Gdk.Monitor

Entities

Simple Types

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

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.

Cb_Gdk_Monitor_Void

type Cb_Gdk_Monitor_Void is not null access procedure (Self : access Gdk_Monitor_Record'Class);
Parameters
Self

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Display_Property

Display_Property : constant Glib.Properties.Property_Boxed;

Type: Display

Gdk_Monitor

type Gdk_Monitor is access all Gdk_Monitor_Record'Class;

Gdk_Monitor_Record

type Gdk_Monitor_Record is new GObject_Record with null record;

Gdk_Subpixel_Layout

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.

Enumeration Literal
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

Gdk_Subpixel_Layout_Properties

package Gdk_Subpixel_Layout_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Subpixel_Layout);

Geometry_Property

Geometry_Property : constant Glib.Properties.Property_Boxed;

Type: Rectangle

Get_Display

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

Parameters
Self
Return Value

Get_Geometry

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

Parameters
Self
Geometry

a Gdk.Rectangle.Gdk_Rectangle to be filled with the monitor geometry

Get_Height_Mm

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

Parameters
Self
Return Value

the physical height of the monitor

Get_Manufacturer

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

Parameters
Self
Return Value

the name of the manufacturer, or null

Get_Model

function Get_Model
   (Self : not null access Gdk_Monitor_Record) return UTF8_String

Gets the a string identifying the monitor model, if available.

Parameters
Self
Return Value

the monitor model, or null

Get_Refresh_Rate

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

Parameters
Self
Return Value

the refresh rate in milli-Hertz, or 0

Get_Scale_Factor

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

Parameters
Self
Return Value

the scale factor

Get_Subpixel_Layout

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

Parameters
Self
Return Value

the subpixel layout

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Width_Mm

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

Parameters
Self
Return Value

the physical width of the monitor

Get_Workarea

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

Parameters
Self
Workarea

a Gdk.Rectangle.Gdk_Rectangle to be filled with the monitor workarea

Height_Mm_Property

Height_Mm_Property : constant Glib.Properties.Property_Int;

Is_Primary

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

Parameters
Self
Return Value

True if Monitor is primary

Manufacturer_Property

Manufacturer_Property : constant Glib.Properties.Property_String;

Model_Property

Model_Property : constant Glib.Properties.Property_String;

On_Invalidate

procedure On_Invalidate
   (Self  : not null access Gdk_Monitor_Record;
    Call  : Cb_Gdk_Monitor_Void;
    After : Boolean := False)
Parameters
Self
Call
After

On_Invalidate

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)
Parameters
Self
Call
Slot
After

Property_Gdk_Subpixel_Layout

type Property_Gdk_Subpixel_Layout is new Gdk_Subpixel_Layout_Properties.Property;

Refresh_Rate_Property

Refresh_Rate_Property : constant Glib.Properties.Property_Int;

Scale_Factor_Property

Scale_Factor_Property : constant Glib.Properties.Property_Int;

Signal_Invalidate

Signal_Invalidate : constant Glib.Signal_Name := "invalidate";

Subpixel_Layout_Property

Subpixel_Layout_Property : constant Glib.Properties.Property_Boxed;

Type: Subpixel_Layout

Width_Mm_Property

Width_Mm_Property : constant Glib.Properties.Property_Int;

Workarea_Property

Workarea_Property : constant Glib.Properties.Property_Boxed;

Type: Rectangle