| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Wnck.Objects.Workspace
Description
The Workspace struct contains only private fields and should not be
directly accessed.
Synopsis
- newtype Workspace = Workspace (ManagedPtr Workspace)
- class (GObject o, IsDescendantOf Workspace o) => IsWorkspace o
- toWorkspace :: (MonadIO m, IsWorkspace o) => o -> m Workspace
- workspaceActivate :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> Word32 -> m ()
- workspaceChangeName :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> Text -> m ()
- workspaceGetHeight :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetLayoutColumn :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetLayoutRow :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetName :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Text
- workspaceGetNeighbor :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> MotionDirection -> m Workspace
- workspaceGetNumber :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetScreen :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Screen
- workspaceGetViewportX :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetViewportY :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceGetWidth :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Int32
- workspaceIsVirtual :: (HasCallStack, MonadIO m, IsWorkspace a) => a -> m Bool
- type C_WorkspaceNameChangedCallback = Ptr () -> Ptr () -> IO ()
- type WorkspaceNameChangedCallback = IO ()
- afterWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> WorkspaceNameChangedCallback -> m SignalHandlerId
- genClosure_WorkspaceNameChanged :: MonadIO m => WorkspaceNameChangedCallback -> m (GClosure C_WorkspaceNameChangedCallback)
- mk_WorkspaceNameChangedCallback :: C_WorkspaceNameChangedCallback -> IO (FunPtr C_WorkspaceNameChangedCallback)
- noWorkspaceNameChangedCallback :: Maybe WorkspaceNameChangedCallback
- onWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> WorkspaceNameChangedCallback -> m SignalHandlerId
- wrap_WorkspaceNameChangedCallback :: WorkspaceNameChangedCallback -> C_WorkspaceNameChangedCallback
Exported types
Memory-managed wrapper type.
Constructors
| Workspace (ManagedPtr Workspace) |
Instances
| Eq Workspace Source # | |
| IsGValue Workspace Source # | Convert |
| ManagedPtrNewtype Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace Methods | |
| TypedObject Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
| GObject Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
| HasParentTypes Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
| type ParentTypes Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
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 # | |
Defined in GI.Wnck.Objects.Workspace | |
toWorkspace :: (MonadIO m, IsWorkspace o) => o -> m Workspace Source #
Methods
Overloaded methods
activate
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> Word32 |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> Text |
|
| -> m () |
Changes the name of space.
Since: 2.2
getHeight
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the height of |
Gets the height of space.
Since: 2.4
getLayoutColumn
workspaceGetLayoutColumn Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the column of |
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 |
|
| -> m Int32 | Returns: the row of |
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
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Text | Returns: the name of |
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
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> MotionDirection |
|
| -> m Workspace | Returns: the neighbor |
Gets the neighbor Workspace of space in the direction direction.
Since: 2.20
getNumber
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the index of |
Gets the index of space on the Screen to which it belongs. The
first workspace has an index of 0.
getScreen
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Screen | Returns: the |
Gets the Screen space is on.
getViewportX
workspaceGetViewportX Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the X coordinate of the viewport in |
Gets the X coordinate of the viewport in space.
Since: 2.4
getViewportY
workspaceGetViewportY Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the Y coordinate of the viewport in |
Gets the Y coordinate of the viewport in space.
Since: 2.4
getWidth
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Int32 | Returns: the width of |
Gets the width of space.
Since: 2.4
isVirtual
Arguments
| :: (HasCallStack, MonadIO m, IsWorkspace a) | |
| => a |
|
| -> m Bool | Returns: |
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 nameChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after workspace #nameChanged callback
genClosure_WorkspaceNameChanged :: MonadIO m => WorkspaceNameChangedCallback -> m (GClosure C_WorkspaceNameChangedCallback) Source #
Wrap the callback into a GClosure.
mk_WorkspaceNameChangedCallback :: C_WorkspaceNameChangedCallback -> IO (FunPtr C_WorkspaceNameChangedCallback) Source #
Generate a function pointer callable from C code, from a C_WorkspaceNameChangedCallback.
noWorkspaceNameChangedCallback :: Maybe WorkspaceNameChangedCallback Source #
A convenience synonym for .Nothing :: Maybe WorkspaceNameChangedCallback
onWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> WorkspaceNameChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the nameChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on workspace #nameChanged callback