Gdk.Monitor¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The display of the monitor |
||
r |
The geometry of the monitor |
||
r |
The height of the monitor, in millimeters |
||
r |
The manufacturer name |
||
r |
The model name |
||
r |
The refresh rate, in millihertz |
||
r |
The scale factor |
||
r |
The subpixel layout |
||
r |
The width of the monitor, in millimeters |
||
r |
The workarea of the monitor |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class Gdk.Monitor(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gdk.Monitor
objects represent the individual outputs that are associated with aGdk.Display
.Gdk.Display
has APIs to enumerate monitors withGdk.Display.get_n_monitors
() andGdk.Display.get_monitor
(), and to find particular monitors withGdk.Display.get_primary_monitor
() orGdk.Display.get_monitor_at_window
().Gdk.Monitor
was introduced in GTK+ 3.22 and supersedes earlier APIs inGdk.Screen
to obtain monitor-related information.- get_display()[source]¶
- Returns:
the display
- Return type:
Gets the display that this monitor belongs to.
New in version 3.22.
- get_geometry()[source]¶
- Returns:
a
Gdk.Rectangle
to be filled with the monitor geometry- Return type:
geometry:
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
()).New in version 3.22.
- get_height_mm()[source]¶
- Returns:
the physical height of the monitor
- Return type:
Gets the height in millimeters of the monitor.
New in version 3.22.
- get_manufacturer()[source]¶
-
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
- get_refresh_rate()[source]¶
- Returns:
the refresh rate in milli-Hertz, or 0
- Return type:
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.
New in version 3.22.
- get_scale_factor()[source]¶
- Returns:
the scale factor
- Return type:
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.New in version 3.22.
- get_subpixel_layout()[source]¶
- Returns:
the subpixel layout
- Return type:
Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available.
New in version 3.22.
- get_width_mm()[source]¶
- Returns:
the physical width of the monitor
- Return type:
Gets the width in millimeters of the monitor.
New in version 3.22.
- get_workarea()[source]¶
- Returns:
a
Gdk.Rectangle
to be filled with the monitor workarea- Return type:
workarea:
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.
New in version 3.22.
- is_primary()[source]¶
-
Gets whether this monitor should be considered primary (see
Gdk.Display.get_primary_monitor
()).New in version 3.22.
Signal Details¶
- Gdk.Monitor.signals.invalidate(monitor)¶
- Signal Name:
invalidate
- Flags:
- Parameters:
monitor (
Gdk.Monitor
) – The object which received the signal
Property Details¶
- Gdk.Monitor.props.display¶
- Name:
display
- Type:
- Default Value:
- Flags:
The display of the monitor
- Gdk.Monitor.props.geometry¶
- Name:
geometry
- Type:
- Default Value:
- Flags:
The geometry of the monitor
- Gdk.Monitor.props.height_mm¶
-
The height of the monitor, in millimeters
- Gdk.Monitor.props.manufacturer¶
-
The manufacturer name
- Gdk.Monitor.props.refresh_rate¶
-
The refresh rate, in millihertz
- Gdk.Monitor.props.scale_factor¶
-
The scale factor
- Gdk.Monitor.props.subpixel_layout¶
- Name:
subpixel-layout
- Type:
- Default Value:
- Flags:
The subpixel layout
- Gdk.Monitor.props.width_mm¶
-
The width of the monitor, in millimeters
- Gdk.Monitor.props.workarea¶
- Name:
workarea
- Type:
- Default Value:
- Flags:
The workarea of the monitor