{-# 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 ActionGroup
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 ActionGroup
ptr Ptr ActionGroup -> Ptr ActionGroup -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ActionGroup
forall a. Ptr a
FP.nullPtr
then ActionGroup -> Maybe ActionGroup
forall a. a -> Maybe a
P.Just (ActionGroup -> Maybe ActionGroup)
-> IO ActionGroup -> IO (Maybe ActionGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ActionGroup -> ActionGroup)
-> Ptr ActionGroup -> IO ActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ActionGroup -> ActionGroup
ActionGroup Ptr ActionGroup
ptr
else Maybe ActionGroup -> IO (Maybe ActionGroup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ActionGroup
forall a. Maybe a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr ActionGroup -> CString -> IO ()
g_action_group_action_added Ptr ActionGroup
actionGroup' CString
actionName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
let enabled' :: CInt
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
Ptr ActionGroup -> CString -> CInt -> IO ()
g_action_group_action_enabled_changed Ptr ActionGroup
actionGroup' CString
actionName' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr ActionGroup -> CString -> IO ()
g_action_group_action_removed Ptr ActionGroup
actionGroup' CString
actionName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
state' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
state
Ptr ActionGroup -> CString -> Ptr GVariant -> IO ()
g_action_group_action_state_changed Ptr ActionGroup
actionGroup' CString
actionName' Ptr GVariant
state'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
maybeParameter <- case Maybe GVariant
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
Ptr GVariant
jParameter' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameter
Ptr GVariant -> IO (Ptr GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParameter'
Ptr ActionGroup -> CString -> Ptr GVariant -> IO ()
g_action_group_activate_action Ptr ActionGroup
actionGroup' CString
actionName' Ptr GVariant
maybeParameter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
parameter GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
value' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
value
Ptr ActionGroup -> CString -> Ptr GVariant -> IO ()
g_action_group_change_action_state Ptr ActionGroup
actionGroup' CString
actionName' Ptr GVariant
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
CInt
result <- Ptr ActionGroup -> CString -> IO CInt
g_action_group_get_action_enabled Ptr ActionGroup
actionGroup' CString
actionName'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr VariantType
result <- Ptr ActionGroup -> CString -> IO (Ptr VariantType)
g_action_group_get_action_parameter_type Ptr ActionGroup
actionGroup' CString
actionName'
Maybe VariantType
maybeResult <- Ptr VariantType
-> (Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VariantType
result ((Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType))
-> (Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType)
forall a b. (a -> b) -> a -> b
$ \Ptr VariantType
result' -> do
VariantType
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'
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Maybe VariantType -> IO (Maybe VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VariantType
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
result <- Ptr ActionGroup -> CString -> IO (Ptr GVariant)
g_action_group_get_action_state Ptr ActionGroup
actionGroup' CString
actionName'
Maybe GVariant
maybeResult <- Ptr GVariant
-> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GVariant
result ((Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant))
-> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ \Ptr GVariant
result' -> do
GVariant
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
GVariant -> IO GVariant
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Maybe GVariant -> IO (Maybe GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GVariant
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr GVariant
result <- Ptr ActionGroup -> CString -> IO (Ptr GVariant)
g_action_group_get_action_state_hint Ptr ActionGroup
actionGroup' CString
actionName'
Maybe GVariant
maybeResult <- Ptr GVariant
-> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GVariant
result ((Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant))
-> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ \Ptr GVariant
result' -> do
GVariant
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
GVariant -> IO GVariant
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Maybe GVariant -> IO (Maybe GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GVariant
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr VariantType
result <- Ptr ActionGroup -> CString -> IO (Ptr VariantType)
g_action_group_get_action_state_type Ptr ActionGroup
actionGroup' CString
actionName'
Maybe VariantType
maybeResult <- Ptr VariantType
-> (Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VariantType
result ((Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType))
-> (Ptr VariantType -> IO VariantType) -> IO (Maybe VariantType)
forall a b. (a -> b) -> a -> b
$ \Ptr VariantType
result' -> do
VariantType
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'
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Maybe VariantType -> IO (Maybe VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VariantType
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
CInt
result <- Ptr ActionGroup -> CString -> IO CInt
g_action_group_has_action Ptr ActionGroup
actionGroup' CString
actionName'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr CString
result <- Ptr ActionGroup -> IO (Ptr CString)
g_action_group_list_actions Ptr ActionGroup
actionGroup'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"actionGroupListActions" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
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
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr CInt
enabled <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr (Ptr VariantType)
parameterType <- IO (Ptr (Ptr VariantType))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.VariantType.VariantType))
Ptr (Ptr VariantType)
stateType <- IO (Ptr (Ptr VariantType))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.VariantType.VariantType))
Ptr (Ptr GVariant)
stateHint <- IO (Ptr (Ptr GVariant))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
Ptr (Ptr GVariant)
state <- IO (Ptr (Ptr GVariant))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GVariant))
CInt
result <- Ptr ActionGroup
-> CString
-> Ptr CInt
-> Ptr (Ptr VariantType)
-> Ptr (Ptr VariantType)
-> Ptr (Ptr GVariant)
-> Ptr (Ptr GVariant)
-> IO CInt
g_action_group_query_action Ptr ActionGroup
actionGroup' CString
actionName' Ptr CInt
enabled Ptr (Ptr VariantType)
parameterType Ptr (Ptr VariantType)
stateType Ptr (Ptr GVariant)
stateHint Ptr (Ptr GVariant)
state
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CInt
enabled' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
enabled
let enabled'' :: Bool
enabled'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
enabled'
Ptr VariantType
parameterType' <- Ptr (Ptr VariantType) -> IO (Ptr VariantType)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr VariantType)
parameterType
VariantType
parameterType'' <- ((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
parameterType'
Ptr VariantType
stateType' <- Ptr (Ptr VariantType) -> IO (Ptr VariantType)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr VariantType)
stateType
VariantType
stateType'' <- ((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
stateType'
Ptr GVariant
stateHint' <- Ptr (Ptr GVariant) -> IO (Ptr GVariant)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
stateHint
GVariant
stateHint'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
stateHint'
Ptr GVariant
state' <- Ptr (Ptr GVariant) -> IO (Ptr GVariant)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GVariant)
state
GVariant
state'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
state'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
enabled
Ptr (Ptr VariantType) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr VariantType)
parameterType
Ptr (Ptr VariantType) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr VariantType)
stateType
Ptr (Ptr GVariant) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
stateHint
Ptr (Ptr GVariant) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GVariant)
state
(Bool, Bool, VariantType, VariantType, GVariant, GVariant)
-> IO (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
enabled'', VariantType
parameterType'', VariantType
stateType'', GVariant
stateHint'', GVariant
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
Text
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \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
FunPtr C_ActionGroupActionAddedCallback
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionAddedCallback C_ActionGroupActionAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-added" FunPtr C_ActionGroupActionAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
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
FunPtr C_ActionGroupActionAddedCallback
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionAddedCallback C_ActionGroupActionAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-added" FunPtr C_ActionGroupActionAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
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
Text
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
let enabled' :: Bool
enabled' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
enabled
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \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
FunPtr C_ActionGroupActionEnabledChangedCallback
wrapped'' <- C_ActionGroupActionEnabledChangedCallback
-> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
mk_ActionGroupActionEnabledChangedCallback C_ActionGroupActionEnabledChangedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionEnabledChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-enabled-changed" FunPtr C_ActionGroupActionEnabledChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
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
FunPtr C_ActionGroupActionEnabledChangedCallback
wrapped'' <- C_ActionGroupActionEnabledChangedCallback
-> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
mk_ActionGroupActionEnabledChangedCallback C_ActionGroupActionEnabledChangedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionEnabledChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-enabled-changed" FunPtr C_ActionGroupActionEnabledChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
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
Text
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \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
FunPtr C_ActionGroupActionAddedCallback
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionRemovedCallback C_ActionGroupActionAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-removed" FunPtr C_ActionGroupActionAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
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
FunPtr C_ActionGroupActionAddedCallback
wrapped'' <- C_ActionGroupActionAddedCallback
-> IO (FunPtr C_ActionGroupActionAddedCallback)
mk_ActionGroupActionRemovedCallback C_ActionGroupActionAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-removed" FunPtr C_ActionGroupActionAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
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
Text
actionName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
actionName
GVariant
value' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
value
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \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
FunPtr C_ActionGroupActionStateChangedCallback
wrapped'' <- C_ActionGroupActionStateChangedCallback
-> IO (FunPtr C_ActionGroupActionStateChangedCallback)
mk_ActionGroupActionStateChangedCallback C_ActionGroupActionStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-state-changed" FunPtr C_ActionGroupActionStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
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
FunPtr C_ActionGroupActionStateChangedCallback
wrapped'' <- C_ActionGroupActionStateChangedCallback
-> IO (FunPtr C_ActionGroupActionStateChangedCallback)
mk_ActionGroupActionStateChangedCallback C_ActionGroupActionStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupActionStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"action-state-changed" FunPtr C_ActionGroupActionStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
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