{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

A server which represents a sharing of a set of
	@/DbusmenuMenuitems/@ across DBus to a 'GI.Dbusmenu.Objects.Client.Client'.
-}

#define ENABLE_OVERLOADING \
       (!defined(__HADDOCK_VERSION__))

module GI.Dbusmenu.Objects.Server
    ( 

-- * Exported types
    Server(..)                              ,
    IsServer                                ,
    toServer                                ,
    noServer                                ,


 -- * Methods
-- ** getIconPaths #method:getIconPaths#

#if ENABLE_OVERLOADING
    ServerGetIconPathsMethodInfo            ,
#endif
    serverGetIconPaths                      ,


-- ** getStatus #method:getStatus#

#if ENABLE_OVERLOADING
    ServerGetStatusMethodInfo               ,
#endif
    serverGetStatus                         ,


-- ** getTextDirection #method:getTextDirection#

#if ENABLE_OVERLOADING
    ServerGetTextDirectionMethodInfo        ,
#endif
    serverGetTextDirection                  ,


-- ** new #method:new#

    serverNew                               ,


-- ** setIconPaths #method:setIconPaths#

#if ENABLE_OVERLOADING
    ServerSetIconPathsMethodInfo            ,
#endif
    serverSetIconPaths                      ,


-- ** setRoot #method:setRoot#

#if ENABLE_OVERLOADING
    ServerSetRootMethodInfo                 ,
#endif
    serverSetRoot                           ,


-- ** setStatus #method:setStatus#

#if ENABLE_OVERLOADING
    ServerSetStatusMethodInfo               ,
#endif
    serverSetStatus                         ,


-- ** setTextDirection #method:setTextDirection#

#if ENABLE_OVERLOADING
    ServerSetTextDirectionMethodInfo        ,
#endif
    serverSetTextDirection                  ,




 -- * Properties
-- ** dbusObject #attr:dbusObject#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    ServerDbusObjectPropertyInfo            ,
#endif
    constructServerDbusObject               ,
    getServerDbusObject                     ,
#if ENABLE_OVERLOADING
    serverDbusObject                        ,
#endif


-- ** rootNode #attr:rootNode#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    ServerRootNodePropertyInfo              ,
#endif
    clearServerRootNode                     ,
    constructServerRootNode                 ,
    getServerRootNode                       ,
#if ENABLE_OVERLOADING
    serverRootNode                          ,
#endif
    setServerRootNode                       ,


-- ** version #attr:version#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    ServerVersionPropertyInfo               ,
#endif
    getServerVersion                        ,
#if ENABLE_OVERLOADING
    serverVersion                           ,
#endif




 -- * Signals
-- ** itemActivationRequested #signal:itemActivationRequested#

    C_ServerItemActivationRequestedCallback ,
    ServerItemActivationRequestedCallback   ,
#if ENABLE_OVERLOADING
    ServerItemActivationRequestedSignalInfo ,
#endif
    afterServerItemActivationRequested      ,
    genClosure_ServerItemActivationRequested,
    mk_ServerItemActivationRequestedCallback,
    noServerItemActivationRequestedCallback ,
    onServerItemActivationRequested         ,
    wrap_ServerItemActivationRequestedCallback,


-- ** itemPropertyUpdated #signal:itemPropertyUpdated#

    C_ServerItemPropertyUpdatedCallback     ,
    ServerItemPropertyUpdatedCallback       ,
#if ENABLE_OVERLOADING
    ServerItemPropertyUpdatedSignalInfo     ,
#endif
    afterServerItemPropertyUpdated          ,
    genClosure_ServerItemPropertyUpdated    ,
    mk_ServerItemPropertyUpdatedCallback    ,
    noServerItemPropertyUpdatedCallback     ,
    onServerItemPropertyUpdated             ,
    wrap_ServerItemPropertyUpdatedCallback  ,


-- ** itemUpdated #signal:itemUpdated#

    C_ServerItemUpdatedCallback             ,
    ServerItemUpdatedCallback               ,
#if ENABLE_OVERLOADING
    ServerItemUpdatedSignalInfo             ,
#endif
    afterServerItemUpdated                  ,
    genClosure_ServerItemUpdated            ,
    mk_ServerItemUpdatedCallback            ,
    noServerItemUpdatedCallback             ,
    onServerItemUpdated                     ,
    wrap_ServerItemUpdatedCallback          ,


-- ** layoutUpdated #signal:layoutUpdated#

    C_ServerLayoutUpdatedCallback           ,
    ServerLayoutUpdatedCallback             ,
#if ENABLE_OVERLOADING
    ServerLayoutUpdatedSignalInfo           ,
#endif
    afterServerLayoutUpdated                ,
    genClosure_ServerLayoutUpdated          ,
    mk_ServerLayoutUpdatedCallback          ,
    noServerLayoutUpdatedCallback           ,
    onServerLayoutUpdated                   ,
    wrap_ServerLayoutUpdatedCallback        ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import {-# SOURCE #-} qualified GI.Dbusmenu.Enums as Dbusmenu.Enums
import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Menuitem as Dbusmenu.Menuitem
import qualified GI.GObject.Objects.Object as GObject.Object

-- | Memory-managed wrapper type.
newtype Server = Server (ManagedPtr Server)
foreign import ccall "dbusmenu_server_get_type"
    c_dbusmenu_server_get_type :: IO GType

instance GObject Server where
    gobjectType :: Server -> IO GType
gobjectType _ = IO GType
c_dbusmenu_server_get_type
    

-- | Type class for types which can be safely cast to `Server`, for instance with `toServer`.
class GObject o => IsServer o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Server a) =>
    IsServer a
#endif
instance IsServer Server
instance GObject.Object.IsObject Server

-- | Cast to `Server`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toServer :: (MonadIO m, IsServer o) => o -> m Server
toServer :: o -> m Server
toServer = IO Server -> m Server
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Server -> m Server) -> (o -> IO Server) -> o -> m Server
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Server -> Server) -> o -> IO Server
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Server -> Server
Server

