Libxfce4windowing.Screen

g GObject.Object GObject.Object Libxfce4windowing.Screen Libxfce4windowing.Screen GObject.Object->Libxfce4windowing.Screen

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_default ()

get_active_window ()

get_monitors ()

get_primary_monitor ()

get_seats ()

get_show_desktop ()

get_windows ()

get_windows_stacked ()

get_workspace_manager ()

set_show_desktop (show)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

active-window

Libxfce4windowing.Window

r

active-window

gdk-screen

Gdk.Screen

r/w/co

Gdk.Screen

show-desktop

bool

r/w/en

show-desktop

workspace-manager

Libxfce4windowing.WorkspaceManager

r

workspace-manager

Signals

Inherited:

GObject.Object (1)

Name

Short Description

active-window-changed

Emitted when a new window becomes the active window.

monitor-added

Emitted when a monitor is added to screen.

monitor-removed

Emitted when a monitor is removed from screen.

monitors-changed

Emitted when one of the following has changed about the monitors attached to screen: * A monitor was added.

seat-added

Emitted when seat has been added to screen.

seat-removed

Emitted when seat has been added to screen.

window-closed

Emitted when a window is closed on the screen.

window-manager-changed

Emitted when the window manager on screen has changed.

window-opened

Emitted when a new window is opened on the screen.

window-stacking-changed

