Top | ![]() |
![]() |
![]() |
![]() |
XfwScreen * | xfw_screen_get_default () |
XfwWorkspaceManager * | xfw_screen_get_workspace_manager () |
GList * | xfw_screen_get_windows () |
GList * | xfw_screen_get_windows_stacked () |
XfwWindow * | xfw_screen_get_active_window () |
gboolean | xfw_screen_get_show_desktop () |
void | xfw_screen_set_show_desktop () |
XfwWindow * | active-window | Read |
GdkScreen * | screen | Read / Write / Construct Only |
gboolean | show-desktop | Read / Write |
XfwWorkspaceManager * | workspace-manager | Read |
void | active-window-changed | Run Last |
void | window-closed | Run Last |
void | window-manager-changed | Run Last |
void | window-opened | Run Last |
void | window-stacking-changed | Run Last |
XfwScreen represents a logical screen. On most windowing environments, this doesn't necessarily correspond to a single monitor, but might span multiple monitors. These days, most windowing environments will only have a single screen, even if (API-wise) more than one can be represented.
The XfwScreen instance is the main entry point into this library. You
can obtain an instance using xfw_screen_get_default()
. From there, you can
enumerate toplevel windows, or examine workspace groups and workspaces.
Note that XfwScreen is actually an interface; when obtaining an instance, an instance of a windowing-environment-specific object that implements this interface will be returned.
XfwScreen *
xfw_screen_get_default (void
);
Retrieves the XfwScreen instance corresponding to the default GdkScreen.
[constructor]
XfwWorkspaceManager *
xfw_screen_get_workspace_manager (XfwScreen *screen
);
Retrieves this screen's XfwWorkspaceManager instance, which can be used
to inspect and interact with screen
's workspace groups and workspaces.
a XfwWorkspaceManager
instance. This instance is a singleton and is owned by screen
.
[not nullable][transfer none]
GList *
xfw_screen_get_windows (XfwScreen *screen
);
Retrieves the list of windows currently displayed on screen
.
The list and its contents are owned by screen
.
the list
of XfwWindow on screen
, or NULL
if there are no windows. The list
and its contents are owned by screen
.
[nullable][element-type XfwWindow][transfer none]
GList *
xfw_screen_get_windows_stacked (XfwScreen *screen
);
Retrieves the list of windows currently displayed on screen
, in stacking
order, with the bottom-most window first in the returned list.
the list
of XfwWindow on screen
, in stacking order, or NULL
if there are no
windows. The list and its contents are owned by screen
.
[nullable][element-type XfwWindow][transfer none]
XfwWindow *
xfw_screen_get_active_window (XfwScreen *screen
);
Retrieves the window on screen
that is currently active.
void xfw_screen_set_show_desktop (XfwScreen *screen
,gboolean show
);
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 “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.
“active-window”
property“active-window” XfwWindow *
The currently-active window.
Owner: XfwScreen
Flags: Read
“screen”
property “screen” GdkScreen *
The GdkScreen instance used to construct this XfwScreen.
Owner: XfwScreen
Flags: Read / Write / Construct Only
“show-desktop”
property “show-desktop” gboolean
Whether or not to show the desktop.
Owner: XfwScreen
Flags: Read / Write
Default value: FALSE
“workspace-manager”
property“workspace-manager” XfwWorkspaceManager *
The XfwWorkspaceManager that manages and describes workspace groups and workspaces on this screen instance.
Owner: XfwScreen
Flags: Read
“active-window-changed”
signalvoid user_function (XfwScreen *screen, XfwWindow *window, gpointer user_data)
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 NULL
), the
newly-active window can be retrieved via
xfw_screen_get_active_window()
.
screen |
the object which received the signal. |
|
window |
the previously-active window. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“window-closed”
signalvoid user_function (XfwScreen *screen, XfwWindow *window, gpointer user_data)
Emitted when a window is closed on the screen.
screen |
the object that received the signal. |
|
window |
the window that has been closed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“window-manager-changed”
signalvoid user_function (XfwScreen *screen, gpointer user_data)
Emitted when the window manager on screen
has changed.
Note that currently this signal is not emitted on Wayland.
screen |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“window-opened”
signalvoid user_function (XfwScreen *screen, XfwWindow *window, gpointer user_data)
Emitted when a new window is opened on the screen.
screen |
the object which received the signal. |
|
window |
the new window that was opened. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“window-stacking-changed”
signalvoid user_function (XfwScreen *screen, gpointer user_data)
Emitted when the order of the windows as displayed on the screen has
changed. Windows, in stacking order, can be retrieved via
xfw_screen_get_windows_stacked()
.
Note that currently this signal is not emitted on Wayland.
screen |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last