gi-dbusmenu-0.4.11: Dbusmenu bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dbusmenu.Objects.Server

Description

A server which represents a sharing of a set of DbusmenuMenuitems across DBus to a Client.

Synopsis

Exported types

newtype Server Source #

Memory-managed wrapper type.

Constructors

Server (ManagedPtr Server) 

Instances

Instances details
Eq Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

Methods

(==) :: Server -> Server -> Bool #

(/=) :: Server -> Server -> Bool #

GObject Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

ManagedPtrNewtype Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

Methods

toManagedPtr :: Server -> ManagedPtr Server

TypedObject Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

Methods

glibType :: IO GType

HasParentTypes Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

IsGValue (Maybe Server) Source #

Convert Server to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Dbusmenu.Objects.Server

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Server -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Server)

type ParentTypes Server Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

type ParentTypes Server = '[Object]

class (GObject o, IsDescendantOf Server o) => IsServer o Source #

Type class for types which can be safely cast to Server, for instance with toServer.

Instances

Instances details
(GObject o, IsDescendantOf Server o) => IsServer o Source # 
Instance details

Defined in GI.Dbusmenu.Objects.Server

toServer :: (MonadIO m, IsServer o) => o -> m Server Source #

Cast to Server, for types for which this is known to be safe. For general casts, use castTo.

Methods

getIconPaths

serverGetIconPaths Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server to get the icon paths from

-> 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

serverGetStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server to get the status from

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server object to get the text direction from

-> 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

serverNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

object: The object name to show for this menu structure on DBus. May be NULL.

-> m Server 

Creates a new Server object with a specific object path on DBus. If object is set to NULL the default object name of "/com/canonical/dbusmenu" will be used.

Return value: A brand new Server

setIconPaths

serverSetIconPaths Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server to set the icon paths on

-> [Text] 
-> m () 

Sets the icon paths for the server. This will replace previously set icon theme paths.

setRoot

serverSetRoot Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a, IsMenuitem b) 
=> a

self: The Server object to set the root on

-> b

root: The new root Menuitem tree

-> m () 

This function contains all of the Value wrapping required to set the property Server:rootNode on the server self.

setStatus

serverSetStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server to set the status on

-> Status

status: Status value to set on the server

-> m () 

Changes the status of the server.

setTextDirection

serverSetTextDirection Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a) 
=> a

server: The Server object to set the text direction on

-> TextDirection

dir: Direction of the text

-> 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 #

Arguments

 = Int32

arg1: The ID of the parent for this update.

-> Word32

arg2: The timestamp of when the event happened

-> 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 #

Arguments

 = Word32

arg1: A revision number representing which revision the update represents itself as.

-> Int32

arg2: The ID of the parent for this update.

-> 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