GnomeRR.Screen¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gio.AsyncInitable (4), Gio.Initable (2)
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The DPMS mode for this |
||
r/w/co |
The GDK display connection represented by this |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted when a display device is connected to a port, or a port is hotplugged with an active output. |
|
This signal is emitted when a display device is disconnected from a port, or a port output is hot-unplugged. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GnomeRR.Screen(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(display)¶
- Parameters:
display (
Gdk.Display
) – the windowing system connection used to query the display data- Raises:
- Returns:
a unique
GnomeRR.Screen
instance, specific to the screen, orNULL
if this could not be created, for instance if the driver does not support Xrandr 1.2. EachGdk.Display
thus has a single instance ofGnomeRR.Screen
.- Return type:
Creates a unique
GnomeRR.Screen
instance for the specified display.
- classmethod new_async(display, callback, *user_data)¶
- Parameters:
display (
Gdk.Display
) – the windowing system connection used to query the displaycallback (
Gio.AsyncReadyCallback
orNone
) – the function to call when theGnomeRR.Screen
is ready, or on error
Asynchronously creates a new
GnomeRR.Screen
instance.On both success and error, callback will be invoked. You should use
GnomeRR.Screen.new_finish
() to retrieve the newly createdGnomeRR.Screen
instance.
- classmethod new_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – the result of the asynchronous operation- Raises:
- Returns:
the newly created instance; on error, this function will return
NULL
and set the givenGLib.Error
- Return type:
Finishes the asynchronous creation of a new
GnomeRR.Screen
instance.
- get_crtc_by_id(id)¶
- Parameters:
id (
int
) – the identifier of a CRTC- Returns:
the CRTC identified by id
- Return type:
Retrieves the CRTC of the screen using the given identifier.
- get_dpms_mode()¶
- Raises:
- Returns:
- mode:
The current
GnomeRR.DpmsMode
of this screen
- Return type:
(
bool
, mode:GnomeRR.DpmsMode
)
- get_output_by_id(id)¶
- Parameters:
id (
int
) – the identifier of an output- Returns:
the output identified by id
- Return type:
Retrieves the output of a screen using the given identifier.
- get_output_by_name(name)¶
- Parameters:
name (
str
) –- Returns:
the output identified by name
- Return type:
Retrieves the output for the given name.
- get_ranges()¶
- Returns:
- min_width:
the minimum width
- max_width:
the maximum width
- min_height:
the minimum height
- max_height:
the maximum height
- Return type:
(min_width:
int
, max_width:int
, min_height:int
, max_height:int
)
Get the ranges of the screen
- list_clone_modes()¶
- Returns:
the available XRandR clone modes
- Return type:
Lists all available XRandR clone modes.
- list_crtcs()¶
- Returns:
the available CRTCs
- Return type:
List all CRTCs of the given screen.
- list_modes()¶
- Returns:
the available XRandR modes
- Return type:
Lists all available XRandR modes.
- list_outputs()¶
- Returns:
the available outputs
- Return type:
List all outputs of the given screen.
- refresh()¶
- Raises:
- Returns:
True
if the screen’s configuration changed; otherwise, the function returnsFalse
and aNone
error if the configuration didn’t change, orFalse
and a non-None
error if there was an error while refreshing the configuration.- Return type:
Refreshes the screen configuration, and calls the screen’s callback if it exists and if the screen’s configuration changed.
- set_dpms_mode(mode)¶
- Parameters:
mode (
GnomeRR.DpmsMode
) –- Raises:
- Return type:
This method also disables the DPMS timeouts.
- do_changed() virtual¶
- do_output_connected(output) virtual¶
- Parameters:
output (
GnomeRR.Output
) –
- do_output_disconnected(output) virtual¶
- Parameters:
output (
GnomeRR.Output
) –
Signal Details¶
- GnomeRR.Screen.signals.changed(screen)¶
- Signal Name:
changed
- Flags:
- Parameters:
screen (
GnomeRR.Screen
) – The object which received the signal
- GnomeRR.Screen.signals.output_connected(screen, output)¶
- Signal Name:
output-connected
- Flags:
- Parameters:
screen (
GnomeRR.Screen
) – The object which received the signaloutput (
GnomeRR.Output
) – theGnomeRR.Output
that was connected
This signal is emitted when a display device is connected to a port, or a port is hotplugged with an active output. The latter can happen if a laptop is docked, and the dock provides a new active output.
The output value is not a
GObject.Object
. The returned output value can only assume to be valid during the emission of the signal (i.e. within your signal handler only), as it may change later when the screen is modified due to an event from the X server, or due to another place in the application modifying the screen and the output. Therefore, deal with changes to the output right in your signal handler, instead of keeping the output reference for an async or idle function.
- GnomeRR.Screen.signals.output_disconnected(screen, output)¶
- Signal Name:
output-disconnected
- Flags:
- Parameters:
screen (
GnomeRR.Screen
) – The object which received the signaloutput (
GnomeRR.Output
) – theGnomeRR.Output
that was disconnected
This signal is emitted when a display device is disconnected from a port, or a port output is hot-unplugged. The latter can happen if a laptop is undocked, and the dock provided the output.
The output value is not a
GObject.Object
. The returned output value can only assume to be valid during the emission of the signal (i.e. within your signal handler only), as it may change later when the screen is modified due to an event from the X server, or due to another place in the application modifying the screen and the output. Therefore, deal with changes to the output right in your signal handler, instead of keeping the output reference for an async or idle function.
Property Details¶
- GnomeRR.Screen.props.dpms_mode¶
- Name:
dpms-mode
- Type:
- Default Value:
- Flags:
The DPMS mode for this
GnomeRR.Screen
- GnomeRR.Screen.props.gdk_display¶
- Name:
gdk-display
- Type:
- Default Value:
- Flags:
The GDK display connection represented by this
GnomeRR.Screen