// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/class.Monitor.html).
pub type Monitor
///|
pub(open) trait IMonitor {
fn as_monitor(Self) -> Monitor
fn get_connector(Self) -> String? = _
fn get_description(Self) -> String? = _
fn get_display(Self) -> Display = _
fn get_geometry(Self) -> Rectangle = _
fn get_height_mm(Self) -> Int = _
fn get_manufacturer(Self) -> String? = _
fn get_model(Self) -> String? = _
fn get_refresh_rate(Self) -> Int = _
fn get_scale(Self) -> Double = _
fn get_scale_factor(Self) -> Int = _
fn get_subpixel_layout(Self) -> SubpixelLayout = _
fn get_width_mm(Self) -> Int = _
fn is_valid(Self) -> Bool = _
fn connect_invalidate(Self, (Monitor) -> Unit) -> UInt64 = _
}
///|
pub impl IMonitor for Monitor with fn as_monitor(self) {
self
}
///|
#borrow(self_)
extern "c" fn moonbit_gdk_monitor_get_connector(
self_ : Monitor,
) -> @glib.Nullable[Bytes] = "moonbit_gdk_monitor_get_connector"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_connector.html).
pub fn Monitor::get_connector(self : Monitor) -> String? {
let result = moonbit_gdk_monitor_get_connector(self)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
#borrow(self_)
extern "c" fn moonbit_gdk_monitor_get_description(
self_ : Monitor,
) -> @glib.Nullable[Bytes] = "moonbit_gdk_monitor_get_description"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_description.html).
pub fn Monitor::get_description(self : Monitor) -> String? {
let result = moonbit_gdk_monitor_get_description(self)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_display.html).
#borrow(self)
pub extern "c" fn Monitor::get_display(self : Monitor) -> Display = "moonbit_gdk_monitor_get_display"
///|
#borrow(self_)
extern "c" fn moonbit_gdk_monitor_get_geometry(self_ : Monitor) -> Rectangle = "moonbit_gdk_monitor_get_geometry"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_geometry.html).
pub fn Monitor::get_geometry(self : Monitor) -> Rectangle {
let __result = moonbit_gdk_monitor_get_geometry(self)
__result
}
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_height_mm.html).
#borrow(self)
pub extern "c" fn Monitor::get_height_mm(self : Monitor) -> Int = "moonbit_gdk_monitor_get_height_mm"
///|
#borrow(self_)
extern "c" fn moonbit_gdk_monitor_get_manufacturer(
self_ : Monitor,
) -> @glib.Nullable[Bytes] = "moonbit_gdk_monitor_get_manufacturer"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_manufacturer.html).
pub fn Monitor::get_manufacturer(self : Monitor) -> String? {
let result = moonbit_gdk_monitor_get_manufacturer(self)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
#borrow(self_)
extern "c" fn moonbit_gdk_monitor_get_model(
self_ : Monitor,
) -> @glib.Nullable[Bytes] = "moonbit_gdk_monitor_get_model"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_model.html).
pub fn Monitor::get_model(self : Monitor) -> String? {
let result = moonbit_gdk_monitor_get_model(self)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_refresh_rate.html).
#borrow(self)
pub extern "c" fn Monitor::get_refresh_rate(self : Monitor) -> Int = "moonbit_gdk_monitor_get_refresh_rate"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_scale.html).
#borrow(self)
pub extern "c" fn Monitor::get_scale(self : Monitor) -> Double = "moonbit_gdk_monitor_get_scale"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_scale_factor.html).
#borrow(self)
pub extern "c" fn Monitor::get_scale_factor(self : Monitor) -> Int = "moonbit_gdk_monitor_get_scale_factor"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_subpixel_layout.html).
#borrow(self)
pub extern "c" fn Monitor::get_subpixel_layout(
self : Monitor,
) -> SubpixelLayout = "moonbit_gdk_monitor_get_subpixel_layout"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.get_width_mm.html).
#borrow(self)
pub extern "c" fn Monitor::get_width_mm(self : Monitor) -> Int = "moonbit_gdk_monitor_get_width_mm"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/method.Monitor.is_valid.html).
#borrow(self)
pub extern "c" fn Monitor::is_valid(self : Monitor) -> Bool = "moonbit_gdk_monitor_is_valid"
///|
#borrow(instance)
extern "c" fn gdk_monitor_connect_invalidate(
instance : Monitor,
function : FuncRef[(Monitor, (Monitor) -> Unit) -> Unit],
closure : (Monitor) -> Unit,
) -> UInt64 = "moonbit_gdk_monitor_connect_invalidate"
///|
/// [Upstream documentation](https://docs.gtk.org/gdk4/signal.Monitor.invalidate.html).
pub fn Monitor::connect_invalidate(
self : Monitor,
f : (Monitor) -> Unit,
) -> UInt64 {
gdk_monitor_connect_invalidate(self, fn(instance_, f) { f(instance_) }, f)
}
///|
impl IMonitor with fn get_connector(self) -> String? {
self.as_monitor().get_connector()
}
///|
impl IMonitor with fn get_description(self) -> String? {
self.as_monitor().get_description()
}
///|
impl IMonitor with fn get_display(self) -> Display {
self.as_monitor().get_display()
}
///|
impl IMonitor with fn get_geometry(self) -> Rectangle {
self.as_monitor().get_geometry()
}
///|
impl IMonitor with fn get_height_mm(self) -> Int {
self.as_monitor().get_height_mm()
}
///|
impl IMonitor with fn get_manufacturer(self) -> String? {
self.as_monitor().get_manufacturer()
}
///|
impl IMonitor with fn get_model(self) -> String? {
self.as_monitor().get_model()
}
///|
impl IMonitor with fn get_refresh_rate(self) -> Int {
self.as_monitor().get_refresh_rate()
}
///|
impl IMonitor with fn get_scale(self) -> Double {
self.as_monitor().get_scale()
}
///|
impl IMonitor with fn get_scale_factor(self) -> Int {
self.as_monitor().get_scale_factor()
}
///|
impl IMonitor with fn get_subpixel_layout(self) -> SubpixelLayout {
self.as_monitor().get_subpixel_layout()
}
///|
impl IMonitor with fn get_width_mm(self) -> Int {
self.as_monitor().get_width_mm()
}
///|
impl IMonitor with fn is_valid(self) -> Bool {
self.as_monitor().is_valid()
}
///|
impl IMonitor with fn connect_invalidate(self, f) -> UInt64 {
self.as_monitor().connect_invalidate(f)
}
///|
pub fn Monitor::as_gobject_object(self : Monitor) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for Monitor with fn as_object(self) {
self.as_gobject_object()
}