-- | A convenience alias for `Nothing` :: `Maybe` `Server`.
noServer :: Maybe Server
noServer :: Maybe Server
noServer = Maybe Server
forall a. Maybe a
Nothing

#if ENABLE_OVERLOADING
type family ResolveServerMethod (t :: Symbol) (o :: *) :: * where
    ResolveServerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveServerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveServerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveServerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveServerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveServerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveServerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveServerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveServerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveServerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveServerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveServerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveServerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveServerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveServerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveServerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveServerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveServerMethod "getIconPaths" o = ServerGetIconPathsMethodInfo
    ResolveServerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveServerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveServerMethod "getStatus" o = ServerGetStatusMethodInfo
    ResolveServerMethod "getTextDirection" o = ServerGetTextDirectionMethodInfo
    ResolveServerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveServerMethod "setIconPaths" o = ServerSetIconPathsMethodInfo
    ResolveServerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveServerMethod "setRoot" o = ServerSetRootMethodInfo
    ResolveServerMethod "setStatus" o = ServerSetStatusMethodInfo
    ResolveServerMethod "setTextDirection" o = ServerSetTextDirectionMethodInfo
    ResolveServerMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveServerMethod t Server, O.MethodInfo info Server p) => O.IsLabelProxy t (Server -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveServerMethod t Server, O.MethodInfo info Server p) => O.IsLabel t (Server -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif

#endif

-- signal Server::item-activation-requested
{- |
This is signaled when a menuitem under this server
		sends its activate signal.
-}
type ServerItemActivationRequestedCallback =
    Int32
    {- ^ /@arg1@/: The ID of the parent for this update. -}
    -> Word32
    {- ^ /@arg2@/: The timestamp of when the event happened -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemActivationRequestedCallback`@.
noServerItemActivationRequestedCallback :: Maybe ServerItemActivationRequestedCallback
noServerItemActivationRequestedCallback :: Maybe ServerItemActivationRequestedCallback
noServerItemActivationRequestedCallback = Maybe ServerItemActivationRequestedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemActivationRequestedCallback =
    Ptr () ->                               -- object
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ServerItemActivationRequestedCallback`.
foreign import ccall "wrapper"
    mk_ServerItemActivationRequestedCallback :: C_ServerItemActivationRequestedCallback -> IO (FunPtr C_ServerItemActivationRequestedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_ServerItemActivationRequested :: ServerItemActivationRequestedCallback -> IO Closure
genClosure_ServerItemActivationRequested :: ServerItemActivationRequestedCallback -> IO Closure
genClosure_ServerItemActivationRequested cb :: ServerItemActivationRequestedCallback
cb = do
    let cb' :: C_ServerItemActivationRequestedCallback
cb' = ServerItemActivationRequestedCallback
-> C_ServerItemActivationRequestedCallback
wrap_ServerItemActivationRequestedCallback ServerItemActivationRequestedCallback
cb
    C_ServerItemActivationRequestedCallback
-> IO (FunPtr C_ServerItemActivationRequestedCallback)
mk_ServerItemActivationRequestedCallback C_ServerItemActivationRequestedCallback
cb' IO (FunPtr C_ServerItemActivationRequestedCallback)
-> (FunPtr C_ServerItemActivationRequestedCallback -> IO Closure)
-> IO Closure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ServerItemActivationRequestedCallback -> IO Closure
forall a. FunPtr a -> IO Closure
newCClosure


-- | Wrap a `ServerItemActivationRequestedCallback` into a `C_ServerItemActivationRequestedCallback`.
wrap_ServerItemActivationRequestedCallback ::
    ServerItemActivationRequestedCallback ->
    C_ServerItemActivationRequestedCallback
wrap_ServerItemActivationRequestedCallback :: ServerItemActivationRequestedCallback
-> C_ServerItemActivationRequestedCallback
wrap_ServerItemActivationRequestedCallback _cb :: ServerItemActivationRequestedCallback
_cb _ arg1 :: Int32
arg1 arg2 :: Word32
arg2 _ = do
    ServerItemActivationRequestedCallback
_cb  Int32
arg1 Word32
arg2


{- |
Connect a signal handler for the “@item-activation-requested@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' server #itemActivationRequested callback
@
-}
onServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId
onServerItemActivationRequested :: a -> ServerItemActivationRequestedCallback -> m SignalHandlerId
onServerItemActivationRequested obj :: a
obj cb :: ServerItemActivationRequestedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemActivationRequestedCallback
cb' = ServerItemActivationRequestedCallback
-> C_ServerItemActivationRequestedCallback
wrap_ServerItemActivationRequestedCallback ServerItemActivationRequestedCallback
cb
    FunPtr C_ServerItemActivationRequestedCallback
cb'' <- C_ServerItemActivationRequestedCallback
-> IO (FunPtr C_ServerItemActivationRequestedCallback)
mk_ServerItemActivationRequestedCallback C_ServerItemActivationRequestedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemActivationRequestedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-activation-requested" FunPtr C_ServerItemActivationRequestedCallback
cb'' SignalConnectMode
SignalConnectBefore

{- |
Connect a signal handler for the “@item-activation-requested@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' server #itemActivationRequested callback
@
-}
afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId
afterServerItemActivationRequested :: a -> ServerItemActivationRequestedCallback -> m SignalHandlerId
afterServerItemActivationRequested obj :: a
obj cb :: ServerItemActivationRequestedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemActivationRequestedCallback
cb' = ServerItemActivationRequestedCallback
-> C_ServerItemActivationRequestedCallback
wrap_ServerItemActivationRequestedCallback ServerItemActivationRequestedCallback
cb
    FunPtr C_ServerItemActivationRequestedCallback
cb'' <- C_ServerItemActivationRequestedCallback
-> IO (FunPtr C_ServerItemActivationRequestedCallback)
mk_ServerItemActivationRequestedCallback C_ServerItemActivationRequestedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemActivationRequestedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-activation-requested" FunPtr C_ServerItemActivationRequestedCallback
cb'' SignalConnectMode
SignalConnectAfter


-- signal Server::item-property-updated
{- |
/No description available in the introspection data./
-}
type ServerItemPropertyUpdatedCallback =
    Int32
    -> T.Text
    -> GVariant
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemPropertyUpdatedCallback`@.
noServerItemPropertyUpdatedCallback :: Maybe ServerItemPropertyUpdatedCallback
noServerItemPropertyUpdatedCallback :: Maybe ServerItemPropertyUpdatedCallback
noServerItemPropertyUpdatedCallback = Maybe ServerItemPropertyUpdatedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemPropertyUpdatedCallback =
    Ptr () ->                               -- object
    Int32 ->
    CString ->
    Ptr GVariant ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ServerItemPropertyUpdatedCallback`.
foreign import ccall "wrapper"
    mk_ServerItemPropertyUpdatedCallback :: C_ServerItemPropertyUpdatedCallback -> IO (FunPtr C_ServerItemPropertyUpdatedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_ServerItemPropertyUpdated :: ServerItemPropertyUpdatedCallback -> IO Closure
genClosure_ServerItemPropertyUpdated :: ServerItemPropertyUpdatedCallback -> IO Closure
genClosure_ServerItemPropertyUpdated cb :: ServerItemPropertyUpdatedCallback
cb = do
    let cb' :: C_ServerItemPropertyUpdatedCallback
cb' = ServerItemPropertyUpdatedCallback
-> C_ServerItemPropertyUpdatedCallback
wrap_ServerItemPropertyUpdatedCallback ServerItemPropertyUpdatedCallback
cb
    C_ServerItemPropertyUpdatedCallback
-> IO (FunPtr C_ServerItemPropertyUpdatedCallback)
mk_ServerItemPropertyUpdatedCallback C_ServerItemPropertyUpdatedCallback
cb' IO (FunPtr C_ServerItemPropertyUpdatedCallback)
-> (FunPtr C_ServerItemPropertyUpdatedCallback -> IO Closure)
-> IO Closure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ServerItemPropertyUpdatedCallback -> IO Closure
forall a. FunPtr a -> IO Closure
newCClosure


-- | Wrap a `ServerItemPropertyUpdatedCallback` into a `C_ServerItemPropertyUpdatedCallback`.
wrap_ServerItemPropertyUpdatedCallback ::
    ServerItemPropertyUpdatedCallback ->
    C_ServerItemPropertyUpdatedCallback
wrap_ServerItemPropertyUpdatedCallback :: ServerItemPropertyUpdatedCallback
-> C_ServerItemPropertyUpdatedCallback
wrap_ServerItemPropertyUpdatedCallback _cb :: ServerItemPropertyUpdatedCallback
_cb _ object :: Int32
object p0 :: CString
p0 p1 :: Ptr GVariant
p1 _ = do
    Text
p0' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
p0
    GVariant
p1' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
p1
    ServerItemPropertyUpdatedCallback
_cb  Int32
object Text
p0' GVariant
p1'


{- |
Connect a signal handler for the “@item-property-updated@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' server #itemPropertyUpdated callback
@
-}
onServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId
onServerItemPropertyUpdated :: a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId
onServerItemPropertyUpdated obj :: a
obj cb :: ServerItemPropertyUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemPropertyUpdatedCallback
cb' = ServerItemPropertyUpdatedCallback
-> C_ServerItemPropertyUpdatedCallback
wrap_ServerItemPropertyUpdatedCallback ServerItemPropertyUpdatedCallback
cb
    FunPtr C_ServerItemPropertyUpdatedCallback
cb'' <- C_ServerItemPropertyUpdatedCallback
-> IO (FunPtr C_ServerItemPropertyUpdatedCallback)
mk_ServerItemPropertyUpdatedCallback C_ServerItemPropertyUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemPropertyUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-property-updated" FunPtr C_ServerItemPropertyUpdatedCallback
cb'' SignalConnectMode
SignalConnectBefore

{- |
Connect a signal handler for the “@item-property-updated@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' server #itemPropertyUpdated callback
@
-}
afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId
afterServerItemPropertyUpdated :: a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId
afterServerItemPropertyUpdated obj :: a
obj cb :: ServerItemPropertyUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemPropertyUpdatedCallback
cb' = ServerItemPropertyUpdatedCallback
-> C_ServerItemPropertyUpdatedCallback
wrap_ServerItemPropertyUpdatedCallback ServerItemPropertyUpdatedCallback
cb
    FunPtr C_ServerItemPropertyUpdatedCallback
cb'' <- C_ServerItemPropertyUpdatedCallback
-> IO (FunPtr C_ServerItemPropertyUpdatedCallback)
mk_ServerItemPropertyUpdatedCallback C_ServerItemPropertyUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemPropertyUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-property-updated" FunPtr C_ServerItemPropertyUpdatedCallback
cb'' SignalConnectMode
SignalConnectAfter


-- signal Server::item-updated
{- |
/No description available in the introspection data./
-}
type ServerItemUpdatedCallback =
    Int32
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemUpdatedCallback`@.
noServerItemUpdatedCallback :: Maybe ServerItemUpdatedCallback
noServerItemUpdatedCallback :: Maybe ServerItemUpdatedCallback
noServerItemUpdatedCallback = Maybe ServerItemUpdatedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ServerItemUpdatedCallback =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ServerItemUpdatedCallback`.
foreign import ccall "wrapper"
    mk_ServerItemUpdatedCallback :: C_ServerItemUpdatedCallback -> IO (FunPtr C_ServerItemUpdatedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_ServerItemUpdated :: ServerItemUpdatedCallback -> IO Closure
genClosure_ServerItemUpdated :: ServerItemUpdatedCallback -> IO Closure
genClosure_ServerItemUpdated cb :: ServerItemUpdatedCallback
cb = do
    let cb' :: C_ServerItemUpdatedCallback
cb' = ServerItemUpdatedCallback -> C_ServerItemUpdatedCallback
wrap_ServerItemUpdatedCallback ServerItemUpdatedCallback
cb
    C_ServerItemUpdatedCallback
-> IO (FunPtr C_ServerItemUpdatedCallback)
mk_ServerItemUpdatedCallback C_ServerItemUpdatedCallback
cb' IO (FunPtr C_ServerItemUpdatedCallback)
-> (FunPtr C_ServerItemUpdatedCallback -> IO Closure) -> IO Closure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ServerItemUpdatedCallback -> IO Closure
forall a. FunPtr a -> IO Closure
newCClosure


-- | Wrap a `ServerItemUpdatedCallback` into a `C_ServerItemUpdatedCallback`.
wrap_ServerItemUpdatedCallback ::
    ServerItemUpdatedCallback ->
    C_ServerItemUpdatedCallback
wrap_ServerItemUpdatedCallback :: ServerItemUpdatedCallback -> C_ServerItemUpdatedCallback
wrap_ServerItemUpdatedCallback _cb :: ServerItemUpdatedCallback
_cb _ object :: Int32
object _ = do
    ServerItemUpdatedCallback
_cb  Int32
object


{- |
Connect a signal handler for the “@item-updated@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' server #itemUpdated callback
@
-}
onServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId
onServerItemUpdated :: a -> ServerItemUpdatedCallback -> m SignalHandlerId
onServerItemUpdated obj :: a
obj cb :: ServerItemUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemUpdatedCallback
cb' = ServerItemUpdatedCallback -> C_ServerItemUpdatedCallback
wrap_ServerItemUpdatedCallback ServerItemUpdatedCallback
cb
    FunPtr C_ServerItemUpdatedCallback
cb'' <- C_ServerItemUpdatedCallback
-> IO (FunPtr C_ServerItemUpdatedCallback)
mk_ServerItemUpdatedCallback C_ServerItemUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-updated" FunPtr C_ServerItemUpdatedCallback
cb'' SignalConnectMode
SignalConnectBefore

{- |
Connect a signal handler for the “@item-updated@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' server #itemUpdated callback
@
-}
afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId
afterServerItemUpdated :: a -> ServerItemUpdatedCallback -> m SignalHandlerId
afterServerItemUpdated obj :: a
obj cb :: ServerItemUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerItemUpdatedCallback
cb' = ServerItemUpdatedCallback -> C_ServerItemUpdatedCallback
wrap_ServerItemUpdatedCallback ServerItemUpdatedCallback
cb
    FunPtr C_ServerItemUpdatedCallback
cb'' <- C_ServerItemUpdatedCallback
-> IO (FunPtr C_ServerItemUpdatedCallback)
mk_ServerItemUpdatedCallback C_ServerItemUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerItemUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "item-updated" FunPtr C_ServerItemUpdatedCallback
cb'' SignalConnectMode
SignalConnectAfter


-- signal Server::layout-updated
{- |
This signal is emitted any time the layout of the
		menuitems under this server is changed.
-}
type ServerLayoutUpdatedCallback =
    Word32
    {- ^ /@arg1@/: A revision number representing which revision the update
		       represents itself as. -}
    -> Int32
    {- ^ /@arg2@/: The ID of the parent for this update. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ServerLayoutUpdatedCallback`@.
noServerLayoutUpdatedCallback :: Maybe ServerLayoutUpdatedCallback
noServerLayoutUpdatedCallback :: Maybe ServerLayoutUpdatedCallback
noServerLayoutUpdatedCallback = Maybe ServerLayoutUpdatedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ServerLayoutUpdatedCallback =
    Ptr () ->                               -- object
    Word32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ServerLayoutUpdatedCallback`.
foreign import ccall "wrapper"
    mk_ServerLayoutUpdatedCallback :: C_ServerLayoutUpdatedCallback -> IO (FunPtr C_ServerLayoutUpdatedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_ServerLayoutUpdated :: ServerLayoutUpdatedCallback -> IO Closure
genClosure_ServerLayoutUpdated :: ServerLayoutUpdatedCallback -> IO Closure
genClosure_ServerLayoutUpdated cb :: ServerLayoutUpdatedCallback
cb = do
    let cb' :: C_ServerLayoutUpdatedCallback
cb' = ServerLayoutUpdatedCallback -> C_ServerLayoutUpdatedCallback
wrap_ServerLayoutUpdatedCallback ServerLayoutUpdatedCallback
cb
    C_ServerLayoutUpdatedCallback
-> IO (FunPtr C_ServerLayoutUpdatedCallback)
mk_ServerLayoutUpdatedCallback C_ServerLayoutUpdatedCallback
cb' IO (FunPtr C_ServerLayoutUpdatedCallback)
-> (FunPtr C_ServerLayoutUpdatedCallback -> IO Closure)
-> IO Closure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ServerLayoutUpdatedCallback -> IO Closure
forall a. FunPtr a -> IO Closure
newCClosure


-- | Wrap a `ServerLayoutUpdatedCallback` into a `C_ServerLayoutUpdatedCallback`.
wrap_ServerLayoutUpdatedCallback ::
    ServerLayoutUpdatedCallback ->
    C_ServerLayoutUpdatedCallback
wrap_ServerLayoutUpdatedCallback :: ServerLayoutUpdatedCallback -> C_ServerLayoutUpdatedCallback
wrap_ServerLayoutUpdatedCallback _cb :: ServerLayoutUpdatedCallback
_cb _ arg1 :: Word32
arg1 arg2 :: Int32
arg2 _ = do
    ServerLayoutUpdatedCallback
_cb  Word32
arg1 Int32
arg2


{- |
Connect a signal handler for the “@layout-updated@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' server #layoutUpdated callback
@
-}
onServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId
onServerLayoutUpdated :: a -> ServerLayoutUpdatedCallback -> m SignalHandlerId
onServerLayoutUpdated obj :: a
obj cb :: ServerLayoutUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerLayoutUpdatedCallback
cb' = ServerLayoutUpdatedCallback -> C_ServerLayoutUpdatedCallback
wrap_ServerLayoutUpdatedCallback ServerLayoutUpdatedCallback
cb
    FunPtr C_ServerLayoutUpdatedCallback
cb'' <- C_ServerLayoutUpdatedCallback
-> IO (FunPtr C_ServerLayoutUpdatedCallback)
mk_ServerLayoutUpdatedCallback C_ServerLayoutUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerLayoutUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "layout-updated" FunPtr C_ServerLayoutUpdatedCallback
cb'' SignalConnectMode
SignalConnectBefore

{- |
Connect a signal handler for the “@layout-updated@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' server #layoutUpdated callback
@
-}
afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId
afterServerLayoutUpdated :: a -> ServerLayoutUpdatedCallback -> m SignalHandlerId
afterServerLayoutUpdated obj :: a
obj cb :: ServerLayoutUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ServerLayoutUpdatedCallback
cb' = ServerLayoutUpdatedCallback -> C_ServerLayoutUpdatedCallback
wrap_ServerLayoutUpdatedCallback ServerLayoutUpdatedCallback
cb
    FunPtr C_ServerLayoutUpdatedCallback
cb'' <- C_ServerLayoutUpdatedCallback
-> IO (FunPtr C_ServerLayoutUpdatedCallback)
mk_ServerLayoutUpdatedCallback C_ServerLayoutUpdatedCallback
cb'
    a
-> String
-> FunPtr C_ServerLayoutUpdatedCallback
-> SignalConnectMode
-> IO SignalHandlerId
forall o a.
GObject o =>
o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
connectSignalFunPtr a
obj "layout-updated" FunPtr C_ServerLayoutUpdatedCallback
cb'' SignalConnectMode
SignalConnectAfter


-- VVV Prop "dbus-object"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

{- |
Get the value of the “@dbus-object@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' server #dbusObject
@
-}
getServerDbusObject :: (MonadIO m, IsServer o) => o -> m (Maybe T.Text)
getServerDbusObject :: o -> m (Maybe Text)
getServerDbusObject obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
getObjectPropertyString o
obj "dbus-object"

{- |
Construct a `GValueConstruct` with valid value for the “@dbus-object@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructServerDbusObject :: (IsServer o) => T.Text -> IO (GValueConstruct o)
constructServerDbusObject :: Text -> IO (GValueConstruct o)
constructServerDbusObject val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
constructObjectPropertyString "dbus-object" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

#if ENABLE_OVERLOADING
data ServerDbusObjectPropertyInfo
instance AttrInfo ServerDbusObjectPropertyInfo where
    type AttrAllowedOps ServerDbusObjectPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint ServerDbusObjectPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint ServerDbusObjectPropertyInfo = IsServer
    type AttrGetType ServerDbusObjectPropertyInfo = (Maybe T.Text)
    type AttrLabel ServerDbusObjectPropertyInfo = "dbus-object"
    type AttrOrigin ServerDbusObjectPropertyInfo = Server
    attrGet _ = getServerDbusObject
    attrSet _ = undefined
    attrConstruct _ = constructServerDbusObject
    attrClear _ = undefined
#endif

-- VVV Prop "root-node"
   -- Type: TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

{- |
Get the value of the “@root-node@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' server #rootNode
@
-}
getServerRootNode :: (MonadIO m, IsServer o) => o -> m (Maybe Dbusmenu.Menuitem.Menuitem)
getServerRootNode :: o -> m (Maybe Menuitem)
getServerRootNode obj :: o
obj = IO (Maybe Menuitem) -> m (Maybe Menuitem)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Menuitem) -> m (Maybe Menuitem))
-> IO (Maybe Menuitem) -> m (Maybe Menuitem)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Menuitem -> Menuitem)
-> IO (Maybe Menuitem)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
getObjectPropertyObject o
obj "root-node" ManagedPtr Menuitem -> Menuitem
Dbusmenu.Menuitem.Menuitem

{- |
Set the value of the “@root-node@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' server [ #rootNode 'Data.GI.Base.Attributes.:=' value ]
@
-}
setServerRootNode :: (MonadIO m, IsServer o, Dbusmenu.Menuitem.IsMenuitem a) => o -> a -> m ()
setServerRootNode :: o -> a -> m ()
setServerRootNode obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
setObjectPropertyObject o
obj "root-node" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

{- |
Construct a `GValueConstruct` with valid value for the “@root-node@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructServerRootNode :: (IsServer o, Dbusmenu.Menuitem.IsMenuitem a) => a -> IO (GValueConstruct o)
constructServerRootNode :: a -> IO (GValueConstruct o)
constructServerRootNode val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
constructObjectPropertyObject "root-node" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

{- |
Set the value of the “@root-node@” property to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.clear' #rootNode
@
-}
clearServerRootNode :: (MonadIO m, IsServer o) => o -> m ()
clearServerRootNode :: o -> m ()
clearServerRootNode obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Menuitem -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
setObjectPropertyObject o
obj "root-node" (Maybe Menuitem
forall a. Maybe a
Nothing :: Maybe Dbusmenu.Menuitem.Menuitem)

#if ENABLE_OVERLOADING
data ServerRootNodePropertyInfo
instance AttrInfo ServerRootNodePropertyInfo where
    type AttrAllowedOps ServerRootNodePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint ServerRootNodePropertyInfo = Dbusmenu.Menuitem.IsMenuitem
    type AttrBaseTypeConstraint ServerRootNodePropertyInfo = IsServer
    type AttrGetType ServerRootNodePropertyInfo = (Maybe Dbusmenu.Menuitem.Menuitem)
    type AttrLabel ServerRootNodePropertyInfo = "root-node"
    type AttrOrigin ServerRootNodePropertyInfo = Server
    attrGet _ = getServerRootNode
    attrSet _ = setServerRootNode
    attrConstruct _ = constructServerRootNode
    attrClear _ = clearServerRootNode
#endif

-- VVV Prop "version"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

{- |
Get the value of the “@version@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' server #version
@
-}
getServerVersion :: (MonadIO m, IsServer o) => o -> m Word32
getServerVersion :: o -> m Word32
getServerVersion obj :: o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
getObjectPropertyUInt32 o
obj "version"

#if ENABLE_OVERLOADING
data ServerVersionPropertyInfo
instance AttrInfo ServerVersionPropertyInfo where
    type AttrAllowedOps ServerVersionPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint ServerVersionPropertyInfo = (~) ()
    type AttrBaseTypeConstraint ServerVersionPropertyInfo = IsServer
    type AttrGetType ServerVersionPropertyInfo = Word32
    type AttrLabel ServerVersionPropertyInfo = "version"
    type AttrOrigin ServerVersionPropertyInfo = Server
    attrGet _ = getServerVersion
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList Server
type instance O.AttributeList Server = ServerAttributeList
type ServerAttributeList = ('[ '("dbusObject", ServerDbusObjectPropertyInfo), '("rootNode", ServerRootNodePropertyInfo), '("version", ServerVersionPropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
serverDbusObject :: AttrLabelProxy "dbusObject"
serverDbusObject = AttrLabelProxy

serverRootNode :: AttrLabelProxy "rootNode"
serverRootNode = AttrLabelProxy

serverVersion :: AttrLabelProxy "version"
serverVersion = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
data ServerItemActivationRequestedSignalInfo
instance SignalInfo ServerItemActivationRequestedSignalInfo where
    type HaskellCallbackType ServerItemActivationRequestedSignalInfo = ServerItemActivationRequestedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ServerItemActivationRequestedCallback cb
        cb'' <- mk_ServerItemActivationRequestedCallback cb'
        connectSignalFunPtr obj "item-activation-requested" cb'' connectMode

data ServerItemPropertyUpdatedSignalInfo
instance SignalInfo ServerItemPropertyUpdatedSignalInfo where
    type HaskellCallbackType ServerItemPropertyUpdatedSignalInfo = ServerItemPropertyUpdatedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ServerItemPropertyUpdatedCallback cb
        cb'' <- mk_ServerItemPropertyUpdatedCallback cb'
        connectSignalFunPtr obj "item-property-updated" cb'' connectMode

data ServerItemUpdatedSignalInfo
instance SignalInfo ServerItemUpdatedSignalInfo where
    type HaskellCallbackType ServerItemUpdatedSignalInfo = ServerItemUpdatedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ServerItemUpdatedCallback cb
        cb'' <- mk_ServerItemUpdatedCallback cb'
        connectSignalFunPtr obj "item-updated" cb'' connectMode

data ServerLayoutUpdatedSignalInfo
instance SignalInfo ServerLayoutUpdatedSignalInfo where
    type HaskellCallbackType ServerLayoutUpdatedSignalInfo = ServerLayoutUpdatedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ServerLayoutUpdatedCallback cb
        cb'' <- mk_ServerLayoutUpdatedCallback cb'
        connectSignalFunPtr obj "layout-updated" cb'' connectMode

type instance O.SignalList Server = ServerSignalList
type ServerSignalList = ('[ '("itemActivationRequested", ServerItemActivationRequestedSignalInfo), '("itemPropertyUpdated", ServerItemPropertyUpdatedSignalInfo), '("itemUpdated", ServerItemUpdatedSignalInfo), '("layoutUpdated", ServerLayoutUpdatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method Server::new
-- method type : Constructor
-- Args : [Arg {argCName = "object", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The object name to show for this menu structure\n\t\ton DBus.  May be NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Server"}))
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_new" dbusmenu_server_new :: 
    CString ->                              -- object : TBasicType TUTF8
    IO (Ptr Server)

{- |
Creates a new 'GI.Dbusmenu.Objects.Server.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 'GI.Dbusmenu.Objects.Server.Server'
-}
serverNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    {- ^ /@object@/: The object name to show for this menu structure
		on DBus.  May be NULL. -}
    -> m Server
serverNew :: Text -> m Server
serverNew object :: Text
object = IO Server -> m Server
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Server -> m Server) -> IO Server -> m Server
forall a b. (a -> b) -> a -> b
$ do
    CString
object' <- Text -> IO CString
textToCString Text
object
    Ptr Server
result <- CString -> IO (Ptr Server)
dbusmenu_server_new CString
object'
    Text -> Ptr Server -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "serverNew" Ptr Server
result
    Server
result' <- ((ManagedPtr Server -> Server) -> Ptr Server -> IO Server
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Server -> Server
Server) Ptr Server
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
object'
    Server -> IO Server
forall (m :: * -> *) a. Monad m => a -> m a
return Server
result'

#if ENABLE_OVERLOADING
#endif

-- method Server::get_icon_paths
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to get the icon paths from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_get_icon_paths" dbusmenu_server_get_icon_paths :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    IO (Ptr CString)

{- |
Gets the stored and exported icon paths from the server.
-}
serverGetIconPaths ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to get the icon paths from -}
    -> m [T.Text]
    {- ^ __Returns:__ A NULL-terminated list of icon paths with
  memory managed by the server.  Duplicate if you want
  to keep them. -}
serverGetIconPaths :: a -> m [Text]
serverGetIconPaths server :: a
server = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    Ptr CString
result <- Ptr Server -> IO (Ptr CString)
dbusmenu_server_get_icon_paths Ptr Server
server'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "serverGetIconPaths" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'

#if ENABLE_OVERLOADING
data ServerGetIconPathsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsServer a) => O.MethodInfo ServerGetIconPathsMethodInfo a signature where
    overloadedMethod _ = serverGetIconPaths

#endif

-- method Server::get_status
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to get the status from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Status"}))
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_get_status" dbusmenu_server_get_status :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    IO CUInt

{- |
Gets the current statust hat the server is sending out over
	DBus.

	Return value: The current status the server is sending
-}
serverGetStatus ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to get the status from -}
    -> m Dbusmenu.Enums.Status
serverGetStatus :: a -> m Status
serverGetStatus server :: a
server = IO Status -> m Status
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Status -> m Status) -> IO Status -> m Status
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    CUInt
result <- Ptr Server -> IO CUInt
dbusmenu_server_get_status Ptr Server
server'
    let result' :: Status
result' = (Int -> Status
forall a. Enum a => Int -> a
toEnum (Int -> Status) -> (CUInt -> Int) -> CUInt -> Status
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    Status -> IO Status
forall (m :: * -> *) a. Monad m => a -> m a
return Status
result'

#if ENABLE_OVERLOADING
data ServerGetStatusMethodInfo
instance (signature ~ (m Dbusmenu.Enums.Status), MonadIO m, IsServer a) => O.MethodInfo ServerGetStatusMethodInfo a signature where
    overloadedMethod _ = serverGetStatus

#endif

-- method Server::get_text_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to get the text direction from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"}))
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_get_text_direction" dbusmenu_server_get_text_direction :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    IO CUInt

{- |
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.
-}
serverGetTextDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' object to get the text direction from -}
    -> m Dbusmenu.Enums.TextDirection
serverGetTextDirection :: a -> m TextDirection
serverGetTextDirection server :: a
server = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    CUInt
result <- Ptr Server -> IO CUInt
dbusmenu_server_get_text_direction Ptr Server
server'
    let result' :: TextDirection
result' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    TextDirection -> IO TextDirection
forall (m :: * -> *) a. Monad m => a -> m a
return TextDirection
result'

#if ENABLE_OVERLOADING
data ServerGetTextDirectionMethodInfo
instance (signature ~ (m Dbusmenu.Enums.TextDirection), MonadIO m, IsServer a) => O.MethodInfo ServerGetTextDirectionMethodInfo a signature where
    overloadedMethod _ = serverGetTextDirection

#endif

-- method Server::set_icon_paths
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to set the icon paths on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon_paths", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_set_icon_paths" dbusmenu_server_set_icon_paths :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    Ptr CString ->                          -- icon_paths : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()

{- |
Sets the icon paths for the server.  This will replace previously
	set icon theme paths.
-}
serverSetIconPaths ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to set the icon paths on -}
    -> [T.Text]
    -> m ()
serverSetIconPaths :: a -> [Text] -> m ()
serverSetIconPaths server :: a
server iconPaths :: [Text]
iconPaths = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    Ptr CString
iconPaths' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
iconPaths
    Ptr Server -> Ptr CString -> IO ()
dbusmenu_server_set_icon_paths Ptr Server
server' Ptr CString
iconPaths'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
iconPaths'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
iconPaths'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if ENABLE_OVERLOADING
data ServerSetIconPathsMethodInfo
instance (signature ~ ([T.Text] -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetIconPathsMethodInfo a signature where
    overloadedMethod _ = serverSetIconPaths

#endif

-- method Server::set_root
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to set the root on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "root", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The new root #DbusmenuMenuitem tree", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_set_root" dbusmenu_server_set_root :: 
    Ptr Server ->                           -- self : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    Ptr Dbusmenu.Menuitem.Menuitem ->       -- root : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})
    IO ()

{- |
This function contains all of the 'GI.GObject.Structs.Value.Value' wrapping
	required to set the property 'GI.Dbusmenu.Objects.Server.Server':@/root-node/@
	on the server /@self@/.
-}
serverSetRoot ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a, Dbusmenu.Menuitem.IsMenuitem b) =>
    a
    {- ^ /@self@/: The 'GI.Dbusmenu.Objects.Server.Server' object to set the root on -}
    -> b
    {- ^ /@root@/: The new root 'GI.Dbusmenu.Objects.Menuitem.Menuitem' tree -}
    -> m ()
serverSetRoot :: a -> b -> m ()
serverSetRoot self :: a
self root :: b
root = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
self' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Menuitem
root' <- b -> IO (Ptr Menuitem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
root
    Ptr Server -> Ptr Menuitem -> IO ()
dbusmenu_server_set_root Ptr Server
self' Ptr Menuitem
root'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
root
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if ENABLE_OVERLOADING
data ServerSetRootMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsServer a, Dbusmenu.Menuitem.IsMenuitem b) => O.MethodInfo ServerSetRootMethodInfo a signature where
    overloadedMethod _ = serverSetRoot

#endif

-- method Server::set_status
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to set the status on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "status", argType = TInterface (Name {namespace = "Dbusmenu", name = "Status"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Status value to set on the server", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_set_status" dbusmenu_server_set_status :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    CUInt ->                                -- status : TInterface (Name {namespace = "Dbusmenu", name = "Status"})
    IO ()

{- |
Changes the status of the server.
-}
serverSetStatus ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to set the status on -}
    -> Dbusmenu.Enums.Status
    {- ^ /@status@/: Status value to set on the server -}
    -> m ()
serverSetStatus :: a -> Status -> m ()
serverSetStatus server :: a
server status :: Status
status = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    let status' :: CUInt
status' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Status -> Int) -> Status -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Status -> Int
forall a. Enum a => a -> Int
fromEnum) Status
status
    Ptr Server -> CUInt -> IO ()
dbusmenu_server_set_status Ptr Server
server' CUInt
status'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if ENABLE_OVERLOADING
data ServerSetStatusMethodInfo
instance (signature ~ (Dbusmenu.Enums.Status -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetStatusMethodInfo a signature where
    overloadedMethod _ = serverSetStatus

#endif

-- method Server::set_text_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to set the text direction on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dir", argType = TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Direction of the text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dbusmenu_server_set_text_direction" dbusmenu_server_set_text_direction :: 
    Ptr Server ->                           -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})
    CUInt ->                                -- dir : TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"})
    IO ()

{- |
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.
-}
serverSetTextDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>
    a
    {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' object to set the text direction on -}
    -> Dbusmenu.Enums.TextDirection
    {- ^ /@dir@/: Direction of the text -}
    -> m ()
serverSetTextDirection :: a -> TextDirection -> m ()
serverSetTextDirection server :: a
server dir :: TextDirection
dir = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Server
server' <- a -> IO (Ptr Server)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
server
    let dir' :: CUInt
dir' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TextDirection -> Int) -> TextDirection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TextDirection -> Int
forall a. Enum a => a -> Int
fromEnum) TextDirection
dir
    Ptr Server -> CUInt -> IO ()
dbusmenu_server_set_text_direction Ptr Server
server' CUInt
dir'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
server
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if ENABLE_OVERLOADING
data ServerSetTextDirectionMethodInfo
instance (signature ~ (Dbusmenu.Enums.TextDirection -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetTextDirectionMethodInfo a signature where
    overloadedMethod _ = serverSetTextDirection

#endif