    {-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- The client for a t'GI.Dbusmenu.Objects.Server.Server' creating a shared
    -- 	object set of t'GI.Dbusmenu.Objects.Menuitem.Menuitem' objects.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Dbusmenu.Objects.Client
        (

    -- * Exported types
        Client(..)                              ,
        IsClient                                ,
        toClient                                ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [addTypeHandler]("GI.Dbusmenu.Objects.Client#g:method:addTypeHandler"), [addTypeHandlerFull]("GI.Dbusmenu.Objects.Client#g:method:addTypeHandlerFull"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
    --
    -- ==== Getters
    -- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getIconPaths]("GI.Dbusmenu.Objects.Client#g:method:getIconPaths"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRoot]("GI.Dbusmenu.Objects.Client#g:method:getRoot"), [getStatus]("GI.Dbusmenu.Objects.Client#g:method:getStatus"), [getTextDirection]("GI.Dbusmenu.Objects.Client#g:method:getTextDirection").
    --
    -- ==== Setters
    -- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolveClientMethod                     ,
    #endif

    -- ** addTypeHandler #method:addTypeHandler#

    #if defined(ENABLE_OVERLOADING)
        ClientAddTypeHandlerMethodInfo          ,
    #endif
        clientAddTypeHandler                    ,

    -- ** addTypeHandlerFull #method:addTypeHandlerFull#

    #if defined(ENABLE_OVERLOADING)
        ClientAddTypeHandlerFullMethodInfo      ,
    #endif
        clientAddTypeHandlerFull                ,

    -- ** getIconPaths #method:getIconPaths#

    #if defined(ENABLE_OVERLOADING)
        ClientGetIconPathsMethodInfo            ,
    #endif
        clientGetIconPaths                      ,

    -- ** getRoot #method:getRoot#

    #if defined(ENABLE_OVERLOADING)
        ClientGetRootMethodInfo                 ,
    #endif
        clientGetRoot                           ,

    -- ** getStatus #method:getStatus#

    #if defined(ENABLE_OVERLOADING)
        ClientGetStatusMethodInfo               ,
    #endif
        clientGetStatus                         ,

    -- ** getTextDirection #method:getTextDirection#

    #if defined(ENABLE_OVERLOADING)
        ClientGetTextDirectionMethodInfo        ,
    #endif
        clientGetTextDirection                  ,

    -- ** new #method:new#

        clientNew                               ,

     -- * Properties

    -- ** dbusName #attr:dbusName#
    -- | /No description available in the introspection data./

    #if defined(ENABLE_OVERLOADING)
        ClientDbusNamePropertyInfo              ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        clientDbusName                          ,
    #endif
        constructClientDbusName                 ,
        getClientDbusName                       ,

    -- ** dbusObject #attr:dbusObject#
    -- | /No description available in the introspection data./

    #if defined(ENABLE_OVERLOADING)
        ClientDbusObjectPropertyInfo            ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        clientDbusObject                        ,
    #endif
        constructClientDbusObject               ,
        getClientDbusObject                     ,

    -- ** groupEvents #attr:groupEvents#
    -- | /No description available in the introspection data./

    #if defined(ENABLE_OVERLOADING)
        ClientGroupEventsPropertyInfo           ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        clientGroupEvents                       ,
    #endif
        constructClientGroupEvents              ,
        getClientGroupEvents                    ,
        setClientGroupEvents                    ,

     -- * Signals

    -- ** eventResult #signal:eventResult#

        ClientEventResultCallback               ,
    #if defined(ENABLE_OVERLOADING)
        ClientEventResultSignalInfo             ,
    #endif
        afterClientEventResult                  ,
        onClientEventResult                     ,

    -- ** iconThemeDirsChanged #signal:iconThemeDirsChanged#

        ClientIconThemeDirsChangedCallback      ,
    #if defined(ENABLE_OVERLOADING)
        ClientIconThemeDirsChangedSignalInfo    ,
    #endif
        afterClientIconThemeDirsChanged         ,
        onClientIconThemeDirsChanged            ,

    -- ** itemActivate #signal:itemActivate#

        ClientItemActivateCallback              ,
    #if defined(ENABLE_OVERLOADING)
        ClientItemActivateSignalInfo            ,
    #endif
        afterClientItemActivate                 ,
        onClientItemActivate                    ,

    -- ** layoutUpdated #signal:layoutUpdated#

        ClientLayoutUpdatedCallback             ,
    #if defined(ENABLE_OVERLOADING)
        ClientLayoutUpdatedSignalInfo           ,
    #endif
        afterClientLayoutUpdated                ,
        onClientLayoutUpdated                   ,

    -- ** newMenuitem #signal:newMenuitem#

        ClientNewMenuitemCallback               ,
    #if defined(ENABLE_OVERLOADING)
        ClientNewMenuitemSignalInfo             ,
    #endif
        afterClientNewMenuitem                  ,
        onClientNewMenuitem                     ,

    -- ** rootChanged #signal:rootChanged#

        ClientRootChangedCallback               ,
    #if defined(ENABLE_OVERLOADING)
        ClientRootChangedSignalInfo             ,
    #endif
        afterClientRootChanged                  ,
        onClientRootChanged                     ,

        ) 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.BasicTypes as B.Types
    import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GArray as B.GArray
    import qualified Data.GI.Base.GClosure as B.GClosure
    import qualified Data.GI.Base.GError as B.GError
    import qualified Data.GI.Base.GHashTable as B.GHT
    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.GI.Base.Properties as B.Properties
    import qualified Data.GI.Base.Signals as B.Signals
    import qualified Control.Monad.IO.Class as MIO
    import qualified Data.Coerce as Coerce
    import qualified Data.Text as T
    import qualified Data.Kind as DK
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP
    import qualified GHC.OverloadedLabels as OL
    import qualified GHC.Records as R
    import qualified Data.Word as DW
    import qualified Data.Int as DI
    import qualified System.Posix.Types as SPT
    import qualified Foreign.C.Types as FCT

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import qualified GI.Dbusmenu.Callbacks as Dbusmenu.Callbacks
    import {-# SOURCE #-} qualified GI.Dbusmenu.Enums as Dbusmenu.Enums
    import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Menuitem as Dbusmenu.Menuitem
    import qualified GI.GLib.Callbacks as GLib.Callbacks
    import qualified GI.GObject.Objects.Object as GObject.Object

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

    #endif

    -- | Memory-managed wrapper type.
    newtype Client = Client (SP.ManagedPtr Client)
        deriving (Client -> Client -> Bool
    (Client -> Client -> Bool)
    -> (Client -> Client -> Bool) -> Eq Client
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Client -> Client -> Bool
    == :: Client -> Client -> Bool
    $c/= :: Client -> Client -> Bool
    /= :: Client -> Client -> Bool
    Eq)

    instance SP.ManagedPtrNewtype Client where
        toManagedPtr :: Client -> ManagedPtr Client
    toManagedPtr (Client ManagedPtr Client
    p) = ManagedPtr Client
    p

    foreign import ccall "dbusmenu_client_get_type"
        c_dbusmenu_client_get_type :: IO B.Types.GType

    instance B.Types.TypedObject Client where
        glibType :: IO GType
    glibType = IO GType
    c_dbusmenu_client_get_type

    instance B.Types.GObject Client

    -- | Type class for types which can be safely cast to t'Client', for instance with `toClient`.
    class (SP.GObject o, O.IsDescendantOf Client o) => IsClient o
    instance (SP.GObject o, O.IsDescendantOf Client o) => IsClient o

    instance O.HasParentTypes Client
    type instance O.ParentTypes Client = '[GObject.Object.Object]

    -- | Cast to t'Client', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
    toClient :: (MIO.MonadIO m, IsClient o) => o -> m Client
    toClient :: forall (m :: * -> *) o. (MonadIO m, IsClient o) => o -> m Client
    toClient = IO Client -> m Client
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Client -> m Client) -> (o -> IO Client) -> o -> m Client
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ManagedPtr Client -> Client) -> o -> IO Client
    forall o o'.
    (HasCallStack, ManagedPtrNewtype o, TypedObject o,
     ManagedPtrNewtype o', TypedObject o') =>
    (ManagedPtr o' -> o') -> o -> IO o'
    B.ManagedPtr.unsafeCastTo ManagedPtr Client -> Client
    Client

    -- | Convert t'Client' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
    instance B.GValue.IsGValue (Maybe Client) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_dbusmenu_client_get_type
        gvalueSet_ :: Ptr GValue -> Maybe Client -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe Client
    P.Nothing = Ptr GValue -> Ptr Client -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr Client
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr Client)
        gvalueSet_ Ptr GValue
    gv (P.Just Client
    obj) = Client -> (Ptr Client -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr Client
    obj (Ptr GValue -> Ptr Client -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe Client)
    gvalueGet_ Ptr GValue
    gv = do
            ptr <- Ptr GValue -> IO (Ptr Client)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr Client)
            if ptr /= FP.nullPtr
            then P.Just <$> B.ManagedPtr.newObject Client ptr
            else return P.Nothing

    #if defined(ENABLE_OVERLOADING)
    type family ResolveClientMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveClientMethod "addTypeHandler" o = ClientAddTypeHandlerMethodInfo
        ResolveClientMethod "addTypeHandlerFull" o = ClientAddTypeHandlerFullMethodInfo
        ResolveClientMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveClientMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveClientMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveClientMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveClientMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveClientMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveClientMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveClientMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveClientMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveClientMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveClientMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveClientMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveClientMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveClientMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveClientMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveClientMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveClientMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveClientMethod "getIconPaths" o = ClientGetIconPathsMethodInfo
        ResolveClientMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveClientMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveClientMethod "getRoot" o = ClientGetRootMethodInfo
        ResolveClientMethod "getStatus" o = ClientGetStatusMethodInfo
        ResolveClientMethod "getTextDirection" o = ClientGetTextDirectionMethodInfo
        ResolveClientMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveClientMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveClientMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveClientMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveClientMethod t Client, O.OverloadedMethod info Client p) => OL.IsLabel t (Client -> p) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.overloadedMethod @info
    #else
        fromLabel _ = O.overloadedMethod @info
    #endif

    #if MIN_VERSION_base(4,13,0)
    instance (info ~ ResolveClientMethod t Client, O.OverloadedMethod info Client p, R.HasField t Client p) => R.HasField t Client p where
        getField = O.overloadedMethod @info

    #endif

    instance (info ~ ResolveClientMethod t Client, O.OverloadedMethodInfo info Client) => OL.IsLabel t (O.MethodProxy info Client) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.MethodProxy
    #else
        fromLabel _ = O.MethodProxy
    #endif

    #endif

    -- signal Client::event-result
    -- | /No description available in the introspection data./
    type ClientEventResultCallback =
        GObject.Object.Object
        -> T.Text
        -> GVariant
        -> Word32
        -> Ptr ()
        -> IO ()

    type C_ClientEventResultCallback =
        Ptr Client ->                           -- object
        Ptr GObject.Object.Object ->
        CString ->
        Ptr GVariant ->
        Word32 ->
        Ptr () ->
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientEventResultCallback ::
        GObject a => (a -> ClientEventResultCallback) ->
        C_ClientEventResultCallback
    wrap_ClientEventResultCallback :: forall a.
    GObject a =>
    (a -> ClientEventResultCallback) -> C_ClientEventResultCallback
    wrap_ClientEventResultCallback a -> ClientEventResultCallback
    gi'cb Ptr Client
    gi'selfPtr Ptr Object
    object CString
    p0 Ptr GVariant
    p1 Word32
    p2 Ptr ()
    p3 Ptr ()
    _ = do
        object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr Object -> Object
    GObject.Object.Object) Ptr Object
    object
        p0' <- cstringToText p0
        p1' <- B.GVariant.newGVariantFromPtr p1
        B.ManagedPtr.withNewObject gi'selfPtr $ \Client
    gi'self -> a -> ClientEventResultCallback
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)  Object
    object' Text
    p0' GVariant
    p1' Word32
    p2 Ptr ()
    p3

    -- | Connect a signal handler for the [eventResult](#signal:eventResult) 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' client #eventResult callback
    -- @
    --
    --
    onClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId
    onClientEventResult :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientEventResultCallback) -> m SignalHandlerId
    onClientEventResult a
    obj (?self::a) => ClientEventResultCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientEventResultCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientEventResultCallback
    ClientEventResultCallback
    cb
        let wrapped' :: C_ClientEventResultCallback
    wrapped' = (a -> ClientEventResultCallback) -> C_ClientEventResultCallback
    forall a.
    GObject a =>
    (a -> ClientEventResultCallback) -> C_ClientEventResultCallback
    wrap_ClientEventResultCallback a -> ClientEventResultCallback
    wrapped
        wrapped'' <- C_ClientEventResultCallback
    -> IO (FunPtr C_ClientEventResultCallback)
    mk_ClientEventResultCallback C_ClientEventResultCallback
    wrapped'
        connectSignalFunPtr obj "event-result" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [eventResult](#signal:eventResult) 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' 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.
    --
    afterClientEventResult :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientEventResultCallback) -> m SignalHandlerId
    afterClientEventResult :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientEventResultCallback) -> m SignalHandlerId
    afterClientEventResult a
    obj (?self::a) => ClientEventResultCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientEventResultCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientEventResultCallback
    ClientEventResultCallback
    cb
        let wrapped' :: C_ClientEventResultCallback
    wrapped' = (a -> ClientEventResultCallback) -> C_ClientEventResultCallback
    forall a.
    GObject a =>
    (a -> ClientEventResultCallback) -> C_ClientEventResultCallback
    wrap_ClientEventResultCallback a -> ClientEventResultCallback
    wrapped
        wrapped'' <- C_ClientEventResultCallback
    -> IO (FunPtr C_ClientEventResultCallback)
    mk_ClientEventResultCallback C_ClientEventResultCallback
    wrapped'
        connectSignalFunPtr obj "event-result" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientEventResultSignalInfo
    instance SignalInfo ClientEventResultSignalInfo where
        type HaskellCallbackType ClientEventResultSignalInfo = ClientEventResultCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientEventResultCallback cb
            cb'' <- mk_ClientEventResultCallback cb'
            connectSignalFunPtr obj "event-result" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::event-result"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:eventResult"})

    #endif

    -- signal Client::icon-theme-dirs-changed
    -- | Signaled when the theme directories are changed by the server.
    type ClientIconThemeDirsChangedCallback =
        Ptr ()
        -- ^ /@arg1@/: A @/GStrv/@ of theme directories
        -> IO ()

    type C_ClientIconThemeDirsChangedCallback =
        Ptr Client ->                           -- object
        Ptr () ->
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientIconThemeDirsChangedCallback ::
        GObject a => (a -> ClientIconThemeDirsChangedCallback) ->
        C_ClientIconThemeDirsChangedCallback
    wrap_ClientIconThemeDirsChangedCallback :: forall a.
    GObject a =>
    (a -> ClientIconThemeDirsChangedCallback)
    -> C_ClientIconThemeDirsChangedCallback
    wrap_ClientIconThemeDirsChangedCallback a -> ClientIconThemeDirsChangedCallback
    gi'cb Ptr Client
    gi'selfPtr Ptr ()
    arg1 Ptr ()
    _ = do
        Ptr Client -> (Client -> IO ()) -> IO ()
    forall o b.
    (HasCallStack, GObject o) =>
    Ptr o -> (o -> IO b) -> IO b
    B.ManagedPtr.withNewObject Ptr Client
    gi'selfPtr ((Client -> IO ()) -> IO ()) -> (Client -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Client
    gi'self -> a -> ClientIconThemeDirsChangedCallback
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)  Ptr ()
    arg1

    -- | Connect a signal handler for the [iconThemeDirsChanged](#signal:iconThemeDirsChanged) 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' client #iconThemeDirsChanged callback
    -- @
    --
    --
    onClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId
    onClientIconThemeDirsChanged :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a
    -> ((?self::a) => ClientIconThemeDirsChangedCallback)
    -> m SignalHandlerId
    onClientIconThemeDirsChanged a
    obj (?self::a) => ClientIconThemeDirsChangedCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientIconThemeDirsChangedCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientIconThemeDirsChangedCallback
    ClientIconThemeDirsChangedCallback
    cb
        let wrapped' :: C_ClientIconThemeDirsChangedCallback
    wrapped' = (a -> ClientIconThemeDirsChangedCallback)
    -> C_ClientIconThemeDirsChangedCallback
    forall a.
    GObject a =>
    (a -> ClientIconThemeDirsChangedCallback)
    -> C_ClientIconThemeDirsChangedCallback
    wrap_ClientIconThemeDirsChangedCallback a -> ClientIconThemeDirsChangedCallback
    wrapped
        wrapped'' <- C_ClientIconThemeDirsChangedCallback
    -> IO (FunPtr C_ClientIconThemeDirsChangedCallback)
    mk_ClientIconThemeDirsChangedCallback C_ClientIconThemeDirsChangedCallback
    wrapped'
        connectSignalFunPtr obj "icon-theme-dirs-changed" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [iconThemeDirsChanged](#signal:iconThemeDirsChanged) 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' 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.
    --
    afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientIconThemeDirsChangedCallback) -> m SignalHandlerId
    afterClientIconThemeDirsChanged :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a
    -> ((?self::a) => ClientIconThemeDirsChangedCallback)
    -> m SignalHandlerId
    afterClientIconThemeDirsChanged a
    obj (?self::a) => ClientIconThemeDirsChangedCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientIconThemeDirsChangedCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientIconThemeDirsChangedCallback
    ClientIconThemeDirsChangedCallback
    cb
        let wrapped' :: C_ClientIconThemeDirsChangedCallback
    wrapped' = (a -> ClientIconThemeDirsChangedCallback)
    -> C_ClientIconThemeDirsChangedCallback
    forall a.
    GObject a =>
    (a -> ClientIconThemeDirsChangedCallback)
    -> C_ClientIconThemeDirsChangedCallback
    wrap_ClientIconThemeDirsChangedCallback a -> ClientIconThemeDirsChangedCallback
    wrapped
        wrapped'' <- C_ClientIconThemeDirsChangedCallback
    -> IO (FunPtr C_ClientIconThemeDirsChangedCallback)
    mk_ClientIconThemeDirsChangedCallback C_ClientIconThemeDirsChangedCallback
    wrapped'
        connectSignalFunPtr obj "icon-theme-dirs-changed" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientIconThemeDirsChangedSignalInfo
    instance SignalInfo ClientIconThemeDirsChangedSignalInfo where
        type HaskellCallbackType ClientIconThemeDirsChangedSignalInfo = ClientIconThemeDirsChangedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientIconThemeDirsChangedCallback cb
            cb'' <- mk_ClientIconThemeDirsChangedCallback cb'
            connectSignalFunPtr obj "icon-theme-dirs-changed" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::icon-theme-dirs-changed"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:iconThemeDirsChanged"})

    #endif

    -- signal Client::item-activate
    -- | Signaled when the server wants to activate an item in
    -- 		order to display the menu.
    type ClientItemActivateCallback =
        GObject.Object.Object
        -- ^ /@arg1@/: The t'GI.Dbusmenu.Objects.Menuitem.Menuitem' activated
        -> Word32
        -- ^ /@arg2@/: A timestamp that the event happened at
        -> IO ()

    type C_ClientItemActivateCallback =
        Ptr Client ->                           -- object
        Ptr GObject.Object.Object ->
        Word32 ->
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientItemActivateCallback ::
        GObject a => (a -> ClientItemActivateCallback) ->
        C_ClientItemActivateCallback
    wrap_ClientItemActivateCallback :: forall a.
    GObject a =>
    (a -> ClientItemActivateCallback) -> C_ClientItemActivateCallback
    wrap_ClientItemActivateCallback a -> ClientItemActivateCallback
    gi'cb Ptr Client
    gi'selfPtr Ptr Object
    arg1 Word32
    arg2 Ptr ()
    _ = do
        arg1' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr Object -> Object
    GObject.Object.Object) Ptr Object
    arg1
        B.ManagedPtr.withNewObject gi'selfPtr $ \Client
    gi'self -> a -> ClientItemActivateCallback
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)  Object
    arg1' Word32
    arg2

    -- | Connect a signal handler for the [itemActivate](#signal:itemActivate) 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' client #itemActivate callback
    -- @
    --
    --
    onClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId
    onClientItemActivate :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a
    -> ((?self::a) => ClientItemActivateCallback) -> m SignalHandlerId
    onClientItemActivate a
    obj (?self::a) => ClientItemActivateCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientItemActivateCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientItemActivateCallback
    ClientItemActivateCallback
    cb
        let wrapped' :: C_ClientItemActivateCallback
    wrapped' = (a -> ClientItemActivateCallback) -> C_ClientItemActivateCallback
    forall a.
    GObject a =>
    (a -> ClientItemActivateCallback) -> C_ClientItemActivateCallback
    wrap_ClientItemActivateCallback a -> ClientItemActivateCallback
    wrapped
        wrapped'' <- C_ClientItemActivateCallback
    -> IO (FunPtr C_ClientItemActivateCallback)
    mk_ClientItemActivateCallback C_ClientItemActivateCallback
    wrapped'
        connectSignalFunPtr obj "item-activate" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [itemActivate](#signal:itemActivate) 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' 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.
    --
    afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientItemActivateCallback) -> m SignalHandlerId
    afterClientItemActivate :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a
    -> ((?self::a) => ClientItemActivateCallback) -> m SignalHandlerId
    afterClientItemActivate a
    obj (?self::a) => ClientItemActivateCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientItemActivateCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientItemActivateCallback
    ClientItemActivateCallback
    cb
        let wrapped' :: C_ClientItemActivateCallback
    wrapped' = (a -> ClientItemActivateCallback) -> C_ClientItemActivateCallback
    forall a.
    GObject a =>
    (a -> ClientItemActivateCallback) -> C_ClientItemActivateCallback
    wrap_ClientItemActivateCallback a -> ClientItemActivateCallback
    wrapped
        wrapped'' <- C_ClientItemActivateCallback
    -> IO (FunPtr C_ClientItemActivateCallback)
    mk_ClientItemActivateCallback C_ClientItemActivateCallback
    wrapped'
        connectSignalFunPtr obj "item-activate" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientItemActivateSignalInfo
    instance SignalInfo ClientItemActivateSignalInfo where
        type HaskellCallbackType ClientItemActivateSignalInfo = ClientItemActivateCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientItemActivateCallback cb
            cb'' <- mk_ClientItemActivateCallback cb'
            connectSignalFunPtr obj "item-activate" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::item-activate"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:itemActivate"})

    #endif

    -- signal Client::layout-updated
    -- | /No description available in the introspection data./
    type ClientLayoutUpdatedCallback =
        IO ()

    type C_ClientLayoutUpdatedCallback =
        Ptr Client ->                           -- object
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientLayoutUpdatedCallback ::
        GObject a => (a -> ClientLayoutUpdatedCallback) ->
        C_ClientLayoutUpdatedCallback
    wrap_ClientLayoutUpdatedCallback :: forall a.
    GObject a =>
    (a -> IO ()) -> C_ClientLayoutUpdatedCallback
    wrap_ClientLayoutUpdatedCallback a -> IO ()
    gi'cb Ptr Client
    gi'selfPtr Ptr ()
    _ = do
        Ptr Client -> (Client -> IO ()) -> IO ()
    forall o b.
    (HasCallStack, GObject o) =>
    Ptr o -> (o -> IO b) -> IO b
    B.ManagedPtr.withNewObject Ptr Client
    gi'selfPtr ((Client -> IO ()) -> IO ()) -> (Client -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Client
    gi'self -> a -> IO ()
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)

    -- | Connect a signal handler for the [layoutUpdated](#signal:layoutUpdated) 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' client #layoutUpdated callback
    -- @
    --
    --
    onClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId
    onClientLayoutUpdated :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    onClientLayoutUpdated a
    obj (?self::a) => IO ()
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> IO ()
    wrapped a
    self = let ?self = a
    ?self::a
    self in IO ()
    (?self::a) => IO ()
    cb
        let wrapped' :: C_ClientLayoutUpdatedCallback
    wrapped' = (a -> IO ()) -> C_ClientLayoutUpdatedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_ClientLayoutUpdatedCallback
    wrap_ClientLayoutUpdatedCallback a -> IO ()
    wrapped
        wrapped'' <- C_ClientLayoutUpdatedCallback
    -> IO (FunPtr C_ClientLayoutUpdatedCallback)
    mk_ClientLayoutUpdatedCallback C_ClientLayoutUpdatedCallback
    wrapped'
        connectSignalFunPtr obj "layout-updated" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [layoutUpdated](#signal:layoutUpdated) 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' 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.
    --
    afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientLayoutUpdatedCallback) -> m SignalHandlerId
    afterClientLayoutUpdated :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    afterClientLayoutUpdated a
    obj (?self::a) => IO ()
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> IO ()
    wrapped a
    self = let ?self = a
    ?self::a
    self in IO ()
    (?self::a) => IO ()
    cb
        let wrapped' :: C_ClientLayoutUpdatedCallback
    wrapped' = (a -> IO ()) -> C_ClientLayoutUpdatedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_ClientLayoutUpdatedCallback
    wrap_ClientLayoutUpdatedCallback a -> IO ()
    wrapped
        wrapped'' <- C_ClientLayoutUpdatedCallback
    -> IO (FunPtr C_ClientLayoutUpdatedCallback)
    mk_ClientLayoutUpdatedCallback C_ClientLayoutUpdatedCallback
    wrapped'
        connectSignalFunPtr obj "layout-updated" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientLayoutUpdatedSignalInfo
    instance SignalInfo ClientLayoutUpdatedSignalInfo where
        type HaskellCallbackType ClientLayoutUpdatedSignalInfo = ClientLayoutUpdatedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientLayoutUpdatedCallback cb
            cb'' <- mk_ClientLayoutUpdatedCallback cb'
            connectSignalFunPtr obj "layout-updated" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::layout-updated"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:layoutUpdated"})

    #endif

    -- signal Client::new-menuitem
    -- | 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]("GI.Dbusmenu.Objects.Menuitem#g:signal:childAdded")
    -- 		when it gets parented.
    type ClientNewMenuitemCallback =
        GObject.Object.Object
        -- ^ /@arg1@/: The new t'GI.Dbusmenu.Objects.Menuitem.Menuitem' created
        -> IO ()

    type C_ClientNewMenuitemCallback =
        Ptr Client ->                           -- object
        Ptr GObject.Object.Object ->
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientNewMenuitemCallback ::
        GObject a => (a -> ClientNewMenuitemCallback) ->
        C_ClientNewMenuitemCallback
    wrap_ClientNewMenuitemCallback :: forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientNewMenuitemCallback a -> ClientNewMenuitemCallback
    gi'cb Ptr Client
    gi'selfPtr Ptr Object
    arg1 Ptr ()
    _ = do
        arg1' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr Object -> Object
    GObject.Object.Object) Ptr Object
    arg1
        B.ManagedPtr.withNewObject gi'selfPtr $ \Client
    gi'self -> a -> ClientNewMenuitemCallback
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)  Object
    arg1'

    -- | Connect a signal handler for the [newMenuitem](#signal:newMenuitem) 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' client #newMenuitem callback
    -- @
    --
    --
    onClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    onClientNewMenuitem :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    onClientNewMenuitem a
    obj (?self::a) => ClientNewMenuitemCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientNewMenuitemCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientNewMenuitemCallback
    ClientNewMenuitemCallback
    cb
        let wrapped' :: C_ClientNewMenuitemCallback
    wrapped' = (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientNewMenuitemCallback a -> ClientNewMenuitemCallback
    wrapped
        wrapped'' <- C_ClientNewMenuitemCallback
    -> IO (FunPtr C_ClientNewMenuitemCallback)
    mk_ClientNewMenuitemCallback C_ClientNewMenuitemCallback
    wrapped'
        connectSignalFunPtr obj "new-menuitem" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [newMenuitem](#signal:newMenuitem) 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' 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.
    --
    afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    afterClientNewMenuitem :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    afterClientNewMenuitem a
    obj (?self::a) => ClientNewMenuitemCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientNewMenuitemCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientNewMenuitemCallback
    ClientNewMenuitemCallback
    cb
        let wrapped' :: C_ClientNewMenuitemCallback
    wrapped' = (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientNewMenuitemCallback a -> ClientNewMenuitemCallback
    wrapped
        wrapped'' <- C_ClientNewMenuitemCallback
    -> IO (FunPtr C_ClientNewMenuitemCallback)
    mk_ClientNewMenuitemCallback C_ClientNewMenuitemCallback
    wrapped'
        connectSignalFunPtr obj "new-menuitem" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientNewMenuitemSignalInfo
    instance SignalInfo ClientNewMenuitemSignalInfo where
        type HaskellCallbackType ClientNewMenuitemSignalInfo = ClientNewMenuitemCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientNewMenuitemCallback cb
            cb'' <- mk_ClientNewMenuitemCallback cb'
            connectSignalFunPtr obj "new-menuitem" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::new-menuitem"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:newMenuitem"})

    #endif

    -- signal Client::root-changed
    -- | 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.
    type ClientRootChangedCallback =
        GObject.Object.Object
        -- ^ /@arg1@/: The new root t'GI.Dbusmenu.Objects.Menuitem.Menuitem'
        -> IO ()

    type C_ClientRootChangedCallback =
        Ptr Client ->                           -- object
        Ptr GObject.Object.Object ->
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_ClientRootChangedCallback ::
        GObject a => (a -> ClientRootChangedCallback) ->
        C_ClientRootChangedCallback
    wrap_ClientRootChangedCallback :: forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientRootChangedCallback a -> ClientNewMenuitemCallback
    gi'cb Ptr Client
    gi'selfPtr Ptr Object
    arg1 Ptr ()
    _ = do
        arg1' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr Object -> Object
    GObject.Object.Object) Ptr Object
    arg1
        B.ManagedPtr.withNewObject gi'selfPtr $ \Client
    gi'self -> a -> ClientNewMenuitemCallback
    gi'cb (Client -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Client
    gi'self)  Object
    arg1'

    -- | Connect a signal handler for the [rootChanged](#signal:rootChanged) 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' client #rootChanged callback
    -- @
    --
    --
    onClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId
    onClientRootChanged :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    onClientRootChanged a
    obj (?self::a) => ClientNewMenuitemCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientNewMenuitemCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientNewMenuitemCallback
    ClientNewMenuitemCallback
    cb
        let wrapped' :: C_ClientNewMenuitemCallback
    wrapped' = (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientRootChangedCallback a -> ClientNewMenuitemCallback
    wrapped
        wrapped'' <- C_ClientNewMenuitemCallback
    -> IO (FunPtr C_ClientNewMenuitemCallback)
    mk_ClientRootChangedCallback C_ClientNewMenuitemCallback
    wrapped'
        connectSignalFunPtr obj "root-changed" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [rootChanged](#signal:rootChanged) 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' 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.
    --
    afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientRootChangedCallback) -> m SignalHandlerId
    afterClientRootChanged :: forall a (m :: * -> *).
    (IsClient a, MonadIO m) =>
    a -> ((?self::a) => ClientNewMenuitemCallback) -> m SignalHandlerId
    afterClientRootChanged a
    obj (?self::a) => ClientNewMenuitemCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    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 wrapped :: a -> ClientNewMenuitemCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => ClientNewMenuitemCallback
    ClientNewMenuitemCallback
    cb
        let wrapped' :: C_ClientNewMenuitemCallback
    wrapped' = (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    forall a.
    GObject a =>
    (a -> ClientNewMenuitemCallback) -> C_ClientNewMenuitemCallback
    wrap_ClientRootChangedCallback a -> ClientNewMenuitemCallback
    wrapped
        wrapped'' <- C_ClientNewMenuitemCallback
    -> IO (FunPtr C_ClientNewMenuitemCallback)
    mk_ClientRootChangedCallback C_ClientNewMenuitemCallback
    wrapped'
        connectSignalFunPtr obj "root-changed" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data ClientRootChangedSignalInfo
    instance SignalInfo ClientRootChangedSignalInfo where
        type HaskellCallbackType ClientRootChangedSignalInfo = ClientRootChangedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_ClientRootChangedCallback cb
            cb'' <- mk_ClientRootChangedCallback cb'
            connectSignalFunPtr obj "root-changed" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client::root-changed"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:signal:rootChanged"})

    #endif

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

    -- | Get the value of the “@dbus-name@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' client #dbusName
    -- @
    getClientDbusName :: (MonadIO m, IsClient o) => o -> m (Maybe T.Text)
    getClientDbusName :: forall (m :: * -> *) o.
    (MonadIO m, IsClient o) =>
    o -> m (Maybe Text)
    getClientDbusName o
    obj = IO (Maybe Text) -> m (Maybe Text)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.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)
    B.Properties.getObjectPropertyString o
    obj String
    "dbus-name"

    -- | Construct a t'GValueConstruct' with valid value for the “@dbus-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructClientDbusName :: (IsClient o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
    constructClientDbusName :: forall o (m :: * -> *).
    (IsClient o, MonadIO m) =>
    Text -> m (GValueConstruct o)
    constructClientDbusName Text
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe Text -> IO (GValueConstruct o)
    forall o. String -> Maybe Text -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyString String
    "dbus-name" (Text -> Maybe Text
    forall a. a -> Maybe a
    P.Just Text
    val)

    #if defined(ENABLE_OVERLOADING)
    data ClientDbusNamePropertyInfo
    instance AttrInfo ClientDbusNamePropertyInfo where
        type AttrAllowedOps ClientDbusNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ClientDbusNamePropertyInfo = IsClient
        type AttrSetTypeConstraint ClientDbusNamePropertyInfo = (~) T.Text
        type AttrTransferTypeConstraint ClientDbusNamePropertyInfo = (~) T.Text
        type AttrTransferType ClientDbusNamePropertyInfo = T.Text
        type AttrGetType ClientDbusNamePropertyInfo = (Maybe T.Text)
        type AttrLabel ClientDbusNamePropertyInfo = "dbus-name"
        type AttrOrigin ClientDbusNamePropertyInfo = Client
        attrGet = getClientDbusName
        attrSet = undefined
        attrPut = undefined
        attrTransfer _ v = do
            return v
        attrConstruct = constructClientDbusName
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.dbusName"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:attr:dbusName"
            })
    #endif

    -- 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' client #dbusObject
    -- @
    getClientDbusObject :: (MonadIO m, IsClient o) => o -> m (Maybe T.Text)
    getClientDbusObject :: forall (m :: * -> *) o.
    (MonadIO m, IsClient o) =>
    o -> m (Maybe Text)
    getClientDbusObject o
    obj = IO (Maybe Text) -> m (Maybe Text)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.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)
    B.Properties.getObjectPropertyString o
    obj String
    "dbus-object"

    -- | Construct a t'GValueConstruct' with valid value for the “@dbus-object@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructClientDbusObject :: (IsClient o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
    constructClientDbusObject :: forall o (m :: * -> *).
    (IsClient o, MonadIO m) =>
    Text -> m (GValueConstruct o)
    constructClientDbusObject Text
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe Text -> IO (GValueConstruct o)
    forall o. String -> Maybe Text -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyString String
    "dbus-object" (Text -> Maybe Text
    forall a. a -> Maybe a
    P.Just Text
    val)

    #if defined(ENABLE_OVERLOADING)
    data ClientDbusObjectPropertyInfo
    instance AttrInfo ClientDbusObjectPropertyInfo where
        type AttrAllowedOps ClientDbusObjectPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ClientDbusObjectPropertyInfo = IsClient
        type AttrSetTypeConstraint ClientDbusObjectPropertyInfo = (~) T.Text
        type AttrTransferTypeConstraint ClientDbusObjectPropertyInfo = (~) T.Text
        type AttrTransferType ClientDbusObjectPropertyInfo = T.Text
        type AttrGetType ClientDbusObjectPropertyInfo = (Maybe T.Text)
        type AttrLabel ClientDbusObjectPropertyInfo = "dbus-object"
        type AttrOrigin ClientDbusObjectPropertyInfo = Client
        attrGet = getClientDbusObject
        attrSet = undefined
        attrPut = undefined
        attrTransfer _ v = do
            return v
        attrConstruct = constructClientDbusObject
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.dbusObject"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:attr:dbusObject"
            })
    #endif

    -- VVV Prop "group-events"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Nothing,Nothing)

    -- | Get the value of the “@group-events@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' client #groupEvents
    -- @
    getClientGroupEvents :: (MonadIO m, IsClient o) => o -> m Bool
    getClientGroupEvents :: forall (m :: * -> *) o. (MonadIO m, IsClient o) => o -> m Bool
    getClientGroupEvents o
    obj = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Bool
    forall a. GObject a => a -> String -> IO Bool
    B.Properties.getObjectPropertyBool o
    obj String
    "group-events"

    -- | Set the value of the “@group-events@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' client [ #groupEvents 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setClientGroupEvents :: (MonadIO m, IsClient o) => o -> Bool -> m ()
    setClientGroupEvents :: forall (m :: * -> *) o.
    (MonadIO m, IsClient o) =>
    o -> Bool -> m ()
    setClientGroupEvents o
    obj Bool
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Bool -> IO ()
    forall a. GObject a => a -> String -> Bool -> IO ()
    B.Properties.setObjectPropertyBool o
    obj String
    "group-events" Bool
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@group-events@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructClientGroupEvents :: (IsClient o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
    constructClientGroupEvents :: forall o (m :: * -> *).
    (IsClient o, MonadIO m) =>
    Bool -> m (GValueConstruct o)
    constructClientGroupEvents Bool
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Bool -> IO (GValueConstruct o)
    forall o. String -> Bool -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyBool String
    "group-events" Bool
    val

    #if defined(ENABLE_OVERLOADING)
    data ClientGroupEventsPropertyInfo
    instance AttrInfo ClientGroupEventsPropertyInfo where
        type AttrAllowedOps ClientGroupEventsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint ClientGroupEventsPropertyInfo = IsClient
        type AttrSetTypeConstraint ClientGroupEventsPropertyInfo = (~) Bool
        type AttrTransferTypeConstraint ClientGroupEventsPropertyInfo = (~) Bool
        type AttrTransferType ClientGroupEventsPropertyInfo = Bool
        type AttrGetType ClientGroupEventsPropertyInfo = Bool
        type AttrLabel ClientGroupEventsPropertyInfo = "group-events"
        type AttrOrigin ClientGroupEventsPropertyInfo = Client
        attrGet = getClientGroupEvents
        attrSet = setClientGroupEvents
        attrPut = setClientGroupEvents
        attrTransfer _ v = do
            return v
        attrConstruct = constructClientGroupEvents
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.groupEvents"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#g:attr:groupEvents"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList Client
    type instance O.AttributeList Client = ClientAttributeList
    type ClientAttributeList = ('[ '("dbusName", ClientDbusNamePropertyInfo), '("dbusObject", ClientDbusObjectPropertyInfo), '("groupEvents", ClientGroupEventsPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    clientDbusName :: AttrLabelProxy "dbusName"
    clientDbusName = AttrLabelProxy

    clientDbusObject :: AttrLabelProxy "dbusObject"
    clientDbusObject = AttrLabelProxy

    clientGroupEvents :: AttrLabelProxy "groupEvents"
    clientGroupEvents = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList Client = ClientSignalList
    type ClientSignalList = ('[ '("eventResult", ClientEventResultSignalInfo), '("iconThemeDirsChanged", ClientIconThemeDirsChangedSignalInfo), '("itemActivate", ClientItemActivateSignalInfo), '("layoutUpdated", ClientLayoutUpdatedSignalInfo), '("newMenuitem", ClientNewMenuitemSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("rootChanged", ClientRootChangedSignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method Client::new
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "name"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const gchar*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The DBus name for the server to connect to"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "object"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const gchar*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The object on the server to monitor"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Dbusmenu" , name = "Client" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_new" dbusmenu_client_new ::
        CString ->                              -- name : TBasicType TUTF8
        CString ->                              -- object : TBasicType TUTF8
        IO (Ptr Client)

    -- | 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.
    clientNew ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        T.Text
        -- ^ /@name@/: The DBus name for the server to connect to
        -> T.Text
        -- ^ /@object@/: The object on the server to monitor
        -> m Client
        -- ^ __Returns:__ A brand new t'GI.Dbusmenu.Objects.Client.Client'
    clientNew :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    Text -> Text -> m Client
    clientNew Text
    name Text
    object = IO Client -> m Client
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Client -> m Client) -> IO Client -> m Client
    forall a b. (a -> b) -> a -> b
    $ do
        name' <- Text -> IO CString
    textToCString Text
    name
        object' <- textToCString object
        result <- dbusmenu_client_new name' object'
        checkUnexpectedReturnNULL "clientNew" result
        result' <- (wrapObject Client) result
        freeMem name'
        freeMem object'
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method Client::add_type_handler
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "client"
    --           , argType =
    --               TInterface Name { namespace = "Dbusmenu" , name = "Client" }
    --           , argCType = Just "DbusmenuClient*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "Client where we're getting types coming in"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "type"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const gchar*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "A text string that will be matched with the 'type'\n    property on incoming menu items"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "newfunc"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "Dbusmenu" , name = "ClientTypeHandler" }
    --           , argCType = Just "DbusmenuClientTypeHandler"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "The function that will be executed with those new\n    items when they come in."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeNotified
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_add_type_handler" dbusmenu_client_add_type_handler ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        CString ->                              -- type : TBasicType TUTF8
        FunPtr Dbusmenu.Callbacks.C_ClientTypeHandler -> -- newfunc : TInterface (Name {namespace = "Dbusmenu", name = "ClientTypeHandler"})
        IO CInt

    -- | This function connects into the type handling of the t'GI.Dbusmenu.Objects.Client.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
    -- t'GI.Dbusmenu.Objects.Menuitem.Menuitem'.  If not, then the DbusmenuClient[newMenuitem](#g:signal:newMenuitem)
    -- 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.
    clientAddTypeHandler ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: Client where we\'re getting types coming in
        -> T.Text
        -- ^ /@type@/: A text string that will be matched with the \'type\'
        --     property on incoming menu items
        -> Dbusmenu.Callbacks.ClientTypeHandler
        -- ^ /@newfunc@/: The function that will be executed with those new
        --     items when they come in.
        -> m Bool
        -- ^ __Returns:__ If registering the new type was successful.
    clientAddTypeHandler :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> Text -> ClientTypeHandler -> m Bool
    clientAddTypeHandler a
    client Text
    type_ ClientTypeHandler
    newfunc = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ do
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        type_' <- textToCString type_
        newfunc' <- Dbusmenu.Callbacks.mk_ClientTypeHandler (Dbusmenu.Callbacks.wrap_ClientTypeHandler Nothing (Dbusmenu.Callbacks.drop_closures_ClientTypeHandler newfunc))
        result <- dbusmenu_client_add_type_handler client' type_' newfunc'
        let result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        touchManagedPtr client
        freeMem type_'
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientAddTypeHandlerMethodInfo
    instance (signature ~ (T.Text -> Dbusmenu.Callbacks.ClientTypeHandler -> m Bool), MonadIO m, IsClient a) => O.OverloadedMethod ClientAddTypeHandlerMethodInfo a signature where
        overloadedMethod = clientAddTypeHandler

    instance O.OverloadedMethodInfo ClientAddTypeHandlerMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientAddTypeHandler",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientAddTypeHandler"
            })

    #endif

    -- method Client::add_type_handler_full
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "client"
    --           , argType =
    --               TInterface Name { namespace = "Dbusmenu" , name = "Client" }
    --           , argCType = Just "DbusmenuClient*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "Client where we're getting types coming in"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "type"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const gchar*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "A text string that will be matched with the 'type'\n    property on incoming menu items"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "newfunc"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "Dbusmenu" , name = "ClientTypeHandler" }
    --           , argCType = Just "DbusmenuClientTypeHandler"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "The function that will be executed with those new\n    items when they come in."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeNotified
    --           , argClosure = 3
    --           , argDestroy = 4
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , argCType = Just "gpointer"
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "Data passed to @newfunc when it is called"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "destroy_func"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
    --           , argCType = Just "GDestroyNotify"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "A function that is called when the type handler is\n\tremoved (usually on client destruction) which will free\n\tthe resources in @user_data."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeAsync
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_add_type_handler_full" dbusmenu_client_add_type_handler_full ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        CString ->                              -- type : TBasicType TUTF8
        FunPtr Dbusmenu.Callbacks.C_ClientTypeHandler -> -- newfunc : TInterface (Name {namespace = "Dbusmenu", name = "ClientTypeHandler"})
        Ptr () ->                               -- user_data : TBasicType TPtr
        FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy_func : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
        IO CInt

    -- | This function connects into the type handling of the t'GI.Dbusmenu.Objects.Client.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
    -- t'GI.Dbusmenu.Objects.Menuitem.Menuitem'.  If not, then the DbusmenuClient[newMenuitem](#g:signal:newMenuitem)
    -- 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.
    clientAddTypeHandlerFull ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: Client where we\'re getting types coming in
        -> T.Text
        -- ^ /@type@/: A text string that will be matched with the \'type\'
        --     property on incoming menu items
        -> Dbusmenu.Callbacks.ClientTypeHandler
        -- ^ /@newfunc@/: The function that will be executed with those new
        --     items when they come in.
        -> m Bool
        -- ^ __Returns:__ If registering the new type was successful.
    clientAddTypeHandlerFull :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> Text -> ClientTypeHandler -> m Bool
    clientAddTypeHandlerFull a
    client Text
    type_ ClientTypeHandler
    newfunc = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ do
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        type_' <- textToCString type_
        newfunc' <- Dbusmenu.Callbacks.mk_ClientTypeHandler (Dbusmenu.Callbacks.wrap_ClientTypeHandler Nothing (Dbusmenu.Callbacks.drop_closures_ClientTypeHandler newfunc))
        let userData = FunPtr C_ClientTypeHandler -> Ptr ()
    forall a b. FunPtr a -> Ptr b
    castFunPtrToPtr FunPtr C_ClientTypeHandler
    newfunc'
        let destroyFunc = FunPtr (Ptr a -> IO ())
    forall a. FunPtr (Ptr a -> IO ())
    SP.safeFreeFunPtrPtr
        result <- dbusmenu_client_add_type_handler_full client' type_' newfunc' userData destroyFunc
        let result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        touchManagedPtr client
        freeMem type_'
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientAddTypeHandlerFullMethodInfo
    instance (signature ~ (T.Text -> Dbusmenu.Callbacks.ClientTypeHandler -> m Bool), MonadIO m, IsClient a) => O.OverloadedMethod ClientAddTypeHandlerFullMethodInfo a signature where
        overloadedMethod = clientAddTypeHandlerFull

    instance O.OverloadedMethodInfo ClientAddTypeHandlerFullMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientAddTypeHandlerFull",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientAddTypeHandlerFull"
            })

    #endif

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

    foreign import ccall "dbusmenu_client_get_icon_paths" dbusmenu_client_get_icon_paths ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        IO (Ptr CString)

    -- | Gets the stored and exported icon paths from the client.
    clientGetIconPaths ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: The t'GI.Dbusmenu.Objects.Client.Client' to get the icon paths from
        -> m [T.Text]
        -- ^ __Returns:__ A NULL-terminated list of icon paths with
        --   memory managed by the client.  Duplicate if you want
        --   to keep them.
    clientGetIconPaths :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> m [Text]
    clientGetIconPaths a
    client = IO [Text] -> m [Text]
    forall a. IO a -> m a
    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
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        result <- dbusmenu_client_get_icon_paths client'
        checkUnexpectedReturnNULL "clientGetIconPaths" result
        result' <- unpackZeroTerminatedUTF8CArray result
        touchManagedPtr client
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientGetIconPathsMethodInfo
    instance (signature ~ (m [T.Text]), MonadIO m, IsClient a) => O.OverloadedMethod ClientGetIconPathsMethodInfo a signature where
        overloadedMethod = clientGetIconPaths

    instance O.OverloadedMethodInfo ClientGetIconPathsMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientGetIconPaths",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientGetIconPaths"
            })

    #endif

    -- method Client::get_root
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "client"
    --           , argType =
    --               TInterface Name { namespace = "Dbusmenu" , name = "Client" }
    --           , argCType = Just "DbusmenuClient*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The #DbusmenuClient to get the root node from"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Dbusmenu" , name = "Menuitem" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_get_root" dbusmenu_client_get_root ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        IO (Ptr Dbusmenu.Menuitem.Menuitem)

    -- | 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.
    clientGetRoot ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: The t'GI.Dbusmenu.Objects.Client.Client' to get the root node from
        -> m Dbusmenu.Menuitem.Menuitem
        -- ^ __Returns:__ A t'GI.Dbusmenu.Objects.Menuitem.Menuitem' representing the root of
        -- 	menu on the server.  If there is no server or there is
        -- 	an error receiving its layout it\'ll return @/NULL/@.
    clientGetRoot :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> m Menuitem
    clientGetRoot a
    client = IO Menuitem -> m Menuitem
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Menuitem -> m Menuitem) -> IO Menuitem -> m Menuitem
    forall a b. (a -> b) -> a -> b
    $ do
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        result <- dbusmenu_client_get_root client'
        checkUnexpectedReturnNULL "clientGetRoot" result
        result' <- (newObject Dbusmenu.Menuitem.Menuitem) result
        touchManagedPtr client
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientGetRootMethodInfo
    instance (signature ~ (m Dbusmenu.Menuitem.Menuitem), MonadIO m, IsClient a) => O.OverloadedMethod ClientGetRootMethodInfo a signature where
        overloadedMethod = clientGetRoot

    instance O.OverloadedMethodInfo ClientGetRootMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientGetRoot",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientGetRoot"
            })

    #endif

    -- method Client::get_status
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "client"
    --           , argType =
    --               TInterface Name { namespace = "Dbusmenu" , name = "Client" }
    --           , argCType = Just "DbusmenuClient*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "#DbusmenuClient to check the status on"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Dbusmenu" , name = "Status" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_get_status" dbusmenu_client_get_status ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        IO CUInt

    -- | 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.
    clientGetStatus ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: t'GI.Dbusmenu.Objects.Client.Client' to check the status on
        -> m Dbusmenu.Enums.Status
    clientGetStatus :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> m Status
    clientGetStatus a
    client = IO Status -> m Status
    forall a. IO a -> m a
    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
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        result <- dbusmenu_client_get_status client'
        let 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
        touchManagedPtr client
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientGetStatusMethodInfo
    instance (signature ~ (m Dbusmenu.Enums.Status), MonadIO m, IsClient a) => O.OverloadedMethod ClientGetStatusMethodInfo a signature where
        overloadedMethod = clientGetStatus

    instance O.OverloadedMethodInfo ClientGetStatusMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientGetStatus",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientGetStatus"
            })

    #endif

    -- method Client::get_text_direction
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "client"
    --           , argType =
    --               TInterface Name { namespace = "Dbusmenu" , name = "Client" }
    --           , argCType = Just "DbusmenuClient*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "#DbusmenuClient to check the text direction on"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface
    --                  Name { namespace = "Dbusmenu" , name = "TextDirection" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dbusmenu_client_get_text_direction" dbusmenu_client_get_text_direction ::
        Ptr Client ->                           -- client : TInterface (Name {namespace = "Dbusmenu", name = "Client"})
        IO CUInt

    -- | 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.
    clientGetTextDirection ::
        (B.CallStack.HasCallStack, MonadIO m, IsClient a) =>
        a
        -- ^ /@client@/: t'GI.Dbusmenu.Objects.Client.Client' to check the text direction on
        -> m Dbusmenu.Enums.TextDirection
    clientGetTextDirection :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsClient a) =>
    a -> m TextDirection
    clientGetTextDirection a
    client = IO TextDirection -> m TextDirection
    forall a. IO a -> m a
    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
        client' <- a -> IO (Ptr Client)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    client
        result <- dbusmenu_client_get_text_direction client'
        let 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
        touchManagedPtr client
        return result'

    #if defined(ENABLE_OVERLOADING)
    data ClientGetTextDirectionMethodInfo
    instance (signature ~ (m Dbusmenu.Enums.TextDirection), MonadIO m, IsClient a) => O.OverloadedMethod ClientGetTextDirectionMethodInfo a signature where
        overloadedMethod = clientGetTextDirection

    instance O.OverloadedMethodInfo ClientGetTextDirectionMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Dbusmenu.Objects.Client.clientGetTextDirection",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dbusmenu-0.4.14/docs/GI-Dbusmenu-Objects-Client.html#v:clientGetTextDirection"
            })

    #endif