Monitor
Superclasses: Object
GdkMonitor
objects represent the individual outputs that are
associated with a GdkDisplay
.
GdkDisplay
keeps a GListModel
to enumerate and monitor
monitors with get_monitors
. You can use
get_monitor_at_surface
to find a particular
monitor.
Methods
- class Monitor
- get_connector() str | None
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.
- get_description() str | None
Gets a string describing the monitor, if available.
This can be used to identify a monitor in the UI.
Added in version 4.10.
- get_geometry() 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
get_scale
).
- get_manufacturer() str | None
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.
- get_refresh_rate() int
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.
- get_scale() float
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
get_scale
instead.Added in version 4.14.
- get_scale_factor() int
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
get_scale_factor
instead.
- get_subpixel_layout() SubpixelLayout
Gets information about the layout of red, green and blue primaries for pixels.