gdk.monitor
Module for [MonitorWrap] class
Types 3
GdkMonitor objects represent the individual outputs that are associated with a #GdkDisplay. GdkDisplay has APIs to enumerate monitors with [gdk.display.Display.getNMonitors] and [gdk.display.Display.getMonitor], and to find particular monitors with [gdk.display.Display.getPrimaryMonitor] or [gdk.display.Display.getMonitorAtWindow].
GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier APIs in GdkScreen to obtain monitor-related information.
Methods
MonitorWrap self()Returns `this`, for use in `with` statements.MonitorWrapGidBuilder builder()Get builder for [gdk.monitor.MonitorWrap] Returns: New builder objectgdk.display.Display display() @propertygdk.rectangle.Rectangle geometry() @propertyint heightMm() @propertystring manufacturer() @propertystring model() @propertyint refreshRate() @propertyint scaleFactor() @propertygdk.types.SubpixelLayout subpixelLayout() @propertyint widthMm() @propertygdk.rectangle.Rectangle workarea() @propertygdk.display.Display getDisplay()Gets the display that this monitor belongs to. Returns: the displayvoid getGeometry(out gdk.rectangle.Rectangle geometry)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.Mon...int getHeightMm()Gets the height in millimeters of the monitor. Returns: the physical height of the monitorstring getManufacturer()Gets the name or PNP ID of the monitor's manufacturer, if available.string getModel()Gets the a string identifying the monitor model, if available. Returns: the monitor model, or nullint getRefreshRate()Gets the refresh rate of the monitor, if available.int getScaleFactor()Gets 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).gdk.types.SubpixelLayout getSubpixelLayout()Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available. Returns: the subpixel layoutint getWidthMm()Gets the width in millimeters of the monitor. Returns: the physical width of the monitorvoid getWorkarea(out gdk.rectangle.Rectangle workarea)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.m...bool isPrimary()Gets whether this monitor should be considered primary (see [gdk.display.Display.getPrimaryMonitor]). Returns: true if monitor is primarygulong connectInvalidate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.monitor.MonitorWrap)))
&& Parameters!T.length < 2)Connect to `Invalidate` signal.Methods
T display(gdk.display.Display propval)Fluent builder for [gdk.monitor.MonitorWrap]
Methods