MonitorProtocol
public protocol MonitorProtocol : ObjectProtocol
The MonitorProtocol protocol exposes the methods and properties of an underlying GdkMonitor instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see Monitor.
Alternatively, use MonitorRef as a lighweight, unowned reference if you already have an instance you just want to use.
GdkMonitor objects represent the individual outputs that are
associated with a GdkDisplay. GdkDisplay has APIs to enumerate
monitors with gdk_display_get_n_monitors() and gdk_display_get_monitor(), and
to find particular monitors with gdk_display_get_primary_monitor() or
gdk_display_get_monitor_at_window().
GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier APIs in GdkScreen to obtain monitor-related information.
-
Untyped pointer to the underlying
GdkMonitorinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
monitor_ptrDefault implementationTyped pointer to the underlying
GdkMonitorinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GdkMonitorinstance.Declaration
Swift
var monitor_ptr: UnsafeMutablePointer<GdkMonitor>! { get } -
Required Initialiser for types conforming to
MonitorProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
MonitorPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: MonitorPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a Monitor property
Declaration
Swift
@inlinable func get(property: MonitorPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a Monitor property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: MonitorPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
MonitorSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: MonitorSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
MonitorSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: MonitorSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onInvalidate(flags:Extension methodhandler: ) Note
This represents the underlyinginvalidatesignalDeclaration
Swift
@discardableResult @inlinable func onInvalidate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
invalidatesignal is emitted -
invalidateSignalExtension methodTyped
invalidatesignal for using theconnect(signal:)methodsDeclaration
Swift
static var invalidateSignal: MonitorSignalName { get } -
onNotifyDisplay(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::displaysignalDeclaration
Swift
@discardableResult @inlinable func onNotifyDisplay(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyDisplaysignal is emitted -
notifyDisplaySignalExtension methodTyped
notify::displaysignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyDisplaySignal: MonitorSignalName { get } -
onNotifyGeometry(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::geometrysignalDeclaration
Swift
@discardableResult @inlinable func onNotifyGeometry(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyGeometrysignal is emitted -
notifyGeometrySignalExtension methodTyped
notify::geometrysignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyGeometrySignal: MonitorSignalName { get } -
onNotifyHeightMm(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::height-mmsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHeightMm(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHeightMmsignal is emitted -
notifyHeightMmSignalExtension methodTyped
notify::height-mmsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHeightMmSignal: MonitorSignalName { get } -
onNotifyManufacturer(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::manufacturersignalDeclaration
Swift
@discardableResult @inlinable func onNotifyManufacturer(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyManufacturersignal is emitted -
notifyManufacturerSignalExtension methodTyped
notify::manufacturersignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyManufacturerSignal: MonitorSignalName { get } -
onNotifyModel(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::modelsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyModelsignal is emitted -
notifyModelSignalExtension methodTyped
notify::modelsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyModelSignal: MonitorSignalName { get } -
onNotifyRefreshRate(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::refresh-ratesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyRefreshRate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyRefreshRatesignal is emitted -
notifyRefreshRateSignalExtension methodTyped
notify::refresh-ratesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyRefreshRateSignal: MonitorSignalName { get } -
onNotifyScaleFactor(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::scale-factorsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyScaleFactor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyScaleFactorsignal is emitted -
notifyScaleFactorSignalExtension methodTyped
notify::scale-factorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyScaleFactorSignal: MonitorSignalName { get } -
onNotifySubpixelLayout(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::subpixel-layoutsignalDeclaration
Swift
@discardableResult @inlinable func onNotifySubpixelLayout(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySubpixelLayoutsignal is emitted -
notifySubpixelLayoutSignalExtension methodTyped
notify::subpixel-layoutsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySubpixelLayoutSignal: MonitorSignalName { get } -
onNotifyWidthMm(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::width-mmsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWidthMm(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWidthMmsignal is emitted -
notifyWidthMmSignalExtension methodTyped
notify::width-mmsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWidthMmSignal: MonitorSignalName { get } -
onNotifyWorkarea(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this: (C Language Example):g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::workareasignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWorkarea(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: MonitorRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWorkareasignal is emitted -
notifyWorkareaSignalExtension methodTyped
notify::workareasignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWorkareaSignal: MonitorSignalName { get }
-
getDisplay()Extension methodGets the display that this monitor belongs to.
Declaration
Swift
@inlinable func getDisplay() -> DisplayRef! -
get(geometry:Extension method) Retrieves the size and position of an individual monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see
gdk_monitor_get_scale_factor()).Declaration
Swift
@inlinable func get<RectangleT>(geometry: RectangleT) where RectangleT : RectangleProtocol -
getHeightMm()Extension methodGets the height in millimeters of the monitor.
Declaration
Swift
@inlinable func getHeightMm() -> Int -
getManufacturer()Extension methodGets the name or PNP ID of the monitor’s manufacturer, if available.
Note that this value might also vary depending on actual display backend.
PNP ID registry is located at https://uefi.org/pnp_id_list
Declaration
Swift
@inlinable func getManufacturer() -> String! -
getModel()Extension methodGets the a string identifying the monitor model, if available.
Declaration
Swift
@inlinable func getModel() -> String! -
getRefreshRate()Extension methodGets the refresh rate of the monitor, if available.
The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.
Declaration
Swift
@inlinable func getRefreshRate() -> Int -
getScaleFactor()Extension methodGets the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).
This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use
gdk_window_get_scale_factor()instead.Declaration
Swift
@inlinable func getScaleFactor() -> Int -
getSubpixelLayout()Extension methodGets information about the layout of red, green and blue primaries for each pixel in this monitor, if available.
Declaration
Swift
@inlinable func getSubpixelLayout() -> GdkSubpixelLayout -
getWidthMm()Extension methodGets the width in millimeters of the monitor.
Declaration
Swift
@inlinable func getWidthMm() -> Int -
get(workarea:Extension method) Retrieves the size and position of the “work area” on a monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see
gdk_monitor_get_scale_factor()).The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components.
Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply.
Declaration
Swift
@inlinable func get<RectangleT>(workarea: RectangleT) where RectangleT : RectangleProtocol -
displayExtension methodUndocumented
Declaration
Swift
@inlinable var display: DisplayRef! { get } -
heightMmExtension methodGets the height in millimeters of the monitor.
Declaration
Swift
@inlinable var heightMm: Int { get } -
isPrimaryExtension methodGets whether this monitor should be considered primary (see
gdk_display_get_primary_monitor()).Declaration
Swift
@inlinable var isPrimary: Bool { get } -
manufacturerExtension methodUndocumented
Declaration
Swift
@inlinable var manufacturer: String! { get } -
modelExtension methodUndocumented
Declaration
Swift
@inlinable var model: String! { get } -
refreshRateExtension methodGets the refresh rate of the monitor, if available.
The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.
Declaration
Swift
@inlinable var refreshRate: Int { get } -
scaleFactorExtension methodGets the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).
This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use
gdk_window_get_scale_factor()instead.Declaration
Swift
@inlinable var scaleFactor: Int { get } -
subpixelLayoutExtension methodGets information about the layout of red, green and blue primaries for each pixel in this monitor, if available.
Declaration
Swift
@inlinable var subpixelLayout: GdkSubpixelLayout { get } -
widthMmExtension methodGets the width in millimeters of the monitor.
Declaration
Swift
@inlinable var widthMm: Int { get }
View on GitHub
Install in Dash
MonitorProtocol Protocol Reference