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 |
GI.Dbusmenu.Objects.Client
Synopsis
- newtype Client = Client (ManagedPtr Client)
- class (GObject o, IsDescendantOf Client o) => IsClient o
- toClient :: (MonadIO m, IsClient o) => o -> m Client
- clientAddTypeHandler :: (HasCallStack, MonadIO m, IsClient a) => a -> Text -> ClientTypeHandler -> m Bool
- clientAddTypeHandlerFull :: (HasCallStack, MonadIO m, IsClient a) => a -> Text -> ClientTypeHandler -> m Bool
- clientGetIconPaths :: (HasCallStack, MonadIO m, IsClient a) => a -> m [Text]
- clientGetRoot :: (HasCallStack, MonadIO m, IsClient a) => a -> m Menuitem
- clientGetStatus :: (HasCallStack, MonadIO m, IsClient a) => a -> m Status
- clientGetTextDirection :: (HasCallStack, MonadIO m, IsClient a) => a -> m TextDirection
- clientNew :: (HasCallStack, MonadIO m) => Text -> Text -> m Client
- constructClientDbusName :: (IsClient o, MonadIO m) => Text -> m (GValueConstruct o)
- getClientDbusName :: (MonadIO m, IsClient o) => o -> m (Maybe Text)
- constructClientDbusObject :: (IsClient o, MonadIO m) => Text -> m (GValueConstruct o)
- getClientDbusObject :: (MonadIO m, IsClient o) => o -> m (Maybe Text)
- constructClientGroupEvents :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o)
- getClientGroupEvents :: (MonadIO m, IsClient o) => o -> m Bool
- setClientGroupEvents :: (MonadIO m, IsClient o) => o -> Bool -> m ()
- type ClientEventResultCallback = Object -> Text -> GVariant -> Word32 -> Ptr () -> IO ()
- afterClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId
- onClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId
- type ClientIconThemeDirsChangedCallback = Ptr () -> IO ()
- afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId
- onClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId
- type ClientItemActivateCallback = Object -> Word32 -> IO ()
- afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId
- onClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId
- type ClientLayoutUpdatedCallback = IO ()
- afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId
- onClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId
- type ClientNewMenuitemCallback = Object -> IO ()
- afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId
- onClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId
- type ClientRootChangedCallback = Object -> IO ()
- afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId
- onClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Client Source # | |
GObject Client Source # | |
Defined in GI.Dbusmenu.Objects.Client | |
ManagedPtrNewtype Client Source # | |
Defined in GI.Dbusmenu.Objects.Client Methods toManagedPtr :: Client -> ManagedPtr Client | |
TypedObject Client Source # | |
Defined in GI.Dbusmenu.Objects.Client | |
HasParentTypes Client Source # | |
Defined in GI.Dbusmenu.Objects.Client | |
IsGValue (Maybe Client) Source # | Convert |
Defined in GI.Dbusmenu.Objects.Client Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Client -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Client) | |
type ParentTypes Client Source # | |
Defined in GI.Dbusmenu.Objects.Client type ParentTypes Client = '[Object] |
class (GObject o, IsDescendantOf Client o) => IsClient o Source #
Instances
(GObject o, IsDescendantOf Client o) => IsClient o Source # | |
Defined in GI.Dbusmenu.Objects.Client |
Methods
Click to display all available methods, including inherited ones
Methods
addTypeHandler, addTypeHandlerFull, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getIconPaths, getProperty, getQdata, getRoot, getStatus, getTextDirection.
Setters
addTypeHandler
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> Text |
|
-> ClientTypeHandler |
|
-> m Bool | Returns: If registering the new type was successful. |
This function connects into the type handling of the Client
.
Every new menuitem that comes in immediately gets asked for its
properties. When we get those properties we check the 'type'
property and look to see if it matches a handler that is known
by the client. If so, the newfunc
function is executed on that
Menuitem
. If not, then the DbusmenuClientnewMenuitem
signal is sent.
In the future the known types will be sent to the server so that it can make choices about the menu item types availble.
addTypeHandlerFull
clientAddTypeHandlerFull Source #
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> Text |
|
-> ClientTypeHandler |
|
-> m Bool | Returns: If registering the new type was successful. |
This function connects into the type handling of the Client
.
Every new menuitem that comes in immediately gets asked for its
properties. When we get those properties we check the 'type'
property and look to see if it matches a handler that is known
by the client. If so, the newfunc
function is executed on that
Menuitem
. If not, then the DbusmenuClientnewMenuitem
signal is sent.
In the future the known types will be sent to the server so that it can make choices about the menu item types availble.
getIconPaths
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> m [Text] | Returns: A NULL-terminated list of icon paths with memory managed by the client. Duplicate if you want to keep them. |
Gets the stored and exported icon paths from the client.
getRoot
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> m Menuitem | Returns: A |
Grabs the root node for the specified client client
. This
function may block. It will block if there is currently a
call to update the layout, it will block on that layout
updated and then return the newly updated layout. Chances
are that this update is in the queue for the mainloop as
it would have been requested some time ago, but in theory
it could block longer.
getStatus
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> m Status |
Gets the recommended current status that the server
is exporting for the menus. In situtations where the
value is DBUSMENU_STATUS_NOTICE
it is recommended that
the client show the menus to the user an a more noticible
way.
Return value: Status being exported.
getTextDirection
clientGetTextDirection Source #
Arguments
:: (HasCallStack, MonadIO m, IsClient a) | |
=> a |
|
-> m TextDirection |
Gets the text direction that the server is exporting. If
the server is not exporting a direction then the value
DBUSMENU_TEXT_DIRECTION_NONE
will be returned.
Return value: Text direction being exported.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Client | Returns: A brand new |
This function creates a new client that connects to a specific server on DBus. That server is at a specific location sharing a known object. The interface is assumed by the code to be the DBus menu interface. The newly created client will start sending out events as it syncs up with the server.
Properties
dbusName
No description available in the introspection data.
constructClientDbusName :: (IsClient o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dbus-name
” property. This is rarely needed directly, but it is used by new
.
getClientDbusName :: (MonadIO m, IsClient o) => o -> m (Maybe Text) Source #
Get the value of the “dbus-name
” property.
When overloading is enabled, this is equivalent to
get
client #dbusName
dbusObject
No description available in the introspection data.
constructClientDbusObject :: (IsClient o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dbus-object
” property. This is rarely needed directly, but it is used by new
.
getClientDbusObject :: (MonadIO m, IsClient o) => o -> m (Maybe Text) Source #
Get the value of the “dbus-object
” property.
When overloading is enabled, this is equivalent to
get
client #dbusObject
groupEvents
No description available in the introspection data.
constructClientGroupEvents :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “group-events
” property. This is rarely needed directly, but it is used by new
.
getClientGroupEvents :: (MonadIO m, IsClient o) => o -> m Bool Source #
Get the value of the “group-events
” property.
When overloading is enabled, this is equivalent to
get
client #groupEvents
setClientGroupEvents :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #
Set the value of the “group-events
” property.
When overloading is enabled, this is equivalent to
set
client [ #groupEvents:=
value ]
Signals
eventResult
type ClientEventResultCallback = Object -> Text -> GVariant -> Word32 -> Ptr () -> IO () Source #
No description available in the introspection data.
afterClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId Source #
Connect a signal handler for the eventResult signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #eventResult 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.
onClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId Source #
Connect a signal handler for the eventResult signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #eventResult callback
iconThemeDirsChanged
type ClientIconThemeDirsChangedCallback Source #
Signaled when the theme directories are changed by the server.
afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the iconThemeDirsChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #iconThemeDirsChanged 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.
onClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the iconThemeDirsChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #iconThemeDirsChanged callback
itemActivate
type ClientItemActivateCallback Source #
Arguments
= Object |
|
-> Word32 |
|
-> IO () |
Signaled when the server wants to activate an item in order to display the menu.
afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #itemActivate 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.
onClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #itemActivate callback
layoutUpdated
type ClientLayoutUpdatedCallback = IO () Source #
No description available in the introspection data.
afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the layoutUpdated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #layoutUpdated 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.
onClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the layoutUpdated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #layoutUpdated callback
newMenuitem
type ClientNewMenuitemCallback Source #
Signaled when the client creates a new menuitem. This doesn't mean that it's placed anywhere. The parent that it's applied to will signal Menuitem::childAdded when it gets parented.
afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId Source #
Connect a signal handler for the newMenuitem signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #newMenuitem 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.
onClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId Source #
Connect a signal handler for the newMenuitem signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #newMenuitem callback
rootChanged
type ClientRootChangedCallback Source #
The layout has changed in a way that can not be represented by the individual items changing as the root of this client has changed.
afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rootChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
client #rootChanged 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.
onClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the rootChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
client #rootChanged callback