Libxfce4windowing.Workspace

g GObject.GInterface GObject.GInterface Libxfce4windowing.Workspace Libxfce4windowing.Workspace GObject.GInterface->Libxfce4windowing.Workspace

Implementations:

None

Methods

activate ()

assign_to_workspace_group (group)

get_capabilities ()

get_geometry ()

get_id ()

get_layout_column ()

get_layout_row ()

get_name ()

get_neighbor (direction)

get_number ()

get_state ()

get_workspace_group ()

remove ()

Virtual Methods

None

Properties

Name

Type

Flags

Short Description

capabilities

Libxfce4windowing.WorkspaceCapabilities

r/w/c

capabilities

group

Libxfce4windowing.WorkspaceGroup

r

group

id

str

r

id

layout-column

int

r

layout-column

layout-row

int

r

layout-row

name

str

r/w/c

name

number

int

r/w/co

number

state

Libxfce4windowing.WorkspaceState

r/w/c

state

Signals

Name

Short Description

capabilities-changed

Emitted when workspace's capabilities change.

group-changed

Emitted when workspace is assigned to an Libxfce4windowing.WorkspaceGroup.

name-changed

Emitted when workspace's name changes.

state-changed

Emitted when workspace's state changes.

Fields

None

Class Details

class Libxfce4windowing.Workspace
Bases:

GObject.GInterface

Structure:

Libxfce4windowing.WorkspaceIface

activate()
Raises:

GLib.Error

Returns:

True if workspace activation succeeded, False otherwise. If False, and error is non-None, an error will be returned that must be freed using GLib.Error.free().

Return type:

bool

Attempts to set self as the active workspace in its group.

On failure, error (if provided) will be set to a description of the error that occurred.

assign_to_workspace_group(group)
Parameters:

group (object or None) – an Libxfce4windowing.WorkspaceGroup.

Raises:

GLib.Error

Returns:

True if workspace assignment succeeded, False otherwise. If False, and error is non-None, an error will be returned that must be freed using GLib.Error.free().

Return type:

bool

Attempts to assign self to group.

On failure, error (if provided) will be set to a description of the error that occurred.

get_capabilities()
Returns:

a Libxfce4windowing.WorkspaceCapabilities bitfield.

Return type:

Libxfce4windowing.WorkspaceCapabilities

Fetches this workspace’s capabilities bitfield.

The bitfield describes what operations are available on this workspace.

get_geometry()
Returns:

a Gdk.Rectangle, owned by self.

Return type:

Gdk.Rectangle

Fetches the position and size of the workspace in screen coordinates.

The values in the returned Gdk.Rectangle are owned by self and should not be modified.

get_id()
Returns:

A UTF-8 formatted string, owned by self.

Return type:

str

Fetches this workspace’s opaque ID.

get_layout_column()
Returns:

a non-negative, 0-indexed integer.

Return type:

int

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.

get_layout_row()
Returns:

a non-negative, 0-indexed integer.

Return type:

int

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.

get_name()
Returns:

A UTF-8 formatted string, owned by self.

Return type:

str

Fetches this workspace’s human-readable name.

get_neighbor(direction)
Parameters:

direction (Libxfce4windowing.Direction) – an Libxfce4windowing.Direction.

Returns:

a Libxfce4windowing.Workspace, owned by the parent group, or None if no workspace exists in direction.

Return type:

Libxfce4windowing.Workspace or None

Fetches the workspace that resides in direction from the self, if any. If workspace is on the edge of the layout, and direction points off the edge of the layout, will return None.

get_number()
Returns:

a non-negative, 0-indexed integer.

Return type:

int

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.

get_state()
Returns:

a Libxfce4windowing.WorkspaceState bitfield.

Return type:

Libxfce4windowing.WorkspaceState

Fetches this workspace’s state bitfield.

get_workspace_group()
Returns:

a Libxfce4windowing.WorkspaceGroup instance, owned by self, or None if the workspace is not a member of any groups.

Return type:

object or None

Fetches the group this workspace belongs to, if any.

remove()
Raises:

GLib.Error

Returns:

True if workspace removal succeeded, False otherwise. If False, and error is non-None, an error will be returned that must be freed using GLib.Error.free().

Return type:

bool

Attempts to remove self from its group.

On failure, error (if provided) will be set to a description of the error that occurred.

Signal Details

Libxfce4windowing.Workspace.signals.capabilities_changed(workspace, changed_mask, new_capabilities)
Signal Name:

capabilities-changed

Flags:

RUN_LAST

Parameters:

Emitted when workspace's capabilities change.

Libxfce4windowing.Workspace.signals.group_changed(workspace, previous_group)
Signal Name:

group-changed

Flags:

RUN_LAST

Parameters:

Emitted when workspace is assigned to an Libxfce4windowing.WorkspaceGroup.

Libxfce4windowing.Workspace.signals.name_changed(workspace)
Signal Name:

name-changed

Flags:

RUN_LAST

Parameters:

workspace (Libxfce4windowing.Workspace) – The object which received the signal

Emitted when workspace's name changes.

Libxfce4windowing.Workspace.signals.state_changed(workspace, changed_mask, new_state)
Signal Name:

state-changed

Flags:

RUN_LAST

Parameters:

Emitted when workspace's state changes.

Property Details

Libxfce4windowing.Workspace.props.capabilities
Name:

capabilities

Type:

Libxfce4windowing.WorkspaceCapabilities

Default Value:

Libxfce4windowing.WorkspaceCapabilities.NONE

Flags:

READABLE, WRITABLE, CONSTRUCT

The Libxfce4windowing.WorkspaceCapabilities bitfield for this workspace.

Libxfce4windowing.Workspace.props.group
Name:

group

Type:

Libxfce4windowing.WorkspaceGroup

Default Value:

None

Flags:

READABLE

The Libxfce4windowing.WorkspaceGroup that this workspace is a member of, if any.

Libxfce4windowing.Workspace.props.id
Name:

id

Type:

str

Default Value:

''

Flags:

READABLE

The opaque ID of this workspace.

Libxfce4windowing.Workspace.props.layout_column
Name:

layout-column

Type:

int

Default Value:

-1

Flags:

READABLE

The y-coordinate of the workspace on a 2D grid.

Libxfce4windowing.Workspace.props.layout_row
Name:

layout-row

Type:

int

Default Value:

-1

Flags:

READABLE

The x-coordinate of the workspace on a 2D grid.

Libxfce4windowing.Workspace.props.name
Name:

name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT

The human-readable name of this workspace.

Libxfce4windowing.Workspace.props.number
Name:

number

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The ordinal number of this workspace.

Libxfce4windowing.Workspace.props.state
Name:

state

Type:

Libxfce4windowing.WorkspaceState

Default Value:

Libxfce4windowing.WorkspaceState.NONE

Flags:

READABLE, WRITABLE, CONSTRUCT

The Libxfce4windowing.WorkspaceState bitfield for this workspace.