Libxfce4windowing.Monitor

g GObject.Object GObject.Object Libxfce4windowing.Monitor Libxfce4windowing.Monitor GObject.Object->Libxfce4windowing.Monitor

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_connector ()

get_description ()

get_fractional_scale ()

get_gdk_monitor ()

get_identifier ()

get_logical_geometry ()

get_make ()

get_model ()

get_physical_geometry ()

get_physical_size ()

get_refresh ()

get_scale ()

get_serial ()

get_subpixel ()

get_transform ()

get_workarea ()

is_primary ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

connector

str

r

Physical/virtual connector name

description

str

r

Human-readable description

fractional-scale

float

r

UI fractional scaling factor

gdk-monitor

Gdk.Monitor

r

Monitor’s Gdk.Monitor

height-mm

int

r

Physical height of the monitor in millimeters

identifier

str

r

Opaque, hopefully-unique monitor identifier

is-primary

bool

r

If this is the primary monitor

logical-geometry

Gdk.Rectangle

r

Coordinates and size of the monitor in scaled logical pixels

make

str

r

Manufacturer name

model

str

r

Product model name

physical-geometry

Gdk.Rectangle

r

Coordinates and size of the monitor in physical device pixels

refresh

int

r

Current refresh rate, in millihertz

scale

int

r

UI scaling factor

serial

str

r

Product serial number

subpixel

Libxfce4windowing.MonitorSubpixel

r

Hardware subpixel layout

transform

Libxfce4windowing.MonitorTransform

r

Rotation and reflection of the monitor’s contents

width-mm

int

r

Physical width of the monitor in millimeters

workarea

Gdk.Rectangle

r

