GnomeDesktop.RRScreen¶
- 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 |
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 |
r |
Class Details¶
- class GnomeDesktop.RRScreen(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(screen)¶
- Parameters:
screen (
Gdk.Screen
) – theGdk.Screen
on which to operate- Raises:
- Returns:
a unique
GnomeDesktop.RRScreen
instance, specific to the screen, orNone
if this could not be created, for instance if the driver does not support Xrandr 1.2. EachGdk.Screen
thus has a single instance ofGnomeDesktop.RRScreen
.- Return type:
Creates a unique
GnomeDesktop.RRScreen
instance for the specified screen.
- classmethod new_async(screen, callback, *user_data)¶
- Parameters:
screen (
Gdk.Screen
) –callback (
Gio.AsyncReadyCallback
orNone
) –
- classmethod new_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) –- Raises:
- Return type:
- get_dpms_mode()¶
- Raises:
- Returns:
- mode:
The current
GnomeDesktop.RRDpmsMode
of this screen
- Return type:
(
bool
, mode:GnomeDesktop.RRDpmsMode
)
- get_output_by_name(name)¶
- Parameters:
name (
str
) –- Returns:
the output identified by name
- Return type:
- 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()¶
- Return type:
List available XRandR clone modes
- list_crtcs()¶
- Return type:
List all CRTCs
- list_modes()¶
- Return type:
List available XRandR modes
- list_outputs()¶
- Return type:
List all outputs
- 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 (
GnomeDesktop.RRDpmsMode
) –- Raises:
- Return type:
This method also disables the DPMS timeouts.
- do_changed() virtual¶
- do_output_connected(output) virtual¶
- Parameters:
output (
GnomeDesktop.RROutput
) –
- do_output_disconnected(output) virtual¶
- Parameters:
output (
GnomeDesktop.RROutput
) –
Signal Details¶
- GnomeDesktop.RRScreen.signals.changed(r_r_screen)¶
- Signal Name:
changed
- Flags:
- Parameters:
r_r_screen (
GnomeDesktop.RRScreen
) – The object which received the signal
- GnomeDesktop.RRScreen.signals.output_connected(r_r_screen, output)¶
- Signal Name:
output-connected
- Flags:
- Parameters:
r_r_screen (
GnomeDesktop.RRScreen
) – The object which received the signaloutput (
object
orNone
) – theGnomeDesktop.RROutput
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.
- GnomeDesktop.RRScreen.signals.output_disconnected(r_r_screen, output)¶
- Signal Name:
output-disconnected
- Flags:
- Parameters:
r_r_screen (
GnomeDesktop.RRScreen
) – The object which received the signaloutput (
object
orNone
) – theGnomeDesktop.RROutput
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¶
- GnomeDesktop.RRScreen.props.dpms_mode¶
- Name:
dpms-mode
- Type:
- Default Value:
- Flags:
The DPMS mode for this
GnomeDesktop.RRScreen
- GnomeDesktop.RRScreen.props.gdk_screen¶
- Name:
gdk-screen
- Type:
- Default Value:
- Flags:
The GDK
xlib.Screen
represented by thisGnomeDesktop.RRScreen