Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- pidReadResourceUsage :: (HasCallStack, MonadIO m, IsDisplay a) => a -> CULong -> ResourceUsage -> m ()
- setClientType :: (HasCallStack, MonadIO m) => ClientType -> m ()
- setDefaultIconSize :: (HasCallStack, MonadIO m) => Word64 -> m ()
- setDefaultMiniIconSize :: (HasCallStack, MonadIO m) => Word64 -> m ()
- shutdown :: (HasCallStack, MonadIO m) => m ()
- xidReadResourceUsage :: (HasCallStack, MonadIO m, IsDisplay a) => a -> CULong -> ResourceUsage -> m ()
Methods
pidReadResourceUsage
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> CULong |
|
-> ResourceUsage |
|
-> m () |
Looks for the X resource usage of the application with process ID pid
on
display gdisplay
. If no resource usage can be found, then all fields of
usage
are set to 0.
In order to find the resource usage of an application that does not have an
X window visible to libwnck (panel applets do not have any toplevel windows,
for example), pidReadResourceUsage
walks through the whole tree of
X windows. Since this walk is expensive in CPU, a cache is created. This
cache is updated in the background. This means there is a non-null
probability that no resource usage will be found for an application, even if
it is an X client. If this happens, calling pidReadResourceUsage
again after a few seconds should work.
To properly work, this function requires the XRes extension on the X server.
Since: 2.6
setClientType
:: (HasCallStack, MonadIO m) | |
=> ClientType |
|
-> m () |
Sets the role of the libwnck user.
The default role is ClientTypeApplication
. Therefore, for
applications providing some window management features, like pagers or
tasklists, it is important to set the role to ClientTypePager
for
libwnck to properly work.
This function should only be called once per program. Additional calls with the same client type will be silently ignored. An attempt to change the client type to a differnet value after it has already been set will be ignored and a critical warning will be logged.
Since: 2.14
setDefaultIconSize
:: (HasCallStack, MonadIO m) | |
=> Word64 |
|
-> m () |
The default main icon size is DEFAULT_ICON_SIZE
. This function allows
to change this value.
Since: 2.4.6
setDefaultMiniIconSize
setDefaultMiniIconSize Source #
:: (HasCallStack, MonadIO m) | |
=> Word64 |
|
-> m () |
The default main icon size is DEFAULT_MINI_ICON_SIZE
. This function
allows to change this value.
Since: 2.4.6
shutdown
shutdown :: (HasCallStack, MonadIO m) => m () Source #
Makes libwnck stop listening to events and tear down all resources from libwnck. This should be done if you are not going to need the state change notifications for an extended period of time, to avoid wakeups with every key and focus event.
After this, all pointers to Wnck object you might still hold are invalid.
Due to the fact that <link linkend="getting-started.pitfalls.memory-management">Wnck objects are all owned by libwnck</link>, users of this API through introspection should be extremely careful: they must explicitly clear variables referencing objects before this call. Failure to do so might result in crashes.
Since: 3.4
xidReadResourceUsage
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> CULong |
|
-> ResourceUsage |
|
-> m () |
Looks for the X resource usage of the application owning the X window ID
xid
on display gdisplay
. If no resource usage can be found, then all
fields of usage
are set to 0.
To properly work, this function requires the XRes extension on the X server.
Since: 2.6