Top |
const gchar * | xfw_workspace_get_id () |
const gchar * | xfw_workspace_get_name () |
XfwWorkspaceCapabilities | xfw_workspace_get_capabilities () |
XfwWorkspaceState | xfw_workspace_get_state () |
guint | xfw_workspace_get_number () |
struct _XfwWorkspaceGroup * | xfw_workspace_get_workspace_group () |
gint | xfw_workspace_get_layout_row () |
gint | xfw_workspace_get_layout_column () |
XfwWorkspace * | xfw_workspace_get_neighbor () |
GdkRectangle * | xfw_workspace_get_geometry () |
gboolean | xfw_workspace_activate () |
gboolean | xfw_workspace_remove () |
gboolean | xfw_workspace_assign_to_workspace_group () |
XfwWorkspaceCapabilities | capabilities | Read / Write / Construct |
XfwWorkspaceGroup * | group | Read |
char * | id | Read |
int | layout-column | Read |
int | layout-row | Read |
char * | name | Read / Write / Construct |
guint | number | Read / Write / Construct Only |
XfwWorkspaceState | state | Read / Write / Construct |
void | capabilities-changed | Run Last |
void | group-changed | Run Last |
void | name-changed | Run Last |
void | state-changed | Run Last |
XfwWorkspace | |
enum | XfwWorkspaceCapabilities |
enum | XfwWorkspaceState |
typedef | XfwWorkspaceIface |
GFlags ├── XfwWorkspaceCapabilities ╰── XfwWorkspaceState GInterface ╰── XfwWorkspace
XfwWorkspace represents a single workspace within a workspace group. A workspace is usually a collection of windows that are shown together on the desktop when that workspace is the active workspace.
An instance of XfwWorkspace can be used to obtain information about the workspace, such as its name, position in the group, and capabilities. The workspace can also be activated or removed.
Note that XfwWorkspace is actually an interface; when obtaining an instance, an instance of a windowing-environment-specific object that implements this interface will be returned.
const gchar *
xfw_workspace_get_id (XfwWorkspace *workspace
);
Fetches this workspace's opaque ID.
const gchar *
xfw_workspace_get_name (XfwWorkspace *workspace
);
Fetches this workspace's human-readable name.
XfwWorkspaceCapabilities
xfw_workspace_get_capabilities (XfwWorkspace *workspace
);
Fetches this workspace's capabilities bitfield.
The bitfield describes what operations are available on this workspace.
XfwWorkspaceState
xfw_workspace_get_state (XfwWorkspace *workspace
);
Fetches this workspace's state bitfield.
guint
xfw_workspace_get_number (XfwWorkspace *workspace
);
Fetches the ordinal number of this workspace.
The number can be used to order workspaces in a UI representation.
On X11, this number should be stable across runs of your application.
On Wayland, this number depends on the order in which the compositor advertises the workspaces. This order may be stable, but may not be.
struct _XfwWorkspaceGroup *
xfw_workspace_get_workspace_group (XfwWorkspace *workspace
);
Fetches the group this workspace belongs to, if any.
a XfwWorkspaceGroup
instance, owned by workspace
, or NULL
if the workspace is not a member of
any groups.
[nullable][transfer none]
gint
xfw_workspace_get_layout_row (XfwWorkspace *workspace
);
Fetches the row this workspace belongs to in the workspace's group.
This information can be used to lay out workspaces in a grid in a pager UI, for example.
gint
xfw_workspace_get_layout_column (XfwWorkspace *workspace
);
Fetches the column this workspace belongs to in the workspace's group.
This information can be used to lay out workspaces in a grid in a pager UI, for example.
XfwWorkspace * xfw_workspace_get_neighbor (XfwWorkspace *workspace
,XfwDirection direction
);
Fetches the workspace that resides in direction
from the workspace
, if
any. If workspace is on the edge of the layout, and direction
points off
the edge of the layout, will return NULL
.
a XfwWorkspace, owned by
the parent group
, or NULL
if no workspace exists in direction
.
[nullable][transfer none]
GdkRectangle *
xfw_workspace_get_geometry (XfwWorkspace *workspace
);
Fetches the position and size of the workspace in screen coordinates.
The values in the returned GdkRectangle are owned by workspace
and should
not be modified.
gboolean xfw_workspace_activate (XfwWorkspace *workspace
,GError **error
);
Attempts to set workspace
as the active workspace in its group.
On failure, error
(if provided) will be set to a description of the error
that occurred.
workspace |
an XfwWorkspace. |
|
error |
a location to store a possible error. |
[out callee-allocates] |
gboolean xfw_workspace_remove (XfwWorkspace *workspace
,GError **error
);
Attempts to remove workspace
from its group.
On failure, error
(if provided) will be set to a description of the error
that occurred.
workspace |
an XfwWorkspace. |
|
error |
a location to store a possible error. |
[out callee-allocates] |
gboolean xfw_workspace_assign_to_workspace_group (XfwWorkspace *workspace
,struct _XfwWorkspaceGroup *group
,GError **error
);
Attempts to assign workspace
to group
.
On failure, error
(if provided) will be set to a description of the error
that occurred.
workspace |
an XfwWorkspace. |
|
group |
||
error |
a location to store a possible error. |
[out callee-allocates] |
Flags enum representing a bitfield of actions that can be performed on this workspace.
Flags enum representing a bitfield that describes the workspace's state.
“capabilities”
property“capabilities” XfwWorkspaceCapabilities
The XfwWorkspaceCapabilities bitfield for this workspace.
Owner: XfwWorkspace
Flags: Read / Write / Construct
“group”
property“group” XfwWorkspaceGroup *
The XfwWorkspaceGroup that this workspace is a member of, if any.
Owner: XfwWorkspace
Flags: Read
“id”
property “id” char *
The opaque ID of this workspace.
Owner: XfwWorkspace
Flags: Read
Default value: ""
“layout-column”
property “layout-column” int
The y-coordinate of the workspace on a 2D grid.
Owner: XfwWorkspace
Flags: Read
Allowed values: >= -1
Default value: -1
“layout-row”
property “layout-row” int
The x-coordinate of the workspace on a 2D grid.
Owner: XfwWorkspace
Flags: Read
Allowed values: >= -1
Default value: -1
“name”
property “name” char *
The human-readable name of this workspace.
Owner: XfwWorkspace
Flags: Read / Write / Construct
Default value: ""
“number”
property “number” guint
The ordinal number of this workspace.
Owner: XfwWorkspace
Flags: Read / Write / Construct Only
Default value: 0
“state”
property“state” XfwWorkspaceState
The XfwWorkspaceState bitfield for this workspace.
Owner: XfwWorkspace
Flags: Read / Write / Construct
“capabilities-changed”
signalvoid user_function (XfwWorkspace *workspace, XfwWorkspaceCapabilities changed_mask, XfwWorkspaceCapabilities new_capabilities, gpointer user_data)
Emitted when workspace
's capabilities change.
workspace |
the object which received the signal. |
|
changed_mask |
a bitfield representing the capabilities that have changed. |
|
new_capabilities |
a bitfield of the new capabilities. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“group-changed”
signalvoid user_function (XfwWorkspace *workspace, XfwWorkspaceGroup *previous_group, gpointer user_data)
Emitted when workspace
is assigned to an XfwWorkspaceGroup.
workspace |
the object which received the signal. |
|
previous_group |
the group |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“name-changed”
signalvoid user_function (XfwWorkspace *workspace, gpointer user_data)
Emitted when workspace
's name changes.
workspace |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“state-changed”
signalvoid user_function (XfwWorkspace *workspace, XfwWorkspaceState changed_mask, XfwWorkspaceState new_state, gpointer user_data)
Emitted when workspace
's state changes.
workspace |
the object which received the signal. |
|
changed_mask |
a bitfield representing the state bits that have changed. |
|
new_state |
a bitfield of the new state. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last