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 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
- 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 ()
- afterApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationIconChangedCallback) -> m SignalHandlerId
- onApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationIconChangedCallback) -> m SignalHandlerId
- type ApplicationNameChangedCallback = IO ()
- afterApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameChangedCallback) -> m SignalHandlerId
- onApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameChangedCallback) -> m SignalHandlerId
Exported types
newtype Application Source #
Memory-managed wrapper type.
Instances
Eq Application Source # | |
Defined in GI.Wnck.Objects.Application (==) :: Application -> Application -> Bool # (/=) :: Application -> Application -> Bool # | |
GObject Application Source # | |
Defined in GI.Wnck.Objects.Application | |
ManagedPtrNewtype Application Source # | |
Defined in GI.Wnck.Objects.Application | |
TypedObject Application Source # | |
Defined in GI.Wnck.Objects.Application | |
HasParentTypes Application Source # | |
Defined in GI.Wnck.Objects.Application | |
IsGValue (Maybe Application) Source # | Convert |
Defined in GI.Wnck.Objects.Application gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe Application -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe 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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getIcon, getIconIsFallback, getIconName, getMiniIcon, getNWindows, getName, getPid, getProperty, getQdata, getStartupId, getWindows, getXid.
Setters
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.
afterApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationIconChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the iconChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
application #iconChanged 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.
onApplicationIconChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationIconChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the iconChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
application #iconChanged callback
nameChanged
type ApplicationNameChangedCallback = IO () Source #
Emitted when the name of app
changes.
afterApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameChangedCallback) -> 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
application #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.
onApplicationNameChanged :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameChangedCallback) -> 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
application #nameChanged callback