Monitor workarea in scaled logical pixels

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Libxfce4windowing.Monitor(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Libxfce4windowing.MonitorClass

get_connector()
Returns:

A string owned by self.

Return type:

str

Returns the name of the physical connector this monitor is connected to.

This might be a string such as “eDP-1”, “DP-3”, or “HDMI-2”. Note that in environments where the monitor is “virtual”, a synthetic connector name may be returned.

Added in version 4.19.4.

get_description()
Returns:

A string owned by self.

Return type:

str

Returns a human-readable description of this monitor, suitable for displaying in a user interface.

Added in version 4.19.4.

get_fractional_scale()
Returns:

A positive fractional scale.

Return type:

float

Returns the monitor’s scaling factor.

Added in version 4.19.4.

get_gdk_monitor()
Returns:

A Gdk.Monitor.

Return type:

Gdk.Monitor

Returns the Gdk.Monitor that corresponds to self.

Added in version 4.19.4.

get_identifier()
Returns:

A string owned by self.

Return type:

str

Retrieves an opaque identifier for this monitor. The identifier can usually be relied upon to uniquely identify this monitor (even if you have multiple identical monitors of the same make and model), assuming the monitor’s hardware is set up properly.

This identifier should also be stable across application and machine restarts.

If the monitor’s hardware is not set up properly, the identifier may not be unique. Unfortunately, this library cannot determine when this is the case.

Added in version 4.19.4.

get_logical_geometry()
Returns:

a Gdk.Rectangle.

Return type:

logical_geometry: Gdk.Rectangle

Retrieves the position and size of the monitor in logical application pixels, which are affected by the monitor’s fractional scale factor.

Added in version 4.19.4.

get_make()
Returns:

A string owned by self, or None.

Return type:

str or None

Returns the monitor’s manufacturer’s name, if available.

Added in version 4.19.4.

get_model()
Returns:

A string owned by self, or None.

Return type:

str or None

Returns the monitor’s product model name, if available.

Added in version 4.19.4.

get_physical_geometry()
Returns:

a Gdk.Rectangle.

Return type:

physical_geometry: Gdk.Rectangle

Retrieves the position and size of the monitor in physical device pixels.

Added in version 4.19.4.

get_physical_size()
Returns:

width_mm:

an unsigned integer.

height_mm:

an unsigned integer.

Return type:

(width_mm: int, height_mm: int)

Retrieves the physical width and height of the monitor in millimeters.

Added in version 4.19.4.

get_refresh()
Returns:

A non-negative integer in mHz.

Return type:

int

Returns the monitor’s current refresh rate, in millihertz.

Added in version 4.19.4.

get_scale()
Returns:

A positive integer scale.

Return type:

int

Returns the monitor’s scaling factor, as an integer.

Added in version 4.19.4.

get_serial()
Returns:

A string owned by self, or None.

Return type:

str or None

Returns the monitor’s serial number, if available. Note that some manufacturers do not program their monitor’s hardware with unique serial numbers.

Added in version 4.19.4.

get_subpixel()
Returns:

A value from the Libxfce4windowing.MonitorSubpixel enum.

Return type:

Libxfce4windowing.MonitorSubpixel

Returns the subpixel ordering of self.

Added in version 4.19.4.

get_transform()
Returns:

A value from the Libxfce4windowing.MonitorTransform enum.

Return type:

Libxfce4windowing.MonitorTransform

Returns the rotation and reflection transform set on self.

Added in version 4.19.4.

get_workarea()
Returns:

a Gdk.Rectangle.

Return type:

workarea: Gdk.Rectangle

Retrieves the workarea for self, which may exclude regions of the screen for windows such as panels or docks.

The returned geometry is in logical application pixels, which are affected by the monitor’s integer scale factor. The origin is set to the top-left corner of the monitor.

Added in version 4.19.4.

is_primary()
Returns:

True or False.

Return type:

bool

Returns whether or not self has been designated as the primary monitor.

Added in version 4.19.4.

Property Details

Libxfce4windowing.Monitor.props.connector
Name:

connector

Type:

str

Default Value:

None

Flags:

READABLE

Physical/virtual connector name.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE

Human-readable description.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.fractional_scale
Name:

fractional-scale

Type:

float

Default Value:

1.0

Flags:

READABLE

UI fractional scaling factor.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.gdk_monitor
Name:

gdk-monitor

Type:

Gdk.Monitor

Default Value:

None

Flags:

READABLE

The Gdk.Monitor corresponding to this monitor.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.height_mm
Name:

height-mm

Type:

int

Default Value:

0

Flags:

READABLE

Physical height of the monitor in millimeters.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.identifier
Name:

identifier

Type:

str

Default Value:

None

Flags:

READABLE

Opaque, hopefully-unique monitor identifier.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.is_primary
Name:

is-primary

Type:

bool

Default Value:

False

Flags:

READABLE

Whether or not this monitor is the primary monitor.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.logical_geometry
Name:

logical-geometry

Type:

Gdk.Rectangle

Default Value:

None

Flags:

READABLE

Coordinates and size of the monitor in scaled logical pixels.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.make
Name:

make

Type:

str

Default Value:

None

Flags:

READABLE

Manufacturer name.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.model
Name:

model

Type:

str

Default Value:

None

Flags:

READABLE

Product model name.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.physical_geometry
Name:

physical-geometry

Type:

Gdk.Rectangle

Default Value:

None

Flags:

READABLE

Coordinates and size of the monitor in physical device pixels.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.refresh
Name:

refresh

Type:

int

Default Value:

60000

Flags:

READABLE

Current refresh rate, in millihertz.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.scale
Name:

scale

Type:

int

Default Value:

1

Flags:

READABLE

UI scaling factor.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.serial
Name:

serial

Type:

str

Default Value:

None

Flags:

READABLE

Product serial number.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.subpixel
Name:

subpixel

Type:

Libxfce4windowing.MonitorSubpixel

Default Value:

Libxfce4windowing.MonitorSubpixel.UNKNOWN

Flags:

READABLE

Hardware subpixel layout.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.transform
Name:

transform

Type:

Libxfce4windowing.MonitorTransform

Default Value:

Libxfce4windowing.MonitorTransform.NORMAL

Flags:

READABLE

Rotation and reflection of the monitor’s contents

Libxfce4windowing.Monitor.props.width_mm
Name:

width-mm

Type:

int

Default Value:

0

Flags:

READABLE

Physical width of the monitor in millimeters.

Added in version 4.19.4.

Libxfce4windowing.Monitor.props.workarea
Name:

workarea

Type:

Gdk.Rectangle

Default Value:

None

Flags:

READABLE

Monitor workarea in scaled logical pixels