Top | ![]() |
![]() |
![]() |
![]() |
WnckScreen * | wnck_workspace_get_screen () |
int | wnck_workspace_get_number () |
const char * | wnck_workspace_get_name () |
void | wnck_workspace_change_name () |
int | wnck_workspace_get_width () |
int | wnck_workspace_get_height () |
int | wnck_workspace_get_viewport_x () |
int | wnck_workspace_get_viewport_y () |
gboolean | wnck_workspace_is_virtual () |
int | wnck_workspace_get_layout_row () |
int | wnck_workspace_get_layout_column () |
WnckWorkspace * | wnck_workspace_get_neighbor () |
void | wnck_workspace_activate () |
The WnckWorkspace represents what is called virtual desktops in the EWMH. A workspace is a virtualization of a WnckScreen: only one workspace can be shown on a WnckScreen at a time. It makes it possible, for example, to put windows on different workspaces to organize them.
If the WnckWorkspace size is bigger that the WnckScreen size, the workspace contains a viewport. Viewports are defined in the large desktops section of the EWMH. The notion of workspaces and viewports are quite similar, and generally both are not used at the same time: there are generally either multiple workspaces with no viewport, or one workspace with a viewport. libwnck supports all situations, even multiple workspaces with viewports.
Workspaces are organized according to a layout set on the WnckScreen. See
wnck_screen_try_set_workspace_layout()
and
wnck_screen_release_workspace_layout()
for more information about the
layout.
The WnckWorkspace objects are always owned by libwnck and must not be referenced or unreferenced.
WnckScreen *
wnck_workspace_get_screen (WnckWorkspace *space
);
Gets the WnckScreen space
is on.
the WnckScreen space
is on. The returned
WnckScreen is owned by libwnck and must not be referenced or unreferenced.
[transfer none]
int
wnck_workspace_get_number (WnckWorkspace *space
);
Gets the index of space
on the WnckScreen to which it belongs. The
first workspace has an index of 0.
const char *
wnck_workspace_get_name (WnckWorkspace *space
);
Gets the human-readable name that should be used to refer to space
. If
the user has not set a special name, a fallback like "Workspace 3" will be
used.
void wnck_workspace_change_name (WnckWorkspace *space
,const char *name
);
Changes the name of space
.
Since: 2.2
int
wnck_workspace_get_width (WnckWorkspace *space
);
Gets the width of space
.
Since: 2.4
int
wnck_workspace_get_height (WnckWorkspace *space
);
Gets the height of space
.
Since: 2.4
int
wnck_workspace_get_viewport_x (WnckWorkspace *space
);
Gets the X coordinate of the viewport in space
.
Since: 2.4
int
wnck_workspace_get_viewport_y (WnckWorkspace *space
);
Gets the Y coordinate of the viewport in space
.
Since: 2.4
gboolean
wnck_workspace_is_virtual (WnckWorkspace *space
);
Gets whether space
contains a viewport.
Since: 2.4
int
wnck_workspace_get_layout_row (WnckWorkspace *space
);
Gets the row of space
in the WnckWorkspace layout. The first row has an
index of 0 and is always the top row, regardless of the starting corner set
for the layout.
Since: 2.20
int
wnck_workspace_get_layout_column (WnckWorkspace *space
);
Gets the column of space
in the WnckWorkspace layout. The first column
has an index of 0 and is always the left column, regardless of the starting
corner set for the layout and regardless of the default direction of the
environment (i.e., in both Left-To-Right and Right-To-Left environments).
Since: 2.20
WnckWorkspace * wnck_workspace_get_neighbor (WnckWorkspace *space
,WnckMotionDirection direction
);
Gets the neighbor WnckWorkspace of space
in the direction
direction.
the neighbor WnckWorkspace of space
in the
direction
direction, or NULL
if no such neighbor WnckWorkspace exists.
The returned WnckWorkspace is owned by libwnck and must not be referenced
or unreferenced.
[transfer none]
Since: 2.20
void wnck_workspace_activate (WnckWorkspace *space
,guint32 timestamp
);
Asks the window manager to make space
the active workspace. The window
manager may decide to refuse the request (to not steal the focus if there is
a more recent user activity, for example).
This function existed before 2.10, but the timestamp
argument was missing
in earlier versions.
space |
||
timestamp |
the X server timestamp of the user interaction event that caused this call to occur. |
Since: 2.10
typedef struct _WnckWorkspace WnckWorkspace;
The WnckWorkspace struct contains only private fields and should not be directly accessed.
Type defining a direction in which to search a neighbor WnckWorkspace.
search a neighbor WnckWorkspace above another WnckWorkspace. |
||
search a neighbor WnckWorkspace below another WnckWorkspace. |
||
search a neighbor WnckWorkspace at the left of another WnckWorkspace. |
||
search a neighbor WnckWorkspace at the right of another WnckWorkspace. |
Since: 2.14
“name-changed”
signalvoid user_function (WnckWorkspace *space, gpointer user_data)
Emitted when the name of space
changes.
space |
the WnckWorkspace which emitted the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last