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 |
A server which represents a sharing of a set of
DbusmenuMenuitems
across DBus to a Client
.
Synopsis
- newtype Server = Server (ManagedPtr Server)
- class (GObject o, IsDescendantOf Server o) => IsServer o
- toServer :: (MonadIO m, IsServer o) => o -> m Server
- serverGetIconPaths :: (HasCallStack, MonadIO m, IsServer a) => a -> m [Text]
- serverGetStatus :: (HasCallStack, MonadIO m, IsServer a) => a -> m Status
- serverGetTextDirection :: (HasCallStack, MonadIO m, IsServer a) => a -> m TextDirection
- serverNew :: (HasCallStack, MonadIO m) => Text -> m Server
- serverSetIconPaths :: (HasCallStack, MonadIO m, IsServer a) => a -> [Text] -> m ()
- serverSetRoot :: (HasCallStack, MonadIO m, IsServer a, IsMenuitem b) => a -> b -> m ()
- serverSetStatus :: (HasCallStack, MonadIO m, IsServer a) => a -> Status -> m ()
- serverSetTextDirection :: (HasCallStack, MonadIO m, IsServer a) => a -> TextDirection -> m ()
- constructServerDbusObject :: (IsServer o, MonadIO m) => Text -> m (GValueConstruct o)
- getServerDbusObject :: (MonadIO m, IsServer o) => o -> m (Maybe Text)
- clearServerRootNode :: (MonadIO m, IsServer o) => o -> m ()
- constructServerRootNode :: (IsServer o, MonadIO m, IsMenuitem a) => a -> m (GValueConstruct o)
- getServerRootNode :: (MonadIO m, IsServer o) => o -> m (Maybe Menuitem)
- setServerRootNode :: (MonadIO m, IsServer o, IsMenuitem a) => o -> a -> m ()
- getServerVersion :: (MonadIO m, IsServer o) => o -> m Word32
- type ServerItemActivationRequestedCallback = Int32 -> Word32 -> IO ()
- afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId
- onServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId
- type ServerItemPropertyUpdatedCallback = Int32 -> Text -> GVariant -> IO ()
- afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId
- onServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId
- type ServerItemUpdatedCallback = Int32 -> IO ()
- afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId
- onServerItemUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId
- type ServerLayoutUpdatedCallback = Word32 -> Int32 -> IO ()
- afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerLayoutUpdatedCallback) -> m SignalHandlerId
- onServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerLayoutUpdatedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Server Source # | |
GObject Server Source # | |
Defined in GI.Dbusmenu.Objects.Server | |
ManagedPtrNewtype Server Source # | |
Defined in GI.Dbusmenu.Objects.Server toManagedPtr :: Server -> ManagedPtr Server | |
TypedObject Server Source # | |
Defined in GI.Dbusmenu.Objects.Server | |
HasParentTypes Server Source # | |
Defined in GI.Dbusmenu.Objects.Server | |
IsGValue (Maybe Server) Source # | Convert |
Defined in GI.Dbusmenu.Objects.Server gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Server -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Server) | |
type ParentTypes Server Source # | |
Defined in GI.Dbusmenu.Objects.Server type ParentTypes Server = '[Object] |
class (GObject o, IsDescendantOf Server o) => IsServer o Source #
Instances
(GObject o, IsDescendantOf Server o) => IsServer o Source # | |
Defined in GI.Dbusmenu.Objects.Server |
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, getIconPaths, getProperty, getQdata, getStatus, getTextDirection.
Setters
setData, setDataFull, setIconPaths, setProperty, setRoot, setStatus, setTextDirection.
getIconPaths
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> m [Text] | Returns: A NULL-terminated list of icon paths with memory managed by the server. Duplicate if you want to keep them. |
Gets the stored and exported icon paths from the server.
getStatus
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> m Status |
Gets the current statust hat the server is sending out over DBus.
Return value: The current status the server is sending
getTextDirection
serverGetTextDirection Source #
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> m TextDirection |
Returns the value of the text direction that is being exported over DBus for this server. It should relate to the direction of the labels and other text fields that are being exported by this server.
Return value: Text direction exported for this server.
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Server |
setIconPaths
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> [Text] | |
-> m () |
Sets the icon paths for the server. This will replace previously set icon theme paths.
setRoot
:: (HasCallStack, MonadIO m, IsServer a, IsMenuitem b) | |
=> a |
|
-> b |
|
-> m () |
This function contains all of the Value
wrapping
required to set the property Server:rootNode
on the server self
.
setStatus
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> Status |
|
-> m () |
Changes the status of the server.
setTextDirection
serverSetTextDirection Source #
:: (HasCallStack, MonadIO m, IsServer a) | |
=> a |
|
-> TextDirection |
|
-> m () |
Sets the text direction that should be exported over DBus for
this server. If the value is set to DBUSMENU_TEXT_DIRECTION_NONE
the default detection will be used for setting the value and
exported over DBus.
Properties
dbusObject
No description available in the introspection data.
constructServerDbusObject :: (IsServer 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
.
getServerDbusObject :: (MonadIO m, IsServer o) => o -> m (Maybe Text) Source #
Get the value of the “dbus-object
” property.
When overloading is enabled, this is equivalent to
get
server #dbusObject
rootNode
No description available in the introspection data.
clearServerRootNode :: (MonadIO m, IsServer o) => o -> m () Source #
Set the value of the “root-node
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#rootNode
constructServerRootNode :: (IsServer o, MonadIO m, IsMenuitem a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “root-node
” property. This is rarely needed directly, but it is used by new
.
getServerRootNode :: (MonadIO m, IsServer o) => o -> m (Maybe Menuitem) Source #
Get the value of the “root-node
” property.
When overloading is enabled, this is equivalent to
get
server #rootNode
setServerRootNode :: (MonadIO m, IsServer o, IsMenuitem a) => o -> a -> m () Source #
Set the value of the “root-node
” property.
When overloading is enabled, this is equivalent to
set
server [ #rootNode:=
value ]
version
No description available in the introspection data.
getServerVersion :: (MonadIO m, IsServer o) => o -> m Word32 Source #
Get the value of the “version
” property.
When overloading is enabled, this is equivalent to
get
server #version
Signals
itemActivationRequested
type ServerItemActivationRequestedCallback Source #
= Int32 |
|
-> Word32 |
|
-> IO () |
This is signaled when a menuitem under this server sends its activate signal.
afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivationRequested signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
server #itemActivationRequested 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.
onServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemActivationRequestedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemActivationRequested signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
server #itemActivationRequested callback
itemPropertyUpdated
type ServerItemPropertyUpdatedCallback = Int32 -> Text -> GVariant -> IO () Source #
No description available in the introspection data.
afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemPropertyUpdated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
server #itemPropertyUpdated 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.
onServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemPropertyUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemPropertyUpdated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
server #itemPropertyUpdated callback
itemUpdated
type ServerItemUpdatedCallback = Int32 -> IO () Source #
No description available in the introspection data.
afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemUpdated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
server #itemUpdated 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.
onServerItemUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerItemUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the itemUpdated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
server #itemUpdated callback
layoutUpdated
type ServerLayoutUpdatedCallback Source #
= Word32 |
|
-> Int32 |
|
-> IO () |
This signal is emitted any time the layout of the menuitems under this server is changed.
afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerLayoutUpdatedCallback) -> 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
server #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.
onServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ((?self :: a) => ServerLayoutUpdatedCallback) -> 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
server #layoutUpdated callback