Represents the individual outputs that are associated with a GdkDisplay.
GdkDisplay keeps a GListModel to enumerate and monitor monitors with [methodGdk.Display.get_monitors]. You can use [methodGdk.Display.get_monitor_at_surface] to find a particular monitor.
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);
Connector_Property : constant Glib.Properties.Property_String;
The connector name.
Description_Property : constant Glib.Properties.Property_String;
A short description of the monitor, meant for display to the user.
Display_Property : constant Glib.Properties.Property_Boxed;
Type: Display The GdkDisplay of the monitor.
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 The geometry of the monitor.
function Get_Connector
(Self : not null access Gdk_Monitor_Record) return UTF8_String
Gets the name of the monitor's connector, if available. These are strings such as "eDP-1", or "HDMI-2". They depend on software and hardware configuration, and should not be relied on as stable identifiers of a specific monitor.
the name of the connector
function Get_Description
(Self : not null access Gdk_Monitor_Record) return UTF8_String
Gets a string describing the monitor, if available. This can be used to identify a monitor in the UI. Since: gtk+ 4.10
the monitor description
function Get_Display
(Self : not null access Gdk_Monitor_Record) return Gdk.Gdk_Display
Gets the display that this monitor belongs to.
the display. Has transfer-ownership='none'.
procedure Get_Geometry
(Self : not null access Gdk_Monitor_Record;
Geometry : out Gdk.Rectangle.Gdk_Rectangle)
Retrieves the size and position of the monitor within the display coordinate space. The returned geometry is in "application pixels", not in "device pixels" (see [methodGdk.Monitor.get_scale]).
a GdkRectangle 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.
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. Note that this value might also vary depending on actual display backend. The PNP ID registry is located at https://uefi.org/pnp_id_list.
the name of the manufacturer
function Get_Model
(Self : not null access Gdk_Monitor_Record) return UTF8_String
Gets the string identifying the monitor model, if available.
the monitor model
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.
the refresh rate in milli-Hertz, or 0
function Get_Scale
(Self : not null access Gdk_Monitor_Record) return Gdouble
Gets the internal scale factor that maps from monitor coordinates to device pixels. 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 surface where it is better to use [methodGdk.Surface.get_scale] instead. Since: gtk+ 4.14
the scale
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 device pixels. On traditional systems this is 1, but on very high density outputs it 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 surface where it is better to use [methodGdk.Surface.get_scale_factor] instead.
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 pixels.
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.
the physical width of the monitor
Height_Mm_Property : constant Glib.Properties.Property_Int;
The height of the monitor, in millimeters.
function Is_Valid
(Self : not null access Gdk_Monitor_Record) return Boolean
Returns True if the Monitor object corresponds to a physical monitor. The Monitor becomes invalid when the physical monitor is unplugged or removed.
True if the object corresponds to a physical monitor
Manufacturer_Property : constant Glib.Properties.Property_String;
The manufacturer name.
Model_Property : constant Glib.Properties.Property_String;
The model name.
procedure On_Invalidate
(Self : not null access Gdk_Monitor_Record;
Call : Cb_Gdk_Monitor_Void;
After : Boolean := False)
Emitted when the output represented by Monitor gets disconnected.
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)
Emitted when the output represented by Monitor gets disconnected.
type Property_Gdk_Subpixel_Layout is new Gdk_Subpixel_Layout_Properties.Property;
Refresh_Rate_Property : constant Glib.Properties.Property_Int;
The refresh rate, in milli-Hertz.
Scale_Factor_Property : constant Glib.Properties.Property_Int;
The scale factor.
The scale factor is the next larger integer, compared to [propertyGdk.Surface:scale].
Scale_Property : constant Glib.Properties.Property_Double;
Type: Gdouble The scale of the monitor.
Signal_Invalidate : constant Glib.Signal_Name := "invalidate";
Emitted when the output represented by Monitor gets disconnected.
Subpixel_Layout_Property : constant Glib.Properties.Property_Boxed;
Type: Subpixel_Layout The subpixel layout.
Valid_Property : constant Glib.Properties.Property_Boolean;
Whether the object is still valid.
Width_Mm_Property : constant Glib.Properties.Property_Int;
The width of the monitor, in millimeters.