#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.SimpleActionGroup
(
SimpleActionGroup(..) ,
IsSimpleActionGroup ,
toSimpleActionGroup ,
noSimpleActionGroup ,
#if ENABLE_OVERLOADING
SimpleActionGroupAddEntriesMethodInfo ,
#endif
simpleActionGroupAddEntries ,
#if ENABLE_OVERLOADING
SimpleActionGroupInsertMethodInfo ,
#endif
simpleActionGroupInsert ,
#if ENABLE_OVERLOADING
SimpleActionGroupLookupMethodInfo ,
#endif
simpleActionGroupLookup ,
simpleActionGroupNew ,
#if ENABLE_OVERLOADING
SimpleActionGroupRemoveMethodInfo ,
#endif
simpleActionGroupRemove ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Action as Gio.Action
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionMap as Gio.ActionMap
import {-# SOURCE #-} qualified GI.Gio.Structs.ActionEntry as Gio.ActionEntry
newtype SimpleActionGroup = SimpleActionGroup (ManagedPtr SimpleActionGroup)
foreign import ccall "g_simple_action_group_get_type"
c_g_simple_action_group_get_type :: IO GType
instance GObject SimpleActionGroup where
gobjectType _ = c_g_simple_action_group_get_type
class GObject o => IsSimpleActionGroup o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError SimpleActionGroup a) =>
IsSimpleActionGroup a
#endif
instance IsSimpleActionGroup SimpleActionGroup
instance GObject.Object.IsObject SimpleActionGroup
instance Gio.ActionGroup.IsActionGroup SimpleActionGroup
instance Gio.ActionMap.IsActionMap SimpleActionGroup
toSimpleActionGroup :: (MonadIO m, IsSimpleActionGroup o) => o -> m SimpleActionGroup
toSimpleActionGroup = liftIO . unsafeCastTo SimpleActionGroup
noSimpleActionGroup :: Maybe SimpleActionGroup
noSimpleActionGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveSimpleActionGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveSimpleActionGroupMethod "actionAdded" o = Gio.ActionGroup.ActionGroupActionAddedMethodInfo
ResolveSimpleActionGroupMethod "actionEnabledChanged" o = Gio.ActionGroup.ActionGroupActionEnabledChangedMethodInfo
ResolveSimpleActionGroupMethod "actionRemoved" o = Gio.ActionGroup.ActionGroupActionRemovedMethodInfo
ResolveSimpleActionGroupMethod "actionStateChanged" o = Gio.ActionGroup.ActionGroupActionStateChangedMethodInfo
ResolveSimpleActionGroupMethod "activateAction" o = Gio.ActionGroup.ActionGroupActivateActionMethodInfo
ResolveSimpleActionGroupMethod "addAction" o = Gio.ActionMap.ActionMapAddActionMethodInfo
ResolveSimpleActionGroupMethod "addActionEntries" o = Gio.ActionMap.ActionMapAddActionEntriesMethodInfo
ResolveSimpleActionGroupMethod "addEntries" o = SimpleActionGroupAddEntriesMethodInfo
ResolveSimpleActionGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSimpleActionGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSimpleActionGroupMethod "changeActionState" o = Gio.ActionGroup.ActionGroupChangeActionStateMethodInfo
ResolveSimpleActionGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSimpleActionGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSimpleActionGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSimpleActionGroupMethod "hasAction" o = Gio.ActionGroup.ActionGroupHasActionMethodInfo
ResolveSimpleActionGroupMethod "insert" o = SimpleActionGroupInsertMethodInfo
ResolveSimpleActionGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSimpleActionGroupMethod "listActions" o = Gio.ActionGroup.ActionGroupListActionsMethodInfo
ResolveSimpleActionGroupMethod "lookup" o = SimpleActionGroupLookupMethodInfo
ResolveSimpleActionGroupMethod "lookupAction" o = Gio.ActionMap.ActionMapLookupActionMethodInfo
ResolveSimpleActionGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSimpleActionGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSimpleActionGroupMethod "queryAction" o = Gio.ActionGroup.ActionGroupQueryActionMethodInfo
ResolveSimpleActionGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSimpleActionGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSimpleActionGroupMethod "remove" o = SimpleActionGroupRemoveMethodInfo
ResolveSimpleActionGroupMethod "removeAction" o = Gio.ActionMap.ActionMapRemoveActionMethodInfo
ResolveSimpleActionGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSimpleActionGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSimpleActionGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSimpleActionGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSimpleActionGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSimpleActionGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSimpleActionGroupMethod "getActionEnabled" o = Gio.ActionGroup.ActionGroupGetActionEnabledMethodInfo
ResolveSimpleActionGroupMethod "getActionParameterType" o = Gio.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo
ResolveSimpleActionGroupMethod "getActionState" o = Gio.ActionGroup.ActionGroupGetActionStateMethodInfo
ResolveSimpleActionGroupMethod "getActionStateHint" o = Gio.ActionGroup.ActionGroupGetActionStateHintMethodInfo
ResolveSimpleActionGroupMethod "getActionStateType" o = Gio.ActionGroup.ActionGroupGetActionStateTypeMethodInfo
ResolveSimpleActionGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSimpleActionGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSimpleActionGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSimpleActionGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSimpleActionGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSimpleActionGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSimpleActionGroupMethod t SimpleActionGroup, O.MethodInfo info SimpleActionGroup p) => O.IsLabelProxy t (SimpleActionGroup -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveSimpleActionGroupMethod t SimpleActionGroup, O.MethodInfo info SimpleActionGroup p) => O.IsLabel t (SimpleActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList SimpleActionGroup
type instance O.AttributeList SimpleActionGroup = SimpleActionGroupAttributeList
type SimpleActionGroupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList SimpleActionGroup = SimpleActionGroupSignalList
type SimpleActionGroupSignalList = ('[ '("actionAdded", Gio.ActionGroup.ActionGroupActionAddedSignalInfo), '("actionEnabledChanged", Gio.ActionGroup.ActionGroupActionEnabledChangedSignalInfo), '("actionRemoved", Gio.ActionGroup.ActionGroupActionRemovedSignalInfo), '("actionStateChanged", Gio.ActionGroup.ActionGroupActionStateChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_simple_action_group_new" g_simple_action_group_new ::
IO (Ptr SimpleActionGroup)
simpleActionGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m SimpleActionGroup
simpleActionGroupNew = liftIO $ do
result <- g_simple_action_group_new
checkUnexpectedReturnNULL "simpleActionGroupNew" result
result' <- (wrapObject SimpleActionGroup) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_simple_action_group_add_entries" g_simple_action_group_add_entries ::
Ptr SimpleActionGroup ->
Ptr Gio.ActionEntry.ActionEntry ->
Int32 ->
Ptr () ->
IO ()
{-# DEPRECATED simpleActionGroupAddEntries ["(Since version 2.38)","Use 'GI.Gio.Interfaces.ActionMap.actionMapAddActionEntries'"] #-}
simpleActionGroupAddEntries ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleActionGroup a) =>
a
-> [Gio.ActionEntry.ActionEntry]
-> Ptr ()
-> m ()
simpleActionGroupAddEntries simple entries userData = liftIO $ do
let nEntries = fromIntegral $ length entries
simple' <- unsafeManagedPtrCastPtr simple
entries' <- mapM unsafeManagedPtrGetPtr entries
entries'' <- packBlockArray 64 entries'
g_simple_action_group_add_entries simple' entries'' nEntries userData
touchManagedPtr simple
mapM_ touchManagedPtr entries
freeMem entries''
return ()
#if ENABLE_OVERLOADING
data SimpleActionGroupAddEntriesMethodInfo
instance (signature ~ ([Gio.ActionEntry.ActionEntry] -> Ptr () -> m ()), MonadIO m, IsSimpleActionGroup a) => O.MethodInfo SimpleActionGroupAddEntriesMethodInfo a signature where
overloadedMethod _ = simpleActionGroupAddEntries
#endif
foreign import ccall "g_simple_action_group_insert" g_simple_action_group_insert ::
Ptr SimpleActionGroup ->
Ptr Gio.Action.Action ->
IO ()
{-# DEPRECATED simpleActionGroupInsert ["(Since version 2.38)","Use 'GI.Gio.Interfaces.ActionMap.actionMapAddAction'"] #-}
simpleActionGroupInsert ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleActionGroup a, Gio.Action.IsAction b) =>
a
-> b
-> m ()
simpleActionGroupInsert simple action = liftIO $ do
simple' <- unsafeManagedPtrCastPtr simple
action' <- unsafeManagedPtrCastPtr action
g_simple_action_group_insert simple' action'
touchManagedPtr simple
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data SimpleActionGroupInsertMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSimpleActionGroup a, Gio.Action.IsAction b) => O.MethodInfo SimpleActionGroupInsertMethodInfo a signature where
overloadedMethod _ = simpleActionGroupInsert
#endif
foreign import ccall "g_simple_action_group_lookup" g_simple_action_group_lookup ::
Ptr SimpleActionGroup ->
CString ->
IO (Ptr Gio.Action.Action)
{-# DEPRECATED simpleActionGroupLookup ["(Since version 2.38)","Use 'GI.Gio.Interfaces.ActionMap.actionMapLookupAction'"] #-}
simpleActionGroupLookup ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleActionGroup a) =>
a
-> T.Text
-> m Gio.Action.Action
simpleActionGroupLookup simple actionName = liftIO $ do
simple' <- unsafeManagedPtrCastPtr simple
actionName' <- textToCString actionName
result <- g_simple_action_group_lookup simple' actionName'
checkUnexpectedReturnNULL "simpleActionGroupLookup" result
result' <- (newObject Gio.Action.Action) result
touchManagedPtr simple
freeMem actionName'
return result'
#if ENABLE_OVERLOADING
data SimpleActionGroupLookupMethodInfo
instance (signature ~ (T.Text -> m Gio.Action.Action), MonadIO m, IsSimpleActionGroup a) => O.MethodInfo SimpleActionGroupLookupMethodInfo a signature where
overloadedMethod _ = simpleActionGroupLookup
#endif
foreign import ccall "g_simple_action_group_remove" g_simple_action_group_remove ::
Ptr SimpleActionGroup ->
CString ->
IO ()
{-# DEPRECATED simpleActionGroupRemove ["(Since version 2.38)","Use 'GI.Gio.Interfaces.ActionMap.actionMapRemoveAction'"] #-}
simpleActionGroupRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleActionGroup a) =>
a
-> T.Text
-> m ()
simpleActionGroupRemove simple actionName = liftIO $ do
simple' <- unsafeManagedPtrCastPtr simple
actionName' <- textToCString actionName
g_simple_action_group_remove simple' actionName'
touchManagedPtr simple
freeMem actionName'
return ()
#if ENABLE_OVERLOADING
data SimpleActionGroupRemoveMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSimpleActionGroup a) => O.MethodInfo SimpleActionGroupRemoveMethodInfo a signature where
overloadedMethod _ = simpleActionGroupRemove
#endif