Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 WorkspaceNameChangedCallback = IO ()
- afterWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> ((?self :: a) => WorkspaceNameChangedCallback) -> m SignalHandlerId
- onWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> ((?self :: a) => WorkspaceNameChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Workspace Source # | |
GObject Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
ManagedPtrNewtype Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace toManagedPtr :: Workspace -> ManagedPtr Workspace | |
TypedObject Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
HasParentTypes Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace | |
IsGValue (Maybe Workspace) Source # | Convert |
Defined in GI.Wnck.Objects.Workspace gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Workspace -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Workspace) | |
type ParentTypes Workspace Source # | |
Defined in GI.Wnck.Objects.Workspace type ParentTypes Workspace = '[Object] |
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
Click to display all available methods, including inherited ones
Methods
activate, bindProperty, bindPropertyFull, changeName, forceFloating, freezeNotify, getv, isFloating, isVirtual, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getHeight, getLayoutColumn, getLayoutRow, getName, getNeighbor, getNumber, getProperty, getQdata, getScreen, getViewportX, getViewportY, getWidth.
Setters
activate
:: (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
:: (HasCallStack, MonadIO m, IsWorkspace a) | |
=> a |
|
-> Text |
|
-> m () |
Changes the name of space
.
Since: 2.2
getHeight
:: (HasCallStack, MonadIO m, IsWorkspace a) | |
=> a |
|
-> m Int32 | Returns: the height of |
Gets the height of space
.
Since: 2.4
getLayoutColumn
workspaceGetLayoutColumn Source #
:: (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 #
:: (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
:: (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
:: (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
:: (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
:: (HasCallStack, MonadIO m, IsWorkspace a) | |
=> a |
|
-> m Screen | Returns: the |
Gets the Screen
space
is on.
getViewportX
workspaceGetViewportX Source #
:: (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 #
:: (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
:: (HasCallStack, MonadIO m, IsWorkspace a) | |
=> a |
|
-> m Int32 | Returns: the width of |
Gets the width of space
.
Since: 2.4
isVirtual
:: (HasCallStack, MonadIO m, IsWorkspace a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether space
contains a viewport.
Since: 2.4
Signals
nameChanged
type WorkspaceNameChangedCallback = IO () Source #
Emitted when the name of space
changes.
afterWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWorkspaceNameChanged :: (IsWorkspace a, MonadIO m) => a -> ((?self :: 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