gi-dbusmenu 0.4.3 → 0.4.4
raw patch · 17 files changed
+16/−6948 lines, 17 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- GI/Dbusmenu.hs +0/−52
- GI/Dbusmenu/Callbacks.hs +0/−369
- GI/Dbusmenu/Constants.hs +0/−462
- GI/Dbusmenu/Enums.hs +0/−116
- GI/Dbusmenu/Enums.hs-boot +0/−28
- GI/Dbusmenu/Objects.hs +0/−47
- GI/Dbusmenu/Objects/Client.hs +0/−1245
- GI/Dbusmenu/Objects/Client.hs-boot +0/−74
- GI/Dbusmenu/Objects/Menuitem.hs +0/−2922
- GI/Dbusmenu/Objects/Menuitem.hs-boot +0/−164
- GI/Dbusmenu/Objects/MenuitemProxy.hs +0/−301
- GI/Dbusmenu/Objects/MenuitemProxy.hs-boot +0/−35
- GI/Dbusmenu/Objects/Server.hs +0/−1060
- GI/Dbusmenu/Objects/Server.hs-boot +0/−71
- README.md +1/−1
- gi-dbusmenu.cabal +11/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+### 0.4.4+++ List autogenerated modules in .cabal file+ ### 0.4.3 + Update to haskell-gi(-base) 0.22
@@ -1,52 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu- ( module GI.Dbusmenu.Callbacks ,- module GI.Dbusmenu.Constants ,- module GI.Dbusmenu.Enums ,- module GI.Dbusmenu.Objects ,---- module Data.GI.Base ,--- ) where--import GI.Dbusmenu.Callbacks-import GI.Dbusmenu.Constants-import GI.Dbusmenu.Enums-import GI.Dbusmenu.Objects--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---import Data.GI.Base-
@@ -1,369 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Callbacks- ( -- -- * Signals--- ** ClientTypeHandler #signal:ClientTypeHandler#-- C_ClientTypeHandler ,- ClientTypeHandler ,- ClientTypeHandler_WithClosures ,- drop_closures_ClientTypeHandler ,- dynamic_ClientTypeHandler ,- genClosure_ClientTypeHandler ,- mk_ClientTypeHandler ,- noClientTypeHandler ,- noClientTypeHandler_WithClosures ,- wrap_ClientTypeHandler ,----- ** MenuitemAboutToShowCb #signal:MenuitemAboutToShowCb#-- C_MenuitemAboutToShowCb ,- MenuitemAboutToShowCb ,- MenuitemAboutToShowCb_WithClosures ,- drop_closures_MenuitemAboutToShowCb ,- dynamic_MenuitemAboutToShowCb ,- genClosure_MenuitemAboutToShowCb ,- mk_MenuitemAboutToShowCb ,- noMenuitemAboutToShowCb ,- noMenuitemAboutToShowCb_WithClosures ,- wrap_MenuitemAboutToShowCb ,----- ** MenuitemBuildvariantSlotT #signal:MenuitemBuildvariantSlotT#-- C_MenuitemBuildvariantSlotT ,- MenuitemBuildvariantSlotT ,- dynamic_MenuitemBuildvariantSlotT ,- genClosure_MenuitemBuildvariantSlotT ,- mk_MenuitemBuildvariantSlotT ,- noMenuitemBuildvariantSlotT ,- wrap_MenuitemBuildvariantSlotT ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Client as Dbusmenu.Client-import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Menuitem as Dbusmenu.Menuitem---- callback MenuitemBuildvariantSlotT--- -> Callable {returnType = Just TVariant, returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "A variant representing this item and its children", sinceVersion = Nothing}, args = [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Menu item that should be built from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "properties", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "A list of properties that should be the only ones in the resulting variant structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "This is the function that is called to represent this menu item\nas a variant. Should call its own children.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_MenuitemBuildvariantSlotT =- Ptr Dbusmenu.Menuitem.Menuitem ->- CString ->- IO (Ptr GVariant)---- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Menu item that should be built from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "properties", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "A list of properties that should be the only ones in the resulting variant structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TVariant--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_MenuitemBuildvariantSlotT :: FunPtr C_MenuitemBuildvariantSlotT -> C_MenuitemBuildvariantSlotT---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_MenuitemBuildvariantSlotT ::- (B.CallStack.HasCallStack, MonadIO m, Dbusmenu.Menuitem.IsMenuitem a) =>- FunPtr C_MenuitemBuildvariantSlotT- -> a- {- ^ /@mi@/: Menu item that should be built from -}- -> Maybe (T.Text)- {- ^ /@properties@/: A list of properties that should be the only ones in the resulting variant structure -}- -> m GVariant- {- ^ __Returns:__ A variant representing this item and its children -}-dynamic_MenuitemBuildvariantSlotT __funPtr mi properties = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- maybeProperties <- case properties of- Nothing -> return nullPtr- Just jProperties -> do- jProperties' <- textToCString jProperties- return jProperties'- result <- (__dynamic_C_MenuitemBuildvariantSlotT __funPtr) mi' maybeProperties- checkUnexpectedReturnNULL "menuitemBuildvariantSlotT" result- result' <- B.GVariant.wrapGVariantPtr result- touchManagedPtr mi- freeMem maybeProperties- return result'---- | Generate a function pointer callable from C code, from a `C_MenuitemBuildvariantSlotT`.-foreign import ccall "wrapper"- mk_MenuitemBuildvariantSlotT :: C_MenuitemBuildvariantSlotT -> IO (FunPtr C_MenuitemBuildvariantSlotT)--{- |-This is the function that is called to represent this menu item-as a variant. Should call its own children.--}-type MenuitemBuildvariantSlotT =- Dbusmenu.Menuitem.Menuitem- {- ^ /@mi@/: Menu item that should be built from -}- -> Maybe T.Text- {- ^ /@properties@/: A list of properties that should be the only ones in the resulting variant structure -}- -> IO GVariant- {- ^ __Returns:__ A variant representing this item and its children -}---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemBuildvariantSlotT`@.-noMenuitemBuildvariantSlotT :: Maybe MenuitemBuildvariantSlotT-noMenuitemBuildvariantSlotT = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemBuildvariantSlotT :: MonadIO m => MenuitemBuildvariantSlotT -> m (GClosure C_MenuitemBuildvariantSlotT)-genClosure_MenuitemBuildvariantSlotT cb = liftIO $ do- let cb' = wrap_MenuitemBuildvariantSlotT Nothing cb- mk_MenuitemBuildvariantSlotT cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemBuildvariantSlotT` into a `C_MenuitemBuildvariantSlotT`.-wrap_MenuitemBuildvariantSlotT ::- Maybe (Ptr (FunPtr C_MenuitemBuildvariantSlotT)) ->- MenuitemBuildvariantSlotT ->- C_MenuitemBuildvariantSlotT-wrap_MenuitemBuildvariantSlotT funptrptr _cb mi properties = do- mi' <- (newObject Dbusmenu.Menuitem.Menuitem) mi- maybeProperties <-- if properties == nullPtr- then return Nothing- else do- properties' <- cstringToText properties- return $ Just properties'- result <- _cb mi' maybeProperties- maybeReleaseFunPtr funptrptr- result' <- B.GVariant.disownGVariant result- return result'----- callback MenuitemAboutToShowCb--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Menu item that should be shown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Extra user data sent with the function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Callback prototype for a callback that is called when the\nmenu should be shown.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_MenuitemAboutToShowCb =- Ptr Dbusmenu.Menuitem.Menuitem ->- Ptr () ->- IO ()---- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Menu item that should be shown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Extra user data sent with the function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_MenuitemAboutToShowCb :: FunPtr C_MenuitemAboutToShowCb -> C_MenuitemAboutToShowCb---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_MenuitemAboutToShowCb ::- (B.CallStack.HasCallStack, MonadIO m, Dbusmenu.Menuitem.IsMenuitem a) =>- FunPtr C_MenuitemAboutToShowCb- -> a- {- ^ /@mi@/: Menu item that should be shown -}- -> Ptr ()- {- ^ /@userData@/: Extra user data sent with the function -}- -> m ()-dynamic_MenuitemAboutToShowCb __funPtr mi userData = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- (__dynamic_C_MenuitemAboutToShowCb __funPtr) mi' userData- touchManagedPtr mi- return ()---- | Generate a function pointer callable from C code, from a `C_MenuitemAboutToShowCb`.-foreign import ccall "wrapper"- mk_MenuitemAboutToShowCb :: C_MenuitemAboutToShowCb -> IO (FunPtr C_MenuitemAboutToShowCb)--{- |-Callback prototype for a callback that is called when the-menu should be shown.--}-type MenuitemAboutToShowCb =- Dbusmenu.Menuitem.Menuitem- {- ^ /@mi@/: Menu item that should be shown -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemAboutToShowCb`@.-noMenuitemAboutToShowCb :: Maybe MenuitemAboutToShowCb-noMenuitemAboutToShowCb = Nothing--{- |-Callback prototype for a callback that is called when the-menu should be shown.--}-type MenuitemAboutToShowCb_WithClosures =- Dbusmenu.Menuitem.Menuitem- {- ^ /@mi@/: Menu item that should be shown -}- -> Ptr ()- {- ^ /@userData@/: Extra user data sent with the function -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemAboutToShowCb_WithClosures`@.-noMenuitemAboutToShowCb_WithClosures :: Maybe MenuitemAboutToShowCb_WithClosures-noMenuitemAboutToShowCb_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_MenuitemAboutToShowCb :: MenuitemAboutToShowCb -> MenuitemAboutToShowCb_WithClosures-drop_closures_MenuitemAboutToShowCb _f mi _ = _f mi---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemAboutToShowCb :: MonadIO m => MenuitemAboutToShowCb -> m (GClosure C_MenuitemAboutToShowCb)-genClosure_MenuitemAboutToShowCb cb = liftIO $ do- let cb' = drop_closures_MenuitemAboutToShowCb cb- let cb'' = wrap_MenuitemAboutToShowCb Nothing cb'- mk_MenuitemAboutToShowCb cb'' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemAboutToShowCb` into a `C_MenuitemAboutToShowCb`.-wrap_MenuitemAboutToShowCb ::- Maybe (Ptr (FunPtr C_MenuitemAboutToShowCb)) ->- MenuitemAboutToShowCb_WithClosures ->- C_MenuitemAboutToShowCb-wrap_MenuitemAboutToShowCb funptrptr _cb mi userData = do- mi' <- (newObject Dbusmenu.Menuitem.Menuitem) mi- _cb mi' userData- maybeReleaseFunPtr funptrptr----- callback ClientTypeHandler--- -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "newitem", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem that was created", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The parent of @newitem or #NULL if none", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A pointer to the #DbusmenuClient", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The data you gave us", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type handler is called when a dbusmenu item is created\n\twith a matching type as setup in #dbusmenu_client_add_type_handler\n\n\tReturn value: #TRUE if the type has been handled. #FALSE if this\n\t\tfunction was somehow unable to handle it.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_ClientTypeHandler =- Ptr Dbusmenu.Menuitem.Menuitem ->- Ptr Dbusmenu.Menuitem.Menuitem ->- Ptr Dbusmenu.Client.Client ->- Ptr () ->- IO CInt---- Args : [Arg {argCName = "newitem", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem that was created", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The parent of @newitem or #NULL if none", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A pointer to the #DbusmenuClient", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The data you gave us", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_ClientTypeHandler :: FunPtr C_ClientTypeHandler -> C_ClientTypeHandler---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_ClientTypeHandler ::- (B.CallStack.HasCallStack, MonadIO m, Dbusmenu.Menuitem.IsMenuitem a, Dbusmenu.Menuitem.IsMenuitem b, Dbusmenu.Client.IsClient c) =>- FunPtr C_ClientTypeHandler- -> a- {- ^ /@newitem@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that was created -}- -> b- {- ^ /@parent@/: The parent of /@newitem@/ or @/NULL/@ if none -}- -> c- {- ^ /@client@/: A pointer to the 'GI.Dbusmenu.Objects.Client.Client' -}- -> Ptr ()- {- ^ /@userData@/: The data you gave us -}- -> m Bool-dynamic_ClientTypeHandler __funPtr newitem parent client userData = liftIO $ do- newitem' <- unsafeManagedPtrCastPtr newitem- parent' <- unsafeManagedPtrCastPtr parent- client' <- unsafeManagedPtrCastPtr client- result <- (__dynamic_C_ClientTypeHandler __funPtr) newitem' parent' client' userData- let result' = (/= 0) result- touchManagedPtr newitem- touchManagedPtr parent- touchManagedPtr client- return result'---- | Generate a function pointer callable from C code, from a `C_ClientTypeHandler`.-foreign import ccall "wrapper"- mk_ClientTypeHandler :: C_ClientTypeHandler -> IO (FunPtr C_ClientTypeHandler)--{- |-The type handler is called when a dbusmenu item is created- with a matching type as setup in @/dbusmenu_client_add_type_handler/@-- Return value: @/TRUE/@ if the type has been handled. @/FALSE/@ if this- function was somehow unable to handle it.--}-type ClientTypeHandler =- Dbusmenu.Menuitem.Menuitem- {- ^ /@newitem@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that was created -}- -> Dbusmenu.Menuitem.Menuitem- {- ^ /@parent@/: The parent of /@newitem@/ or @/NULL/@ if none -}- -> Dbusmenu.Client.Client- {- ^ /@client@/: A pointer to the 'GI.Dbusmenu.Objects.Client.Client' -}- -> IO Bool---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientTypeHandler`@.-noClientTypeHandler :: Maybe ClientTypeHandler-noClientTypeHandler = Nothing--{- |-The type handler is called when a dbusmenu item is created- with a matching type as setup in @/dbusmenu_client_add_type_handler/@-- Return value: @/TRUE/@ if the type has been handled. @/FALSE/@ if this- function was somehow unable to handle it.--}-type ClientTypeHandler_WithClosures =- Dbusmenu.Menuitem.Menuitem- {- ^ /@newitem@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that was created -}- -> Dbusmenu.Menuitem.Menuitem- {- ^ /@parent@/: The parent of /@newitem@/ or @/NULL/@ if none -}- -> Dbusmenu.Client.Client- {- ^ /@client@/: A pointer to the 'GI.Dbusmenu.Objects.Client.Client' -}- -> Ptr ()- {- ^ /@userData@/: The data you gave us -}- -> IO Bool---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientTypeHandler_WithClosures`@.-noClientTypeHandler_WithClosures :: Maybe ClientTypeHandler_WithClosures-noClientTypeHandler_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_ClientTypeHandler :: ClientTypeHandler -> ClientTypeHandler_WithClosures-drop_closures_ClientTypeHandler _f newitem parent client _ = _f newitem parent client---- | Wrap the callback into a `GClosure`.-genClosure_ClientTypeHandler :: MonadIO m => ClientTypeHandler -> m (GClosure C_ClientTypeHandler)-genClosure_ClientTypeHandler cb = liftIO $ do- let cb' = drop_closures_ClientTypeHandler cb- let cb'' = wrap_ClientTypeHandler Nothing cb'- mk_ClientTypeHandler cb'' >>= B.GClosure.newGClosure----- | Wrap a `ClientTypeHandler` into a `C_ClientTypeHandler`.-wrap_ClientTypeHandler ::- Maybe (Ptr (FunPtr C_ClientTypeHandler)) ->- ClientTypeHandler_WithClosures ->- C_ClientTypeHandler-wrap_ClientTypeHandler funptrptr _cb newitem parent client userData = do- newitem' <- (newObject Dbusmenu.Menuitem.Menuitem) newitem- parent' <- (newObject Dbusmenu.Menuitem.Menuitem) parent- client' <- (newObject Dbusmenu.Client.Client) client- result <- _cb newitem' parent' client' userData- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---
@@ -1,462 +0,0 @@-{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Constants- ( - pattern SERVER_SIGNAL_LAYOUT_UPDATED ,- pattern SERVER_SIGNAL_ITEM_ACTIVATION ,- pattern SERVER_SIGNAL_ID_UPDATE ,- pattern SERVER_SIGNAL_ID_PROP_UPDATE ,- pattern SERVER_PROP_VERSION ,- pattern SERVER_PROP_TEXT_DIRECTION ,- pattern SERVER_PROP_STATUS ,- pattern SERVER_PROP_ROOT_NODE ,- pattern SERVER_PROP_DBUS_OBJECT ,- pattern MENUITEM_TOGGLE_STATE_UNKNOWN ,- pattern MENUITEM_TOGGLE_STATE_UNCHECKED ,- pattern MENUITEM_TOGGLE_STATE_CHECKED ,- pattern MENUITEM_TOGGLE_RADIO ,- pattern MENUITEM_TOGGLE_CHECK ,- pattern MENUITEM_SIGNAL_SHOW_TO_USER ,- pattern MENUITEM_SIGNAL_REALIZED ,- pattern MENUITEM_SIGNAL_PROPERTY_CHANGED,- pattern MENUITEM_SIGNAL_ITEM_ACTIVATED ,- pattern MENUITEM_SIGNAL_EVENT ,- pattern MENUITEM_SIGNAL_CHILD_REMOVED ,- pattern MENUITEM_SIGNAL_CHILD_MOVED ,- pattern MENUITEM_SIGNAL_CHILD_ADDED ,- pattern MENUITEM_SIGNAL_ABOUT_TO_SHOW ,- pattern MENUITEM_SHORTCUT_SUPER ,- pattern MENUITEM_SHORTCUT_SHIFT ,- pattern MENUITEM_SHORTCUT_CONTROL ,- pattern MENUITEM_SHORTCUT_ALT ,- pattern MENUITEM_PROP_VISIBLE ,- pattern MENUITEM_PROP_TYPE ,- pattern MENUITEM_PROP_TOGGLE_TYPE ,- pattern MENUITEM_PROP_TOGGLE_STATE ,- pattern MENUITEM_PROP_SHORTCUT ,- pattern MENUITEM_PROP_LABEL ,- pattern MENUITEM_PROP_ICON_NAME ,- pattern MENUITEM_PROP_ICON_DATA ,- pattern MENUITEM_PROP_ENABLED ,- pattern MENUITEM_PROP_DISPOSITION ,- pattern MENUITEM_PROP_CHILD_DISPLAY ,- pattern MENUITEM_PROP_ACCESSIBLE_DESC ,- pattern MENUITEM_ICON_NAME_BLANK ,- pattern MENUITEM_EVENT_OPENED ,- pattern MENUITEM_EVENT_CLOSED ,- pattern MENUITEM_EVENT_ACTIVATED ,- pattern MENUITEM_DISPOSITION_WARNING ,- pattern MENUITEM_DISPOSITION_NORMAL ,- pattern MENUITEM_DISPOSITION_INFORMATIVE,- pattern MENUITEM_DISPOSITION_ALERT ,- pattern MENUITEM_CHILD_DISPLAY_SUBMENU ,- pattern CLIENT_TYPES_SEPARATOR ,- pattern CLIENT_TYPES_IMAGE ,- pattern CLIENT_TYPES_DEFAULT ,- pattern CLIENT_SIGNAL_ROOT_CHANGED ,- pattern CLIENT_SIGNAL_NEW_MENUITEM ,- pattern CLIENT_SIGNAL_LAYOUT_UPDATED ,- pattern CLIENT_SIGNAL_ITEM_ACTIVATE ,- pattern CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED,- pattern CLIENT_SIGNAL_EVENT_RESULT ,- pattern CLIENT_PROP_TEXT_DIRECTION ,- pattern CLIENT_PROP_STATUS ,- pattern CLIENT_PROP_GROUP_EVENTS ,- pattern CLIENT_PROP_DBUS_OBJECT ,- pattern CLIENT_PROP_DBUS_NAME ,-- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/layout-updated/@--}-pattern SERVER_SIGNAL_LAYOUT_UPDATED = "layout-updated" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/item-activation-requested/@--}-pattern SERVER_SIGNAL_ITEM_ACTIVATION = "item-activation-requested" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/item-updated/@--}-pattern SERVER_SIGNAL_ID_UPDATE = "item-updated" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/item-property-updated/@--}-pattern SERVER_SIGNAL_ID_PROP_UPDATE = "item-property-updated" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Server.Server':@/version/@--}-pattern SERVER_PROP_VERSION = "version" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Server.Server':@/text-direction/@--}-pattern SERVER_PROP_TEXT_DIRECTION = "text-direction" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Server.Server':@/status/@--}-pattern SERVER_PROP_STATUS = "status" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Server.Server':@/root-node/@--}-pattern SERVER_PROP_ROOT_NODE = "root-node" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Server.Server':@/dbus-object/@--}-pattern SERVER_PROP_DBUS_OBJECT = "dbus-object" :: T.Text--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_STATE' so that the menu\'s-toggle item is undecided.--}-pattern MENUITEM_TOGGLE_STATE_UNKNOWN = -1 :: Int32--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_STATE' so that the menu\'s-toggle item is empty.--}-pattern MENUITEM_TOGGLE_STATE_UNCHECKED = 0 :: Int32--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_STATE' so that the menu\'s-toggle item is filled.--}-pattern MENUITEM_TOGGLE_STATE_CHECKED = 1 :: Int32--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_TYPE' to be a standard-radio item.--}-pattern MENUITEM_TOGGLE_RADIO = "radio" :: T.Text--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_TYPE' to be a standard-check mark item.--}-pattern MENUITEM_TOGGLE_CHECK = "checkmark" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/show-to-user/@--}-pattern MENUITEM_SIGNAL_SHOW_TO_USER = "show-to-user" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/realized/@--}-pattern MENUITEM_SIGNAL_REALIZED = "realized" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/property-changed/@--}-pattern MENUITEM_SIGNAL_PROPERTY_CHANGED = "property-changed" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/item-activated/@--}-pattern MENUITEM_SIGNAL_ITEM_ACTIVATED = "item-activated" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/event/@--}-pattern MENUITEM_SIGNAL_EVENT = "event" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/child-removed/@--}-pattern MENUITEM_SIGNAL_CHILD_REMOVED = "child-removed" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/child-moved/@--}-pattern MENUITEM_SIGNAL_CHILD_MOVED = "child-moved" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/child-added/@--}-pattern MENUITEM_SIGNAL_CHILD_ADDED = "child-added" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Server.Server'::@/about-to-show/@--}-pattern MENUITEM_SIGNAL_ABOUT_TO_SHOW = "about-to-show" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_SHORTCUT' to represent the-super key.--}-pattern MENUITEM_SHORTCUT_SUPER = "Super" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_SHORTCUT' to represent the-shift key.--}-pattern MENUITEM_SHORTCUT_SHIFT = "Shift" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_SHORTCUT' to represent the-control key.--}-pattern MENUITEM_SHORTCUT_CONTROL = "Control" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_SHORTCUT' to represent the-alternate key.--}-pattern MENUITEM_SHORTCUT_ALT = "Alt" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property used to represent whether the menuitem-should be shown or not. Type: @/G_VARIANT_TYPE_BOOLEAN/@.--}-pattern MENUITEM_PROP_VISIBLE = "visible" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property used to represent what type of menuitem-this object represents. Type: @/G_VARIANT_TYPE_STRING/@.--}-pattern MENUITEM_PROP_TYPE = "type" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that says what type of toggle entry should-be shown in the menu. Should be either 'GI.Dbusmenu.Constants.MENUITEM_TOGGLE_CHECK'-or 'GI.Dbusmenu.Constants.MENUITEM_TOGGLE_RADIO'. Type: @/G_VARIANT_TYPE_STRING/@--}-pattern MENUITEM_PROP_TOGGLE_TYPE = "toggle-type" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that says what state a toggle entry should-be shown as the menu. Should be either 'GI.Dbusmenu.Constants.MENUITEM_TOGGLE_STATE_UNCHECKED'-'GI.Dbusmenu.Constants.MENUITEM_TOGGLE_STATE_CHECKED' or @/DBUSMENU_MENUITEM_TOGGLE_STATUE_UNKNOWN/@.--}-pattern MENUITEM_PROP_TOGGLE_STATE = "toggle-state" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that is the entries that represent a shortcut-to activate the menuitem. It is an array of arrays of strings.--It is recommended that this is not set directly but instead the-libdbusmenu-gtk library is used with the function @/dbusmenu_menuitem_property_set_shortcut()/@--}-pattern MENUITEM_PROP_SHORTCUT = "shortcut" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property used for the text on the menu item.--}-pattern MENUITEM_PROP_LABEL = "label" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that is the name of the icon under the-Freedesktop.org icon naming spec. Type: @/G_VARIANT_TYPE_STRING/@--}-pattern MENUITEM_PROP_ICON_NAME = "icon-name" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that is the raw data of a custom icon-used in the application. Type: @/G_VARIANT_TYPE_VARIANT/@--It is recommended that this is not set directly but instead the-libdbusmenu-gtk library is used with the function @/dbusmenu_menuitem_property_set_image()/@--}-pattern MENUITEM_PROP_ICON_DATA = "icon-data" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property used to represent whether the menuitem-is clickable or not. Type: @/G_VARIANT_TYPE_BOOLEAN/@.--}-pattern MENUITEM_PROP_ENABLED = "enabled" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property to tell what type of information that the-menu item is displaying to the user. Type: @/G_VARIANT_TYPE_STRING/@--}-pattern MENUITEM_PROP_DISPOSITION = "disposition" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property that tells how the children of this menuitem-should be displayed. Most likely this will be unset or of the value-'GI.Dbusmenu.Constants.MENUITEM_CHILD_DISPLAY_SUBMENU'. Type: @/G_VARIANT_TYPE_STRING/@--}-pattern MENUITEM_PROP_CHILD_DISPLAY = "children-display" :: T.Text--{- |-'GI.Dbusmenu.Objects.Menuitem.Menuitem' property used to provide a textual description of any-information that the icon may convey. The contents of this property are-passed through to assistive technologies such as the Orca screen reader.-The contents of this property will not be visible in the menu item. If-this property is set, Orca will use this property instead of the label-property.--}-pattern MENUITEM_PROP_ACCESSIBLE_DESC = "accessible-desc" :: T.Text--{- |-Used to set 'GI.Dbusmenu.Constants.MENUITEM_PROP_TOGGLE_STATE' so that the menu\'s-toggle item is undecided.--}-pattern MENUITEM_ICON_NAME_BLANK = "blank-icon" :: T.Text--{- |-String for the event identifier when a menu is opened and-displayed to the user. Only valid for items that contain-submenus.--}-pattern MENUITEM_EVENT_OPENED = "opened" :: T.Text--{- |-String for the event identifier when a menu is closed and-displayed to the user. Only valid for items that contain-submenus.--}-pattern MENUITEM_EVENT_CLOSED = "closed" :: T.Text--{- |-String for the event identifier when a menu item is clicked-on by the user.--}-pattern MENUITEM_EVENT_ACTIVATED = "clicked" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_DISPOSITION' to have a menu-item displayed in a way that conveys it\'s giving a warning-to the user.--}-pattern MENUITEM_DISPOSITION_WARNING = "warning" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_DISPOSITION' to have a menu-item displayed in the normal manner. Default value.--}-pattern MENUITEM_DISPOSITION_NORMAL = "normal" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_DISPOSITION' to have a menu-item displayed in a way that conveys it\'s giving additional-information to the user.--}-pattern MENUITEM_DISPOSITION_INFORMATIVE = "informative" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_DISPOSITION' to have a menu-item displayed in a way that conveys it\'s giving an alert-to the user.--}-pattern MENUITEM_DISPOSITION_ALERT = "alert" :: T.Text--{- |-Used in 'GI.Dbusmenu.Constants.MENUITEM_PROP_CHILD_DISPLAY' to have the-subitems displayed as a submenu.--}-pattern MENUITEM_CHILD_DISPLAY_SUBMENU = "submenu" :: T.Text--{- |-Used to set the \'type\' property on a menu item to create-a separator menu item.--}-pattern CLIENT_TYPES_SEPARATOR = "separator" :: T.Text--{- |-Used to set the \'type\' property on a menu item to create-an image menu item. Deprecated as standard menu items now-support images as well.--}-pattern CLIENT_TYPES_IMAGE = "standard" :: T.Text--{- |-Used to set the \'type\' property on a menu item to create-a standard menu item.--}-pattern CLIENT_TYPES_DEFAULT = "standard" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/root-changed/@--}-pattern CLIENT_SIGNAL_ROOT_CHANGED = "root-changed" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/new-menuitem/@--}-pattern CLIENT_SIGNAL_NEW_MENUITEM = "new-menuitem" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/layout-updated/@--}-pattern CLIENT_SIGNAL_LAYOUT_UPDATED = "layout-updated" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/item-activate/@--}-pattern CLIENT_SIGNAL_ITEM_ACTIVATE = "item-activate" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/icon-theme-dirs-changed/@--}-pattern CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED = "icon-theme-dirs-changed" :: T.Text--{- |-String to attach to signal 'GI.Dbusmenu.Objects.Client.Client'::@/event-result/@--}-pattern CLIENT_SIGNAL_EVENT_RESULT = "event-result" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Client.Client':@/text-direction/@--}-pattern CLIENT_PROP_TEXT_DIRECTION = "text-direction" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Client.Client':@/status/@--}-pattern CLIENT_PROP_STATUS = "status" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Client.Client':@/group-events/@--}-pattern CLIENT_PROP_GROUP_EVENTS = "group-events" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Client.Client':@/dbus-object/@--}-pattern CLIENT_PROP_DBUS_OBJECT = "dbus-object" :: T.Text--{- |-String to access property 'GI.Dbusmenu.Objects.Client.Client':@/dbus-name/@--}-pattern CLIENT_PROP_DBUS_NAME = "dbus-name" :: T.Text--
@@ -1,116 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Enums- ( -- -- * Enumerations--- ** Status #enum:Status#-- Status(..) ,----- ** TextDirection #enum:TextDirection#-- TextDirection(..) ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- Enum TextDirection-{- |-The direction of text that the strings that this server- will be sending strings as.--}-data TextDirection = - TextDirectionNone- {- ^- Unspecified text direction- -}- | TextDirectionLtr- {- ^- Left-to-right text direction- -}- | TextDirectionRtl- {- ^- Right-to-left text direction- -}- | AnotherTextDirection Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum TextDirection where- fromEnum TextDirectionNone = 0- fromEnum TextDirectionLtr = 1- fromEnum TextDirectionRtl = 2- fromEnum (AnotherTextDirection k) = k-- toEnum 0 = TextDirectionNone- toEnum 1 = TextDirectionLtr- toEnum 2 = TextDirectionRtl- toEnum k = AnotherTextDirection k--instance P.Ord TextDirection where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)---- Enum Status-{- |-Tracks how the menus should be presented to the user.--}-data Status = - StatusNormal- {- ^- Everything is normal- -}- | StatusNotice- {- ^- The menus should be shown at a higher priority- -}- | AnotherStatus Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Status where- fromEnum StatusNormal = 0- fromEnum StatusNotice = 1- fromEnum (AnotherStatus k) = k-- toEnum 0 = StatusNormal- toEnum 1 = StatusNotice- toEnum k = AnotherStatus k--instance P.Ord Status where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--
@@ -1,28 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Dbusmenu.Enums where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--data TextDirection-instance P.Enum TextDirection where-data Status-instance P.Enum Status where
@@ -1,47 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Objects- ( module GI.Dbusmenu.Objects.Client ,- module GI.Dbusmenu.Objects.Menuitem ,- module GI.Dbusmenu.Objects.MenuitemProxy,- module GI.Dbusmenu.Objects.Server ,--- ) where--import GI.Dbusmenu.Objects.Client-import GI.Dbusmenu.Objects.Menuitem-import GI.Dbusmenu.Objects.MenuitemProxy-import GI.Dbusmenu.Objects.Server--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---
@@ -1,1245 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The client for a 'GI.Dbusmenu.Objects.Server.Server' creating a shared- object set of 'GI.Dbusmenu.Objects.Menuitem.Menuitem' objects.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Objects.Client- ( ---- * Exported types- Client(..) ,- IsClient ,- toClient ,- noClient ,--- -- * Methods--- ** addTypeHandler #method:addTypeHandler#--#if ENABLE_OVERLOADING- ClientAddTypeHandlerMethodInfo ,-#endif- clientAddTypeHandler ,----- ** addTypeHandlerFull #method:addTypeHandlerFull#--#if ENABLE_OVERLOADING- ClientAddTypeHandlerFullMethodInfo ,-#endif- clientAddTypeHandlerFull ,----- ** getIconPaths #method:getIconPaths#--#if ENABLE_OVERLOADING- ClientGetIconPathsMethodInfo ,-#endif- clientGetIconPaths ,----- ** getRoot #method:getRoot#--#if ENABLE_OVERLOADING- ClientGetRootMethodInfo ,-#endif- clientGetRoot ,----- ** getStatus #method:getStatus#--#if ENABLE_OVERLOADING- ClientGetStatusMethodInfo ,-#endif- clientGetStatus ,----- ** getTextDirection #method:getTextDirection#--#if ENABLE_OVERLOADING- ClientGetTextDirectionMethodInfo ,-#endif- clientGetTextDirection ,----- ** new #method:new#-- clientNew ,----- -- * Properties--- ** dbusName #attr:dbusName#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ClientDbusNamePropertyInfo ,-#endif-#if ENABLE_OVERLOADING- clientDbusName ,-#endif- constructClientDbusName ,- getClientDbusName ,----- ** dbusObject #attr:dbusObject#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ClientDbusObjectPropertyInfo ,-#endif-#if ENABLE_OVERLOADING- clientDbusObject ,-#endif- constructClientDbusObject ,- getClientDbusObject ,----- ** groupEvents #attr:groupEvents#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ClientGroupEventsPropertyInfo ,-#endif-#if ENABLE_OVERLOADING- clientGroupEvents ,-#endif- constructClientGroupEvents ,- getClientGroupEvents ,- setClientGroupEvents ,----- -- * Signals--- ** eventResult #signal:eventResult#-- C_ClientEventResultCallback ,- ClientEventResultCallback ,-#if ENABLE_OVERLOADING- ClientEventResultSignalInfo ,-#endif- afterClientEventResult ,- genClosure_ClientEventResult ,- mk_ClientEventResultCallback ,- noClientEventResultCallback ,- onClientEventResult ,- wrap_ClientEventResultCallback ,----- ** iconThemeDirsChanged #signal:iconThemeDirsChanged#-- C_ClientIconThemeDirsChangedCallback ,- ClientIconThemeDirsChangedCallback ,-#if ENABLE_OVERLOADING- ClientIconThemeDirsChangedSignalInfo ,-#endif- afterClientIconThemeDirsChanged ,- genClosure_ClientIconThemeDirsChanged ,- mk_ClientIconThemeDirsChangedCallback ,- noClientIconThemeDirsChangedCallback ,- onClientIconThemeDirsChanged ,- wrap_ClientIconThemeDirsChangedCallback ,----- ** itemActivate #signal:itemActivate#-- C_ClientItemActivateCallback ,- ClientItemActivateCallback ,-#if ENABLE_OVERLOADING- ClientItemActivateSignalInfo ,-#endif- afterClientItemActivate ,- genClosure_ClientItemActivate ,- mk_ClientItemActivateCallback ,- noClientItemActivateCallback ,- onClientItemActivate ,- wrap_ClientItemActivateCallback ,----- ** layoutUpdated #signal:layoutUpdated#-- C_ClientLayoutUpdatedCallback ,- ClientLayoutUpdatedCallback ,-#if ENABLE_OVERLOADING- ClientLayoutUpdatedSignalInfo ,-#endif- afterClientLayoutUpdated ,- genClosure_ClientLayoutUpdated ,- mk_ClientLayoutUpdatedCallback ,- noClientLayoutUpdatedCallback ,- onClientLayoutUpdated ,- wrap_ClientLayoutUpdatedCallback ,----- ** newMenuitem #signal:newMenuitem#-- C_ClientNewMenuitemCallback ,- ClientNewMenuitemCallback ,-#if ENABLE_OVERLOADING- ClientNewMenuitemSignalInfo ,-#endif- afterClientNewMenuitem ,- genClosure_ClientNewMenuitem ,- mk_ClientNewMenuitemCallback ,- noClientNewMenuitemCallback ,- onClientNewMenuitem ,- wrap_ClientNewMenuitemCallback ,----- ** rootChanged #signal:rootChanged#-- C_ClientRootChangedCallback ,- ClientRootChangedCallback ,-#if ENABLE_OVERLOADING- ClientRootChangedSignalInfo ,-#endif- afterClientRootChanged ,- genClosure_ClientRootChanged ,- mk_ClientRootChangedCallback ,- noClientRootChangedCallback ,- onClientRootChanged ,- wrap_ClientRootChangedCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--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---- | Memory-managed wrapper type.-newtype Client = Client (ManagedPtr Client)-foreign import ccall "dbusmenu_client_get_type"- c_dbusmenu_client_get_type :: IO GType--instance GObject Client where- gobjectType = c_dbusmenu_client_get_type- ---- | Type class for types which can be safely cast to `Client`, for instance with `toClient`.-class (GObject o, O.IsDescendantOf Client o) => IsClient o-instance (GObject o, O.IsDescendantOf Client o) => IsClient o--instance O.HasParentTypes Client-type instance O.ParentTypes Client = '[GObject.Object.Object]---- | Cast to `Client`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toClient :: (MonadIO m, IsClient o) => o -> m Client-toClient = liftIO . unsafeCastTo Client---- | A convenience alias for `Nothing` :: `Maybe` `Client`.-noClient :: Maybe Client-noClient = Nothing--#if ENABLE_OVERLOADING-type family ResolveClientMethod (t :: Symbol) (o :: *) :: * 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 "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveClientMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveClientMethod t Client, O.MethodInfo info Client p) => OL.IsLabel t (Client -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif---- signal Client::event-result-{- |-/No description available in the introspection data./--}-type ClientEventResultCallback =- GObject.Object.Object- -> T.Text- -> GVariant- -> Word32- -> Ptr ()- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientEventResultCallback`@.-noClientEventResultCallback :: Maybe ClientEventResultCallback-noClientEventResultCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientEventResultCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientEventResult :: MonadIO m => ClientEventResultCallback -> m (GClosure C_ClientEventResultCallback)-genClosure_ClientEventResult cb = liftIO $ do- let cb' = wrap_ClientEventResultCallback cb- mk_ClientEventResultCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientEventResultCallback` into a `C_ClientEventResultCallback`.-wrap_ClientEventResultCallback ::- ClientEventResultCallback ->- C_ClientEventResultCallback-wrap_ClientEventResultCallback _cb _ object p0 p1 p2 p3 _ = do- object' <- (newObject GObject.Object.Object) object- p0' <- cstringToText p0- p1' <- B.GVariant.newGVariantFromPtr p1- _cb object' p0' p1' p2 p3---{- |-Connect a signal handler for the “@event-result@” 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 -> ClientEventResultCallback -> m SignalHandlerId-onClientEventResult obj cb = liftIO $ do- let cb' = wrap_ClientEventResultCallback cb- cb'' <- mk_ClientEventResultCallback cb'- connectSignalFunPtr obj "event-result" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@event-result@” 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-@--}-afterClientEventResult :: (IsClient a, MonadIO m) => a -> ClientEventResultCallback -> m SignalHandlerId-afterClientEventResult obj cb = liftIO $ do- let cb' = wrap_ClientEventResultCallback cb- cb'' <- mk_ClientEventResultCallback cb'- connectSignalFunPtr obj "event-result" cb'' SignalConnectAfter----- 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 ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientIconThemeDirsChangedCallback`@.-noClientIconThemeDirsChangedCallback :: Maybe ClientIconThemeDirsChangedCallback-noClientIconThemeDirsChangedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientIconThemeDirsChangedCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientIconThemeDirsChanged :: MonadIO m => ClientIconThemeDirsChangedCallback -> m (GClosure C_ClientIconThemeDirsChangedCallback)-genClosure_ClientIconThemeDirsChanged cb = liftIO $ do- let cb' = wrap_ClientIconThemeDirsChangedCallback cb- mk_ClientIconThemeDirsChangedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientIconThemeDirsChangedCallback` into a `C_ClientIconThemeDirsChangedCallback`.-wrap_ClientIconThemeDirsChangedCallback ::- ClientIconThemeDirsChangedCallback ->- C_ClientIconThemeDirsChangedCallback-wrap_ClientIconThemeDirsChangedCallback _cb _ arg1 _ = do- _cb arg1---{- |-Connect a signal handler for the “@icon-theme-dirs-changed@” 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 -> ClientIconThemeDirsChangedCallback -> m SignalHandlerId-onClientIconThemeDirsChanged obj cb = liftIO $ do- let cb' = wrap_ClientIconThemeDirsChangedCallback cb- cb'' <- mk_ClientIconThemeDirsChangedCallback cb'- connectSignalFunPtr obj "icon-theme-dirs-changed" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@icon-theme-dirs-changed@” 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-@--}-afterClientIconThemeDirsChanged :: (IsClient a, MonadIO m) => a -> ClientIconThemeDirsChangedCallback -> m SignalHandlerId-afterClientIconThemeDirsChanged obj cb = liftIO $ do- let cb' = wrap_ClientIconThemeDirsChangedCallback cb- cb'' <- mk_ClientIconThemeDirsChangedCallback cb'- connectSignalFunPtr obj "icon-theme-dirs-changed" cb'' SignalConnectAfter----- 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 'GI.Dbusmenu.Objects.Menuitem.Menuitem' activated -}- -> Word32- {- ^ /@arg2@/: A timestamp that the event happened at -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientItemActivateCallback`@.-noClientItemActivateCallback :: Maybe ClientItemActivateCallback-noClientItemActivateCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientItemActivateCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientItemActivate :: MonadIO m => ClientItemActivateCallback -> m (GClosure C_ClientItemActivateCallback)-genClosure_ClientItemActivate cb = liftIO $ do- let cb' = wrap_ClientItemActivateCallback cb- mk_ClientItemActivateCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientItemActivateCallback` into a `C_ClientItemActivateCallback`.-wrap_ClientItemActivateCallback ::- ClientItemActivateCallback ->- C_ClientItemActivateCallback-wrap_ClientItemActivateCallback _cb _ arg1 arg2 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1' arg2---{- |-Connect a signal handler for the “@item-activate@” 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 -> ClientItemActivateCallback -> m SignalHandlerId-onClientItemActivate obj cb = liftIO $ do- let cb' = wrap_ClientItemActivateCallback cb- cb'' <- mk_ClientItemActivateCallback cb'- connectSignalFunPtr obj "item-activate" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@item-activate@” 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-@--}-afterClientItemActivate :: (IsClient a, MonadIO m) => a -> ClientItemActivateCallback -> m SignalHandlerId-afterClientItemActivate obj cb = liftIO $ do- let cb' = wrap_ClientItemActivateCallback cb- cb'' <- mk_ClientItemActivateCallback cb'- connectSignalFunPtr obj "item-activate" cb'' SignalConnectAfter----- signal Client::layout-updated-{- |-/No description available in the introspection data./--}-type ClientLayoutUpdatedCallback =- IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientLayoutUpdatedCallback`@.-noClientLayoutUpdatedCallback :: Maybe ClientLayoutUpdatedCallback-noClientLayoutUpdatedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientLayoutUpdatedCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientLayoutUpdated :: MonadIO m => ClientLayoutUpdatedCallback -> m (GClosure C_ClientLayoutUpdatedCallback)-genClosure_ClientLayoutUpdated cb = liftIO $ do- let cb' = wrap_ClientLayoutUpdatedCallback cb- mk_ClientLayoutUpdatedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientLayoutUpdatedCallback` into a `C_ClientLayoutUpdatedCallback`.-wrap_ClientLayoutUpdatedCallback ::- ClientLayoutUpdatedCallback ->- C_ClientLayoutUpdatedCallback-wrap_ClientLayoutUpdatedCallback _cb _ _ = do- _cb ---{- |-Connect a signal handler for the “@layout-updated@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' client #layoutUpdated callback-@--}-onClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ClientLayoutUpdatedCallback -> m SignalHandlerId-onClientLayoutUpdated obj cb = liftIO $ do- let cb' = wrap_ClientLayoutUpdatedCallback cb- cb'' <- mk_ClientLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@layout-updated@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' client #layoutUpdated callback-@--}-afterClientLayoutUpdated :: (IsClient a, MonadIO m) => a -> ClientLayoutUpdatedCallback -> m SignalHandlerId-afterClientLayoutUpdated obj cb = liftIO $ do- let cb' = wrap_ClientLayoutUpdatedCallback cb- cb'' <- mk_ClientLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' SignalConnectAfter----- 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 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/child-added/@- when it gets parented.--}-type ClientNewMenuitemCallback =- GObject.Object.Object- {- ^ /@arg1@/: The new 'GI.Dbusmenu.Objects.Menuitem.Menuitem' created -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientNewMenuitemCallback`@.-noClientNewMenuitemCallback :: Maybe ClientNewMenuitemCallback-noClientNewMenuitemCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientNewMenuitemCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientNewMenuitem :: MonadIO m => ClientNewMenuitemCallback -> m (GClosure C_ClientNewMenuitemCallback)-genClosure_ClientNewMenuitem cb = liftIO $ do- let cb' = wrap_ClientNewMenuitemCallback cb- mk_ClientNewMenuitemCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientNewMenuitemCallback` into a `C_ClientNewMenuitemCallback`.-wrap_ClientNewMenuitemCallback ::- ClientNewMenuitemCallback ->- C_ClientNewMenuitemCallback-wrap_ClientNewMenuitemCallback _cb _ arg1 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1'---{- |-Connect a signal handler for the “@new-menuitem@” 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 -> ClientNewMenuitemCallback -> m SignalHandlerId-onClientNewMenuitem obj cb = liftIO $ do- let cb' = wrap_ClientNewMenuitemCallback cb- cb'' <- mk_ClientNewMenuitemCallback cb'- connectSignalFunPtr obj "new-menuitem" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@new-menuitem@” 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-@--}-afterClientNewMenuitem :: (IsClient a, MonadIO m) => a -> ClientNewMenuitemCallback -> m SignalHandlerId-afterClientNewMenuitem obj cb = liftIO $ do- let cb' = wrap_ClientNewMenuitemCallback cb- cb'' <- mk_ClientNewMenuitemCallback cb'- connectSignalFunPtr obj "new-menuitem" cb'' SignalConnectAfter----- 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 'GI.Dbusmenu.Objects.Menuitem.Menuitem' -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ClientRootChangedCallback`@.-noClientRootChangedCallback :: Maybe ClientRootChangedCallback-noClientRootChangedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ClientRootChangedCallback =- Ptr () -> -- 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 the callback into a `GClosure`.-genClosure_ClientRootChanged :: MonadIO m => ClientRootChangedCallback -> m (GClosure C_ClientRootChangedCallback)-genClosure_ClientRootChanged cb = liftIO $ do- let cb' = wrap_ClientRootChangedCallback cb- mk_ClientRootChangedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ClientRootChangedCallback` into a `C_ClientRootChangedCallback`.-wrap_ClientRootChangedCallback ::- ClientRootChangedCallback ->- C_ClientRootChangedCallback-wrap_ClientRootChangedCallback _cb _ arg1 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1'---{- |-Connect a signal handler for the “@root-changed@” 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 -> ClientRootChangedCallback -> m SignalHandlerId-onClientRootChanged obj cb = liftIO $ do- let cb' = wrap_ClientRootChangedCallback cb- cb'' <- mk_ClientRootChangedCallback cb'- connectSignalFunPtr obj "root-changed" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@root-changed@” 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-@--}-afterClientRootChanged :: (IsClient a, MonadIO m) => a -> ClientRootChangedCallback -> m SignalHandlerId-afterClientRootChanged obj cb = liftIO $ do- let cb' = wrap_ClientRootChangedCallback cb- cb'' <- mk_ClientRootChangedCallback cb'- connectSignalFunPtr obj "root-changed" cb'' SignalConnectAfter----- 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 obj = liftIO $ B.Properties.getObjectPropertyString obj "dbus-name"--{- |-Construct a `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) => T.Text -> IO (GValueConstruct o)-constructClientDbusName val = B.Properties.constructObjectPropertyString "dbus-name" (Just val)--#if ENABLE_OVERLOADING-data ClientDbusNamePropertyInfo-instance AttrInfo ClientDbusNamePropertyInfo where- type AttrAllowedOps ClientDbusNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ClientDbusNamePropertyInfo = (~) T.Text- type AttrBaseTypeConstraint ClientDbusNamePropertyInfo = IsClient- type AttrGetType ClientDbusNamePropertyInfo = (Maybe T.Text)- type AttrLabel ClientDbusNamePropertyInfo = "dbus-name"- type AttrOrigin ClientDbusNamePropertyInfo = Client- attrGet _ = getClientDbusName- attrSet _ = undefined- attrConstruct _ = constructClientDbusName- attrClear _ = undefined-#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 obj = liftIO $ B.Properties.getObjectPropertyString obj "dbus-object"--{- |-Construct a `GValueConstruct` with valid value for the “@dbus-object@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructClientDbusObject :: (IsClient o) => T.Text -> IO (GValueConstruct o)-constructClientDbusObject val = B.Properties.constructObjectPropertyString "dbus-object" (Just val)--#if ENABLE_OVERLOADING-data ClientDbusObjectPropertyInfo-instance AttrInfo ClientDbusObjectPropertyInfo where- type AttrAllowedOps ClientDbusObjectPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ClientDbusObjectPropertyInfo = (~) T.Text- type AttrBaseTypeConstraint ClientDbusObjectPropertyInfo = IsClient- type AttrGetType ClientDbusObjectPropertyInfo = (Maybe T.Text)- type AttrLabel ClientDbusObjectPropertyInfo = "dbus-object"- type AttrOrigin ClientDbusObjectPropertyInfo = Client- attrGet _ = getClientDbusObject- attrSet _ = undefined- attrConstruct _ = constructClientDbusObject- attrClear _ = undefined-#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 obj = liftIO $ B.Properties.getObjectPropertyBool obj "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 obj val = liftIO $ B.Properties.setObjectPropertyBool obj "group-events" val--{- |-Construct a `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) => Bool -> IO (GValueConstruct o)-constructClientGroupEvents val = B.Properties.constructObjectPropertyBool "group-events" val--#if ENABLE_OVERLOADING-data ClientGroupEventsPropertyInfo-instance AttrInfo ClientGroupEventsPropertyInfo where- type AttrAllowedOps ClientGroupEventsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]- type AttrSetTypeConstraint ClientGroupEventsPropertyInfo = (~) Bool- type AttrBaseTypeConstraint ClientGroupEventsPropertyInfo = IsClient- type AttrGetType ClientGroupEventsPropertyInfo = Bool- type AttrLabel ClientGroupEventsPropertyInfo = "group-events"- type AttrOrigin ClientGroupEventsPropertyInfo = Client- attrGet _ = getClientGroupEvents- attrSet _ = setClientGroupEvents- attrConstruct _ = constructClientGroupEvents- attrClear _ = undefined-#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Client-type instance O.AttributeList Client = ClientAttributeList-type ClientAttributeList = ('[ '("dbusName", ClientDbusNamePropertyInfo), '("dbusObject", ClientDbusObjectPropertyInfo), '("groupEvents", ClientGroupEventsPropertyInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-clientDbusName :: AttrLabelProxy "dbusName"-clientDbusName = AttrLabelProxy--clientDbusObject :: AttrLabelProxy "dbusObject"-clientDbusObject = AttrLabelProxy--clientGroupEvents :: AttrLabelProxy "groupEvents"-clientGroupEvents = AttrLabelProxy--#endif--#if ENABLE_OVERLOADING-data ClientEventResultSignalInfo-instance SignalInfo ClientEventResultSignalInfo where- type HaskellCallbackType ClientEventResultSignalInfo = ClientEventResultCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientEventResultCallback cb- cb'' <- mk_ClientEventResultCallback cb'- connectSignalFunPtr obj "event-result" cb'' connectMode--data ClientIconThemeDirsChangedSignalInfo-instance SignalInfo ClientIconThemeDirsChangedSignalInfo where- type HaskellCallbackType ClientIconThemeDirsChangedSignalInfo = ClientIconThemeDirsChangedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientIconThemeDirsChangedCallback cb- cb'' <- mk_ClientIconThemeDirsChangedCallback cb'- connectSignalFunPtr obj "icon-theme-dirs-changed" cb'' connectMode--data ClientItemActivateSignalInfo-instance SignalInfo ClientItemActivateSignalInfo where- type HaskellCallbackType ClientItemActivateSignalInfo = ClientItemActivateCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientItemActivateCallback cb- cb'' <- mk_ClientItemActivateCallback cb'- connectSignalFunPtr obj "item-activate" cb'' connectMode--data ClientLayoutUpdatedSignalInfo-instance SignalInfo ClientLayoutUpdatedSignalInfo where- type HaskellCallbackType ClientLayoutUpdatedSignalInfo = ClientLayoutUpdatedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientLayoutUpdatedCallback cb- cb'' <- mk_ClientLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' connectMode--data ClientNewMenuitemSignalInfo-instance SignalInfo ClientNewMenuitemSignalInfo where- type HaskellCallbackType ClientNewMenuitemSignalInfo = ClientNewMenuitemCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientNewMenuitemCallback cb- cb'' <- mk_ClientNewMenuitemCallback cb'- connectSignalFunPtr obj "new-menuitem" cb'' connectMode--data ClientRootChangedSignalInfo-instance SignalInfo ClientRootChangedSignalInfo where- type HaskellCallbackType ClientRootChangedSignalInfo = ClientRootChangedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ClientRootChangedCallback cb- cb'' <- mk_ClientRootChangedCallback cb'- connectSignalFunPtr obj "root-changed" cb'' connectMode--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, *)])--#endif---- method Client::new--- method type : Constructor--- Args : [Arg {argCName = "name", argType = TBasicType TUTF8, 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, transfer = TransferNothing},Arg {argCName = "object", argType = TBasicType TUTF8, 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, 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 'GI.Dbusmenu.Objects.Client.Client' -}-clientNew name object = liftIO $ do- name' <- textToCString name- object' <- textToCString object- result <- dbusmenu_client_new name' object'- checkUnexpectedReturnNULL "clientNew" result- result' <- (wrapObject Client) result- freeMem name'- freeMem object'- return result'--#if ENABLE_OVERLOADING-#endif---- method Client::add_type_handler--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), 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, transfer = TransferNothing},Arg {argCName = "type", argType = TBasicType TUTF8, 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, transfer = TransferNothing},Arg {argCName = "newfunc", argType = TInterface (Name {namespace = "Dbusmenu", name = "ClientTypeHandler"}), 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, 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 '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-'GI.Dbusmenu.Objects.Menuitem.Menuitem'. If not, then the DbusmenuClient::new-menuitem-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 client type_ newfunc = liftIO $ do- client' <- unsafeManagedPtrCastPtr 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' = (/= 0) result- touchManagedPtr client- freeMem type_'- return result'--#if ENABLE_OVERLOADING-data ClientAddTypeHandlerMethodInfo-instance (signature ~ (T.Text -> Dbusmenu.Callbacks.ClientTypeHandler -> m Bool), MonadIO m, IsClient a) => O.MethodInfo ClientAddTypeHandlerMethodInfo a signature where- overloadedMethod _ = clientAddTypeHandler--#endif---- method Client::add_type_handler_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), 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, transfer = TransferNothing},Arg {argCName = "type", argType = TBasicType TUTF8, 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, transfer = TransferNothing},Arg {argCName = "newfunc", argType = TInterface (Name {namespace = "Dbusmenu", name = "ClientTypeHandler"}), 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, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, 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, transfer = TransferNothing},Arg {argCName = "destroy_func", argType = TInterface (Name {namespace = "GLib", name = "DestroyNotify"}), 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, 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 '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-'GI.Dbusmenu.Objects.Menuitem.Menuitem'. If not, then the DbusmenuClient::new-menuitem-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 client type_ newfunc = liftIO $ do- client' <- unsafeManagedPtrCastPtr client- type_' <- textToCString type_- newfunc' <- Dbusmenu.Callbacks.mk_ClientTypeHandler (Dbusmenu.Callbacks.wrap_ClientTypeHandler Nothing (Dbusmenu.Callbacks.drop_closures_ClientTypeHandler newfunc))- let userData = castFunPtrToPtr newfunc'- let destroyFunc = safeFreeFunPtrPtr- result <- dbusmenu_client_add_type_handler_full client' type_' newfunc' userData destroyFunc- let result' = (/= 0) result- touchManagedPtr client- freeMem type_'- return result'--#if ENABLE_OVERLOADING-data ClientAddTypeHandlerFullMethodInfo-instance (signature ~ (T.Text -> Dbusmenu.Callbacks.ClientTypeHandler -> m Bool), MonadIO m, IsClient a) => O.MethodInfo ClientAddTypeHandlerFullMethodInfo a signature where- overloadedMethod _ = clientAddTypeHandlerFull--#endif---- method Client::get_icon_paths--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), 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, 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 '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 client = liftIO $ do- client' <- unsafeManagedPtrCastPtr client- result <- dbusmenu_client_get_icon_paths client'- checkUnexpectedReturnNULL "clientGetIconPaths" result- result' <- unpackZeroTerminatedUTF8CArray result- touchManagedPtr client- return result'--#if ENABLE_OVERLOADING-data ClientGetIconPathsMethodInfo-instance (signature ~ (m [T.Text]), MonadIO m, IsClient a) => O.MethodInfo ClientGetIconPathsMethodInfo a signature where- overloadedMethod _ = clientGetIconPaths--#endif---- method Client::get_root--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), 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, 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 'GI.Dbusmenu.Objects.Client.Client' to get the root node from -}- -> m Dbusmenu.Menuitem.Menuitem- {- ^ __Returns:__ A '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 client = liftIO $ do- client' <- unsafeManagedPtrCastPtr client- result <- dbusmenu_client_get_root client'- checkUnexpectedReturnNULL "clientGetRoot" result- result' <- (newObject Dbusmenu.Menuitem.Menuitem) result- touchManagedPtr client- return result'--#if ENABLE_OVERLOADING-data ClientGetRootMethodInfo-instance (signature ~ (m Dbusmenu.Menuitem.Menuitem), MonadIO m, IsClient a) => O.MethodInfo ClientGetRootMethodInfo a signature where- overloadedMethod _ = clientGetRoot--#endif---- method Client::get_status--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuClient to check the status on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Status"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_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@/: 'GI.Dbusmenu.Objects.Client.Client' to check the status on -}- -> m Dbusmenu.Enums.Status-clientGetStatus client = liftIO $ do- client' <- unsafeManagedPtrCastPtr client- result <- dbusmenu_client_get_status client'- let result' = (toEnum . fromIntegral) result- touchManagedPtr client- return result'--#if ENABLE_OVERLOADING-data ClientGetStatusMethodInfo-instance (signature ~ (m Dbusmenu.Enums.Status), MonadIO m, IsClient a) => O.MethodInfo ClientGetStatusMethodInfo a signature where- overloadedMethod _ = clientGetStatus--#endif---- method Client::get_text_direction--- method type : OrdinaryMethod--- Args : [Arg {argCName = "client", argType = TInterface (Name {namespace = "Dbusmenu", name = "Client"}), 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, 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@/: 'GI.Dbusmenu.Objects.Client.Client' to check the text direction on -}- -> m Dbusmenu.Enums.TextDirection-clientGetTextDirection client = liftIO $ do- client' <- unsafeManagedPtrCastPtr client- result <- dbusmenu_client_get_text_direction client'- let result' = (toEnum . fromIntegral) result- touchManagedPtr client- return result'--#if ENABLE_OVERLOADING-data ClientGetTextDirectionMethodInfo-instance (signature ~ (m Dbusmenu.Enums.TextDirection), MonadIO m, IsClient a) => O.MethodInfo ClientGetTextDirectionMethodInfo a signature where- overloadedMethod _ = clientGetTextDirection--#endif--
@@ -1,74 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Dbusmenu.Objects.Client where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Client = Client (ManagedPtr Client)-instance GObject Client where-class (GObject o, O.IsDescendantOf Client o) => IsClient o-instance (GObject o, O.IsDescendantOf Client o) => IsClient o-instance O.HasParentTypes Client-#if ENABLE_OVERLOADING-data ClientDbusNamePropertyInfo-#endif-#if ENABLE_OVERLOADING-data ClientDbusObjectPropertyInfo-#endif-#if ENABLE_OVERLOADING-data ClientGroupEventsPropertyInfo-#endif-#if ENABLE_OVERLOADING-data ClientEventResultSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientIconThemeDirsChangedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientItemActivateSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientLayoutUpdatedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientNewMenuitemSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientRootChangedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ClientAddTypeHandlerMethodInfo-#endif-#if ENABLE_OVERLOADING-data ClientAddTypeHandlerFullMethodInfo-#endif-#if ENABLE_OVERLOADING-data ClientGetIconPathsMethodInfo-#endif-#if ENABLE_OVERLOADING-data ClientGetRootMethodInfo-#endif-#if ENABLE_OVERLOADING-data ClientGetStatusMethodInfo-#endif-#if ENABLE_OVERLOADING-data ClientGetTextDirectionMethodInfo-#endif
@@ -1,2922 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--This is the 'GI.GObject.Objects.Object.Object' based object that represents a menu-item. It gets created the same on both the client and-the server side and libdbusmenu-glib does the work of making-this object model appear on both sides of DBus. Simple-really, though through updates and people coming on and off-the bus it can lead to lots of fun complex scenarios.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Objects.Menuitem- ( ---- * Exported types- Menuitem(..) ,- IsMenuitem ,- toMenuitem ,- noMenuitem ,--- -- * Methods--- ** childAddPosition #method:childAddPosition#--#if ENABLE_OVERLOADING- MenuitemChildAddPositionMethodInfo ,-#endif- menuitemChildAddPosition ,----- ** childAppend #method:childAppend#--#if ENABLE_OVERLOADING- MenuitemChildAppendMethodInfo ,-#endif- menuitemChildAppend ,----- ** childDelete #method:childDelete#--#if ENABLE_OVERLOADING- MenuitemChildDeleteMethodInfo ,-#endif- menuitemChildDelete ,----- ** childFind #method:childFind#--#if ENABLE_OVERLOADING- MenuitemChildFindMethodInfo ,-#endif- menuitemChildFind ,----- ** childPrepend #method:childPrepend#--#if ENABLE_OVERLOADING- MenuitemChildPrependMethodInfo ,-#endif- menuitemChildPrepend ,----- ** childReorder #method:childReorder#--#if ENABLE_OVERLOADING- MenuitemChildReorderMethodInfo ,-#endif- menuitemChildReorder ,----- ** findId #method:findId#--#if ENABLE_OVERLOADING- MenuitemFindIdMethodInfo ,-#endif- menuitemFindId ,----- ** foreach #method:foreach#--#if ENABLE_OVERLOADING- MenuitemForeachMethodInfo ,-#endif- menuitemForeach ,----- ** getChildren #method:getChildren#--#if ENABLE_OVERLOADING- MenuitemGetChildrenMethodInfo ,-#endif- menuitemGetChildren ,----- ** getId #method:getId#--#if ENABLE_OVERLOADING- MenuitemGetIdMethodInfo ,-#endif- menuitemGetId ,----- ** getParent #method:getParent#--#if ENABLE_OVERLOADING- MenuitemGetParentMethodInfo ,-#endif- menuitemGetParent ,----- ** getPosition #method:getPosition#--#if ENABLE_OVERLOADING- MenuitemGetPositionMethodInfo ,-#endif- menuitemGetPosition ,----- ** getPositionRealized #method:getPositionRealized#--#if ENABLE_OVERLOADING- MenuitemGetPositionRealizedMethodInfo ,-#endif- menuitemGetPositionRealized ,----- ** getRoot #method:getRoot#--#if ENABLE_OVERLOADING- MenuitemGetRootMethodInfo ,-#endif- menuitemGetRoot ,----- ** handleEvent #method:handleEvent#--#if ENABLE_OVERLOADING- MenuitemHandleEventMethodInfo ,-#endif- menuitemHandleEvent ,----- ** new #method:new#-- menuitemNew ,----- ** newWithId #method:newWithId#-- menuitemNewWithId ,----- ** propertiesCopy #method:propertiesCopy#--#if ENABLE_OVERLOADING- MenuitemPropertiesCopyMethodInfo ,-#endif- menuitemPropertiesCopy ,----- ** propertiesList #method:propertiesList#--#if ENABLE_OVERLOADING- MenuitemPropertiesListMethodInfo ,-#endif- menuitemPropertiesList ,----- ** propertyExist #method:propertyExist#--#if ENABLE_OVERLOADING- MenuitemPropertyExistMethodInfo ,-#endif- menuitemPropertyExist ,----- ** propertyGet #method:propertyGet#--#if ENABLE_OVERLOADING- MenuitemPropertyGetMethodInfo ,-#endif- menuitemPropertyGet ,----- ** propertyGetBool #method:propertyGetBool#--#if ENABLE_OVERLOADING- MenuitemPropertyGetBoolMethodInfo ,-#endif- menuitemPropertyGetBool ,----- ** propertyGetByteArray #method:propertyGetByteArray#--#if ENABLE_OVERLOADING- MenuitemPropertyGetByteArrayMethodInfo ,-#endif- menuitemPropertyGetByteArray ,----- ** propertyGetInt #method:propertyGetInt#--#if ENABLE_OVERLOADING- MenuitemPropertyGetIntMethodInfo ,-#endif- menuitemPropertyGetInt ,----- ** propertyGetVariant #method:propertyGetVariant#--#if ENABLE_OVERLOADING- MenuitemPropertyGetVariantMethodInfo ,-#endif- menuitemPropertyGetVariant ,----- ** propertyRemove #method:propertyRemove#--#if ENABLE_OVERLOADING- MenuitemPropertyRemoveMethodInfo ,-#endif- menuitemPropertyRemove ,----- ** propertySet #method:propertySet#--#if ENABLE_OVERLOADING- MenuitemPropertySetMethodInfo ,-#endif- menuitemPropertySet ,----- ** propertySetBool #method:propertySetBool#--#if ENABLE_OVERLOADING- MenuitemPropertySetBoolMethodInfo ,-#endif- menuitemPropertySetBool ,----- ** propertySetByteArray #method:propertySetByteArray#--#if ENABLE_OVERLOADING- MenuitemPropertySetByteArrayMethodInfo ,-#endif- menuitemPropertySetByteArray ,----- ** propertySetInt #method:propertySetInt#--#if ENABLE_OVERLOADING- MenuitemPropertySetIntMethodInfo ,-#endif- menuitemPropertySetInt ,----- ** propertySetVariant #method:propertySetVariant#--#if ENABLE_OVERLOADING- MenuitemPropertySetVariantMethodInfo ,-#endif- menuitemPropertySetVariant ,----- ** sendAboutToShow #method:sendAboutToShow#--#if ENABLE_OVERLOADING- MenuitemSendAboutToShowMethodInfo ,-#endif- menuitemSendAboutToShow ,----- ** setParent #method:setParent#--#if ENABLE_OVERLOADING- MenuitemSetParentMethodInfo ,-#endif- menuitemSetParent ,----- ** setRoot #method:setRoot#--#if ENABLE_OVERLOADING- MenuitemSetRootMethodInfo ,-#endif- menuitemSetRoot ,----- ** showToUser #method:showToUser#--#if ENABLE_OVERLOADING- MenuitemShowToUserMethodInfo ,-#endif- menuitemShowToUser ,----- ** takeChildren #method:takeChildren#--#if ENABLE_OVERLOADING- MenuitemTakeChildrenMethodInfo ,-#endif- menuitemTakeChildren ,----- ** unparent #method:unparent#--#if ENABLE_OVERLOADING- MenuitemUnparentMethodInfo ,-#endif- menuitemUnparent ,----- -- * Properties--- ** id #attr:id#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- MenuitemIdPropertyInfo ,-#endif- constructMenuitemId ,- getMenuitemId ,-#if ENABLE_OVERLOADING- menuitemId ,-#endif----- -- * Signals--- ** aboutToShow #signal:aboutToShow#-- C_MenuitemAboutToShowCallback ,- MenuitemAboutToShowCallback ,-#if ENABLE_OVERLOADING- MenuitemAboutToShowSignalInfo ,-#endif- afterMenuitemAboutToShow ,- genClosure_MenuitemAboutToShow ,- mk_MenuitemAboutToShowCallback ,- noMenuitemAboutToShowCallback ,- onMenuitemAboutToShow ,- wrap_MenuitemAboutToShowCallback ,----- ** childAdded #signal:childAdded#-- C_MenuitemChildAddedCallback ,- MenuitemChildAddedCallback ,-#if ENABLE_OVERLOADING- MenuitemChildAddedSignalInfo ,-#endif- afterMenuitemChildAdded ,- genClosure_MenuitemChildAdded ,- mk_MenuitemChildAddedCallback ,- noMenuitemChildAddedCallback ,- onMenuitemChildAdded ,- wrap_MenuitemChildAddedCallback ,----- ** childMoved #signal:childMoved#-- C_MenuitemChildMovedCallback ,- MenuitemChildMovedCallback ,-#if ENABLE_OVERLOADING- MenuitemChildMovedSignalInfo ,-#endif- afterMenuitemChildMoved ,- genClosure_MenuitemChildMoved ,- mk_MenuitemChildMovedCallback ,- noMenuitemChildMovedCallback ,- onMenuitemChildMoved ,- wrap_MenuitemChildMovedCallback ,----- ** childRemoved #signal:childRemoved#-- C_MenuitemChildRemovedCallback ,- MenuitemChildRemovedCallback ,-#if ENABLE_OVERLOADING- MenuitemChildRemovedSignalInfo ,-#endif- afterMenuitemChildRemoved ,- genClosure_MenuitemChildRemoved ,- mk_MenuitemChildRemovedCallback ,- noMenuitemChildRemovedCallback ,- onMenuitemChildRemoved ,- wrap_MenuitemChildRemovedCallback ,----- ** event #signal:event#-- C_MenuitemEventCallback ,- MenuitemEventCallback ,-#if ENABLE_OVERLOADING- MenuitemEventSignalInfo ,-#endif- afterMenuitemEvent ,- genClosure_MenuitemEvent ,- mk_MenuitemEventCallback ,- noMenuitemEventCallback ,- onMenuitemEvent ,- wrap_MenuitemEventCallback ,----- ** itemActivated #signal:itemActivated#-- C_MenuitemItemActivatedCallback ,- MenuitemItemActivatedCallback ,-#if ENABLE_OVERLOADING- MenuitemItemActivatedSignalInfo ,-#endif- afterMenuitemItemActivated ,- genClosure_MenuitemItemActivated ,- mk_MenuitemItemActivatedCallback ,- noMenuitemItemActivatedCallback ,- onMenuitemItemActivated ,- wrap_MenuitemItemActivatedCallback ,----- ** propertyChanged #signal:propertyChanged#-- C_MenuitemPropertyChangedCallback ,- MenuitemPropertyChangedCallback ,-#if ENABLE_OVERLOADING- MenuitemPropertyChangedSignalInfo ,-#endif- afterMenuitemPropertyChanged ,- genClosure_MenuitemPropertyChanged ,- mk_MenuitemPropertyChangedCallback ,- noMenuitemPropertyChangedCallback ,- onMenuitemPropertyChanged ,- wrap_MenuitemPropertyChangedCallback ,----- ** realized #signal:realized#-- C_MenuitemRealizedCallback ,- MenuitemRealizedCallback ,-#if ENABLE_OVERLOADING- MenuitemRealizedSignalInfo ,-#endif- afterMenuitemRealized ,- genClosure_MenuitemRealized ,- mk_MenuitemRealizedCallback ,- noMenuitemRealizedCallback ,- onMenuitemRealized ,- wrap_MenuitemRealizedCallback ,----- ** showToUser #signal:showToUser#-- C_MenuitemShowToUserCallback ,- MenuitemShowToUserCallback ,-#if ENABLE_OVERLOADING- MenuitemShowToUserSignalInfo ,-#endif- afterMenuitemShowToUser ,- genClosure_MenuitemShowToUser ,- mk_MenuitemShowToUserCallback ,- noMenuitemShowToUserCallback ,- onMenuitemShowToUser ,- wrap_MenuitemShowToUserCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object---- | Memory-managed wrapper type.-newtype Menuitem = Menuitem (ManagedPtr Menuitem)-foreign import ccall "dbusmenu_menuitem_get_type"- c_dbusmenu_menuitem_get_type :: IO GType--instance GObject Menuitem where- gobjectType = c_dbusmenu_menuitem_get_type- ---- | Type class for types which can be safely cast to `Menuitem`, for instance with `toMenuitem`.-class (GObject o, O.IsDescendantOf Menuitem o) => IsMenuitem o-instance (GObject o, O.IsDescendantOf Menuitem o) => IsMenuitem o--instance O.HasParentTypes Menuitem-type instance O.ParentTypes Menuitem = '[GObject.Object.Object]---- | Cast to `Menuitem`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toMenuitem :: (MonadIO m, IsMenuitem o) => o -> m Menuitem-toMenuitem = liftIO . unsafeCastTo Menuitem---- | A convenience alias for `Nothing` :: `Maybe` `Menuitem`.-noMenuitem :: Maybe Menuitem-noMenuitem = Nothing--#if ENABLE_OVERLOADING-type family ResolveMenuitemMethod (t :: Symbol) (o :: *) :: * where- ResolveMenuitemMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveMenuitemMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveMenuitemMethod "childAddPosition" o = MenuitemChildAddPositionMethodInfo- ResolveMenuitemMethod "childAppend" o = MenuitemChildAppendMethodInfo- ResolveMenuitemMethod "childDelete" o = MenuitemChildDeleteMethodInfo- ResolveMenuitemMethod "childFind" o = MenuitemChildFindMethodInfo- ResolveMenuitemMethod "childPrepend" o = MenuitemChildPrependMethodInfo- ResolveMenuitemMethod "childReorder" o = MenuitemChildReorderMethodInfo- ResolveMenuitemMethod "findId" o = MenuitemFindIdMethodInfo- ResolveMenuitemMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveMenuitemMethod "foreach" o = MenuitemForeachMethodInfo- ResolveMenuitemMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveMenuitemMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveMenuitemMethod "handleEvent" o = MenuitemHandleEventMethodInfo- ResolveMenuitemMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveMenuitemMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveMenuitemMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveMenuitemMethod "propertiesCopy" o = MenuitemPropertiesCopyMethodInfo- ResolveMenuitemMethod "propertiesList" o = MenuitemPropertiesListMethodInfo- ResolveMenuitemMethod "propertyExist" o = MenuitemPropertyExistMethodInfo- ResolveMenuitemMethod "propertyGet" o = MenuitemPropertyGetMethodInfo- ResolveMenuitemMethod "propertyGetBool" o = MenuitemPropertyGetBoolMethodInfo- ResolveMenuitemMethod "propertyGetByteArray" o = MenuitemPropertyGetByteArrayMethodInfo- ResolveMenuitemMethod "propertyGetInt" o = MenuitemPropertyGetIntMethodInfo- ResolveMenuitemMethod "propertyGetVariant" o = MenuitemPropertyGetVariantMethodInfo- ResolveMenuitemMethod "propertyRemove" o = MenuitemPropertyRemoveMethodInfo- ResolveMenuitemMethod "propertySet" o = MenuitemPropertySetMethodInfo- ResolveMenuitemMethod "propertySetBool" o = MenuitemPropertySetBoolMethodInfo- ResolveMenuitemMethod "propertySetByteArray" o = MenuitemPropertySetByteArrayMethodInfo- ResolveMenuitemMethod "propertySetInt" o = MenuitemPropertySetIntMethodInfo- ResolveMenuitemMethod "propertySetVariant" o = MenuitemPropertySetVariantMethodInfo- ResolveMenuitemMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveMenuitemMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveMenuitemMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveMenuitemMethod "sendAboutToShow" o = MenuitemSendAboutToShowMethodInfo- ResolveMenuitemMethod "showToUser" o = MenuitemShowToUserMethodInfo- ResolveMenuitemMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveMenuitemMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveMenuitemMethod "takeChildren" o = MenuitemTakeChildrenMethodInfo- ResolveMenuitemMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveMenuitemMethod "unparent" o = MenuitemUnparentMethodInfo- ResolveMenuitemMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveMenuitemMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveMenuitemMethod "getChildren" o = MenuitemGetChildrenMethodInfo- ResolveMenuitemMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveMenuitemMethod "getId" o = MenuitemGetIdMethodInfo- ResolveMenuitemMethod "getParent" o = MenuitemGetParentMethodInfo- ResolveMenuitemMethod "getPosition" o = MenuitemGetPositionMethodInfo- ResolveMenuitemMethod "getPositionRealized" o = MenuitemGetPositionRealizedMethodInfo- ResolveMenuitemMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveMenuitemMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveMenuitemMethod "getRoot" o = MenuitemGetRootMethodInfo- ResolveMenuitemMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveMenuitemMethod "setParent" o = MenuitemSetParentMethodInfo- ResolveMenuitemMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveMenuitemMethod "setRoot" o = MenuitemSetRootMethodInfo- ResolveMenuitemMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveMenuitemMethod t Menuitem, O.MethodInfo info Menuitem p) => OL.IsLabel t (Menuitem -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif---- signal Menuitem::about-to-show-{- |-Emitted when the submenu for this item- is about to be shown--}-type MenuitemAboutToShowCallback =- IO Bool---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemAboutToShowCallback`@.-noMenuitemAboutToShowCallback :: Maybe MenuitemAboutToShowCallback-noMenuitemAboutToShowCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemAboutToShowCallback =- Ptr () -> -- object- Ptr () -> -- user_data- IO CInt---- | Generate a function pointer callable from C code, from a `C_MenuitemAboutToShowCallback`.-foreign import ccall "wrapper"- mk_MenuitemAboutToShowCallback :: C_MenuitemAboutToShowCallback -> IO (FunPtr C_MenuitemAboutToShowCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemAboutToShow :: MonadIO m => MenuitemAboutToShowCallback -> m (GClosure C_MenuitemAboutToShowCallback)-genClosure_MenuitemAboutToShow cb = liftIO $ do- let cb' = wrap_MenuitemAboutToShowCallback cb- mk_MenuitemAboutToShowCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemAboutToShowCallback` into a `C_MenuitemAboutToShowCallback`.-wrap_MenuitemAboutToShowCallback ::- MenuitemAboutToShowCallback ->- C_MenuitemAboutToShowCallback-wrap_MenuitemAboutToShowCallback _cb _ _ = do- result <- _cb - let result' = (fromIntegral . fromEnum) result- return result'---{- |-Connect a signal handler for the “@about-to-show@” 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' menuitem #aboutToShow callback-@--}-onMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> MenuitemAboutToShowCallback -> m SignalHandlerId-onMenuitemAboutToShow obj cb = liftIO $ do- let cb' = wrap_MenuitemAboutToShowCallback cb- cb'' <- mk_MenuitemAboutToShowCallback cb'- connectSignalFunPtr obj "about-to-show" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@about-to-show@” 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' menuitem #aboutToShow callback-@--}-afterMenuitemAboutToShow :: (IsMenuitem a, MonadIO m) => a -> MenuitemAboutToShowCallback -> m SignalHandlerId-afterMenuitemAboutToShow obj cb = liftIO $ do- let cb' = wrap_MenuitemAboutToShowCallback cb- cb'' <- mk_MenuitemAboutToShowCallback cb'- connectSignalFunPtr obj "about-to-show" cb'' SignalConnectAfter----- signal Menuitem::child-added-{- |-Signaled when the child menuitem has been added to- the parent.--}-type MenuitemChildAddedCallback =- GObject.Object.Object- {- ^ /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which is the child. -}- -> Word32- {- ^ /@arg2@/: The position that the child is being added in. -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemChildAddedCallback`@.-noMenuitemChildAddedCallback :: Maybe MenuitemChildAddedCallback-noMenuitemChildAddedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemChildAddedCallback =- Ptr () -> -- object- Ptr GObject.Object.Object ->- Word32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemChildAddedCallback`.-foreign import ccall "wrapper"- mk_MenuitemChildAddedCallback :: C_MenuitemChildAddedCallback -> IO (FunPtr C_MenuitemChildAddedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemChildAdded :: MonadIO m => MenuitemChildAddedCallback -> m (GClosure C_MenuitemChildAddedCallback)-genClosure_MenuitemChildAdded cb = liftIO $ do- let cb' = wrap_MenuitemChildAddedCallback cb- mk_MenuitemChildAddedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemChildAddedCallback` into a `C_MenuitemChildAddedCallback`.-wrap_MenuitemChildAddedCallback ::- MenuitemChildAddedCallback ->- C_MenuitemChildAddedCallback-wrap_MenuitemChildAddedCallback _cb _ arg1 arg2 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1' arg2---{- |-Connect a signal handler for the “@child-added@” 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' menuitem #childAdded callback-@--}-onMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildAddedCallback -> m SignalHandlerId-onMenuitemChildAdded obj cb = liftIO $ do- let cb' = wrap_MenuitemChildAddedCallback cb- cb'' <- mk_MenuitemChildAddedCallback cb'- connectSignalFunPtr obj "child-added" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@child-added@” 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' menuitem #childAdded callback-@--}-afterMenuitemChildAdded :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildAddedCallback -> m SignalHandlerId-afterMenuitemChildAdded obj cb = liftIO $ do- let cb' = wrap_MenuitemChildAddedCallback cb- cb'' <- mk_MenuitemChildAddedCallback cb'- connectSignalFunPtr obj "child-added" cb'' SignalConnectAfter----- signal Menuitem::child-moved-{- |-Signaled when the child menuitem has had its location- in the list change.--}-type MenuitemChildMovedCallback =- GObject.Object.Object- {- ^ /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which is the child. -}- -> Word32- {- ^ /@arg2@/: The position that the child is being moved to. -}- -> Word32- {- ^ /@arg3@/: The position that the child is was in. -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemChildMovedCallback`@.-noMenuitemChildMovedCallback :: Maybe MenuitemChildMovedCallback-noMenuitemChildMovedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemChildMovedCallback =- Ptr () -> -- object- Ptr GObject.Object.Object ->- Word32 ->- Word32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemChildMovedCallback`.-foreign import ccall "wrapper"- mk_MenuitemChildMovedCallback :: C_MenuitemChildMovedCallback -> IO (FunPtr C_MenuitemChildMovedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemChildMoved :: MonadIO m => MenuitemChildMovedCallback -> m (GClosure C_MenuitemChildMovedCallback)-genClosure_MenuitemChildMoved cb = liftIO $ do- let cb' = wrap_MenuitemChildMovedCallback cb- mk_MenuitemChildMovedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemChildMovedCallback` into a `C_MenuitemChildMovedCallback`.-wrap_MenuitemChildMovedCallback ::- MenuitemChildMovedCallback ->- C_MenuitemChildMovedCallback-wrap_MenuitemChildMovedCallback _cb _ arg1 arg2 arg3 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1' arg2 arg3---{- |-Connect a signal handler for the “@child-moved@” 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' menuitem #childMoved callback-@--}-onMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildMovedCallback -> m SignalHandlerId-onMenuitemChildMoved obj cb = liftIO $ do- let cb' = wrap_MenuitemChildMovedCallback cb- cb'' <- mk_MenuitemChildMovedCallback cb'- connectSignalFunPtr obj "child-moved" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@child-moved@” 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' menuitem #childMoved callback-@--}-afterMenuitemChildMoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildMovedCallback -> m SignalHandlerId-afterMenuitemChildMoved obj cb = liftIO $ do- let cb' = wrap_MenuitemChildMovedCallback cb- cb'' <- mk_MenuitemChildMovedCallback cb'- connectSignalFunPtr obj "child-moved" cb'' SignalConnectAfter----- signal Menuitem::child-removed-{- |-Signaled when the child menuitem has been requested to- be removed from the parent. This signal is called when- it has been removed from the list but not yet had- @/g_object_unref/@ called on it.--}-type MenuitemChildRemovedCallback =- GObject.Object.Object- {- ^ /@arg1@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which was the child. -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemChildRemovedCallback`@.-noMenuitemChildRemovedCallback :: Maybe MenuitemChildRemovedCallback-noMenuitemChildRemovedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemChildRemovedCallback =- Ptr () -> -- object- Ptr GObject.Object.Object ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemChildRemovedCallback`.-foreign import ccall "wrapper"- mk_MenuitemChildRemovedCallback :: C_MenuitemChildRemovedCallback -> IO (FunPtr C_MenuitemChildRemovedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemChildRemoved :: MonadIO m => MenuitemChildRemovedCallback -> m (GClosure C_MenuitemChildRemovedCallback)-genClosure_MenuitemChildRemoved cb = liftIO $ do- let cb' = wrap_MenuitemChildRemovedCallback cb- mk_MenuitemChildRemovedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemChildRemovedCallback` into a `C_MenuitemChildRemovedCallback`.-wrap_MenuitemChildRemovedCallback ::- MenuitemChildRemovedCallback ->- C_MenuitemChildRemovedCallback-wrap_MenuitemChildRemovedCallback _cb _ arg1 _ = do- arg1' <- (newObject GObject.Object.Object) arg1- _cb arg1'---{- |-Connect a signal handler for the “@child-removed@” 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' menuitem #childRemoved callback-@--}-onMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildRemovedCallback -> m SignalHandlerId-onMenuitemChildRemoved obj cb = liftIO $ do- let cb' = wrap_MenuitemChildRemovedCallback cb- cb'' <- mk_MenuitemChildRemovedCallback cb'- connectSignalFunPtr obj "child-removed" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@child-removed@” 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' menuitem #childRemoved callback-@--}-afterMenuitemChildRemoved :: (IsMenuitem a, MonadIO m) => a -> MenuitemChildRemovedCallback -> m SignalHandlerId-afterMenuitemChildRemoved obj cb = liftIO $ do- let cb' = wrap_MenuitemChildRemovedCallback cb- cb'' <- mk_MenuitemChildRemovedCallback cb'- connectSignalFunPtr obj "child-removed" cb'' SignalConnectAfter----- signal Menuitem::event-{- |-Emitted when an event is passed through. The event is signalled- after handle_event is called.--}-type MenuitemEventCallback =- T.Text- {- ^ /@arg1@/: Name of the event -}- -> GVariant- {- ^ /@arg2@/: Information passed along with the event -}- -> Word32- {- ^ /@arg3@/: X11 timestamp of when the event happened -}- -> IO Bool---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemEventCallback`@.-noMenuitemEventCallback :: Maybe MenuitemEventCallback-noMenuitemEventCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemEventCallback =- Ptr () -> -- object- CString ->- Ptr GVariant ->- Word32 ->- Ptr () -> -- user_data- IO CInt---- | Generate a function pointer callable from C code, from a `C_MenuitemEventCallback`.-foreign import ccall "wrapper"- mk_MenuitemEventCallback :: C_MenuitemEventCallback -> IO (FunPtr C_MenuitemEventCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemEvent :: MonadIO m => MenuitemEventCallback -> m (GClosure C_MenuitemEventCallback)-genClosure_MenuitemEvent cb = liftIO $ do- let cb' = wrap_MenuitemEventCallback cb- mk_MenuitemEventCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemEventCallback` into a `C_MenuitemEventCallback`.-wrap_MenuitemEventCallback ::- MenuitemEventCallback ->- C_MenuitemEventCallback-wrap_MenuitemEventCallback _cb _ arg1 arg2 arg3 _ = do- arg1' <- cstringToText arg1- arg2' <- B.GVariant.newGVariantFromPtr arg2- result <- _cb arg1' arg2' arg3- let result' = (fromIntegral . fromEnum) result- return result'---{- |-Connect a signal handler for the “@event@” 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' menuitem #event callback-@--}-onMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> MenuitemEventCallback -> m SignalHandlerId-onMenuitemEvent obj cb = liftIO $ do- let cb' = wrap_MenuitemEventCallback cb- cb'' <- mk_MenuitemEventCallback cb'- connectSignalFunPtr obj "event" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@event@” 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' menuitem #event callback-@--}-afterMenuitemEvent :: (IsMenuitem a, MonadIO m) => a -> MenuitemEventCallback -> m SignalHandlerId-afterMenuitemEvent obj cb = liftIO $ do- let cb' = wrap_MenuitemEventCallback cb- cb'' <- mk_MenuitemEventCallback cb'- connectSignalFunPtr obj "event" cb'' SignalConnectAfter----- signal Menuitem::item-activated-{- |-Emitted on the objects on the server side when- they are signaled on the client side.--}-type MenuitemItemActivatedCallback =- Word32- {- ^ /@arg1@/: The timestamp of when it was activated -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemItemActivatedCallback`@.-noMenuitemItemActivatedCallback :: Maybe MenuitemItemActivatedCallback-noMenuitemItemActivatedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemItemActivatedCallback =- Ptr () -> -- object- Word32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemItemActivatedCallback`.-foreign import ccall "wrapper"- mk_MenuitemItemActivatedCallback :: C_MenuitemItemActivatedCallback -> IO (FunPtr C_MenuitemItemActivatedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemItemActivated :: MonadIO m => MenuitemItemActivatedCallback -> m (GClosure C_MenuitemItemActivatedCallback)-genClosure_MenuitemItemActivated cb = liftIO $ do- let cb' = wrap_MenuitemItemActivatedCallback cb- mk_MenuitemItemActivatedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemItemActivatedCallback` into a `C_MenuitemItemActivatedCallback`.-wrap_MenuitemItemActivatedCallback ::- MenuitemItemActivatedCallback ->- C_MenuitemItemActivatedCallback-wrap_MenuitemItemActivatedCallback _cb _ arg1 _ = do- _cb arg1---{- |-Connect a signal handler for the “@item-activated@” 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' menuitem #itemActivated callback-@--}-onMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> MenuitemItemActivatedCallback -> m SignalHandlerId-onMenuitemItemActivated obj cb = liftIO $ do- let cb' = wrap_MenuitemItemActivatedCallback cb- cb'' <- mk_MenuitemItemActivatedCallback cb'- connectSignalFunPtr obj "item-activated" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@item-activated@” 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' menuitem #itemActivated callback-@--}-afterMenuitemItemActivated :: (IsMenuitem a, MonadIO m) => a -> MenuitemItemActivatedCallback -> m SignalHandlerId-afterMenuitemItemActivated obj cb = liftIO $ do- let cb' = wrap_MenuitemItemActivatedCallback cb- cb'' <- mk_MenuitemItemActivatedCallback cb'- connectSignalFunPtr obj "item-activated" cb'' SignalConnectAfter----- signal Menuitem::property-changed-{- |-Emitted everytime a property on a menuitem is either- updated or added.--}-type MenuitemPropertyChangedCallback =- T.Text- {- ^ /@arg1@/: The name of the property that changed -}- -> GVariant- {- ^ /@arg2@/: The new value of the property -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemPropertyChangedCallback`@.-noMenuitemPropertyChangedCallback :: Maybe MenuitemPropertyChangedCallback-noMenuitemPropertyChangedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemPropertyChangedCallback =- Ptr () -> -- object- CString ->- Ptr GVariant ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemPropertyChangedCallback`.-foreign import ccall "wrapper"- mk_MenuitemPropertyChangedCallback :: C_MenuitemPropertyChangedCallback -> IO (FunPtr C_MenuitemPropertyChangedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemPropertyChanged :: MonadIO m => MenuitemPropertyChangedCallback -> m (GClosure C_MenuitemPropertyChangedCallback)-genClosure_MenuitemPropertyChanged cb = liftIO $ do- let cb' = wrap_MenuitemPropertyChangedCallback cb- mk_MenuitemPropertyChangedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemPropertyChangedCallback` into a `C_MenuitemPropertyChangedCallback`.-wrap_MenuitemPropertyChangedCallback ::- MenuitemPropertyChangedCallback ->- C_MenuitemPropertyChangedCallback-wrap_MenuitemPropertyChangedCallback _cb _ arg1 arg2 _ = do- arg1' <- cstringToText arg1- arg2' <- B.GVariant.newGVariantFromPtr arg2- _cb arg1' arg2'---{- |-Connect a signal handler for the “@property-changed@” 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' menuitem #propertyChanged callback-@--}-onMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> MenuitemPropertyChangedCallback -> m SignalHandlerId-onMenuitemPropertyChanged obj cb = liftIO $ do- let cb' = wrap_MenuitemPropertyChangedCallback cb- cb'' <- mk_MenuitemPropertyChangedCallback cb'- connectSignalFunPtr obj "property-changed" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@property-changed@” 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' menuitem #propertyChanged callback-@--}-afterMenuitemPropertyChanged :: (IsMenuitem a, MonadIO m) => a -> MenuitemPropertyChangedCallback -> m SignalHandlerId-afterMenuitemPropertyChanged obj cb = liftIO $ do- let cb' = wrap_MenuitemPropertyChangedCallback cb- cb'' <- mk_MenuitemPropertyChangedCallback cb'- connectSignalFunPtr obj "property-changed" cb'' SignalConnectAfter----- signal Menuitem::realized-{- |-Emitted when the initial request for properties- is complete on the item. If there is a type- handler configured for the \"type\" parameter- that will be executed before this is signaled.--}-type MenuitemRealizedCallback =- IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemRealizedCallback`@.-noMenuitemRealizedCallback :: Maybe MenuitemRealizedCallback-noMenuitemRealizedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemRealizedCallback =- Ptr () -> -- object- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemRealizedCallback`.-foreign import ccall "wrapper"- mk_MenuitemRealizedCallback :: C_MenuitemRealizedCallback -> IO (FunPtr C_MenuitemRealizedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemRealized :: MonadIO m => MenuitemRealizedCallback -> m (GClosure C_MenuitemRealizedCallback)-genClosure_MenuitemRealized cb = liftIO $ do- let cb' = wrap_MenuitemRealizedCallback cb- mk_MenuitemRealizedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemRealizedCallback` into a `C_MenuitemRealizedCallback`.-wrap_MenuitemRealizedCallback ::- MenuitemRealizedCallback ->- C_MenuitemRealizedCallback-wrap_MenuitemRealizedCallback _cb _ _ = do- _cb ---{- |-Connect a signal handler for the “@realized@” 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' menuitem #realized callback-@--}-onMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> MenuitemRealizedCallback -> m SignalHandlerId-onMenuitemRealized obj cb = liftIO $ do- let cb' = wrap_MenuitemRealizedCallback cb- cb'' <- mk_MenuitemRealizedCallback cb'- connectSignalFunPtr obj "realized" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@realized@” 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' menuitem #realized callback-@--}-afterMenuitemRealized :: (IsMenuitem a, MonadIO m) => a -> MenuitemRealizedCallback -> m SignalHandlerId-afterMenuitemRealized obj cb = liftIO $ do- let cb' = wrap_MenuitemRealizedCallback cb- cb'' <- mk_MenuitemRealizedCallback cb'- connectSignalFunPtr obj "realized" cb'' SignalConnectAfter----- signal Menuitem::show-to-user-{- |-Signaled when the application would like the visualization- of this menu item shown to the user. This usually requires- going over the bus to get it done.--}-type MenuitemShowToUserCallback =- Word32- {- ^ /@arg1@/: Timestamp the event happened at -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `MenuitemShowToUserCallback`@.-noMenuitemShowToUserCallback :: Maybe MenuitemShowToUserCallback-noMenuitemShowToUserCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_MenuitemShowToUserCallback =- Ptr () -> -- object- Word32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_MenuitemShowToUserCallback`.-foreign import ccall "wrapper"- mk_MenuitemShowToUserCallback :: C_MenuitemShowToUserCallback -> IO (FunPtr C_MenuitemShowToUserCallback)---- | Wrap the callback into a `GClosure`.-genClosure_MenuitemShowToUser :: MonadIO m => MenuitemShowToUserCallback -> m (GClosure C_MenuitemShowToUserCallback)-genClosure_MenuitemShowToUser cb = liftIO $ do- let cb' = wrap_MenuitemShowToUserCallback cb- mk_MenuitemShowToUserCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `MenuitemShowToUserCallback` into a `C_MenuitemShowToUserCallback`.-wrap_MenuitemShowToUserCallback ::- MenuitemShowToUserCallback ->- C_MenuitemShowToUserCallback-wrap_MenuitemShowToUserCallback _cb _ arg1 _ = do- _cb arg1---{- |-Connect a signal handler for the “@show-to-user@” 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' menuitem #showToUser callback-@--}-onMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> MenuitemShowToUserCallback -> m SignalHandlerId-onMenuitemShowToUser obj cb = liftIO $ do- let cb' = wrap_MenuitemShowToUserCallback cb- cb'' <- mk_MenuitemShowToUserCallback cb'- connectSignalFunPtr obj "show-to-user" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@show-to-user@” 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' menuitem #showToUser callback-@--}-afterMenuitemShowToUser :: (IsMenuitem a, MonadIO m) => a -> MenuitemShowToUserCallback -> m SignalHandlerId-afterMenuitemShowToUser obj cb = liftIO $ do- let cb' = wrap_MenuitemShowToUserCallback cb- cb'' <- mk_MenuitemShowToUserCallback cb'- connectSignalFunPtr obj "show-to-user" cb'' SignalConnectAfter----- VVV Prop "id"- -- Type: TBasicType TInt- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]- -- Nullable: (Just False,Nothing)--{- |-Get the value of the “@id@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' menuitem #id-@--}-getMenuitemId :: (MonadIO m, IsMenuitem o) => o -> m Int32-getMenuitemId obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "id"--{- |-Construct a `GValueConstruct` with valid value for the “@id@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructMenuitemId :: (IsMenuitem o) => Int32 -> IO (GValueConstruct o)-constructMenuitemId val = B.Properties.constructObjectPropertyInt32 "id" val--#if ENABLE_OVERLOADING-data MenuitemIdPropertyInfo-instance AttrInfo MenuitemIdPropertyInfo where- type AttrAllowedOps MenuitemIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet]- type AttrSetTypeConstraint MenuitemIdPropertyInfo = (~) Int32- type AttrBaseTypeConstraint MenuitemIdPropertyInfo = IsMenuitem- type AttrGetType MenuitemIdPropertyInfo = Int32- type AttrLabel MenuitemIdPropertyInfo = "id"- type AttrOrigin MenuitemIdPropertyInfo = Menuitem- attrGet _ = getMenuitemId- attrSet _ = undefined- attrConstruct _ = constructMenuitemId- attrClear _ = undefined-#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Menuitem-type instance O.AttributeList Menuitem = MenuitemAttributeList-type MenuitemAttributeList = ('[ '("id", MenuitemIdPropertyInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-menuitemId :: AttrLabelProxy "id"-menuitemId = AttrLabelProxy--#endif--#if ENABLE_OVERLOADING-data MenuitemAboutToShowSignalInfo-instance SignalInfo MenuitemAboutToShowSignalInfo where- type HaskellCallbackType MenuitemAboutToShowSignalInfo = MenuitemAboutToShowCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemAboutToShowCallback cb- cb'' <- mk_MenuitemAboutToShowCallback cb'- connectSignalFunPtr obj "about-to-show" cb'' connectMode--data MenuitemChildAddedSignalInfo-instance SignalInfo MenuitemChildAddedSignalInfo where- type HaskellCallbackType MenuitemChildAddedSignalInfo = MenuitemChildAddedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemChildAddedCallback cb- cb'' <- mk_MenuitemChildAddedCallback cb'- connectSignalFunPtr obj "child-added" cb'' connectMode--data MenuitemChildMovedSignalInfo-instance SignalInfo MenuitemChildMovedSignalInfo where- type HaskellCallbackType MenuitemChildMovedSignalInfo = MenuitemChildMovedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemChildMovedCallback cb- cb'' <- mk_MenuitemChildMovedCallback cb'- connectSignalFunPtr obj "child-moved" cb'' connectMode--data MenuitemChildRemovedSignalInfo-instance SignalInfo MenuitemChildRemovedSignalInfo where- type HaskellCallbackType MenuitemChildRemovedSignalInfo = MenuitemChildRemovedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemChildRemovedCallback cb- cb'' <- mk_MenuitemChildRemovedCallback cb'- connectSignalFunPtr obj "child-removed" cb'' connectMode--data MenuitemEventSignalInfo-instance SignalInfo MenuitemEventSignalInfo where- type HaskellCallbackType MenuitemEventSignalInfo = MenuitemEventCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemEventCallback cb- cb'' <- mk_MenuitemEventCallback cb'- connectSignalFunPtr obj "event" cb'' connectMode--data MenuitemItemActivatedSignalInfo-instance SignalInfo MenuitemItemActivatedSignalInfo where- type HaskellCallbackType MenuitemItemActivatedSignalInfo = MenuitemItemActivatedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemItemActivatedCallback cb- cb'' <- mk_MenuitemItemActivatedCallback cb'- connectSignalFunPtr obj "item-activated" cb'' connectMode--data MenuitemPropertyChangedSignalInfo-instance SignalInfo MenuitemPropertyChangedSignalInfo where- type HaskellCallbackType MenuitemPropertyChangedSignalInfo = MenuitemPropertyChangedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemPropertyChangedCallback cb- cb'' <- mk_MenuitemPropertyChangedCallback cb'- connectSignalFunPtr obj "property-changed" cb'' connectMode--data MenuitemRealizedSignalInfo-instance SignalInfo MenuitemRealizedSignalInfo where- type HaskellCallbackType MenuitemRealizedSignalInfo = MenuitemRealizedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemRealizedCallback cb- cb'' <- mk_MenuitemRealizedCallback cb'- connectSignalFunPtr obj "realized" cb'' connectMode--data MenuitemShowToUserSignalInfo-instance SignalInfo MenuitemShowToUserSignalInfo where- type HaskellCallbackType MenuitemShowToUserSignalInfo = MenuitemShowToUserCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_MenuitemShowToUserCallback cb- cb'' <- mk_MenuitemShowToUserCallback cb'- connectSignalFunPtr obj "show-to-user" cb'' connectMode--type instance O.SignalList Menuitem = MenuitemSignalList-type MenuitemSignalList = ('[ '("aboutToShow", MenuitemAboutToShowSignalInfo), '("childAdded", MenuitemChildAddedSignalInfo), '("childMoved", MenuitemChildMovedSignalInfo), '("childRemoved", MenuitemChildRemovedSignalInfo), '("event", MenuitemEventSignalInfo), '("itemActivated", MenuitemItemActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("propertyChanged", MenuitemPropertyChangedSignalInfo), '("realized", MenuitemRealizedSignalInfo), '("showToUser", MenuitemShowToUserSignalInfo)] :: [(Symbol, *)])--#endif---- method Menuitem::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_new" dbusmenu_menuitem_new :: - IO (Ptr Menuitem)--{- |-Create a new 'GI.Dbusmenu.Objects.Menuitem.Menuitem' with all default values.--}-menuitemNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Menuitem- {- ^ __Returns:__ A newly allocated 'GI.Dbusmenu.Objects.Menuitem.Menuitem'. -}-menuitemNew = liftIO $ do- result <- dbusmenu_menuitem_new- checkUnexpectedReturnNULL "menuitemNew" result- result' <- (wrapObject Menuitem) result- return result'--#if ENABLE_OVERLOADING-#endif---- method Menuitem::new_with_id--- method type : Constructor--- Args : [Arg {argCName = "id", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "ID to use for this menuitem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_new_with_id" dbusmenu_menuitem_new_with_id :: - Int32 -> -- id : TBasicType TInt- IO (Ptr Menuitem)--{- |-This creates a blank 'GI.Dbusmenu.Objects.Menuitem.Menuitem' with a specific ID.--}-menuitemNewWithId ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@id@/: ID to use for this menuitem -}- -> m Menuitem- {- ^ __Returns:__ A newly allocated 'GI.Dbusmenu.Objects.Menuitem.Menuitem'. -}-menuitemNewWithId id = liftIO $ do- result <- dbusmenu_menuitem_new_with_id id- checkUnexpectedReturnNULL "menuitemNewWithId" result- result' <- (wrapObject Menuitem) result- return result'--#if ENABLE_OVERLOADING-#endif---- method Menuitem::child_add_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem that we're adding the child @child to.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to make a child of @mi.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "position", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Where in @mi object's list of chidren @child should be placed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_add_position" dbusmenu_menuitem_child_add_position :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- child : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Word32 -> -- position : TBasicType TUInt- IO CInt--{- |-Puts /@child@/ in the list of children for /@mi@/ at the location-specified in /@position@/. If there is not enough entires available-then /@child@/ will be placed at the end of the list.--}-menuitemChildAddPosition ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that we\'re adding the child /@child@/ to. -}- -> b- {- ^ /@child@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to make a child of /@mi@/. -}- -> Word32- {- ^ /@position@/: Where in /@mi@/ object\'s list of chidren /@child@/ should be placed. -}- -> m Bool- {- ^ __Returns:__ Whether /@child@/ was added successfully. -}-menuitemChildAddPosition mi child position = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- child' <- unsafeManagedPtrCastPtr child- result <- dbusmenu_menuitem_child_add_position mi' child' position- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr child- return result'--#if ENABLE_OVERLOADING-data MenuitemChildAddPositionMethodInfo-instance (signature ~ (b -> Word32 -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemChildAddPositionMethodInfo a signature where- overloadedMethod _ = menuitemChildAddPosition--#endif---- method Menuitem::child_append--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem which will become a new parent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenMenuitem that will be a child", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_append" dbusmenu_menuitem_child_append :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- child : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-This function adds /@child@/ to the list of children on /@mi@/ at-the end of that list.--}-menuitemChildAppend ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which will become a new parent -}- -> b- {- ^ /@child@/: The @/DbusmenMenuitem/@ that will be a child -}- -> m Bool- {- ^ __Returns:__ Whether the child has been added successfully. -}-menuitemChildAppend mi child = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- child' <- unsafeManagedPtrCastPtr child- result <- dbusmenu_menuitem_child_append mi' child'- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr child- return result'--#if ENABLE_OVERLOADING-data MenuitemChildAppendMethodInfo-instance (signature ~ (b -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemChildAppendMethodInfo a signature where- overloadedMethod _ = menuitemChildAppend--#endif---- method Menuitem::child_delete--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem which has @child as a child", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The child #DbusmenuMenuitem that you want to no longer\n be a child of @mi.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_delete" dbusmenu_menuitem_child_delete :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- child : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-This function removes /@child@/ from the children list of /@mi@/. It does-not call @/g_object_unref/@ on /@child@/.--}-menuitemChildDelete ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which has /@child@/ as a child -}- -> b- {- ^ /@child@/: The child 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that you want to no longer- be a child of /@mi@/. -}- -> m Bool- {- ^ __Returns:__ If we were able to delete /@child@/. -}-menuitemChildDelete mi child = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- child' <- unsafeManagedPtrCastPtr child- result <- dbusmenu_menuitem_child_delete mi' child'- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr child- return result'--#if ENABLE_OVERLOADING-data MenuitemChildDeleteMethodInfo-instance (signature ~ (b -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemChildDeleteMethodInfo a signature where- overloadedMethod _ = menuitemChildDelete--#endif---- method Menuitem::child_find--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem who's children to look on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The ID of the child that we're looking for.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_find" dbusmenu_menuitem_child_find :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Int32 -> -- id : TBasicType TInt- IO (Ptr Menuitem)--{- |-Search the children of /@mi@/ to find one with the ID of /@id@/.-If it doesn\'t exist then we return @/NULL/@.--}-menuitemChildFind ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' who\'s children to look on -}- -> Int32- {- ^ /@id@/: The ID of the child that we\'re looking for. -}- -> m Menuitem- {- ^ __Returns:__ The menu item with the ID /@id@/ or @/NULL/@ if it- can\'t be found. -}-menuitemChildFind mi id = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_child_find mi' id- checkUnexpectedReturnNULL "menuitemChildFind" result- result' <- (newObject Menuitem) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-data MenuitemChildFindMethodInfo-instance (signature ~ (Int32 -> m Menuitem), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemChildFindMethodInfo a signature where- overloadedMethod _ = menuitemChildFind--#endif---- method Menuitem::child_prepend--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem which will become a new parent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenMenuitem that will be a child", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_prepend" dbusmenu_menuitem_child_prepend :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- child : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-This function adds /@child@/ to the list of children on /@mi@/ at-the beginning of that list.--}-menuitemChildPrepend ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' which will become a new parent -}- -> b- {- ^ /@child@/: The @/DbusmenMenuitem/@ that will be a child -}- -> m Bool- {- ^ __Returns:__ Whether the child has been added successfully. -}-menuitemChildPrepend mi child = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- child' <- unsafeManagedPtrCastPtr child- result <- dbusmenu_menuitem_child_prepend mi' child'- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr child- return result'--#if ENABLE_OVERLOADING-data MenuitemChildPrependMethodInfo-instance (signature ~ (b -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemChildPrependMethodInfo a signature where- overloadedMethod _ = menuitemChildPrepend--#endif---- method Menuitem::child_reorder--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem that has children needing realignment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem that is a child needing to be moved", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "position", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The position in the list to place it in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_child_reorder" dbusmenu_menuitem_child_reorder :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- child : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Word32 -> -- position : TBasicType TUInt- IO CInt--{- |-This function moves a child on the list of children. It is-for a child that is already in the list, but simply needs a-new location.--}-menuitemChildReorder ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that has children needing realignment -}- -> b- {- ^ /@child@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that is a child needing to be moved -}- -> Word32- {- ^ /@position@/: The position in the list to place it in -}- -> m Bool- {- ^ __Returns:__ Whether the move was successful. -}-menuitemChildReorder mi child position = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- child' <- unsafeManagedPtrCastPtr child- result <- dbusmenu_menuitem_child_reorder mi' child' position- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr child- return result'--#if ENABLE_OVERLOADING-data MenuitemChildReorderMethodInfo-instance (signature ~ (b -> Word32 -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemChildReorderMethodInfo a signature where- overloadedMethod _ = menuitemChildReorder--#endif---- method Menuitem::find_id--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem at the top of the tree to search", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "ID of the #DbusmenuMenuitem to search for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_find_id" dbusmenu_menuitem_find_id :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Int32 -> -- id : TBasicType TInt- IO (Ptr Menuitem)--{- |-This function searchs the whole tree of children that-are attached to /@mi@/. This could be quite a few nodes, all-the way down the tree. It is a depth first search.--}-menuitemFindId ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' at the top of the tree to search -}- -> Int32- {- ^ /@id@/: ID of the 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to search for -}- -> m Menuitem- {- ^ __Returns:__ The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' with the ID of /@id@/- or @/NULL/@ if there isn\'t such a menu item in the tree- represented by /@mi@/. -}-menuitemFindId mi id = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_find_id mi' id- checkUnexpectedReturnNULL "menuitemFindId" result- result' <- (newObject Menuitem) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-data MenuitemFindIdMethodInfo-instance (signature ~ (Int32 -> m Menuitem), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemFindIdMethodInfo a signature where- overloadedMethod _ = menuitemFindId--#endif---- method Menuitem::foreach--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenItem to start from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Function to call on every node in the tree", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "User data to pass to the function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_foreach" dbusmenu_menuitem_foreach :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr () -> -- func : TBasicType TPtr- Ptr () -> -- data : TBasicType TPtr- IO ()--{- |-This calls the function /@func@/ on this menu item and all-of the children of this item. And their children. And-their children. And... you get the point. It will get-called on the whole tree.--}-menuitemForeach ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The @/DbusmenItem/@ to start from -}- -> Ptr ()- {- ^ /@func@/: Function to call on every node in the tree -}- -> Ptr ()- {- ^ /@data@/: User data to pass to the function -}- -> m ()-menuitemForeach mi func data_ = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- dbusmenu_menuitem_foreach mi' func data_- touchManagedPtr mi- return ()--#if ENABLE_OVERLOADING-data MenuitemForeachMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemForeachMethodInfo a signature where- overloadedMethod _ = menuitemForeach--#endif---- method Menuitem::get_children--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to query.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_children" dbusmenu_menuitem_get_children :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr (GList (Ptr Menuitem)))--{- |-Returns simply the list of children that this menu item-has. The list is valid until another child related function-is called, where it might be changed.--}-menuitemGetChildren ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to query. -}- -> m [Menuitem]- {- ^ __Returns:__ A 'GI.GLib.Structs.List.List' of pointers to 'GI.Dbusmenu.Objects.Menuitem.Menuitem' objects. -}-menuitemGetChildren mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_get_children mi'- result' <- unpackGList result- result'' <- mapM (newObject Menuitem) result'- touchManagedPtr mi- return result''--#if ENABLE_OVERLOADING-data MenuitemGetChildrenMethodInfo-instance (signature ~ (m [Menuitem]), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemGetChildrenMethodInfo a signature where- overloadedMethod _ = menuitemGetChildren--#endif---- method Menuitem::get_id--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to query.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_id" dbusmenu_menuitem_get_id :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO Int32--{- |-Gets the unique ID for /@mi@/.--}-menuitemGetId ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to query. -}- -> m Int32- {- ^ __Returns:__ The ID of the /@mi@/. -}-menuitemGetId mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_get_id mi'- touchManagedPtr mi- return result--#if ENABLE_OVERLOADING-data MenuitemGetIdMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemGetIdMethodInfo a signature where- overloadedMethod _ = menuitemGetId--#endif---- method Menuitem::get_parent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem for which to inspect the parent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_parent" dbusmenu_menuitem_get_parent :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr Menuitem)--{- |-This function looks up the parent of /@mi@/--}-menuitemGetParent ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' for which to inspect the parent -}- -> m Menuitem- {- ^ __Returns:__ The parent of this menu item -}-menuitemGetParent mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_get_parent mi'- checkUnexpectedReturnNULL "menuitemGetParent" result- result' <- (newObject Menuitem) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-data MenuitemGetParentMethodInfo-instance (signature ~ (m Menuitem), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemGetParentMethodInfo a signature where- overloadedMethod _ = menuitemGetParent--#endif---- method Menuitem::get_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to find the position of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem who's children contain @mi", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_position" dbusmenu_menuitem_get_position :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- parent : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO Word32--{- |-This function returns the position of the menu item /@mi@/-in the children of /@parent@/. It will return zero if the-menu item can\'t be found.--}-menuitemGetPosition ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to find the position of -}- -> b- {- ^ /@parent@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' who\'s children contain /@mi@/ -}- -> m Word32- {- ^ __Returns:__ The position of /@mi@/ in the children of /@parent@/. -}-menuitemGetPosition mi parent = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- parent' <- unsafeManagedPtrCastPtr parent- result <- dbusmenu_menuitem_get_position mi' parent'- touchManagedPtr mi- touchManagedPtr parent- return result--#if ENABLE_OVERLOADING-data MenuitemGetPositionMethodInfo-instance (signature ~ (b -> m Word32), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemGetPositionMethodInfo a signature where- overloadedMethod _ = menuitemGetPosition--#endif---- method Menuitem::get_position_realized--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to find the position of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem who's children contain @mi", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_position_realized" dbusmenu_menuitem_get_position_realized :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- parent : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO Word32--{- |-This function is very similar to @/dbusmenu_menuitem_get_position/@-except that it only counts in the children that have been realized.--}-menuitemGetPositionRealized ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to find the position of -}- -> b- {- ^ /@parent@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' who\'s children contain /@mi@/ -}- -> m Word32- {- ^ __Returns:__ The position of /@mi@/ in the realized children of /@parent@/. -}-menuitemGetPositionRealized mi parent = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- parent' <- unsafeManagedPtrCastPtr parent- result <- dbusmenu_menuitem_get_position_realized mi' parent'- touchManagedPtr mi- touchManagedPtr parent- return result--#if ENABLE_OVERLOADING-data MenuitemGetPositionRealizedMethodInfo-instance (signature ~ (b -> m Word32), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemGetPositionRealizedMethodInfo a signature where- overloadedMethod _ = menuitemGetPositionRealized--#endif---- method Menuitem::get_root--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem to see whether it's root", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_get_root" dbusmenu_menuitem_get_root :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-This function returns the internal value of whether this is a-root node or not.--}-menuitemGetRoot ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to see whether it\'s root -}- -> m Bool- {- ^ __Returns:__ @/TRUE/@ if this is a root node -}-menuitemGetRoot mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_get_root mi'- let result' = (/= 0) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-data MenuitemGetRootMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemGetRootMethodInfo a signature where- overloadedMethod _ = menuitemGetRoot--#endif---- method Menuitem::handle_event--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to send the signal on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The name of the signal", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "variant", argType = TVariant, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A value that could be set for the event", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timestamp", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The timestamp of when the event happened", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_handle_event" dbusmenu_menuitem_handle_event :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- name : TBasicType TUTF8- Ptr GVariant -> -- variant : TVariant- Word32 -> -- timestamp : TBasicType TUInt- IO ()--{- |-This function is called to create an event. It is likely-to be overrided by subclasses. The default menu item-will respond to the activate signal and do:--Emits the 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/item-activate/@ signal on this-menu item. Called by server objects when they get the-appropriate DBus signals from the client.--If you subclass this function you should really think-about calling the parent function unless you have a good-reason not to.--}-menuitemHandleEvent ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to send the signal on. -}- -> T.Text- {- ^ /@name@/: The name of the signal -}- -> GVariant- {- ^ /@variant@/: A value that could be set for the event -}- -> Word32- {- ^ /@timestamp@/: The timestamp of when the event happened -}- -> m ()-menuitemHandleEvent mi name variant timestamp = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- name' <- textToCString name- variant' <- unsafeManagedPtrGetPtr variant- dbusmenu_menuitem_handle_event mi' name' variant' timestamp- touchManagedPtr mi- touchManagedPtr variant- freeMem name'- return ()--#if ENABLE_OVERLOADING-data MenuitemHandleEventMethodInfo-instance (signature ~ (T.Text -> GVariant -> Word32 -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemHandleEventMethodInfo a signature where- overloadedMethod _ = menuitemHandleEvent--#endif---- method Menuitem::properties_copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem that we're interested in the properties of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGHash (TBasicType TPtr) (TBasicType TPtr))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_properties_copy" dbusmenu_menuitem_properties_copy :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr (GHashTable (Ptr ()) (Ptr ())))--{- |-This function takes the properties of a 'GI.Dbusmenu.Objects.Menuitem.Menuitem'-and puts them into a 'GI.GLib.Structs.HashTable.HashTable' that is referenced by the-key of a string and has the value of a string. The hash-table may not have any entries if there aren\'t any or there-is an error in processing. It is the caller\'s responsibility-to destroy the created 'GI.GLib.Structs.HashTable.HashTable'.--}-menuitemPropertiesCopy ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' that we\'re interested in the properties of -}- -> m (Map.Map (Ptr ()) (Ptr ()))- {- ^ __Returns:__ A brand new 'GI.GLib.Structs.HashTable.HashTable' that contains all of- theroperties that are on this 'GI.Dbusmenu.Objects.Menuitem.Menuitem' /@mi@/. -}-menuitemPropertiesCopy mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_properties_copy mi'- checkUnexpectedReturnNULL "menuitemPropertiesCopy" result- result' <- unpackGHashTable result- let result'' = mapFirst ptrUnpackPtr result'- let result''' = mapSecond ptrUnpackPtr result''- let result'''' = Map.fromList result'''- unrefGHashTable result- touchManagedPtr mi- return result''''--#if ENABLE_OVERLOADING-data MenuitemPropertiesCopyMethodInfo-instance (signature ~ (m (Map.Map (Ptr ()) (Ptr ()))), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertiesCopyMethodInfo a signature where- overloadedMethod _ = menuitemPropertiesCopy--#endif---- method Menuitem::properties_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem to list the properties on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_properties_list" dbusmenu_menuitem_properties_list :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr (GList CString))--{- |-This functiong gets a list of the names of all the properties-that are set on this menu item. This data on the list is owned-by the menuitem but the list is not and should be freed using-@/g_list_free()/@ when the calling function is done with it.--}-menuitemPropertiesList ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to list the properties on -}- -> m [T.Text]- {- ^ __Returns:__ A list of-strings or NULL if there are none. -}-menuitemPropertiesList mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_properties_list mi'- result' <- unpackGList result- result'' <- mapM cstringToText result'- g_list_free result- touchManagedPtr mi- return result''--#if ENABLE_OVERLOADING-data MenuitemPropertiesListMethodInfo-instance (signature ~ (m [T.Text]), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertiesListMethodInfo a signature where- overloadedMethod _ = menuitemPropertiesList--#endif---- method Menuitem::property_exist--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to look for.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_exist" dbusmenu_menuitem_property_exist :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO CInt--{- |-Checkes to see if a particular property exists on /@mi@/ and-returns @/TRUE/@ if so.--}-menuitemPropertyExist ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to look for. -}- -> m Bool- {- ^ __Returns:__ A boolean checking to see if the property is available -}-menuitemPropertyExist mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_exist mi' property'- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertyExistMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyExistMethodInfo a signature where- overloadedMethod _ = menuitemPropertyExist--#endif---- method Menuitem::property_get--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to grab.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_get" dbusmenu_menuitem_property_get :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO CString--{- |-Look up a property on /@mi@/ and return the value of it if-it exits. @/NULL/@ will be returned if the property doesn\'t-exist.--}-menuitemPropertyGet ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to grab. -}- -> m T.Text- {- ^ __Returns:__ A string with the value of the property- that shouldn\'t be free\'d. Or @/NULL/@ if the property- is not set or is not a string. -}-menuitemPropertyGet mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_get mi' property'- checkUnexpectedReturnNULL "menuitemPropertyGet" result- result' <- cstringToText result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertyGetMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyGetMethodInfo a signature where- overloadedMethod _ = menuitemPropertyGet--#endif---- method Menuitem::property_get_bool--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to grab.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_get_bool" dbusmenu_menuitem_property_get_bool :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO CInt--{- |-Look up a property on /@mi@/ and return the value of it if-it exits. Returns @/FALSE/@ if the property doesn\'t exist.--}-menuitemPropertyGetBool ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to grab. -}- -> m Bool- {- ^ __Returns:__ The value of the property or @/FALSE/@. -}-menuitemPropertyGetBool mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_get_bool mi' property'- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertyGetBoolMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyGetBoolMethodInfo a signature where- overloadedMethod _ = menuitemPropertyGetBool--#endif---- method Menuitem::property_get_byte_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to grab.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nelements", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A pointer to the location to store the number of items (out)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "nelements", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A pointer to the location to store the number of items (out)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 2 (TBasicType TUInt8))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_get_byte_array" dbusmenu_menuitem_property_get_byte_array :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- Ptr Word64 -> -- nelements : TBasicType TUInt64- IO (Ptr Word8)--{- |-Look up a property on /@mi@/ and return the value of it if-it exits. @/NULL/@ will be returned if the property doesn\'t-exist.--}-menuitemPropertyGetByteArray ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to grab. -}- -> m ByteString- {- ^ __Returns:__ A byte array with the- value of the property that shouldn\'t be free\'d. Or @/NULL/@ if the property- is not set or is not a byte array. -}-menuitemPropertyGetByteArray mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- nelements <- allocMem :: IO (Ptr Word64)- result <- dbusmenu_menuitem_property_get_byte_array mi' property' nelements- nelements' <- peek nelements- checkUnexpectedReturnNULL "menuitemPropertyGetByteArray" result- result' <- (unpackByteStringWithLength nelements') result- touchManagedPtr mi- freeMem property'- freeMem nelements- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertyGetByteArrayMethodInfo-instance (signature ~ (T.Text -> m ByteString), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyGetByteArrayMethodInfo a signature where- overloadedMethod _ = menuitemPropertyGetByteArray--#endif---- method Menuitem::property_get_int--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to grab.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_get_int" dbusmenu_menuitem_property_get_int :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO Int32--{- |-Look up a property on /@mi@/ and return the value of it if-it exits. Returns zero if the property doesn\'t exist.--}-menuitemPropertyGetInt ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to grab. -}- -> m Int32- {- ^ __Returns:__ The value of the property or zero. -}-menuitemPropertyGetInt mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_get_int mi' property'- touchManagedPtr mi- freeMem property'- return result--#if ENABLE_OVERLOADING-data MenuitemPropertyGetIntMethodInfo-instance (signature ~ (T.Text -> m Int32), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyGetIntMethodInfo a signature where- overloadedMethod _ = menuitemPropertyGetInt--#endif---- method Menuitem::property_get_variant--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to look for the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to grab.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TVariant--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_get_variant" dbusmenu_menuitem_property_get_variant :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO (Ptr GVariant)--{- |-Look up a property on /@mi@/ and return the value of it if-it exits. @/NULL/@ will be returned if the property doesn\'t-exist.--}-menuitemPropertyGetVariant ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to look for the property on. -}- -> T.Text- {- ^ /@property@/: The property to grab. -}- -> m GVariant- {- ^ __Returns:__ A GVariant for the property. -}-menuitemPropertyGetVariant mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_get_variant mi' property'- checkUnexpectedReturnNULL "menuitemPropertyGetVariant" result- result' <- B.GVariant.newGVariantFromPtr result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertyGetVariantMethodInfo-instance (signature ~ (T.Text -> m GVariant), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyGetVariantMethodInfo a signature where- overloadedMethod _ = menuitemPropertyGetVariant--#endif---- method Menuitem::property_remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to remove the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The property to look for.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_remove" dbusmenu_menuitem_property_remove :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- IO ()--{- |-Removes a property from the menuitem.--}-menuitemPropertyRemove ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to remove the property on. -}- -> T.Text- {- ^ /@property@/: The property to look for. -}- -> m ()-menuitemPropertyRemove mi property = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- dbusmenu_menuitem_property_remove mi' property'- touchManagedPtr mi- freeMem property'- return ()--#if ENABLE_OVERLOADING-data MenuitemPropertyRemoveMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertyRemoveMethodInfo a signature where- overloadedMethod _ = menuitemPropertyRemove--#endif---- method Menuitem::property_set--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to set the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Name of the property to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The value of the property.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_set" dbusmenu_menuitem_property_set :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- CString -> -- value : TBasicType TUTF8- IO CInt--{- |-Takes the pair of /@property@/ and /@value@/ and places them as a-property on /@mi@/. If a property already exists by that name,-then the value is set to the new value. If not, the property-is added. If the value is changed or the property was previously-unset then the signal 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/prop-changed/@ will be-emitted by this function.--}-menuitemPropertySet ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set the property on. -}- -> T.Text- {- ^ /@property@/: Name of the property to set. -}- -> T.Text- {- ^ /@value@/: The value of the property. -}- -> m Bool- {- ^ __Returns:__ A boolean representing if the property value was set. -}-menuitemPropertySet mi property value = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- value' <- textToCString value- result <- dbusmenu_menuitem_property_set mi' property' value'- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- freeMem value'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertySetMethodInfo-instance (signature ~ (T.Text -> T.Text -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertySetMethodInfo a signature where- overloadedMethod _ = menuitemPropertySet--#endif---- method Menuitem::property_set_bool--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to set the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Name of the property to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The value of the property.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_set_bool" dbusmenu_menuitem_property_set_bool :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- CInt -> -- value : TBasicType TBoolean- IO CInt--{- |-Takes a boolean /@value@/ and sets it on /@property@/ as a-property on /@mi@/. If a property already exists by that name,-then the value is set to the new value. If not, the property-is added. If the value is changed or the property was previously-unset then the signal 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/prop-changed/@ will be-emitted by this function.--}-menuitemPropertySetBool ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set the property on. -}- -> T.Text- {- ^ /@property@/: Name of the property to set. -}- -> Bool- {- ^ /@value@/: The value of the property. -}- -> m Bool- {- ^ __Returns:__ A boolean representing if the property value was set. -}-menuitemPropertySetBool mi property value = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- let value' = (fromIntegral . fromEnum) value- result <- dbusmenu_menuitem_property_set_bool mi' property' value'- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertySetBoolMethodInfo-instance (signature ~ (T.Text -> Bool -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertySetBoolMethodInfo a signature where- overloadedMethod _ = menuitemPropertySetBool--#endif---- method Menuitem::property_set_byte_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to set the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Name of the property to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The byte array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nelements", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The number of elements in the byte array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_set_byte_array" dbusmenu_menuitem_property_set_byte_array :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- Word8 -> -- value : TBasicType TUInt8- Word64 -> -- nelements : TBasicType TUInt64- IO CInt--{- |-Takes a byte array /@value@/ and sets it on /@property@/ as a-property on /@mi@/. If a property already exists by that name,-then the value is set to the new value. If not, the property-is added. If the value is changed or the property was previously-unset then the signal 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/prop-changed/@ will be-emitted by this function.--}-menuitemPropertySetByteArray ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set the property on. -}- -> T.Text- {- ^ /@property@/: Name of the property to set. -}- -> Word8- {- ^ /@value@/: The byte array. -}- -> Word64- {- ^ /@nelements@/: The number of elements in the byte array. -}- -> m Bool- {- ^ __Returns:__ A boolean representing if the property value was set. -}-menuitemPropertySetByteArray mi property value nelements = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_set_byte_array mi' property' value nelements- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertySetByteArrayMethodInfo-instance (signature ~ (T.Text -> Word8 -> Word64 -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertySetByteArrayMethodInfo a signature where- overloadedMethod _ = menuitemPropertySetByteArray--#endif---- method Menuitem::property_set_int--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to set the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Name of the property to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The value of the property.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_set_int" dbusmenu_menuitem_property_set_int :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- Int32 -> -- value : TBasicType TInt- IO CInt--{- |-Takes a boolean /@value@/ and sets it on /@property@/ as a-property on /@mi@/. If a property already exists by that name,-then the value is set to the new value. If not, the property-is added. If the value is changed or the property was previously-unset then the signal 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/prop-changed/@ will be-emitted by this function.--}-menuitemPropertySetInt ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set the property on. -}- -> T.Text- {- ^ /@property@/: Name of the property to set. -}- -> Int32- {- ^ /@value@/: The value of the property. -}- -> m Bool- {- ^ __Returns:__ A boolean representing if the property value was set. -}-menuitemPropertySetInt mi property value = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- result <- dbusmenu_menuitem_property_set_int mi' property' value- let result' = (/= 0) result- touchManagedPtr mi- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertySetIntMethodInfo-instance (signature ~ (T.Text -> Int32 -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertySetIntMethodInfo a signature where- overloadedMethod _ = menuitemPropertySetInt--#endif---- method Menuitem::property_set_variant--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to set the property on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Name of the property to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The value of the property.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_property_set_variant" dbusmenu_menuitem_property_set_variant :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CString -> -- property : TBasicType TUTF8- Ptr GVariant -> -- value : TVariant- IO CInt--{- |-Takes the pair of /@property@/ and /@value@/ and places them as a-property on /@mi@/. If a property already exists by that name,-then the value is set to the new value. If not, the property-is added. If the value is changed or the property was previously-unset then the signal 'GI.Dbusmenu.Objects.Menuitem.Menuitem'::@/prop-changed/@ will be-emitted by this function.--}-menuitemPropertySetVariant ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set the property on. -}- -> T.Text- {- ^ /@property@/: Name of the property to set. -}- -> GVariant- {- ^ /@value@/: The value of the property. -}- -> m Bool- {- ^ __Returns:__ A boolean representing if the property value was set. -}-menuitemPropertySetVariant mi property value = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- property' <- textToCString property- value' <- unsafeManagedPtrGetPtr value- result <- dbusmenu_menuitem_property_set_variant mi' property' value'- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr value- freeMem property'- return result'--#if ENABLE_OVERLOADING-data MenuitemPropertySetVariantMethodInfo-instance (signature ~ (T.Text -> GVariant -> m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemPropertySetVariantMethodInfo a signature where- overloadedMethod _ = menuitemPropertySetVariant--#endif---- method Menuitem::send_about_to_show--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to send the signal on.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cb", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback to call when the call has returned.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cb_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Data to pass to the callback.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_send_about_to_show" dbusmenu_menuitem_send_about_to_show :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr () -> -- cb : TBasicType TPtr- Ptr () -> -- cb_data : TBasicType TPtr- IO ()--{- |-This function is used to send the even that the submenu-of this item is about to be shown. Callers to this event-should delay showing the menu until their callback is-called if possible.--}-menuitemSendAboutToShow ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to send the signal on. -}- -> Ptr ()- {- ^ /@cb@/: Callback to call when the call has returned. -}- -> Ptr ()- {- ^ /@cbData@/: Data to pass to the callback. -}- -> m ()-menuitemSendAboutToShow mi cb cbData = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- dbusmenu_menuitem_send_about_to_show mi' cb cbData- touchManagedPtr mi- return ()--#if ENABLE_OVERLOADING-data MenuitemSendAboutToShowMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemSendAboutToShowMethodInfo a signature where- overloadedMethod _ = menuitemSendAboutToShow--#endif---- method Menuitem::set_parent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem for which to set the parent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The new parent #DbusmenuMenuitem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_set_parent" dbusmenu_menuitem_set_parent :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Ptr Menuitem -> -- parent : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-Sets the parent of /@mi@/ to /@parent@/. If /@mi@/ already-has a parent, then this call will fail. The parent will-be set automatically when using the usual methods to add a-child menuitem, so this function should not normally be-called directly--}-menuitemSetParent ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a, IsMenuitem b) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' for which to set the parent -}- -> b- {- ^ /@parent@/: The new parent 'GI.Dbusmenu.Objects.Menuitem.Menuitem' -}- -> m Bool- {- ^ __Returns:__ Whether the parent was set successfully -}-menuitemSetParent mi parent = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- parent' <- unsafeManagedPtrCastPtr parent- result <- dbusmenu_menuitem_set_parent mi' parent'- let result' = (/= 0) result- touchManagedPtr mi- touchManagedPtr parent- return result'--#if ENABLE_OVERLOADING-data MenuitemSetParentMethodInfo-instance (signature ~ (b -> m Bool), MonadIO m, IsMenuitem a, IsMenuitem b) => O.MethodInfo MenuitemSetParentMethodInfo a signature where- overloadedMethod _ = menuitemSetParent--#endif---- method Menuitem::set_root--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem to set whether it's root", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "root", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Whether @mi is a root node or not", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_set_root" dbusmenu_menuitem_set_root :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- CInt -> -- root : TBasicType TBoolean- IO ()--{- |-This function sets the internal value of whether this is a-root node or not.--}-menuitemSetRoot ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to set whether it\'s root -}- -> Bool- {- ^ /@root@/: Whether /@mi@/ is a root node or not -}- -> m ()-menuitemSetRoot mi root = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- let root' = (fromIntegral . fromEnum) root- dbusmenu_menuitem_set_root mi' root'- touchManagedPtr mi- return ()--#if ENABLE_OVERLOADING-data MenuitemSetRootMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemSetRootMethodInfo a signature where- overloadedMethod _ = menuitemSetRoot--#endif---- method Menuitem::show_to_user--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitem to show", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timestamp", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The time that the user requested it to be shown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_show_to_user" dbusmenu_menuitem_show_to_user :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- Word32 -> -- timestamp : TBasicType TUInt- IO ()--{- |-Signals that this menu item should be shown to the user. If this is-server side the server will then take it and send it over the-bus.--}-menuitemShowToUser ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to show -}- -> Word32- {- ^ /@timestamp@/: The time that the user requested it to be shown -}- -> m ()-menuitemShowToUser mi timestamp = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- dbusmenu_menuitem_show_to_user mi' timestamp- touchManagedPtr mi- return ()--#if ENABLE_OVERLOADING-data MenuitemShowToUserMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemShowToUserMethodInfo a signature where- overloadedMethod _ = menuitemShowToUser--#endif---- method Menuitem::take_children--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenMenuitem to take the children from.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_take_children" dbusmenu_menuitem_take_children :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr (GList (Ptr Menuitem)))--{- |-While the name sounds devious that\'s exactly what this function-does. It takes the list of children from the /@mi@/ and clears the-internal list. The calling function is now in charge of the ref\'s-on the children it has taken. A lot of responsibility involved-in taking children.--}-menuitemTakeChildren ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The @/DbusmenMenuitem/@ to take the children from. -}- -> m [Menuitem]- {- ^ __Returns:__ - A 'GI.GLib.Structs.List.List' of pointers to 'GI.Dbusmenu.Objects.Menuitem.Menuitem' objects. -}-menuitemTakeChildren mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_take_children mi'- result' <- unpackGList result- result'' <- mapM (wrapObject Menuitem) result'- g_list_free result- touchManagedPtr mi- return result''--#if ENABLE_OVERLOADING-data MenuitemTakeChildrenMethodInfo-instance (signature ~ (m [Menuitem]), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemTakeChildrenMethodInfo a signature where- overloadedMethod _ = menuitemTakeChildren--#endif---- method Menuitem::unparent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to unparent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_unparent" dbusmenu_menuitem_unparent :: - Ptr Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO CInt--{- |-Unparents the menu item /@mi@/. If /@mi@/ doesn\'t have a-parent, then this call will fail. The menuitem will-be unparented automatically when using the usual methods-to delete a child menuitem, so this function should not-normally be called directly--}-menuitemUnparent ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to unparent -}- -> m Bool- {- ^ __Returns:__ Whether the menu item was unparented successfully -}-menuitemUnparent mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_unparent mi'- let result' = (/= 0) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-data MenuitemUnparentMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsMenuitem a) => O.MethodInfo MenuitemUnparentMethodInfo a signature where- overloadedMethod _ = menuitemUnparent--#endif--
@@ -1,164 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Dbusmenu.Objects.Menuitem where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Menuitem = Menuitem (ManagedPtr Menuitem)-instance GObject Menuitem where-class (GObject o, O.IsDescendantOf Menuitem o) => IsMenuitem o-instance (GObject o, O.IsDescendantOf Menuitem o) => IsMenuitem o-instance O.HasParentTypes Menuitem-#if ENABLE_OVERLOADING-data MenuitemIdPropertyInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemAboutToShowSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildAddedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildMovedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildRemovedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemEventSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemItemActivatedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyChangedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemRealizedSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemShowToUserSignalInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildAddPositionMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildAppendMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildDeleteMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildFindMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildPrependMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemChildReorderMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemFindIdMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemForeachMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetChildrenMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetIdMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetParentMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetPositionMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetPositionRealizedMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemGetRootMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemHandleEventMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertiesCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertiesListMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyExistMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyGetMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyGetBoolMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyGetByteArrayMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyGetIntMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyGetVariantMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertyRemoveMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertySetMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertySetBoolMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertySetByteArrayMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertySetIntMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemPropertySetVariantMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemSendAboutToShowMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemSetParentMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemSetRootMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemShowToUserMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemTakeChildrenMethodInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemUnparentMethodInfo-#endif
@@ -1,301 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--Public instance data for a 'GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy'.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Objects.MenuitemProxy- ( ---- * Exported types- MenuitemProxy(..) ,- IsMenuitemProxy ,- toMenuitemProxy ,- noMenuitemProxy ,--- -- * Methods--- ** getWrapped #method:getWrapped#--#if ENABLE_OVERLOADING- MenuitemProxyGetWrappedMethodInfo ,-#endif- menuitemProxyGetWrapped ,----- ** new #method:new#-- menuitemProxyNew ,----- -- * Properties--- ** menuItem #attr:menuItem#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- MenuitemProxyMenuItemPropertyInfo ,-#endif- constructMenuitemProxyMenuItem ,- getMenuitemProxyMenuItem ,-#if ENABLE_OVERLOADING- menuitemProxyMenuItem ,-#endif----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Menuitem as Dbusmenu.Menuitem-import qualified GI.GObject.Objects.Object as GObject.Object---- | Memory-managed wrapper type.-newtype MenuitemProxy = MenuitemProxy (ManagedPtr MenuitemProxy)-foreign import ccall "dbusmenu_menuitem_proxy_get_type"- c_dbusmenu_menuitem_proxy_get_type :: IO GType--instance GObject MenuitemProxy where- gobjectType = c_dbusmenu_menuitem_proxy_get_type- ---- | Type class for types which can be safely cast to `MenuitemProxy`, for instance with `toMenuitemProxy`.-class (GObject o, O.IsDescendantOf MenuitemProxy o) => IsMenuitemProxy o-instance (GObject o, O.IsDescendantOf MenuitemProxy o) => IsMenuitemProxy o--instance O.HasParentTypes MenuitemProxy-type instance O.ParentTypes MenuitemProxy = '[Dbusmenu.Menuitem.Menuitem, GObject.Object.Object]---- | Cast to `MenuitemProxy`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toMenuitemProxy :: (MonadIO m, IsMenuitemProxy o) => o -> m MenuitemProxy-toMenuitemProxy = liftIO . unsafeCastTo MenuitemProxy---- | A convenience alias for `Nothing` :: `Maybe` `MenuitemProxy`.-noMenuitemProxy :: Maybe MenuitemProxy-noMenuitemProxy = Nothing--#if ENABLE_OVERLOADING-type family ResolveMenuitemProxyMethod (t :: Symbol) (o :: *) :: * where- ResolveMenuitemProxyMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveMenuitemProxyMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveMenuitemProxyMethod "childAddPosition" o = Dbusmenu.Menuitem.MenuitemChildAddPositionMethodInfo- ResolveMenuitemProxyMethod "childAppend" o = Dbusmenu.Menuitem.MenuitemChildAppendMethodInfo- ResolveMenuitemProxyMethod "childDelete" o = Dbusmenu.Menuitem.MenuitemChildDeleteMethodInfo- ResolveMenuitemProxyMethod "childFind" o = Dbusmenu.Menuitem.MenuitemChildFindMethodInfo- ResolveMenuitemProxyMethod "childPrepend" o = Dbusmenu.Menuitem.MenuitemChildPrependMethodInfo- ResolveMenuitemProxyMethod "childReorder" o = Dbusmenu.Menuitem.MenuitemChildReorderMethodInfo- ResolveMenuitemProxyMethod "findId" o = Dbusmenu.Menuitem.MenuitemFindIdMethodInfo- ResolveMenuitemProxyMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveMenuitemProxyMethod "foreach" o = Dbusmenu.Menuitem.MenuitemForeachMethodInfo- ResolveMenuitemProxyMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveMenuitemProxyMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveMenuitemProxyMethod "handleEvent" o = Dbusmenu.Menuitem.MenuitemHandleEventMethodInfo- ResolveMenuitemProxyMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveMenuitemProxyMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveMenuitemProxyMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveMenuitemProxyMethod "propertiesCopy" o = Dbusmenu.Menuitem.MenuitemPropertiesCopyMethodInfo- ResolveMenuitemProxyMethod "propertiesList" o = Dbusmenu.Menuitem.MenuitemPropertiesListMethodInfo- ResolveMenuitemProxyMethod "propertyExist" o = Dbusmenu.Menuitem.MenuitemPropertyExistMethodInfo- ResolveMenuitemProxyMethod "propertyGet" o = Dbusmenu.Menuitem.MenuitemPropertyGetMethodInfo- ResolveMenuitemProxyMethod "propertyGetBool" o = Dbusmenu.Menuitem.MenuitemPropertyGetBoolMethodInfo- ResolveMenuitemProxyMethod "propertyGetByteArray" o = Dbusmenu.Menuitem.MenuitemPropertyGetByteArrayMethodInfo- ResolveMenuitemProxyMethod "propertyGetInt" o = Dbusmenu.Menuitem.MenuitemPropertyGetIntMethodInfo- ResolveMenuitemProxyMethod "propertyGetVariant" o = Dbusmenu.Menuitem.MenuitemPropertyGetVariantMethodInfo- ResolveMenuitemProxyMethod "propertyRemove" o = Dbusmenu.Menuitem.MenuitemPropertyRemoveMethodInfo- ResolveMenuitemProxyMethod "propertySet" o = Dbusmenu.Menuitem.MenuitemPropertySetMethodInfo- ResolveMenuitemProxyMethod "propertySetBool" o = Dbusmenu.Menuitem.MenuitemPropertySetBoolMethodInfo- ResolveMenuitemProxyMethod "propertySetByteArray" o = Dbusmenu.Menuitem.MenuitemPropertySetByteArrayMethodInfo- ResolveMenuitemProxyMethod "propertySetInt" o = Dbusmenu.Menuitem.MenuitemPropertySetIntMethodInfo- ResolveMenuitemProxyMethod "propertySetVariant" o = Dbusmenu.Menuitem.MenuitemPropertySetVariantMethodInfo- ResolveMenuitemProxyMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveMenuitemProxyMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveMenuitemProxyMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveMenuitemProxyMethod "sendAboutToShow" o = Dbusmenu.Menuitem.MenuitemSendAboutToShowMethodInfo- ResolveMenuitemProxyMethod "showToUser" o = Dbusmenu.Menuitem.MenuitemShowToUserMethodInfo- ResolveMenuitemProxyMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveMenuitemProxyMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveMenuitemProxyMethod "takeChildren" o = Dbusmenu.Menuitem.MenuitemTakeChildrenMethodInfo- ResolveMenuitemProxyMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveMenuitemProxyMethod "unparent" o = Dbusmenu.Menuitem.MenuitemUnparentMethodInfo- ResolveMenuitemProxyMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveMenuitemProxyMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveMenuitemProxyMethod "getChildren" o = Dbusmenu.Menuitem.MenuitemGetChildrenMethodInfo- ResolveMenuitemProxyMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveMenuitemProxyMethod "getId" o = Dbusmenu.Menuitem.MenuitemGetIdMethodInfo- ResolveMenuitemProxyMethod "getParent" o = Dbusmenu.Menuitem.MenuitemGetParentMethodInfo- ResolveMenuitemProxyMethod "getPosition" o = Dbusmenu.Menuitem.MenuitemGetPositionMethodInfo- ResolveMenuitemProxyMethod "getPositionRealized" o = Dbusmenu.Menuitem.MenuitemGetPositionRealizedMethodInfo- ResolveMenuitemProxyMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveMenuitemProxyMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveMenuitemProxyMethod "getRoot" o = Dbusmenu.Menuitem.MenuitemGetRootMethodInfo- ResolveMenuitemProxyMethod "getWrapped" o = MenuitemProxyGetWrappedMethodInfo- ResolveMenuitemProxyMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveMenuitemProxyMethod "setParent" o = Dbusmenu.Menuitem.MenuitemSetParentMethodInfo- ResolveMenuitemProxyMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveMenuitemProxyMethod "setRoot" o = Dbusmenu.Menuitem.MenuitemSetRootMethodInfo- ResolveMenuitemProxyMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveMenuitemProxyMethod t MenuitemProxy, O.MethodInfo info MenuitemProxy p) => OL.IsLabel t (MenuitemProxy -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif---- VVV Prop "menu-item"- -- Type: TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@menu-item@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' menuitemProxy #menuItem-@--}-getMenuitemProxyMenuItem :: (MonadIO m, IsMenuitemProxy o) => o -> m (Maybe Dbusmenu.Menuitem.Menuitem)-getMenuitemProxyMenuItem obj = liftIO $ B.Properties.getObjectPropertyObject obj "menu-item" Dbusmenu.Menuitem.Menuitem--{- |-Construct a `GValueConstruct` with valid value for the “@menu-item@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructMenuitemProxyMenuItem :: (IsMenuitemProxy o, Dbusmenu.Menuitem.IsMenuitem a) => a -> IO (GValueConstruct o)-constructMenuitemProxyMenuItem val = B.Properties.constructObjectPropertyObject "menu-item" (Just val)--#if ENABLE_OVERLOADING-data MenuitemProxyMenuItemPropertyInfo-instance AttrInfo MenuitemProxyMenuItemPropertyInfo where- type AttrAllowedOps MenuitemProxyMenuItemPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint MenuitemProxyMenuItemPropertyInfo = Dbusmenu.Menuitem.IsMenuitem- type AttrBaseTypeConstraint MenuitemProxyMenuItemPropertyInfo = IsMenuitemProxy- type AttrGetType MenuitemProxyMenuItemPropertyInfo = (Maybe Dbusmenu.Menuitem.Menuitem)- type AttrLabel MenuitemProxyMenuItemPropertyInfo = "menu-item"- type AttrOrigin MenuitemProxyMenuItemPropertyInfo = MenuitemProxy- attrGet _ = getMenuitemProxyMenuItem- attrSet _ = undefined- attrConstruct _ = constructMenuitemProxyMenuItem- attrClear _ = undefined-#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList MenuitemProxy-type instance O.AttributeList MenuitemProxy = MenuitemProxyAttributeList-type MenuitemProxyAttributeList = ('[ '("id", Dbusmenu.Menuitem.MenuitemIdPropertyInfo), '("menuItem", MenuitemProxyMenuItemPropertyInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-menuitemProxyMenuItem :: AttrLabelProxy "menuItem"-menuitemProxyMenuItem = AttrLabelProxy--#endif--#if ENABLE_OVERLOADING-type instance O.SignalList MenuitemProxy = MenuitemProxySignalList-type MenuitemProxySignalList = ('[ '("aboutToShow", Dbusmenu.Menuitem.MenuitemAboutToShowSignalInfo), '("childAdded", Dbusmenu.Menuitem.MenuitemChildAddedSignalInfo), '("childMoved", Dbusmenu.Menuitem.MenuitemChildMovedSignalInfo), '("childRemoved", Dbusmenu.Menuitem.MenuitemChildRemovedSignalInfo), '("event", Dbusmenu.Menuitem.MenuitemEventSignalInfo), '("itemActivated", Dbusmenu.Menuitem.MenuitemItemActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("propertyChanged", Dbusmenu.Menuitem.MenuitemPropertyChangedSignalInfo), '("realized", Dbusmenu.Menuitem.MenuitemRealizedSignalInfo), '("showToUser", Dbusmenu.Menuitem.MenuitemShowToUserSignalInfo)] :: [(Symbol, *)])--#endif---- method MenuitemProxy::new--- method type : Constructor--- Args : [Arg {argCName = "mi", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuMenuitem to proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "MenuitemProxy"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_proxy_new" dbusmenu_menuitem_proxy_new :: - Ptr Dbusmenu.Menuitem.Menuitem -> -- mi : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO (Ptr MenuitemProxy)--{- |-Builds a new 'GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy' object that proxies-all of the values for /@mi@/.--}-menuitemProxyNew ::- (B.CallStack.HasCallStack, MonadIO m, Dbusmenu.Menuitem.IsMenuitem a) =>- a- {- ^ /@mi@/: The 'GI.Dbusmenu.Objects.Menuitem.Menuitem' to proxy -}- -> m MenuitemProxy- {- ^ __Returns:__ A new 'GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy' object. -}-menuitemProxyNew mi = liftIO $ do- mi' <- unsafeManagedPtrCastPtr mi- result <- dbusmenu_menuitem_proxy_new mi'- checkUnexpectedReturnNULL "menuitemProxyNew" result- result' <- (wrapObject MenuitemProxy) result- touchManagedPtr mi- return result'--#if ENABLE_OVERLOADING-#endif---- method MenuitemProxy::get_wrapped--- method type : OrdinaryMethod--- Args : [Arg {argCName = "pmi", argType = TInterface (Name {namespace = "Dbusmenu", name = "MenuitemProxy"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#DbusmenuMenuitemProxy to look into", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_menuitem_proxy_get_wrapped" dbusmenu_menuitem_proxy_get_wrapped :: - Ptr MenuitemProxy -> -- pmi : TInterface (Name {namespace = "Dbusmenu", name = "MenuitemProxy"})- IO (Ptr Dbusmenu.Menuitem.Menuitem)--{- |-Accesses the private variable of which 'GI.Dbusmenu.Objects.Menuitem.Menuitem'-we are doing the proxying for.--}-menuitemProxyGetWrapped ::- (B.CallStack.HasCallStack, MonadIO m, IsMenuitemProxy a) =>- a- {- ^ /@pmi@/: 'GI.Dbusmenu.Objects.MenuitemProxy.MenuitemProxy' to look into -}- -> m Dbusmenu.Menuitem.Menuitem- {- ^ __Returns:__ A 'GI.Dbusmenu.Objects.Menuitem.Menuitem' object or a @/NULL/@ if we- don\'t have one or there is an error. -}-menuitemProxyGetWrapped pmi = liftIO $ do- pmi' <- unsafeManagedPtrCastPtr pmi- result <- dbusmenu_menuitem_proxy_get_wrapped pmi'- checkUnexpectedReturnNULL "menuitemProxyGetWrapped" result- result' <- (newObject Dbusmenu.Menuitem.Menuitem) result- touchManagedPtr pmi- return result'--#if ENABLE_OVERLOADING-data MenuitemProxyGetWrappedMethodInfo-instance (signature ~ (m Dbusmenu.Menuitem.Menuitem), MonadIO m, IsMenuitemProxy a) => O.MethodInfo MenuitemProxyGetWrappedMethodInfo a signature where- overloadedMethod _ = menuitemProxyGetWrapped--#endif--
@@ -1,35 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Dbusmenu.Objects.MenuitemProxy where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype MenuitemProxy = MenuitemProxy (ManagedPtr MenuitemProxy)-instance GObject MenuitemProxy where-class (GObject o, O.IsDescendantOf MenuitemProxy o) => IsMenuitemProxy o-instance (GObject o, O.IsDescendantOf MenuitemProxy o) => IsMenuitemProxy o-instance O.HasParentTypes MenuitemProxy-#if ENABLE_OVERLOADING-data MenuitemProxyMenuItemPropertyInfo-#endif-#if ENABLE_OVERLOADING-data MenuitemProxyGetWrappedMethodInfo-#endif
@@ -1,1060 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A server which represents a sharing of a set of- @/DbusmenuMenuitems/@ across DBus to a 'GI.Dbusmenu.Objects.Client.Client'.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Dbusmenu.Objects.Server- ( ---- * Exported types- Server(..) ,- IsServer ,- toServer ,- noServer ,--- -- * Methods--- ** getIconPaths #method:getIconPaths#--#if ENABLE_OVERLOADING- ServerGetIconPathsMethodInfo ,-#endif- serverGetIconPaths ,----- ** getStatus #method:getStatus#--#if ENABLE_OVERLOADING- ServerGetStatusMethodInfo ,-#endif- serverGetStatus ,----- ** getTextDirection #method:getTextDirection#--#if ENABLE_OVERLOADING- ServerGetTextDirectionMethodInfo ,-#endif- serverGetTextDirection ,----- ** new #method:new#-- serverNew ,----- ** setIconPaths #method:setIconPaths#--#if ENABLE_OVERLOADING- ServerSetIconPathsMethodInfo ,-#endif- serverSetIconPaths ,----- ** setRoot #method:setRoot#--#if ENABLE_OVERLOADING- ServerSetRootMethodInfo ,-#endif- serverSetRoot ,----- ** setStatus #method:setStatus#--#if ENABLE_OVERLOADING- ServerSetStatusMethodInfo ,-#endif- serverSetStatus ,----- ** setTextDirection #method:setTextDirection#--#if ENABLE_OVERLOADING- ServerSetTextDirectionMethodInfo ,-#endif- serverSetTextDirection ,----- -- * Properties--- ** dbusObject #attr:dbusObject#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ServerDbusObjectPropertyInfo ,-#endif- constructServerDbusObject ,- getServerDbusObject ,-#if ENABLE_OVERLOADING- serverDbusObject ,-#endif----- ** rootNode #attr:rootNode#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ServerRootNodePropertyInfo ,-#endif- clearServerRootNode ,- constructServerRootNode ,- getServerRootNode ,-#if ENABLE_OVERLOADING- serverRootNode ,-#endif- setServerRootNode ,----- ** version #attr:version#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- ServerVersionPropertyInfo ,-#endif- getServerVersion ,-#if ENABLE_OVERLOADING- serverVersion ,-#endif----- -- * Signals--- ** itemActivationRequested #signal:itemActivationRequested#-- C_ServerItemActivationRequestedCallback ,- ServerItemActivationRequestedCallback ,-#if ENABLE_OVERLOADING- ServerItemActivationRequestedSignalInfo ,-#endif- afterServerItemActivationRequested ,- genClosure_ServerItemActivationRequested,- mk_ServerItemActivationRequestedCallback,- noServerItemActivationRequestedCallback ,- onServerItemActivationRequested ,- wrap_ServerItemActivationRequestedCallback,----- ** itemPropertyUpdated #signal:itemPropertyUpdated#-- C_ServerItemPropertyUpdatedCallback ,- ServerItemPropertyUpdatedCallback ,-#if ENABLE_OVERLOADING- ServerItemPropertyUpdatedSignalInfo ,-#endif- afterServerItemPropertyUpdated ,- genClosure_ServerItemPropertyUpdated ,- mk_ServerItemPropertyUpdatedCallback ,- noServerItemPropertyUpdatedCallback ,- onServerItemPropertyUpdated ,- wrap_ServerItemPropertyUpdatedCallback ,----- ** itemUpdated #signal:itemUpdated#-- C_ServerItemUpdatedCallback ,- ServerItemUpdatedCallback ,-#if ENABLE_OVERLOADING- ServerItemUpdatedSignalInfo ,-#endif- afterServerItemUpdated ,- genClosure_ServerItemUpdated ,- mk_ServerItemUpdatedCallback ,- noServerItemUpdatedCallback ,- onServerItemUpdated ,- wrap_ServerItemUpdatedCallback ,----- ** layoutUpdated #signal:layoutUpdated#-- C_ServerLayoutUpdatedCallback ,- ServerLayoutUpdatedCallback ,-#if ENABLE_OVERLOADING- ServerLayoutUpdatedSignalInfo ,-#endif- afterServerLayoutUpdated ,- genClosure_ServerLayoutUpdated ,- mk_ServerLayoutUpdatedCallback ,- noServerLayoutUpdatedCallback ,- onServerLayoutUpdated ,- wrap_ServerLayoutUpdatedCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Dbusmenu.Enums as Dbusmenu.Enums-import {-# SOURCE #-} qualified GI.Dbusmenu.Objects.Menuitem as Dbusmenu.Menuitem-import qualified GI.GObject.Objects.Object as GObject.Object---- | Memory-managed wrapper type.-newtype Server = Server (ManagedPtr Server)-foreign import ccall "dbusmenu_server_get_type"- c_dbusmenu_server_get_type :: IO GType--instance GObject Server where- gobjectType = c_dbusmenu_server_get_type- ---- | Type class for types which can be safely cast to `Server`, for instance with `toServer`.-class (GObject o, O.IsDescendantOf Server o) => IsServer o-instance (GObject o, O.IsDescendantOf Server o) => IsServer o--instance O.HasParentTypes Server-type instance O.ParentTypes Server = '[GObject.Object.Object]---- | Cast to `Server`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toServer :: (MonadIO m, IsServer o) => o -> m Server-toServer = liftIO . unsafeCastTo Server---- | A convenience alias for `Nothing` :: `Maybe` `Server`.-noServer :: Maybe Server-noServer = Nothing--#if ENABLE_OVERLOADING-type family ResolveServerMethod (t :: Symbol) (o :: *) :: * where- ResolveServerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveServerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveServerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveServerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveServerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveServerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveServerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveServerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveServerMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveServerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveServerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveServerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveServerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveServerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveServerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveServerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveServerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveServerMethod "getIconPaths" o = ServerGetIconPathsMethodInfo- ResolveServerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveServerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveServerMethod "getStatus" o = ServerGetStatusMethodInfo- ResolveServerMethod "getTextDirection" o = ServerGetTextDirectionMethodInfo- ResolveServerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveServerMethod "setIconPaths" o = ServerSetIconPathsMethodInfo- ResolveServerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveServerMethod "setRoot" o = ServerSetRootMethodInfo- ResolveServerMethod "setStatus" o = ServerSetStatusMethodInfo- ResolveServerMethod "setTextDirection" o = ServerSetTextDirectionMethodInfo- ResolveServerMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveServerMethod t Server, O.MethodInfo info Server p) => OL.IsLabel t (Server -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif---- signal Server::item-activation-requested-{- |-This is signaled when a menuitem under this server- sends its activate signal.--}-type ServerItemActivationRequestedCallback =- Int32- {- ^ /@arg1@/: The ID of the parent for this update. -}- -> Word32- {- ^ /@arg2@/: The timestamp of when the event happened -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemActivationRequestedCallback`@.-noServerItemActivationRequestedCallback :: Maybe ServerItemActivationRequestedCallback-noServerItemActivationRequestedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ServerItemActivationRequestedCallback =- Ptr () -> -- object- Int32 ->- Word32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_ServerItemActivationRequestedCallback`.-foreign import ccall "wrapper"- mk_ServerItemActivationRequestedCallback :: C_ServerItemActivationRequestedCallback -> IO (FunPtr C_ServerItemActivationRequestedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_ServerItemActivationRequested :: MonadIO m => ServerItemActivationRequestedCallback -> m (GClosure C_ServerItemActivationRequestedCallback)-genClosure_ServerItemActivationRequested cb = liftIO $ do- let cb' = wrap_ServerItemActivationRequestedCallback cb- mk_ServerItemActivationRequestedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ServerItemActivationRequestedCallback` into a `C_ServerItemActivationRequestedCallback`.-wrap_ServerItemActivationRequestedCallback ::- ServerItemActivationRequestedCallback ->- C_ServerItemActivationRequestedCallback-wrap_ServerItemActivationRequestedCallback _cb _ arg1 arg2 _ = do- _cb arg1 arg2---{- |-Connect a signal handler for the “@item-activation-requested@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' server #itemActivationRequested callback-@--}-onServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId-onServerItemActivationRequested obj cb = liftIO $ do- let cb' = wrap_ServerItemActivationRequestedCallback cb- cb'' <- mk_ServerItemActivationRequestedCallback cb'- connectSignalFunPtr obj "item-activation-requested" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@item-activation-requested@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' server #itemActivationRequested callback-@--}-afterServerItemActivationRequested :: (IsServer a, MonadIO m) => a -> ServerItemActivationRequestedCallback -> m SignalHandlerId-afterServerItemActivationRequested obj cb = liftIO $ do- let cb' = wrap_ServerItemActivationRequestedCallback cb- cb'' <- mk_ServerItemActivationRequestedCallback cb'- connectSignalFunPtr obj "item-activation-requested" cb'' SignalConnectAfter----- signal Server::item-property-updated-{- |-/No description available in the introspection data./--}-type ServerItemPropertyUpdatedCallback =- Int32- -> T.Text- -> GVariant- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemPropertyUpdatedCallback`@.-noServerItemPropertyUpdatedCallback :: Maybe ServerItemPropertyUpdatedCallback-noServerItemPropertyUpdatedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ServerItemPropertyUpdatedCallback =- Ptr () -> -- object- Int32 ->- CString ->- Ptr GVariant ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_ServerItemPropertyUpdatedCallback`.-foreign import ccall "wrapper"- mk_ServerItemPropertyUpdatedCallback :: C_ServerItemPropertyUpdatedCallback -> IO (FunPtr C_ServerItemPropertyUpdatedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_ServerItemPropertyUpdated :: MonadIO m => ServerItemPropertyUpdatedCallback -> m (GClosure C_ServerItemPropertyUpdatedCallback)-genClosure_ServerItemPropertyUpdated cb = liftIO $ do- let cb' = wrap_ServerItemPropertyUpdatedCallback cb- mk_ServerItemPropertyUpdatedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ServerItemPropertyUpdatedCallback` into a `C_ServerItemPropertyUpdatedCallback`.-wrap_ServerItemPropertyUpdatedCallback ::- ServerItemPropertyUpdatedCallback ->- C_ServerItemPropertyUpdatedCallback-wrap_ServerItemPropertyUpdatedCallback _cb _ object p0 p1 _ = do- p0' <- cstringToText p0- p1' <- B.GVariant.newGVariantFromPtr p1- _cb object p0' p1'---{- |-Connect a signal handler for the “@item-property-updated@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' server #itemPropertyUpdated callback-@--}-onServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId-onServerItemPropertyUpdated obj cb = liftIO $ do- let cb' = wrap_ServerItemPropertyUpdatedCallback cb- cb'' <- mk_ServerItemPropertyUpdatedCallback cb'- connectSignalFunPtr obj "item-property-updated" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@item-property-updated@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' server #itemPropertyUpdated callback-@--}-afterServerItemPropertyUpdated :: (IsServer a, MonadIO m) => a -> ServerItemPropertyUpdatedCallback -> m SignalHandlerId-afterServerItemPropertyUpdated obj cb = liftIO $ do- let cb' = wrap_ServerItemPropertyUpdatedCallback cb- cb'' <- mk_ServerItemPropertyUpdatedCallback cb'- connectSignalFunPtr obj "item-property-updated" cb'' SignalConnectAfter----- signal Server::item-updated-{- |-/No description available in the introspection data./--}-type ServerItemUpdatedCallback =- Int32- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ServerItemUpdatedCallback`@.-noServerItemUpdatedCallback :: Maybe ServerItemUpdatedCallback-noServerItemUpdatedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ServerItemUpdatedCallback =- Ptr () -> -- object- Int32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_ServerItemUpdatedCallback`.-foreign import ccall "wrapper"- mk_ServerItemUpdatedCallback :: C_ServerItemUpdatedCallback -> IO (FunPtr C_ServerItemUpdatedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_ServerItemUpdated :: MonadIO m => ServerItemUpdatedCallback -> m (GClosure C_ServerItemUpdatedCallback)-genClosure_ServerItemUpdated cb = liftIO $ do- let cb' = wrap_ServerItemUpdatedCallback cb- mk_ServerItemUpdatedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ServerItemUpdatedCallback` into a `C_ServerItemUpdatedCallback`.-wrap_ServerItemUpdatedCallback ::- ServerItemUpdatedCallback ->- C_ServerItemUpdatedCallback-wrap_ServerItemUpdatedCallback _cb _ object _ = do- _cb object---{- |-Connect a signal handler for the “@item-updated@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' server #itemUpdated callback-@--}-onServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId-onServerItemUpdated obj cb = liftIO $ do- let cb' = wrap_ServerItemUpdatedCallback cb- cb'' <- mk_ServerItemUpdatedCallback cb'- connectSignalFunPtr obj "item-updated" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@item-updated@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' server #itemUpdated callback-@--}-afterServerItemUpdated :: (IsServer a, MonadIO m) => a -> ServerItemUpdatedCallback -> m SignalHandlerId-afterServerItemUpdated obj cb = liftIO $ do- let cb' = wrap_ServerItemUpdatedCallback cb- cb'' <- mk_ServerItemUpdatedCallback cb'- connectSignalFunPtr obj "item-updated" cb'' SignalConnectAfter----- signal Server::layout-updated-{- |-This signal is emitted any time the layout of the- menuitems under this server is changed.--}-type ServerLayoutUpdatedCallback =- Word32- {- ^ /@arg1@/: A revision number representing which revision the update- represents itself as. -}- -> Int32- {- ^ /@arg2@/: The ID of the parent for this update. -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ServerLayoutUpdatedCallback`@.-noServerLayoutUpdatedCallback :: Maybe ServerLayoutUpdatedCallback-noServerLayoutUpdatedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_ServerLayoutUpdatedCallback =- Ptr () -> -- object- Word32 ->- Int32 ->- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_ServerLayoutUpdatedCallback`.-foreign import ccall "wrapper"- mk_ServerLayoutUpdatedCallback :: C_ServerLayoutUpdatedCallback -> IO (FunPtr C_ServerLayoutUpdatedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_ServerLayoutUpdated :: MonadIO m => ServerLayoutUpdatedCallback -> m (GClosure C_ServerLayoutUpdatedCallback)-genClosure_ServerLayoutUpdated cb = liftIO $ do- let cb' = wrap_ServerLayoutUpdatedCallback cb- mk_ServerLayoutUpdatedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `ServerLayoutUpdatedCallback` into a `C_ServerLayoutUpdatedCallback`.-wrap_ServerLayoutUpdatedCallback ::- ServerLayoutUpdatedCallback ->- C_ServerLayoutUpdatedCallback-wrap_ServerLayoutUpdatedCallback _cb _ arg1 arg2 _ = do- _cb arg1 arg2---{- |-Connect a signal handler for the “@layout-updated@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' server #layoutUpdated callback-@--}-onServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId-onServerLayoutUpdated obj cb = liftIO $ do- let cb' = wrap_ServerLayoutUpdatedCallback cb- cb'' <- mk_ServerLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@layout-updated@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' server #layoutUpdated callback-@--}-afterServerLayoutUpdated :: (IsServer a, MonadIO m) => a -> ServerLayoutUpdatedCallback -> m SignalHandlerId-afterServerLayoutUpdated obj cb = liftIO $ do- let cb' = wrap_ServerLayoutUpdatedCallback cb- cb'' <- mk_ServerLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' SignalConnectAfter----- VVV Prop "dbus-object"- -- Type: TBasicType TUTF8- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@dbus-object@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' server #dbusObject-@--}-getServerDbusObject :: (MonadIO m, IsServer o) => o -> m (Maybe T.Text)-getServerDbusObject obj = liftIO $ B.Properties.getObjectPropertyString obj "dbus-object"--{- |-Construct a `GValueConstruct` with valid value for the “@dbus-object@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructServerDbusObject :: (IsServer o) => T.Text -> IO (GValueConstruct o)-constructServerDbusObject val = B.Properties.constructObjectPropertyString "dbus-object" (Just val)--#if ENABLE_OVERLOADING-data ServerDbusObjectPropertyInfo-instance AttrInfo ServerDbusObjectPropertyInfo where- type AttrAllowedOps ServerDbusObjectPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ServerDbusObjectPropertyInfo = (~) T.Text- type AttrBaseTypeConstraint ServerDbusObjectPropertyInfo = IsServer- type AttrGetType ServerDbusObjectPropertyInfo = (Maybe T.Text)- type AttrLabel ServerDbusObjectPropertyInfo = "dbus-object"- type AttrOrigin ServerDbusObjectPropertyInfo = Server- attrGet _ = getServerDbusObject- attrSet _ = undefined- attrConstruct _ = constructServerDbusObject- attrClear _ = undefined-#endif---- VVV Prop "root-node"- -- Type: TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- -- Flags: [PropertyReadable,PropertyWritable]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@root-node@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' server #rootNode-@--}-getServerRootNode :: (MonadIO m, IsServer o) => o -> m (Maybe Dbusmenu.Menuitem.Menuitem)-getServerRootNode obj = liftIO $ B.Properties.getObjectPropertyObject obj "root-node" Dbusmenu.Menuitem.Menuitem--{- |-Set the value of the “@root-node@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' server [ #rootNode 'Data.GI.Base.Attributes.:=' value ]-@--}-setServerRootNode :: (MonadIO m, IsServer o, Dbusmenu.Menuitem.IsMenuitem a) => o -> a -> m ()-setServerRootNode obj val = liftIO $ B.Properties.setObjectPropertyObject obj "root-node" (Just val)--{- |-Construct a `GValueConstruct` with valid value for the “@root-node@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructServerRootNode :: (IsServer o, Dbusmenu.Menuitem.IsMenuitem a) => a -> IO (GValueConstruct o)-constructServerRootNode val = B.Properties.constructObjectPropertyObject "root-node" (Just val)--{- |-Set the value of the “@root-node@” property to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #rootNode-@--}-clearServerRootNode :: (MonadIO m, IsServer o) => o -> m ()-clearServerRootNode obj = liftIO $ B.Properties.setObjectPropertyObject obj "root-node" (Nothing :: Maybe Dbusmenu.Menuitem.Menuitem)--#if ENABLE_OVERLOADING-data ServerRootNodePropertyInfo-instance AttrInfo ServerRootNodePropertyInfo where- type AttrAllowedOps ServerRootNodePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ServerRootNodePropertyInfo = Dbusmenu.Menuitem.IsMenuitem- type AttrBaseTypeConstraint ServerRootNodePropertyInfo = IsServer- type AttrGetType ServerRootNodePropertyInfo = (Maybe Dbusmenu.Menuitem.Menuitem)- type AttrLabel ServerRootNodePropertyInfo = "root-node"- type AttrOrigin ServerRootNodePropertyInfo = Server- attrGet _ = getServerRootNode- attrSet _ = setServerRootNode- attrConstruct _ = constructServerRootNode- attrClear _ = clearServerRootNode-#endif---- VVV Prop "version"- -- Type: TBasicType TUInt- -- Flags: [PropertyReadable]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@version@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' server #version-@--}-getServerVersion :: (MonadIO m, IsServer o) => o -> m Word32-getServerVersion obj = liftIO $ B.Properties.getObjectPropertyUInt32 obj "version"--#if ENABLE_OVERLOADING-data ServerVersionPropertyInfo-instance AttrInfo ServerVersionPropertyInfo where- type AttrAllowedOps ServerVersionPropertyInfo = '[ 'AttrGet]- type AttrSetTypeConstraint ServerVersionPropertyInfo = (~) ()- type AttrBaseTypeConstraint ServerVersionPropertyInfo = IsServer- type AttrGetType ServerVersionPropertyInfo = Word32- type AttrLabel ServerVersionPropertyInfo = "version"- type AttrOrigin ServerVersionPropertyInfo = Server- attrGet _ = getServerVersion- attrSet _ = undefined- attrConstruct _ = undefined- attrClear _ = undefined-#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Server-type instance O.AttributeList Server = ServerAttributeList-type ServerAttributeList = ('[ '("dbusObject", ServerDbusObjectPropertyInfo), '("rootNode", ServerRootNodePropertyInfo), '("version", ServerVersionPropertyInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-serverDbusObject :: AttrLabelProxy "dbusObject"-serverDbusObject = AttrLabelProxy--serverRootNode :: AttrLabelProxy "rootNode"-serverRootNode = AttrLabelProxy--serverVersion :: AttrLabelProxy "version"-serverVersion = AttrLabelProxy--#endif--#if ENABLE_OVERLOADING-data ServerItemActivationRequestedSignalInfo-instance SignalInfo ServerItemActivationRequestedSignalInfo where- type HaskellCallbackType ServerItemActivationRequestedSignalInfo = ServerItemActivationRequestedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ServerItemActivationRequestedCallback cb- cb'' <- mk_ServerItemActivationRequestedCallback cb'- connectSignalFunPtr obj "item-activation-requested" cb'' connectMode--data ServerItemPropertyUpdatedSignalInfo-instance SignalInfo ServerItemPropertyUpdatedSignalInfo where- type HaskellCallbackType ServerItemPropertyUpdatedSignalInfo = ServerItemPropertyUpdatedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ServerItemPropertyUpdatedCallback cb- cb'' <- mk_ServerItemPropertyUpdatedCallback cb'- connectSignalFunPtr obj "item-property-updated" cb'' connectMode--data ServerItemUpdatedSignalInfo-instance SignalInfo ServerItemUpdatedSignalInfo where- type HaskellCallbackType ServerItemUpdatedSignalInfo = ServerItemUpdatedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ServerItemUpdatedCallback cb- cb'' <- mk_ServerItemUpdatedCallback cb'- connectSignalFunPtr obj "item-updated" cb'' connectMode--data ServerLayoutUpdatedSignalInfo-instance SignalInfo ServerLayoutUpdatedSignalInfo where- type HaskellCallbackType ServerLayoutUpdatedSignalInfo = ServerLayoutUpdatedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_ServerLayoutUpdatedCallback cb- cb'' <- mk_ServerLayoutUpdatedCallback cb'- connectSignalFunPtr obj "layout-updated" cb'' connectMode--type instance O.SignalList Server = ServerSignalList-type ServerSignalList = ('[ '("itemActivationRequested", ServerItemActivationRequestedSignalInfo), '("itemPropertyUpdated", ServerItemPropertyUpdatedSignalInfo), '("itemUpdated", ServerItemUpdatedSignalInfo), '("layoutUpdated", ServerLayoutUpdatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Server::new--- method type : Constructor--- Args : [Arg {argCName = "object", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The object name to show for this menu structure\n\t\ton DBus. May be NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Server"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_new" dbusmenu_server_new :: - CString -> -- object : TBasicType TUTF8- IO (Ptr Server)--{- |-Creates a new 'GI.Dbusmenu.Objects.Server.Server' object with a specific object- path on DBus. If /@object@/ is set to NULL the default object- name of \"\/com\/canonical\/dbusmenu\" will be used.-- Return value: A brand new 'GI.Dbusmenu.Objects.Server.Server'--}-serverNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@object@/: The object name to show for this menu structure- on DBus. May be NULL. -}- -> m Server-serverNew object = liftIO $ do- object' <- textToCString object- result <- dbusmenu_server_new object'- checkUnexpectedReturnNULL "serverNew" result- result' <- (wrapObject Server) result- freeMem object'- return result'--#if ENABLE_OVERLOADING-#endif---- method Server::get_icon_paths--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to get the icon paths from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_get_icon_paths" dbusmenu_server_get_icon_paths :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- IO (Ptr CString)--{- |-Gets the stored and exported icon paths from the server.--}-serverGetIconPaths ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to get the icon paths from -}- -> m [T.Text]- {- ^ __Returns:__ A NULL-terminated list of icon paths with- memory managed by the server. Duplicate if you want- to keep them. -}-serverGetIconPaths server = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- result <- dbusmenu_server_get_icon_paths server'- checkUnexpectedReturnNULL "serverGetIconPaths" result- result' <- unpackZeroTerminatedUTF8CArray result- touchManagedPtr server- return result'--#if ENABLE_OVERLOADING-data ServerGetIconPathsMethodInfo-instance (signature ~ (m [T.Text]), MonadIO m, IsServer a) => O.MethodInfo ServerGetIconPathsMethodInfo a signature where- overloadedMethod _ = serverGetIconPaths--#endif---- method Server::get_status--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to get the status from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "Status"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_get_status" dbusmenu_server_get_status :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- IO CUInt--{- |-Gets the current statust hat the server is sending out over- DBus.-- Return value: The current status the server is sending--}-serverGetStatus ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to get the status from -}- -> m Dbusmenu.Enums.Status-serverGetStatus server = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- result <- dbusmenu_server_get_status server'- let result' = (toEnum . fromIntegral) result- touchManagedPtr server- return result'--#if ENABLE_OVERLOADING-data ServerGetStatusMethodInfo-instance (signature ~ (m Dbusmenu.Enums.Status), MonadIO m, IsServer a) => O.MethodInfo ServerGetStatusMethodInfo a signature where- overloadedMethod _ = serverGetStatus--#endif---- method Server::get_text_direction--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to get the text direction from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"}))--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_get_text_direction" dbusmenu_server_get_text_direction :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- IO CUInt--{- |-Returns the value of the text direction that is being exported- over DBus for this server. It should relate to the direction- of the labels and other text fields that are being exported by- this server.-- Return value: Text direction exported for this server.--}-serverGetTextDirection ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' object to get the text direction from -}- -> m Dbusmenu.Enums.TextDirection-serverGetTextDirection server = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- result <- dbusmenu_server_get_text_direction server'- let result' = (toEnum . fromIntegral) result- touchManagedPtr server- return result'--#if ENABLE_OVERLOADING-data ServerGetTextDirectionMethodInfo-instance (signature ~ (m Dbusmenu.Enums.TextDirection), MonadIO m, IsServer a) => O.MethodInfo ServerGetTextDirectionMethodInfo a signature where- overloadedMethod _ = serverGetTextDirection--#endif---- method Server::set_icon_paths--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to set the icon paths on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon_paths", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_set_icon_paths" dbusmenu_server_set_icon_paths :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- Ptr CString -> -- icon_paths : TCArray True (-1) (-1) (TBasicType TUTF8)- IO ()--{- |-Sets the icon paths for the server. This will replace previously- set icon theme paths.--}-serverSetIconPaths ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to set the icon paths on -}- -> [T.Text]- -> m ()-serverSetIconPaths server iconPaths = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- iconPaths' <- packZeroTerminatedUTF8CArray iconPaths- dbusmenu_server_set_icon_paths server' iconPaths'- touchManagedPtr server- mapZeroTerminatedCArray freeMem iconPaths'- freeMem iconPaths'- return ()--#if ENABLE_OVERLOADING-data ServerSetIconPathsMethodInfo-instance (signature ~ ([T.Text] -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetIconPathsMethodInfo a signature where- overloadedMethod _ = serverSetIconPaths--#endif---- method Server::set_root--- method type : OrdinaryMethod--- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to set the root on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "root", argType = TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The new root #DbusmenuMenuitem tree", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_set_root" dbusmenu_server_set_root :: - Ptr Server -> -- self : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- Ptr Dbusmenu.Menuitem.Menuitem -> -- root : TInterface (Name {namespace = "Dbusmenu", name = "Menuitem"})- IO ()--{- |-This function contains all of the 'GI.GObject.Structs.Value.Value' wrapping- required to set the property 'GI.Dbusmenu.Objects.Server.Server':@/root-node/@- on the server /@self@/.--}-serverSetRoot ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a, Dbusmenu.Menuitem.IsMenuitem b) =>- a- {- ^ /@self@/: The 'GI.Dbusmenu.Objects.Server.Server' object to set the root on -}- -> b- {- ^ /@root@/: The new root 'GI.Dbusmenu.Objects.Menuitem.Menuitem' tree -}- -> m ()-serverSetRoot self root = liftIO $ do- self' <- unsafeManagedPtrCastPtr self- root' <- unsafeManagedPtrCastPtr root- dbusmenu_server_set_root self' root'- touchManagedPtr self- touchManagedPtr root- return ()--#if ENABLE_OVERLOADING-data ServerSetRootMethodInfo-instance (signature ~ (b -> m ()), MonadIO m, IsServer a, Dbusmenu.Menuitem.IsMenuitem b) => O.MethodInfo ServerSetRootMethodInfo a signature where- overloadedMethod _ = serverSetRoot--#endif---- method Server::set_status--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer to set the status on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "status", argType = TInterface (Name {namespace = "Dbusmenu", name = "Status"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Status value to set on the server", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_set_status" dbusmenu_server_set_status :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- CUInt -> -- status : TInterface (Name {namespace = "Dbusmenu", name = "Status"})- IO ()--{- |-Changes the status of the server.--}-serverSetStatus ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' to set the status on -}- -> Dbusmenu.Enums.Status- {- ^ /@status@/: Status value to set on the server -}- -> m ()-serverSetStatus server status = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- let status' = (fromIntegral . fromEnum) status- dbusmenu_server_set_status server' status'- touchManagedPtr server- return ()--#if ENABLE_OVERLOADING-data ServerSetStatusMethodInfo-instance (signature ~ (Dbusmenu.Enums.Status -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetStatusMethodInfo a signature where- overloadedMethod _ = serverSetStatus--#endif---- method Server::set_text_direction--- method type : OrdinaryMethod--- Args : [Arg {argCName = "server", argType = TInterface (Name {namespace = "Dbusmenu", name = "Server"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #DbusmenuServer object to set the text direction on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dir", argType = TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Direction of the text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dbusmenu_server_set_text_direction" dbusmenu_server_set_text_direction :: - Ptr Server -> -- server : TInterface (Name {namespace = "Dbusmenu", name = "Server"})- CUInt -> -- dir : TInterface (Name {namespace = "Dbusmenu", name = "TextDirection"})- IO ()--{- |-Sets the text direction that should be exported over DBus for- this server. If the value is set to @/DBUSMENU_TEXT_DIRECTION_NONE/@- the default detection will be used for setting the value and- exported over DBus.--}-serverSetTextDirection ::- (B.CallStack.HasCallStack, MonadIO m, IsServer a) =>- a- {- ^ /@server@/: The 'GI.Dbusmenu.Objects.Server.Server' object to set the text direction on -}- -> Dbusmenu.Enums.TextDirection- {- ^ /@dir@/: Direction of the text -}- -> m ()-serverSetTextDirection server dir = liftIO $ do- server' <- unsafeManagedPtrCastPtr server- let dir' = (fromIntegral . fromEnum) dir- dbusmenu_server_set_text_direction server' dir'- touchManagedPtr server- return ()--#if ENABLE_OVERLOADING-data ServerSetTextDirectionMethodInfo-instance (signature ~ (Dbusmenu.Enums.TextDirection -> m ()), MonadIO m, IsServer a) => O.MethodInfo ServerSetTextDirectionMethodInfo a signature where- overloadedMethod _ = serverSetTextDirection--#endif--
@@ -1,71 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Dbusmenu.Objects.Server where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Server = Server (ManagedPtr Server)-instance GObject Server where-class (GObject o, O.IsDescendantOf Server o) => IsServer o-instance (GObject o, O.IsDescendantOf Server o) => IsServer o-instance O.HasParentTypes Server-#if ENABLE_OVERLOADING-data ServerDbusObjectPropertyInfo-#endif-#if ENABLE_OVERLOADING-data ServerRootNodePropertyInfo-#endif-#if ENABLE_OVERLOADING-data ServerVersionPropertyInfo-#endif-#if ENABLE_OVERLOADING-data ServerItemActivationRequestedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ServerItemPropertyUpdatedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ServerItemUpdatedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ServerLayoutUpdatedSignalInfo-#endif-#if ENABLE_OVERLOADING-data ServerGetIconPathsMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerGetStatusMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerGetTextDirectionMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerSetIconPathsMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerSetRootMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerSetStatusMethodInfo-#endif-#if ENABLE_OVERLOADING-data ServerSetTextDirectionMethodInfo-#endif
README.md view
@@ -1,6 +1,6 @@ # Documentation Autogenerated documentation for this package can be found at -[https://hackage.haskell.org/package/gi-dbusmenu-0.4.3/docs/GI-Dbusmenu.html](https://hackage.haskell.org/package/gi-dbusmenu-0.4.3/docs/GI-Dbusmenu.html)+[https://hackage.haskell.org/package/gi-dbusmenu-0.4.4/docs/GI-Dbusmenu.html](https://hackage.haskell.org/package/gi-dbusmenu-0.4.4/docs/GI-Dbusmenu.html) For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
@@ -1,5 +1,5 @@ name: gi-dbusmenu-version: 0.4.3+version: 0.4.4 synopsis: Dbusmenu bindings description: Bindings for libdbusmenu, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -42,6 +42,16 @@ build-depends: haskell-gi-overloading == 0.0 exposed-modules: GI.Dbusmenu,+ GI.Dbusmenu.Callbacks,+ GI.Dbusmenu.Constants,+ GI.Dbusmenu.Enums,+ GI.Dbusmenu.Objects,+ GI.Dbusmenu.Objects.Client,+ GI.Dbusmenu.Objects.Menuitem,+ GI.Dbusmenu.Objects.MenuitemProxy,+ GI.Dbusmenu.Objects.Server++ autogen-modules: GI.Dbusmenu, GI.Dbusmenu.Callbacks, GI.Dbusmenu.Constants, GI.Dbusmenu.Enums,