gi-wnck-3.0.4: Wnck bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Wnck.Objects.Workspace

Contents

Description

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

Synopsis

Exported types

newtype Workspace Source #

Memory-managed wrapper type.

Constructors

Workspace (ManagedPtr Workspace) 
Instances
GObject Workspace Source # 
Instance details

Defined in GI.Wnck.Objects.Workspace

Methods

gobjectType :: IO GType

HasParentTypes Workspace Source # 
Instance details

Defined in GI.Wnck.Objects.Workspace

type ParentTypes Workspace Source # 
Instance details

Defined in GI.Wnck.Objects.Workspace

type ParentTypes Workspace = Object ': ([] :: [Type])

class (GObject o, IsDescendantOf Workspace o) => IsWorkspace o Source #

Type class for types which can be safely cast to Workspace, for instance with toWorkspace.

Instances
(GObject o, IsDescendantOf Workspace o) => IsWorkspace o Source # 
Instance details

Defined in GI.Wnck.Objects.Workspace

toWorkspace :: (MonadIO m, IsWorkspace o) => o -> m Workspace Source #

Cast to Workspace, for types for which this is known to be safe. For general casts, use castTo.

noWorkspace :: Maybe Workspace Source #

A convenience alias for Nothing :: Maybe Workspace.

Methods

activate

workspaceActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> Word32

timestamp: the X server timestamp of the user interaction event that caused this call to occur.

-> m () 

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.

Since: 2.10

changeName

workspaceChangeName Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> Text

name: new name for space.

-> m () 

Changes the name of space.

Since: 2.2

getHeight

workspaceGetHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the height of space.

Gets the height of space.

Since: 2.4

getLayoutColumn

workspaceGetLayoutColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the column of space in the Workspace layout, or -1 on errors.

Gets the column of space in the 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).

Since: 2.20

getLayoutRow

workspaceGetLayoutRow Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the row of space in the Workspace layout, or -1 on errors.

Gets the row of space in the 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.

Since: 2.20

getName

workspaceGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Text

Returns: the name of 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.

getNeighbor

workspaceGetNeighbor Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> MotionDirection

direction: direction in which to search the neighbor.

-> m Workspace

Returns: the neighbor Workspace of space in the direction direction, or Nothing if no such neighbor Workspace exists. The returned Workspace is owned by libwnck and must not be referenced or unreferenced.

Gets the neighbor Workspace of space in the direction direction.

Since: 2.20

getNumber

workspaceGetNumber Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the index of space on its Screen, or -1 on errors.

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

getScreen

workspaceGetScreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Screen

Returns: the Screen space is on. The returned Screen is owned by libwnck and must not be referenced or unreferenced.

Gets the Screen space is on.

getViewportX

workspaceGetViewportX Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the X coordinate of the viewport in space, or 0 if space does not contain a viewport.

Gets the X coordinate of the viewport in space.

Since: 2.4

getViewportY

workspaceGetViewportY Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the Y coordinate of the viewport in space, or 0 if space does not contain a viewport.

Gets the Y coordinate of the viewport in space.

Since: 2.4

getWidth

workspaceGetWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Int32

Returns: the width of space.

Gets the width of space.

Since: 2.4

isVirtual

workspaceIsVirtual Source #

Arguments

:: (HasCallStack, MonadIO m, IsWorkspace a) 
=> a

space: a Workspace.

-> m Bool

Returns: True if space contains a viewport, False otherwise.

Gets whether space contains a viewport.

Since: 2.4

Signals

nameChanged

type C_WorkspaceNameChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WorkspaceNameChangedCallback = IO () Source #

Emitted when the name of space changes.

afterWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> WorkspaceNameChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “name-changed” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after workspace #nameChanged callback

onWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> WorkspaceNameChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “name-changed” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on workspace #nameChanged callback