Emitted when the order of the windows as displayed on the screen has changed.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Libxfce4windowing.Screen(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Libxfce4windowing.ScreenClass

classmethod get_default()
Returns:

an Libxfce4windowing.Screen instance, with a reference owned by the caller.

Return type:

Libxfce4windowing.Screen

Retrieves the Libxfce4windowing.Screen instance corresponding to the default Gdk.Screen.

get_active_window()
Returns:

an Libxfce4windowing.Window, or None if no window is active on self.

Return type:

Libxfce4windowing.Window or None

Retrieves the window on self that is currently active.

get_monitors()
Returns:

the list of Libxfce4windowing.Monitor on self, or None if there are no connected/enabled monitors. The list and its contents are owned by self.

Return type:

[Libxfce4windowing.Monitor] or None

Retrieves the list of monitors currently attached and enabled on self.

New in version 4.19.4.

get_primary_monitor()
Returns:

self's primary Libxfce4windowing.Monitor, or None.

Return type:

Libxfce4windowing.Monitor or None

Returns the monitor designated as “primary”.

This function will do its best to return something other than None. If the windowing system has no concept of a primary monitor, or if the primary monitor is unset, a likely candidate will be chosen from the list of available monitors.

However, if no monitors are connected, None can still be returned.

New in version 4.19.4.

get_seats()
Returns:

a list of Libxfce4windowing.Seat. The list and its contents are owned by self.

Return type:

[Libxfce4windowing.Seat] or None

Returns the list of all Libxfce4windowing.Seat instances available on self.

get_show_desktop()
Returns:

True if the desktop is shown, False otherwise.

Return type:

bool

get_windows()
Returns:

the list of Libxfce4windowing.Window on self, or None if there are no windows. The list and its contents are owned by self.

Return type:

[Libxfce4windowing.Window] or None

Retrieves the list of windows currently displayed on self.

The list and its contents are owned by self.

get_windows_stacked()
Returns:

the list of Libxfce4windowing.Window on self, in stacking order, or None if there are no windows. The list and its contents are owned by self.

Return type:

[Libxfce4windowing.Window] or None

Retrieves the list of windows currently displayed on self, in stacking order, with the bottom-most window first in the returned list.

get_workspace_manager()
Returns:

a Libxfce4windowing.WorkspaceManager instance. This instance is a singleton and is owned by self.

Return type:

Libxfce4windowing.WorkspaceManager

Retrieves this screen’s Libxfce4windowing.WorkspaceManager instance, which can be used to inspect and interact with self's workspace groups and workspaces.

set_show_desktop(show)
Parameters:

show (bool) – True to show the desktop, False to restore the previous state.

Showing the desktop minimizes the windows not minimized at the time of the query. The reverse process unminimizes those same windows, if they have not already been unminimized or destroyed. The desktop show state can be tracked via Libxfce4windowing.Screen :show-desktop.

The state of the previously active window is always restored upon unminimization, but there is no guarantee for the rest of the window stacking order on Wayland.

A request to switch to the current state is silently ignored.

Signal Details

Libxfce4windowing.Screen.signals.active_window_changed(screen, window)
Signal Name:

active-window-changed

Flags:

RUN_LAST

Parameters:

Emitted when a new window becomes the active window. Often the active window will receive keyboard focus. While window is the previously-active window (if any, and may be None), the newly-active window can be retrieved via Libxfce4windowing.Screen.get_active_window().

Libxfce4windowing.Screen.signals.monitor_added(screen, monitor)
Signal Name:

monitor-added

Flags:

RUN_LAST

Parameters:

Emitted when a monitor is added to screen.

New in version 4.19.4.

Libxfce4windowing.Screen.signals.monitor_removed(screen, monitor)
Signal Name:

monitor-removed

Flags:

RUN_LAST

Parameters:

Emitted when a monitor is removed from screen.

New in version 4.19.4.

Libxfce4windowing.Screen.signals.monitors_changed(screen)
Signal Name:

monitors-changed

Flags:

RUN_LAST

Parameters:

screen (Libxfce4windowing.Screen) – The object which received the signal

Emitted when one of the following has changed about the monitors attached to screen:

  • A monitor was added.

  • A monitor was removed.

  • A monitor’s resolution changed (including if the scale factor changed).

  • A monitor was re-positioned in the global screen space.

  • Which monitor is primary has changed.

Note that changes such as the subpixel layout or model name will not result in the emission of this signal. Connect to the propert notify signals on Libxfce4windowing.Monitor to be notified of changes in other aspects of the monitor.

New in version 4.19.4.

Libxfce4windowing.Screen.signals.seat_added(screen, seat)
Signal Name:

seat-added

Flags:

RUN_LAST

Parameters:

Emitted when seat has been added to screen.

Libxfce4windowing.Screen.signals.seat_removed(screen, seat)
Signal Name:

seat-removed

Flags:

RUN_LAST

Parameters:

Emitted when seat has been added to screen.

Libxfce4windowing.Screen.signals.window_closed(screen, window)
Signal Name:

window-closed

Flags:

RUN_LAST

Parameters:

Emitted when a window is closed on the screen.

Libxfce4windowing.Screen.signals.window_manager_changed(screen)
Signal Name:

window-manager-changed

Flags:

RUN_LAST

Parameters:

screen (Libxfce4windowing.Screen) – The object which received the signal

Emitted when the window manager on screen has changed.

Note that currently this signal is not emitted on Wayland.

Libxfce4windowing.Screen.signals.window_opened(screen, window)
Signal Name:

window-opened

Flags:

RUN_LAST

Parameters:

Emitted when a new window is opened on the screen.

Libxfce4windowing.Screen.signals.window_stacking_changed(screen)
Signal Name:

window-stacking-changed

Flags:

RUN_LAST

Parameters:

screen (Libxfce4windowing.Screen) – The object which received the signal

Emitted when the order of the windows as displayed on the screen has changed. Windows, in stacking order, can be retrieved via Libxfce4windowing.Screen.get_windows_stacked().

Note that currently this signal is not emitted on Wayland.

Property Details

Libxfce4windowing.Screen.props.active_window
Name:

active-window

Type:

Libxfce4windowing.Window

Default Value:

None

Flags:

READABLE

The currently-active window.

Libxfce4windowing.Screen.props.gdk_screen
Name:

gdk-screen

Type:

Gdk.Screen

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gdk.Screen instance used to construct this Libxfce4windowing.Screen.

Libxfce4windowing.Screen.props.show_desktop
Name:

show-desktop

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether or not to show the desktop.

Libxfce4windowing.Screen.props.workspace_manager
Name:

workspace-manager

Type:

Libxfce4windowing.WorkspaceManager

Default Value:

None

Flags:

READABLE

The Libxfce4windowing.WorkspaceManager that manages and describes workspace groups and workspaces on this screen instance.