{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.ActionGroup
(
ActionGroup(..) ,
IsActionGroup ,
toActionGroup ,
#if defined(ENABLE_OVERLOADING)
ResolveActionGroupMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ActionGroupActionAddedMethodInfo ,
#endif
actionGroupActionAdded ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionEnabledChangedMethodInfo,
#endif
actionGroupActionEnabledChanged ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionRemovedMethodInfo ,
#endif
actionGroupActionRemoved ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionStateChangedMethodInfo ,
#endif
actionGroupActionStateChanged ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActivateActionMethodInfo ,
#endif
actionGroupActivateAction ,
#if defined(ENABLE_OVERLOADING)
ActionGroupChangeActionStateMethodInfo ,
#endif
actionGroupChangeActionState ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionEnabledMethodInfo ,
#endif
actionGroupGetActionEnabled ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionParameterTypeMethodInfo,
#endif
actionGroupGetActionParameterType ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionStateMethodInfo ,
#endif
actionGroupGetActionState ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionStateHintMethodInfo ,
#endif
actionGroupGetActionStateHint ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionStateTypeMethodInfo ,
#endif
actionGroupGetActionStateType ,
#if defined(ENABLE_OVERLOADING)
ActionGroupHasActionMethodInfo ,
#endif
actionGroupHasAction ,
#if defined(ENABLE_OVERLOADING)
ActionGroupListActionsMethodInfo ,
#endif
actionGroupListActions ,
#if defined(ENABLE_OVERLOADING)
ActionGroupQueryActionMethodInfo ,
#endif
actionGroupQueryAction ,
ActionGroupActionAddedCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionAddedSignalInfo ,
#endif
afterActionGroupActionAdded ,
onActionGroupActionAdded ,
ActionGroupActionEnabledChangedCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionEnabledChangedSignalInfo,
#endif
afterActionGroupActionEnabledChanged ,
onActionGroupActionEnabledChanged ,
ActionGroupActionRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionRemovedSignalInfo ,
#endif
afterActionGroupActionRemoved ,
onActionGroupActionRemoved ,
ActionGroupActionStateChangedCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupActionStateChangedSignalInfo ,
#endif
afterActionGroupActionStateChanged ,
onActionGroupActionStateChanged ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
#else
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
#endif
newtype ActionGroup = ActionGroup (SP.ManagedPtr ActionGroup)
deriving (ActionGroup -> ActionGroup -> Bool
(ActionGroup -> ActionGroup -> Bool)
-> (ActionGroup -> ActionGroup -> Bool) -> Eq ActionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionGroup -> ActionGroup -> Bool
== :: ActionGroup -> ActionGroup -> Bool
$c/= :: ActionGroup -> ActionGroup -> Bool
/= :: ActionGroup -> ActionGroup -> Bool
Eq)
instance SP.ManagedPtrNewtype ActionGroup where
toManagedPtr :: ActionGroup -> ManagedPtr ActionGroup
toManagedPtr (ActionGroup ManagedPtr ActionGroup
p) = ManagedPtr ActionGroup
p
foreign import ccall "g_action_group_get_type"
c_g_action_group_get_type :: IO B.Types.GType
instance B.Types.TypedObject ActionGroup where
glibType :: IO GType
glibType = IO GType
c_g_action_group_get_type
instance B.Types.GObject ActionGroup
class (SP.GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance (SP.GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance O.HasParentTypes ActionGroup
type instance O.ParentTypes ActionGroup = '[GObject.Object.Object]
toActionGroup :: (MIO.MonadIO m, IsActionGroup o) => o -> m ActionGroup
toActionGroup :: forall (m :: * -> *) o.
(MonadIO m, IsActionGroup o) =>
o -> m ActionGroup
toActionGroup = IO ActionGroup -> m ActionGroup
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ActionGroup -> m ActionGroup)
-> (o -> IO ActionGroup) -> o -> m ActionGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ActionGroup -> ActionGroup) -> o -> IO ActionGroup
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ActionGroup -> ActionGroup
ActionGroup
instance B.GValue.IsGValue (Maybe ActionGroup) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_action_group_get_type
gvalueSet_ :: Ptr GValue -> Maybe ActionGroup -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ActionGroup
P.Nothing = Ptr GValue -> Ptr ActionGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ActionGroup
forall a. Ptr a
FP.nullPtr :: FP.Ptr ActionGroup)
gvalueSet_ Ptr GValue
gv (P.Just ActionGroup
obj) = ActionGroup -> (Ptr ActionGroup -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ActionGroup
obj (Ptr GValue -> Ptr ActionGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe ActionGroup)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr ActionGroup)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ActionGroup)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject ActionGroup ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ActionGroup
type instance O.AttributeList ActionGroup = ActionGroupAttributeList
type ActionGroupAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveActionGroupMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveActionGroupMethod "actionAdded" o = ActionGroupActionAddedMethodInfo
ResolveActionGroupMethod "actionEnabledChanged" o = ActionGroupActionEnabledChangedMethodInfo
ResolveActionGroupMethod "actionRemoved" o = ActionGroupActionRemovedMethodInfo
ResolveActionGroupMethod "actionStateChanged" o = ActionGroupActionStateChangedMethodInfo
ResolveActionGroupMethod "activateAction" o = ActionGroupActivateActionMethodInfo
ResolveActionGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveActionGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveActionGroupMethod "changeActionState" o = ActionGroupChangeActionStateMethodInfo
ResolveActionGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveActionGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveActionGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveActionGroupMethod "hasAction" o = ActionGroupHasActionMethodInfo
ResolveActionGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveActionGroupMethod "listActions" o = ActionGroupListActionsMethodInfo
ResolveActionGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveActionGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveActionGroupMethod "queryAction" o = ActionGroupQueryActionMethodInfo
ResolveActionGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveActionGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveActionGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveActionGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveActionGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveActionGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveActionGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveActionGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveActionGroupMethod "getActionEnabled" o = ActionGroupGetActionEnabledMethodInfo
ResolveActionGroupMethod "getActionParameterType" o = ActionGroupGetActionParameterTypeMethodInfo
ResolveActionGroupMethod "getActionState" o = ActionGroupGetActionStateMethodInfo
ResolveActionGroupMethod "getActionStateHint" o = ActionGroupGetActionStateHintMethodInfo
ResolveActionGroupMethod "getActionStateType" o = ActionGroupGetActionStateTypeMethodInfo
ResolveActionGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveActionGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveActionGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveActionGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveActionGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveActionGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveActionGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.OverloadedMethod info ActionGroup p) => OL.IsLabel t (ActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.OverloadedMethod info ActionGroup p, R.HasField t ActionGroup p) => R.HasField t ActionGroup p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.OverloadedMethodInfo info ActionGroup) => OL.IsLabel t (O.MethodProxy info ActionGroup) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "g_action_group_action_added" g_action_group_action_added ::
Ptr ActionGroup ->
CString ->
IO ()
actionGroupActionAdded ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m ()
actionGroupActionAdded :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m ()
actionGroupActionAdded a
actionGroup Text
actionName = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
g_action_group_action_added actionGroup' actionName'
touchManagedPtr actionGroup
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionAddedMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupActionAddedMethodInfo a signature where
overloadedMethod = actionGroupActionAdded
instance O.OverloadedMethodInfo ActionGroupActionAddedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupActionAdded",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupActionAdded"
})
#endif
foreign import ccall "g_action_group_action_enabled_changed" g_action_group_action_enabled_changed ::
Ptr ActionGroup ->
CString ->
CInt ->
IO ()
actionGroupActionEnabledChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> Bool
-> m ()
actionGroupActionEnabledChanged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> Bool -> m ()
actionGroupActionEnabledChanged a
actionGroup Text
actionName Bool
enabled = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
let enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
enabled
g_action_group_action_enabled_changed actionGroup' actionName' enabled'
touchManagedPtr actionGroup
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionEnabledChangedMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupActionEnabledChangedMethodInfo a signature where
overloadedMethod = actionGroupActionEnabledChanged
instance O.OverloadedMethodInfo ActionGroupActionEnabledChangedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupActionEnabledChanged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupActionEnabledChanged"
})
#endif
foreign import ccall "g_action_group_action_removed" g_action_group_action_removed ::
Ptr ActionGroup ->
CString ->
IO ()
actionGroupActionRemoved ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m ()
actionGroupActionRemoved :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m ()
actionGroupActionRemoved a
actionGroup Text
actionName = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
g_action_group_action_removed actionGroup' actionName'
touchManagedPtr actionGroup
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionRemovedMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupActionRemovedMethodInfo a signature where
overloadedMethod = actionGroupActionRemoved
instance O.OverloadedMethodInfo ActionGroupActionRemovedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupActionRemoved",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupActionRemoved"
})
#endif
foreign import ccall "g_action_group_action_state_changed" g_action_group_action_state_changed ::
Ptr ActionGroup ->
CString ->
Ptr GVariant ->
IO ()
actionGroupActionStateChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> GVariant
-> m ()
actionGroupActionStateChanged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> GVariant -> m ()
actionGroupActionStateChanged a
actionGroup Text
actionName GVariant
state = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
state' <- unsafeManagedPtrGetPtr state
g_action_group_action_state_changed actionGroup' actionName' state'
touchManagedPtr actionGroup
touchManagedPtr state
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionStateChangedMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupActionStateChangedMethodInfo a signature where
overloadedMethod = actionGroupActionStateChanged
instance O.OverloadedMethodInfo ActionGroupActionStateChangedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupActionStateChanged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupActionStateChanged"
})
#endif
foreign import ccall "g_action_group_activate_action" g_action_group_activate_action ::
Ptr ActionGroup ->
CString ->
Ptr GVariant ->
IO ()
actionGroupActivateAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> Maybe (GVariant)
-> m ()
actionGroupActivateAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> Maybe GVariant -> m ()
actionGroupActivateAction a
actionGroup Text
actionName Maybe GVariant
parameter = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
maybeParameter <- case parameter of
Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
FP.nullPtr
Just GVariant
jParameter -> do
jParameter' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameter
return jParameter'
g_action_group_activate_action actionGroup' actionName' maybeParameter
touchManagedPtr actionGroup
whenJust parameter touchManagedPtr
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupActivateActionMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupActivateActionMethodInfo a signature where
overloadedMethod = actionGroupActivateAction
instance O.OverloadedMethodInfo ActionGroupActivateActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupActivateAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupActivateAction"
})
#endif
foreign import ccall "g_action_group_change_action_state" g_action_group_change_action_state ::
Ptr ActionGroup ->
CString ->
Ptr GVariant ->
IO ()
actionGroupChangeActionState ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> GVariant
-> m ()
actionGroupChangeActionState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> GVariant -> m ()
actionGroupChangeActionState a
actionGroup Text
actionName GVariant
value = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
value' <- unsafeManagedPtrGetPtr value
g_action_group_change_action_state actionGroup' actionName' value'
touchManagedPtr actionGroup
touchManagedPtr value
freeMem actionName'
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupChangeActionStateMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupChangeActionStateMethodInfo a signature where
overloadedMethod = actionGroupChangeActionState
instance O.OverloadedMethodInfo ActionGroupChangeActionStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupChangeActionState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupChangeActionState"
})
#endif
foreign import ccall "g_action_group_get_action_enabled" g_action_group_get_action_enabled ::
Ptr ActionGroup ->
CString ->
IO CInt
actionGroupGetActionEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m Bool
actionGroupGetActionEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m Bool
actionGroupGetActionEnabled a
actionGroup Text
actionName = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_get_action_enabled actionGroup' actionName'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr actionGroup
freeMem actionName'
return result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionEnabledMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionEnabledMethodInfo a signature where
overloadedMethod = actionGroupGetActionEnabled
instance O.OverloadedMethodInfo ActionGroupGetActionEnabledMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupGetActionEnabled",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupGetActionEnabled"
})
#endif
foreign import ccall "g_action_group_get_action_parameter_type" g_action_group_get_action_parameter_type ::
Ptr ActionGroup ->
CString ->
IO (Ptr GLib.VariantType.VariantType)
actionGroupGetActionParameterType ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m (Maybe GLib.VariantType.VariantType)
actionGroupGetActionParameterType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m (Maybe VariantType)
actionGroupGetActionParameterType a
actionGroup Text
actionName = IO (Maybe VariantType) -> m (Maybe VariantType)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VariantType) -> m (Maybe VariantType))
-> IO (Maybe VariantType) -> m (Maybe VariantType)
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_get_action_parameter_type actionGroup' actionName'
maybeResult <- convertIfNonNull result $ \Ptr VariantType
result' -> do
result'' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
GLib.VariantType.VariantType) Ptr VariantType
result'
return result''
touchManagedPtr actionGroup
freeMem actionName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionParameterTypeMethodInfo
instance (signature ~ (T.Text -> m (Maybe GLib.VariantType.VariantType)), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionParameterTypeMethodInfo a signature where
overloadedMethod = actionGroupGetActionParameterType
instance O.OverloadedMethodInfo ActionGroupGetActionParameterTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupGetActionParameterType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupGetActionParameterType"
})
#endif
foreign import ccall "g_action_group_get_action_state" g_action_group_get_action_state ::
Ptr ActionGroup ->
CString ->
IO (Ptr GVariant)
actionGroupGetActionState ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m (Maybe GVariant)
actionGroupGetActionState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m (Maybe GVariant)
actionGroupGetActionState a
actionGroup Text
actionName = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_get_action_state actionGroup' actionName'
maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
return result''
touchManagedPtr actionGroup
freeMem actionName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionStateMethodInfo
instance (signature ~ (T.Text -> m (Maybe GVariant)), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionStateMethodInfo a signature where
overloadedMethod = actionGroupGetActionState
instance O.OverloadedMethodInfo ActionGroupGetActionStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupGetActionState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupGetActionState"
})
#endif
foreign import ccall "g_action_group_get_action_state_hint" g_action_group_get_action_state_hint ::
Ptr ActionGroup ->
CString ->
IO (Ptr GVariant)
actionGroupGetActionStateHint ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m (Maybe GVariant)
actionGroupGetActionStateHint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m (Maybe GVariant)
actionGroupGetActionStateHint a
actionGroup Text
actionName = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_get_action_state_hint actionGroup' actionName'
maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
return result''
touchManagedPtr actionGroup
freeMem actionName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionStateHintMethodInfo
instance (signature ~ (T.Text -> m (Maybe GVariant)), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionStateHintMethodInfo a signature where
overloadedMethod = actionGroupGetActionStateHint
instance O.OverloadedMethodInfo ActionGroupGetActionStateHintMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupGetActionStateHint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupGetActionStateHint"
})
#endif
foreign import ccall "g_action_group_get_action_state_type" g_action_group_get_action_state_type ::
Ptr ActionGroup ->
CString ->
IO (Ptr GLib.VariantType.VariantType)
actionGroupGetActionStateType ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m (Maybe GLib.VariantType.VariantType)
actionGroupGetActionStateType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m (Maybe VariantType)
actionGroupGetActionStateType a
actionGroup Text
actionName = IO (Maybe VariantType) -> m (Maybe VariantType)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VariantType) -> m (Maybe VariantType))
-> IO (Maybe VariantType) -> m (Maybe VariantType)
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_get_action_state_type actionGroup' actionName'
maybeResult <- convertIfNonNull result $ \Ptr VariantType
result' -> do
result'' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
GLib.VariantType.VariantType) Ptr VariantType
result'
return result''
touchManagedPtr actionGroup
freeMem actionName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionStateTypeMethodInfo
instance (signature ~ (T.Text -> m (Maybe GLib.VariantType.VariantType)), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionStateTypeMethodInfo a signature where
overloadedMethod = actionGroupGetActionStateType
instance O.OverloadedMethodInfo ActionGroupGetActionStateTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupGetActionStateType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupGetActionStateType"
})
#endif
foreign import ccall "g_action_group_has_action" g_action_group_has_action ::
Ptr ActionGroup ->
CString ->
IO CInt
actionGroupHasAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m Bool
actionGroupHasAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m Bool
actionGroupHasAction a
actionGroup Text
actionName = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
result <- g_action_group_has_action actionGroup' actionName'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr actionGroup
freeMem actionName'
return result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupHasActionMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupHasActionMethodInfo a signature where
overloadedMethod = actionGroupHasAction
instance O.OverloadedMethodInfo ActionGroupHasActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupHasAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupHasAction"
})
#endif
foreign import ccall "g_action_group_list_actions" g_action_group_list_actions ::
Ptr ActionGroup ->
IO (Ptr CString)
actionGroupListActions ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m [T.Text]
actionGroupListActions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m [Text]
actionGroupListActions a
actionGroup = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
result <- g_action_group_list_actions actionGroup'
checkUnexpectedReturnNULL "actionGroupListActions" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr actionGroup
return result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupListActionsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupListActionsMethodInfo a signature where
overloadedMethod = actionGroupListActions
instance O.OverloadedMethodInfo ActionGroupListActionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupListActions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupListActions"
})
#endif
foreign import ccall "g_action_group_query_action" g_action_group_query_action ::
Ptr ActionGroup ->
CString ->
Ptr CInt ->
Ptr (Ptr GLib.VariantType.VariantType) ->
Ptr (Ptr GLib.VariantType.VariantType) ->
Ptr (Ptr GVariant) ->
Ptr (Ptr GVariant) ->
IO CInt
actionGroupQueryAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m ((Bool, Bool, GLib.VariantType.VariantType, GLib.VariantType.VariantType, GVariant, GVariant))
actionGroupQueryAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> Text
-> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
actionGroupQueryAction a
actionGroup Text
actionName = IO (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
-> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
-> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant))
-> IO (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
-> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
forall a b. (a -> b) -> a -> b
$ do
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
actionName' <- textToCString actionName
enabled <- allocMem :: IO (Ptr CInt)
parameterType <- callocMem :: IO (Ptr (Ptr GLib.VariantType.VariantType))
stateType <- callocMem :: IO (Ptr (Ptr GLib.VariantType.VariantType))
stateHint <- callocMem :: IO (Ptr (Ptr GVariant))
state <- callocMem :: IO (Ptr (Ptr GVariant))
result <- g_action_group_query_action actionGroup' actionName' enabled parameterType stateType stateHint state
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
enabled' <- peek enabled
let enabled'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
enabled'
parameterType' <- peek parameterType
parameterType'' <- (newBoxed GLib.VariantType.VariantType) parameterType'
stateType' <- peek stateType
stateType'' <- (newBoxed GLib.VariantType.VariantType) stateType'
stateHint' <- peek stateHint
stateHint'' <- B.GVariant.wrapGVariantPtr stateHint'
state' <- peek state
state'' <- B.GVariant.wrapGVariantPtr state'
touchManagedPtr actionGroup
freeMem actionName'
freeMem enabled
freeMem parameterType
freeMem stateType
freeMem stateHint
freeMem state
return (result', enabled'', parameterType'', stateType'', stateHint'', state'')
#if defined(ENABLE_OVERLOADING)
data ActionGroupQueryActionMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Bool, GLib.VariantType.VariantType, GLib.VariantType.VariantType, GVariant, GVariant))), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupQueryActionMethodInfo a signature where
overloadedMethod = actionGroupQueryAction
instance O.OverloadedMethodInfo ActionGroupQueryActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup.actionGroupQueryAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#v:actionGroupQueryAction"
})
#endif
type ActionGroupActionAddedCallback =
T.Text
-> IO ()
type C_ActionGroupActionAddedCallback =
Ptr ActionGroup ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupActionAddedCallback :: C_ActionGroupActionAddedCallback -> IO (FunPtr C_ActionGroupActionAddedCallback)
wrap_ActionGroupActionAddedCallback ::
GObject a => (a -> ActionGroupActionAddedCallback) ->
C_ActionGroupActionAddedCallback
wrap_ActionGroupActionAddedCallback :: forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionAddedCallback a -> ActionGroupActionAddedCallback
gi'cb Ptr ActionGroup
gi'selfPtr CString
actionName Ptr ()
_ = do
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
B.ManagedPtr.withNewObject gi'selfPtr $ \ActionGroup
gi'self -> a -> ActionGroupActionAddedCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Text
actionName'
onActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionAddedCallback) -> m SignalHandlerId
onActionGroupActionAdded :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionAddedCallback)
-> m SignalHandlerId
onActionGroupActionAdded a
obj Maybe Text
detail (?self::a) => ActionGroupActionAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionAddedCallback
ActionGroupActionAddedCallback
cb
let wrapped' :: C_ActionGroupActionAddedCallback
wrapped' = (a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionAddedCallback a -> ActionGroupActionAddedCallback
wrapped
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionAddedCallback C_ActionGroupActionAddedCallback
wrapped'
connectSignalFunPtr obj "action-added" wrapped'' SignalConnectBefore detail
afterActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionAddedCallback) -> m SignalHandlerId
afterActionGroupActionAdded :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionAddedCallback)
-> m SignalHandlerId
afterActionGroupActionAdded a
obj Maybe Text
detail (?self::a) => ActionGroupActionAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionAddedCallback
ActionGroupActionAddedCallback
cb
let wrapped' :: C_ActionGroupActionAddedCallback
wrapped' = (a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionAddedCallback a -> ActionGroupActionAddedCallback
wrapped
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionAddedCallback C_ActionGroupActionAddedCallback
wrapped'
connectSignalFunPtr obj "action-added" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionAddedSignalInfo
instance SignalInfo ActionGroupActionAddedSignalInfo where
type HaskellCallbackType ActionGroupActionAddedSignalInfo = ActionGroupActionAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupActionAddedCallback cb
cb'' <- mk_ActionGroupActionAddedCallback cb'
connectSignalFunPtr obj "action-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup::action-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#g:signal:actionAdded"})
#endif
type ActionGroupActionEnabledChangedCallback =
T.Text
-> Bool
-> IO ()
type C_ActionGroupActionEnabledChangedCallback =
Ptr ActionGroup ->
CString ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupActionEnabledChangedCallback :: C_ActionGroupActionEnabledChangedCallback -> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
wrap_ActionGroupActionEnabledChangedCallback ::
GObject a => (a -> ActionGroupActionEnabledChangedCallback) ->
C_ActionGroupActionEnabledChangedCallback
wrap_ActionGroupActionEnabledChangedCallback :: forall a.
GObject a =>
(a -> ActionGroupActionEnabledChangedCallback)
-> C_ActionGroupActionEnabledChangedCallback
wrap_ActionGroupActionEnabledChangedCallback a -> ActionGroupActionEnabledChangedCallback
gi'cb Ptr ActionGroup
gi'selfPtr CString
actionName CInt
enabled Ptr ()
_ = do
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
let enabled' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
enabled
B.ManagedPtr.withNewObject gi'selfPtr $ \ActionGroup
gi'self -> a -> ActionGroupActionEnabledChangedCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Text
actionName' Bool
enabled'
onActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionEnabledChangedCallback) -> m SignalHandlerId
onActionGroupActionEnabledChanged :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionEnabledChangedCallback)
-> m SignalHandlerId
onActionGroupActionEnabledChanged a
obj Maybe Text
detail (?self::a) => ActionGroupActionEnabledChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionEnabledChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionEnabledChangedCallback
ActionGroupActionEnabledChangedCallback
cb
let wrapped' :: C_ActionGroupActionEnabledChangedCallback
wrapped' = (a -> ActionGroupActionEnabledChangedCallback)
-> C_ActionGroupActionEnabledChangedCallback
forall a.
GObject a =>
(a -> ActionGroupActionEnabledChangedCallback)
-> C_ActionGroupActionEnabledChangedCallback
wrap_ActionGroupActionEnabledChangedCallback a -> ActionGroupActionEnabledChangedCallback
wrapped
wrapped'' <- C_ActionGroupActionEnabledChangedCallback
-> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
mk_ActionGroupActionEnabledChangedCallback C_ActionGroupActionEnabledChangedCallback
wrapped'
connectSignalFunPtr obj "action-enabled-changed" wrapped'' SignalConnectBefore detail
afterActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionEnabledChangedCallback) -> m SignalHandlerId
afterActionGroupActionEnabledChanged :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionEnabledChangedCallback)
-> m SignalHandlerId
afterActionGroupActionEnabledChanged a
obj Maybe Text
detail (?self::a) => ActionGroupActionEnabledChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionEnabledChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionEnabledChangedCallback
ActionGroupActionEnabledChangedCallback
cb
let wrapped' :: C_ActionGroupActionEnabledChangedCallback
wrapped' = (a -> ActionGroupActionEnabledChangedCallback)
-> C_ActionGroupActionEnabledChangedCallback
forall a.
GObject a =>
(a -> ActionGroupActionEnabledChangedCallback)
-> C_ActionGroupActionEnabledChangedCallback
wrap_ActionGroupActionEnabledChangedCallback a -> ActionGroupActionEnabledChangedCallback
wrapped
wrapped'' <- C_ActionGroupActionEnabledChangedCallback
-> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
mk_ActionGroupActionEnabledChangedCallback C_ActionGroupActionEnabledChangedCallback
wrapped'
connectSignalFunPtr obj "action-enabled-changed" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionEnabledChangedSignalInfo
instance SignalInfo ActionGroupActionEnabledChangedSignalInfo where
type HaskellCallbackType ActionGroupActionEnabledChangedSignalInfo = ActionGroupActionEnabledChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupActionEnabledChangedCallback cb
cb'' <- mk_ActionGroupActionEnabledChangedCallback cb'
connectSignalFunPtr obj "action-enabled-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup::action-enabled-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#g:signal:actionEnabledChanged"})
#endif
type ActionGroupActionRemovedCallback =
T.Text
-> IO ()
type C_ActionGroupActionRemovedCallback =
Ptr ActionGroup ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupActionRemovedCallback :: C_ActionGroupActionRemovedCallback -> IO (FunPtr C_ActionGroupActionRemovedCallback)
wrap_ActionGroupActionRemovedCallback ::
GObject a => (a -> ActionGroupActionRemovedCallback) ->
C_ActionGroupActionRemovedCallback
wrap_ActionGroupActionRemovedCallback :: forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionRemovedCallback a -> ActionGroupActionAddedCallback
gi'cb Ptr ActionGroup
gi'selfPtr CString
actionName Ptr ()
_ = do
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
B.ManagedPtr.withNewObject gi'selfPtr $ \ActionGroup
gi'self -> a -> ActionGroupActionAddedCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Text
actionName'
onActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId
onActionGroupActionRemoved :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionAddedCallback)
-> m SignalHandlerId
onActionGroupActionRemoved a
obj Maybe Text
detail (?self::a) => ActionGroupActionAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionAddedCallback
ActionGroupActionAddedCallback
cb
let wrapped' :: C_ActionGroupActionAddedCallback
wrapped' = (a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionRemovedCallback a -> ActionGroupActionAddedCallback
wrapped
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionRemovedCallback C_ActionGroupActionAddedCallback
wrapped'
connectSignalFunPtr obj "action-removed" wrapped'' SignalConnectBefore detail
afterActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId
afterActionGroupActionRemoved :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionAddedCallback)
-> m SignalHandlerId
afterActionGroupActionRemoved a
obj Maybe Text
detail (?self::a) => ActionGroupActionAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionAddedCallback
ActionGroupActionAddedCallback
cb
let wrapped' :: C_ActionGroupActionAddedCallback
wrapped' = (a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
forall a.
GObject a =>
(a -> ActionGroupActionAddedCallback)
-> C_ActionGroupActionAddedCallback
wrap_ActionGroupActionRemovedCallback a -> ActionGroupActionAddedCallback
wrapped
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionRemovedCallback C_ActionGroupActionAddedCallback
wrapped'
connectSignalFunPtr obj "action-removed" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionRemovedSignalInfo
instance SignalInfo ActionGroupActionRemovedSignalInfo where
type HaskellCallbackType ActionGroupActionRemovedSignalInfo = ActionGroupActionRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupActionRemovedCallback cb
cb'' <- mk_ActionGroupActionRemovedCallback cb'
connectSignalFunPtr obj "action-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup::action-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#g:signal:actionRemoved"})
#endif
type ActionGroupActionStateChangedCallback =
T.Text
-> GVariant
-> IO ()
type C_ActionGroupActionStateChangedCallback =
Ptr ActionGroup ->
CString ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupActionStateChangedCallback :: C_ActionGroupActionStateChangedCallback -> IO (FunPtr C_ActionGroupActionStateChangedCallback)
wrap_ActionGroupActionStateChangedCallback ::
GObject a => (a -> ActionGroupActionStateChangedCallback) ->
C_ActionGroupActionStateChangedCallback
wrap_ActionGroupActionStateChangedCallback :: forall a.
GObject a =>
(a -> ActionGroupActionStateChangedCallback)
-> C_ActionGroupActionStateChangedCallback
wrap_ActionGroupActionStateChangedCallback a -> ActionGroupActionStateChangedCallback
gi'cb Ptr ActionGroup
gi'selfPtr CString
actionName Ptr GVariant
value Ptr ()
_ = do
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
value' <- B.GVariant.newGVariantFromPtr value
B.ManagedPtr.withNewObject gi'selfPtr $ \ActionGroup
gi'self -> a -> ActionGroupActionStateChangedCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Text
actionName' GVariant
value'
onActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionStateChangedCallback) -> m SignalHandlerId
onActionGroupActionStateChanged :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionStateChangedCallback)
-> m SignalHandlerId
onActionGroupActionStateChanged a
obj Maybe Text
detail (?self::a) => ActionGroupActionStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionStateChangedCallback
ActionGroupActionStateChangedCallback
cb
let wrapped' :: C_ActionGroupActionStateChangedCallback
wrapped' = (a -> ActionGroupActionStateChangedCallback)
-> C_ActionGroupActionStateChangedCallback
forall a.
GObject a =>
(a -> ActionGroupActionStateChangedCallback)
-> C_ActionGroupActionStateChangedCallback
wrap_ActionGroupActionStateChangedCallback a -> ActionGroupActionStateChangedCallback
wrapped
wrapped'' <- C_ActionGroupActionStateChangedCallback
-> IO (FunPtr C_ActionGroupActionStateChangedCallback)
mk_ActionGroupActionStateChangedCallback C_ActionGroupActionStateChangedCallback
wrapped'
connectSignalFunPtr obj "action-state-changed" wrapped'' SignalConnectBefore detail
afterActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => ActionGroupActionStateChangedCallback) -> m SignalHandlerId
afterActionGroupActionStateChanged :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => ActionGroupActionStateChangedCallback)
-> m SignalHandlerId
afterActionGroupActionStateChanged a
obj Maybe Text
detail (?self::a) => ActionGroupActionStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupActionStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupActionStateChangedCallback
ActionGroupActionStateChangedCallback
cb
let wrapped' :: C_ActionGroupActionStateChangedCallback
wrapped' = (a -> ActionGroupActionStateChangedCallback)
-> C_ActionGroupActionStateChangedCallback
forall a.
GObject a =>
(a -> ActionGroupActionStateChangedCallback)
-> C_ActionGroupActionStateChangedCallback
wrap_ActionGroupActionStateChangedCallback a -> ActionGroupActionStateChangedCallback
wrapped
wrapped'' <- C_ActionGroupActionStateChangedCallback
-> IO (FunPtr C_ActionGroupActionStateChangedCallback)
mk_ActionGroupActionStateChangedCallback C_ActionGroupActionStateChangedCallback
wrapped'
connectSignalFunPtr obj "action-state-changed" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data ActionGroupActionStateChangedSignalInfo
instance SignalInfo ActionGroupActionStateChangedSignalInfo where
type HaskellCallbackType ActionGroupActionStateChangedSignalInfo = ActionGroupActionStateChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupActionStateChangedCallback cb
cb'' <- mk_ActionGroupActionStateChangedCallback cb'
connectSignalFunPtr obj "action-state-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.ActionGroup::action-state-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-ActionGroup.html#g:signal:actionStateChanged"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ActionGroup = ActionGroupSignalList
type ActionGroupSignalList = ('[ '("actionAdded", ActionGroupActionAddedSignalInfo), '("actionEnabledChanged", ActionGroupActionEnabledChangedSignalInfo), '("actionRemoved", ActionGroupActionRemovedSignalInfo), '("actionStateChanged", ActionGroupActionStateChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif