Wnck.Workspace

g GObject.Object GObject.Object Wnck.Workspace Wnck.Workspace GObject.Object->Wnck.Workspace

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

activate (timestamp)

change_name (name)

get_height ()

get_layout_column ()

get_layout_row ()

get_name ()

get_neighbor (direction)

get_number ()

get_screen ()

get_viewport_x ()

get_viewport_y ()

get_width ()

is_virtual ()

Virtual Methods

Inherited:

GObject.Object (7)

do_name_changed ()

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

name-changed

Emitted when the name of space changes.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Wnck.Workspace(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Wnck.WorkspaceClass

The Wnck.Workspace struct contains only private fields and should not be directly accessed.

activate(timestamp)
Parameters:

timestamp (int) – the X server timestamp of the user interaction event that caused this call to occur.

Asks the window manager to make self 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.

New in version 2.10.

change_name(name)
Parameters:

name (str) – new name for self.

Changes the name of self.

New in version 2.2.

get_height()
Returns:

the height of self.

Return type:

int

Gets the height of self.

New in version 2.4.

get_layout_column()
Returns:

the column of self in the Wnck.Workspace layout, or -1 on errors.

Return type:

int

Gets the column of self in the Wnck.Workspace 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).

New in version 2.20.

get_layout_row()
Returns:

the row of self in the Wnck.Workspace layout, or -1 on errors.

Return type:

int

Gets the row of self in the Wnck.Workspace layout. The first row has an index of 0 and is always the top row, regardless of the starting corner set for the layout.

New in version 2.20.

get_name()
Returns:

the name of self.

Return type:

str

Gets the human-readable name that should be used to refer to self. If the user has not set a special name, a fallback like “Workspace 3” will be used.

get_neighbor(direction)
Parameters:

direction (Wnck.MotionDirection) – direction in which to search the neighbor.

Returns:

the neighbor Wnck.Workspace of self in the direction direction, or None if no such neighbor Wnck.Workspace exists. The returned Wnck.Workspace is owned by libwnck and must not be referenced or unreferenced.

Return type:

Wnck.Workspace

Gets the neighbor Wnck.Workspace of self in the direction direction.

New in version 2.20.

get_number()
Returns:

the index of self on its Wnck.Screen, or -1 on errors.

Return type:

int

Gets the index of self on the Wnck.Screen to which it belongs. The first workspace has an index of 0.

get_screen()
Returns:

the Wnck.Screen self is on. The returned Wnck.Screen is owned by libwnck and must not be referenced or unreferenced.

Return type:

Wnck.Screen

Gets the Wnck.Screen self is on.

get_viewport_x()
Returns:

the X coordinate of the viewport in self, or 0 if self does not contain a viewport.

Return type:

int

Gets the X coordinate of the viewport in self.

New in version 2.4.

get_viewport_y()
Returns:

the Y coordinate of the viewport in self, or 0 if self does not contain a viewport.

Return type:

int

Gets the Y coordinate of the viewport in self.

New in version 2.4.

get_width()
Returns:

the width of self.

Return type:

int

Gets the width of self.

New in version 2.4.

is_virtual()
Returns:

True if self contains a viewport, False otherwise.

Return type:

bool

Gets whether self contains a viewport.

New in version 2.4.

do_name_changed() virtual

Signal Details

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

name-changed

Flags:

RUN_LAST

Parameters:

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

Emitted when the name of space changes.