GdkMonitor objects represent the individual outputs that are associated with a Gdk.Display.Gdk_Display. 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.
type Cb_Gdk_Monitor_Void is not null access procedure (Self : access Gdk_Monitor_Record'Class);
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
Display_Property : constant Glib.Properties.Property_Boxed;
Type: Display
type Gdk_Monitor is access all Gdk_Monitor_Record'Class;
type Gdk_Monitor_Record is new GObject_Record with null record;
type Gdk_Subpixel_Layout is (
Gdk_Subpixel_Layout_Unknown,
Gdk_Subpixel_Layout_None,
Gdk_Subpixel_Layout_Horizontal_Rgb,
Gdk_Subpixel_Layout_Horizontal_Bgr,
Gdk_Subpixel_Layout_Vertical_Rgb,
Gdk_Subpixel_Layout_Vertical_Bgr);
This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.
package Gdk_Subpixel_Layout_Properties is
new Generic_Internal_Discrete_Property (Gdk_Subpixel_Layout);
Geometry_Property : constant Glib.Properties.Property_Boxed;
Type: Rectangle
function Get_Display
(Self : not null access Gdk_Monitor_Record) return Glib.Object.GObject
Gets the display that this monitor belongs to. Since: gtk+ 3.22
procedure Get_Geometry
(Self : not null access Gdk_Monitor_Record;
Geometry : out Gdk.Rectangle.Gdk_Rectangle)
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). Since: gtk+ 3.22
a Gdk.Rectangle.Gdk_Rectangle to be filled with the monitor geometry
function Get_Height_Mm
(Self : not null access Gdk_Monitor_Record) return Glib.Gint
Gets the height in millimeters of the monitor. Since: gtk+ 3.22
the physical height of the monitor
function Get_Manufacturer
(Self : not null access Gdk_Monitor_Record) return UTF8_String
Gets 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
the name of the manufacturer, or null
function Get_Model
(Self : not null access Gdk_Monitor_Record) return UTF8_String
Gets the a string identifying the monitor model, if available.
the monitor model, or null
function Get_Refresh_Rate
(Self : not null access Gdk_Monitor_Record) return Glib.Gint
Gets the refresh rate of the monitor, if available. The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000. Since: gtk+ 3.22
the refresh rate in milli-Hertz, or 0
function Get_Scale_Factor
(Self : not null access Gdk_Monitor_Record) return Glib.Gint
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). 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. Since: gtk+ 3.22
the scale factor
function Get_Subpixel_Layout
(Self : not null access Gdk_Monitor_Record) return Gdk_Subpixel_Layout
Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available. Since: gtk+ 3.22
the subpixel layout
function Get_Type return Glib.GType
function Get_Width_Mm
(Self : not null access Gdk_Monitor_Record) return Glib.Gint
Gets the width in millimeters of the monitor. Since: gtk+ 3.22
the physical width of the monitor
procedure Get_Workarea
(Self : not null access Gdk_Monitor_Record;
Workarea : out Gdk.Rectangle.Gdk_Rectangle)
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. Since: gtk+ 3.22
a Gdk.Rectangle.Gdk_Rectangle to be filled with the monitor workarea
Height_Mm_Property : constant Glib.Properties.Property_Int;
function Is_Primary
(Self : not null access Gdk_Monitor_Record) return Boolean
Gets whether this monitor should be considered primary (see Gdk.Display.Get_Primary_Monitor). Since: gtk+ 3.22
True if Monitor is primary
Manufacturer_Property : constant Glib.Properties.Property_String;
Model_Property : constant Glib.Properties.Property_String;
procedure On_Invalidate
(Self : not null access Gdk_Monitor_Record;
Call : Cb_Gdk_Monitor_Void;
After : Boolean := False)
procedure On_Invalidate
(Self : not null access Gdk_Monitor_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
type Property_Gdk_Subpixel_Layout is new Gdk_Subpixel_Layout_Properties.Property;
Refresh_Rate_Property : constant Glib.Properties.Property_Int;
Scale_Factor_Property : constant Glib.Properties.Property_Int;
Signal_Invalidate : constant Glib.Signal_Name := "invalidate";
Subpixel_Layout_Property : constant Glib.Properties.Property_Boxed;
Type: Subpixel_Layout
Width_Mm_Property : constant Glib.Properties.Property_Int;
Workarea_Property : constant Glib.Properties.Property_Boxed;
Type: Rectangle