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 |
The Application
struct contains only private fields and should not be
directly accessed.
Synopsis
- newtype Application = Application (ManagedPtr Application)
- class (GObject o, IsDescendantOf Application o) => IsApplication o
- toApplication :: (MonadIO m, IsApplication o) => o -> m Application
- noApplication :: Maybe Application
- applicationGet :: (HasCallStack, MonadIO m) => CULong -> m Application
- applicationGetIcon :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Pixbuf
- applicationGetIconIsFallback :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Bool
- applicationGetIconName :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Text
- applicationGetMiniIcon :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Pixbuf
- applicationGetNWindows :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Int32
- applicationGetName :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Text
- applicationGetPid :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Int32
- applicationGetStartupId :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Text
- applicationGetWindows :: (HasCallStack, MonadIO m, IsApplication a) => a -> m [Window]
- applicationGetXid :: (HasCallStack, MonadIO m, IsApplication a) => a -> m CULong
- type ApplicationIconChangedCallback = IO ()
- type C_ApplicationIconChangedCallback = Ptr () -> Ptr () -> IO ()
- afterApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ApplicationIconChangedCallback -> m SignalHandlerId
- genClosure_ApplicationIconChanged :: MonadIO m => ApplicationIconChangedCallback -> m (GClosure C_ApplicationIconChangedCallback)
- mk_ApplicationIconChangedCallback :: C_ApplicationIconChangedCallback -> IO (FunPtr C_ApplicationIconChangedCallback)
- noApplicationIconChangedCallback :: Maybe ApplicationIconChangedCallback
- onApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ApplicationIconChangedCallback -> m SignalHandlerId
- wrap_ApplicationIconChangedCallback :: ApplicationIconChangedCallback -> C_ApplicationIconChangedCallback
- type ApplicationNameChangedCallback = IO ()
- type C_ApplicationNameChangedCallback = Ptr () -> Ptr () -> IO ()
- afterApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ApplicationNameChangedCallback -> m SignalHandlerId
- genClosure_ApplicationNameChanged :: MonadIO m => ApplicationNameChangedCallback -> m (GClosure C_ApplicationNameChangedCallback)
- mk_ApplicationNameChangedCallback :: C_ApplicationNameChangedCallback -> IO (FunPtr C_ApplicationNameChangedCallback)
- noApplicationNameChangedCallback :: Maybe ApplicationNameChangedCallback
- onApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ApplicationNameChangedCallback -> m SignalHandlerId
- wrap_ApplicationNameChangedCallback :: ApplicationNameChangedCallback -> C_ApplicationNameChangedCallback
Exported types
newtype Application Source #
Memory-managed wrapper type.
Application (ManagedPtr Application) |
Instances
GObject Application Source # | |
Defined in GI.Wnck.Objects.Application gobjectType :: IO GType | |
HasParentTypes Application Source # | |
Defined in GI.Wnck.Objects.Application | |
type ParentTypes Application Source # | |
Defined in GI.Wnck.Objects.Application |
class (GObject o, IsDescendantOf Application o) => IsApplication o Source #
Type class for types which can be safely cast to Application
, for instance with toApplication
.
Instances
(GObject o, IsDescendantOf Application o) => IsApplication o Source # | |
Defined in GI.Wnck.Objects.Application |
toApplication :: (MonadIO m, IsApplication o) => o -> m Application Source #
Cast to Application
, for types for which this is known to be safe. For general casts, use castTo
.
noApplication :: Maybe Application Source #
A convenience alias for Nothing
:: Maybe
Application
.
Methods
get
:: (HasCallStack, MonadIO m) | |
=> CULong |
|
-> m Application | Returns: the |
Gets the Application
corresponding to the group leader with xwindow
as X window ID.
getIcon
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Pixbuf | Returns: the icon for |
Gets the icon to be used for app
. If no icon is set for app
, a
suboptimal heuristic is used to find an appropriate icon. If no icon was
found, a fallback icon is used.
getIconIsFallback
applicationGetIconIsFallback Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether a default fallback icon is used for app
(because none
was set on app
).
getIconName
applicationGetIconName Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Text | Returns: the icon name of |
Gets the icon name of app
(to be used when app
is minimized). Since
there is no way to properly find this name, various suboptimal heuristics
are used to find it.
getMiniIcon
applicationGetMiniIcon Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Pixbuf | Returns: the mini-icon for |
Gets the mini-icon to be used for app
. If no mini-icon is set for app
,
a suboptimal heuristic is used to find an appropriate icon. If no mini-icon
was found, a fallback mini-icon is used.
getNWindows
applicationGetNWindows Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Int32 | Returns: the number of |
Gets the number of Window
belonging to app
.
getName
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Text | Returns: the name of |
Gets the name of app
. Since there is no way to properly find this name,
various suboptimal heuristics are used to find it. GTK+ should probably have
a function to allow applications to set the _NET_WM_NAME property on the
group leader as the application name, and the <ulink
url="http://standards.freedesktop.org/wm-spec/wm-spec-latest.html">EWMH</ulink>
should say that this is where the application name goes.
getPid
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Int32 | Returns: the process ID of |
Gets the process ID of app
.
getStartupId
applicationGetStartupId Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m Text | Returns: the startup sequence ID used for startup notification of |
Gets the startup sequence ID used for startup notification of app
.
Since: 2.2
getWindows
applicationGetWindows Source #
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m [Window] | Returns: the list of
|
Gets the list of Window
belonging to app
.
getXid
:: (HasCallStack, MonadIO m, IsApplication a) | |
=> a |
|
-> m CULong | Returns: the X window ID of the group leader window for |
Gets the X window ID of the group leader window for app
.
Signals
iconChanged
type ApplicationIconChangedCallback = IO () Source #
Emitted when the icon of app
changes.
type C_ApplicationIconChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
afterApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ApplicationIconChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “icon-changed
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
application #iconChanged callback
genClosure_ApplicationIconChanged :: MonadIO m => ApplicationIconChangedCallback -> m (GClosure C_ApplicationIconChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_ApplicationIconChangedCallback :: C_ApplicationIconChangedCallback -> IO (FunPtr C_ApplicationIconChangedCallback) Source #
Generate a function pointer callable from C code, from a C_ApplicationIconChangedCallback
.
noApplicationIconChangedCallback :: Maybe ApplicationIconChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ApplicationIconChangedCallback
onApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ApplicationIconChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “icon-changed
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
application #iconChanged callback
wrap_ApplicationIconChangedCallback :: ApplicationIconChangedCallback -> C_ApplicationIconChangedCallback Source #
Wrap a ApplicationIconChangedCallback
into a C_ApplicationIconChangedCallback
.
nameChanged
type ApplicationNameChangedCallback = IO () Source #
Emitted when the name of app
changes.
type C_ApplicationNameChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
afterApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ApplicationNameChangedCallback -> 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
application #nameChanged callback
genClosure_ApplicationNameChanged :: MonadIO m => ApplicationNameChangedCallback -> m (GClosure C_ApplicationNameChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_ApplicationNameChangedCallback :: C_ApplicationNameChangedCallback -> IO (FunPtr C_ApplicationNameChangedCallback) Source #
Generate a function pointer callable from C code, from a C_ApplicationNameChangedCallback
.
noApplicationNameChangedCallback :: Maybe ApplicationNameChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ApplicationNameChangedCallback
onApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ApplicationNameChangedCallback -> 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
application #nameChanged callback