    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- @GAction@ represents a single named action.
    --
    -- The main interface to an action is that it can be activated with
    -- 'GI.Gio.Interfaces.Action.actionActivate'. This results in the \'activate\' signal being
    -- emitted. An activation has a @GVariant@ parameter (which may be
    -- @NULL@). The correct type for the parameter is determined by a static
    -- parameter type (which is given at construction time).
    --
    -- An action may optionally have a state, in which case the state may be
    -- set with 'GI.Gio.Interfaces.Action.actionChangeState'. This call takes a t'GVariant'. The
    -- correct type for the state is determined by a static state type
    -- (which is given at construction time).
    --
    -- The state may have a hint associated with it, specifying its valid
    -- range.
    --
    -- @GAction@ is merely the interface to the concept of an action, as
    -- described above.  Various implementations of actions exist, including
    -- t'GI.Gio.Objects.SimpleAction.SimpleAction'.
    --
    -- In all cases, the implementing class is responsible for storing the
    -- name of the action, the parameter type, the enabled state, the optional
    -- state type and the state and emitting the appropriate signals when these
    -- change. The implementor is responsible for filtering calls to
    -- 'GI.Gio.Interfaces.Action.actionActivate' and 'GI.Gio.Interfaces.Action.actionChangeState'
    -- for type safety and for the state being enabled.
    --
    -- Probably the only useful thing to do with a @GAction@ is to put it
    -- inside of a t'GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup'.

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

    module GI.Gio.Interfaces.Action
        (

    -- * Exported types
        Action(..)                              ,
        IsAction                                ,
        toAction                                ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [activate]("GI.Gio.Interfaces.Action#g:method:activate"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [changeState]("GI.Gio.Interfaces.Action#g:method:changeState"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
    --
    -- ==== Getters
    -- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getEnabled]("GI.Gio.Interfaces.Action#g:method:getEnabled"), [getName]("GI.Gio.Interfaces.Action#g:method:getName"), [getParameterType]("GI.Gio.Interfaces.Action#g:method:getParameterType"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getState]("GI.Gio.Interfaces.Action#g:method:getState"), [getStateHint]("GI.Gio.Interfaces.Action#g:method:getStateHint"), [getStateType]("GI.Gio.Interfaces.Action#g:method:getStateType").
    --
    -- ==== Setters
    -- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolveActionMethod                     ,
    #endif

    -- ** activate #method:activate#

    #if defined(ENABLE_OVERLOADING)
        ActionActivateMethodInfo                ,
    #endif
        actionActivate                          ,

    -- ** changeState #method:changeState#

    #if defined(ENABLE_OVERLOADING)
        ActionChangeStateMethodInfo             ,
    #endif
        actionChangeState                       ,

    -- ** getEnabled #method:getEnabled#

    #if defined(ENABLE_OVERLOADING)
        ActionGetEnabledMethodInfo              ,
    #endif
        actionGetEnabled                        ,

    -- ** getName #method:getName#

    #if defined(ENABLE_OVERLOADING)
        ActionGetNameMethodInfo                 ,
    #endif
        actionGetName                           ,

    -- ** getParameterType #method:getParameterType#

    #if defined(ENABLE_OVERLOADING)
        ActionGetParameterTypeMethodInfo        ,
    #endif
        actionGetParameterType                  ,

    -- ** getState #method:getState#

    #if defined(ENABLE_OVERLOADING)
        ActionGetStateMethodInfo                ,
    #endif
        actionGetState                          ,

    -- ** getStateHint #method:getStateHint#

    #if defined(ENABLE_OVERLOADING)
        ActionGetStateHintMethodInfo            ,
    #endif
        actionGetStateHint                      ,

    -- ** getStateType #method:getStateType#

    #if defined(ENABLE_OVERLOADING)
        ActionGetStateTypeMethodInfo            ,
    #endif
        actionGetStateType                      ,

    -- ** nameIsValid #method:nameIsValid#

        actionNameIsValid                       ,

    -- ** parseDetailedName #method:parseDetailedName#

        actionParseDetailedName                 ,

    -- ** printDetailedName #method:printDetailedName#

        actionPrintDetailedName                 ,

     -- * Properties

    -- ** enabled #attr:enabled#
    -- | If /@action@/ is currently enabled.
    --
    -- If the action is disabled then calls to 'GI.Gio.Interfaces.Action.actionActivate' and
    -- 'GI.Gio.Interfaces.Action.actionChangeState' have no effect.
    --
    -- /Since: 2.28/

    #if defined(ENABLE_OVERLOADING)
        ActionEnabledPropertyInfo               ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        actionEnabled                           ,
    #endif
        getActionEnabled                        ,

    -- ** name #attr:name#
    -- | The name of the action.  This is mostly meaningful for identifying
    -- the action once it has been added to a t'GI.Gio.Interfaces.ActionGroup.ActionGroup'. It is immutable.
    --
    -- /Since: 2.28/

    #if defined(ENABLE_OVERLOADING)
        ActionNamePropertyInfo                  ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        actionName                              ,
    #endif
        getActionName                           ,

    -- ** parameterType #attr:parameterType#
    -- | The type of the parameter that must be given when activating the
    -- action. This is immutable, and may be 'P.Nothing' if no parameter is needed when
    -- activating the action.
    --
    -- /Since: 2.28/

    #if defined(ENABLE_OVERLOADING)
        ActionParameterTypePropertyInfo         ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        actionParameterType                     ,
    #endif
        getActionParameterType                  ,

    -- ** state #attr:state#
    -- | The state of the action, or 'P.Nothing' if the action is stateless.
    --
    -- /Since: 2.28/

    #if defined(ENABLE_OVERLOADING)
        ActionStatePropertyInfo                 ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        actionState                             ,
    #endif
        getActionState                          ,

    -- ** stateType #attr:stateType#
    -- | The t'GI.GLib.Structs.VariantType.VariantType' of the state that the action has, or 'P.Nothing' if the
    -- action is stateless. This is immutable.
    --
    -- /Since: 2.28/

    #if defined(ENABLE_OVERLOADING)
        ActionStateTypePropertyInfo             ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        actionStateType                         ,
    #endif
        getActionStateType                      ,

        ) 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 GI.GLib.Structs.VariantType as GLib.VariantType
    import qualified GI.GObject.Objects.Object as GObject.Object

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

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

    foreign import ccall "g_action_get_type"
        c_g_action_get_type :: IO B.Types.GType

    instance B.Types.TypedObject Action where
        glibType :: IO GType
    glibType = IO GType
    c_g_action_get_type

    instance B.Types.GObject Action

    -- | Type class for types which can be safely cast to `Action`, for instance with `toAction`.
    class (SP.GObject o, O.IsDescendantOf Action o) => IsAction o
    instance (SP.GObject o, O.IsDescendantOf Action o) => IsAction o

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

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

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

    -- VVV Prop "enabled"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable]
       -- Nullable: (Just False,Nothing)

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

    #if defined(ENABLE_OVERLOADING)
    data ActionEnabledPropertyInfo
    instance AttrInfo ActionEnabledPropertyInfo where
        type AttrAllowedOps ActionEnabledPropertyInfo = '[ 'AttrGet]
        type AttrBaseTypeConstraint ActionEnabledPropertyInfo = IsAction
        type AttrSetTypeConstraint ActionEnabledPropertyInfo = (~) ()
        type AttrTransferTypeConstraint ActionEnabledPropertyInfo = (~) ()
        type AttrTransferType ActionEnabledPropertyInfo = ()
        type AttrGetType ActionEnabledPropertyInfo = Bool
        type AttrLabel ActionEnabledPropertyInfo = "enabled"
        type AttrOrigin ActionEnabledPropertyInfo = Action
        attrGet = getActionEnabled
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.enabled"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#g:attr:enabled"
            })
    #endif

    -- VVV Prop "name"
       -- Type: TBasicType TUTF8
       -- Flags: [PropertyReadable]
       -- Nullable: (Just False,Nothing)

    -- | Get the value of the “@name@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' action #name
    -- @
    getActionName :: (MonadIO m, IsAction o) => o -> m T.Text
    getActionName :: forall (m :: * -> *) o. (MonadIO m, IsAction o) => o -> m Text
    getActionName o
    obj = IO Text -> m Text
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
    forall a b. (a -> b) -> a -> b
    $ Text -> IO (Maybe Text) -> IO Text
    forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
    checkUnexpectedNothing Text
    "getActionName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO (Maybe Text)
    forall a. GObject a => a -> String -> IO (Maybe Text)
    B.Properties.getObjectPropertyString o
    obj String
    "name"

    #if defined(ENABLE_OVERLOADING)
    data ActionNamePropertyInfo
    instance AttrInfo ActionNamePropertyInfo where
        type AttrAllowedOps ActionNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ActionNamePropertyInfo = IsAction
        type AttrSetTypeConstraint ActionNamePropertyInfo = (~) ()
        type AttrTransferTypeConstraint ActionNamePropertyInfo = (~) ()
        type AttrTransferType ActionNamePropertyInfo = ()
        type AttrGetType ActionNamePropertyInfo = T.Text
        type AttrLabel ActionNamePropertyInfo = "name"
        type AttrOrigin ActionNamePropertyInfo = Action
        attrGet = getActionName
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.name"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#g:attr:name"
            })
    #endif

    -- VVV Prop "parameter-type"
       -- Type: TInterface (Name {namespace = "GLib", name = "VariantType"})
       -- Flags: [PropertyReadable]
       -- Nullable: (Just True,Nothing)

    -- | Get the value of the “@parameter-type@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' action #parameterType
    -- @
    getActionParameterType :: (MonadIO m, IsAction o) => o -> m (Maybe GLib.VariantType.VariantType)
    getActionParameterType :: forall (m :: * -> *) o.
    (MonadIO m, IsAction o) =>
    o -> m (Maybe VariantType)
    getActionParameterType o
    obj = IO (Maybe VariantType) -> m (Maybe VariantType)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (Maybe VariantType) -> m (Maybe VariantType))
    -> IO (Maybe VariantType) -> m (Maybe VariantType)
    forall a b. (a -> b) -> a -> b
    $ o
    -> String
    -> (ManagedPtr VariantType -> VariantType)
    -> IO (Maybe VariantType)
    forall a b.
    (GObject a, GBoxed b) =>
    a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
    B.Properties.getObjectPropertyBoxed o
    obj String
    "parameter-type" ManagedPtr VariantType -> VariantType
    GLib.VariantType.VariantType

    #if defined(ENABLE_OVERLOADING)
    data ActionParameterTypePropertyInfo
    instance AttrInfo ActionParameterTypePropertyInfo where
        type AttrAllowedOps ActionParameterTypePropertyInfo = '[ 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ActionParameterTypePropertyInfo = IsAction
        type AttrSetTypeConstraint ActionParameterTypePropertyInfo = (~) ()
        type AttrTransferTypeConstraint ActionParameterTypePropertyInfo = (~) ()
        type AttrTransferType ActionParameterTypePropertyInfo = ()
        type AttrGetType ActionParameterTypePropertyInfo = (Maybe GLib.VariantType.VariantType)
        type AttrLabel ActionParameterTypePropertyInfo = "parameter-type"
        type AttrOrigin ActionParameterTypePropertyInfo = Action
        attrGet = getActionParameterType
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.parameterType"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#g:attr:parameterType"
            })
    #endif

    -- VVV Prop "state"
       -- Type: TVariant
       -- Flags: [PropertyReadable]
       -- Nullable: (Nothing,Nothing)

    -- | Get the value of the “@state@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' action #state
    -- @
    getActionState :: (MonadIO m, IsAction o) => o -> m (Maybe GVariant)
    getActionState :: forall (m :: * -> *) o.
    (MonadIO m, IsAction o) =>
    o -> m (Maybe GVariant)
    getActionState o
    obj = IO (Maybe GVariant) -> m (Maybe GVariant)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
    -> IO (Maybe GVariant) -> m (Maybe GVariant)
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO (Maybe GVariant)
    forall a. GObject a => a -> String -> IO (Maybe GVariant)
    B.Properties.getObjectPropertyVariant o
    obj String
    "state"

    #if defined(ENABLE_OVERLOADING)
    data ActionStatePropertyInfo
    instance AttrInfo ActionStatePropertyInfo where
        type AttrAllowedOps ActionStatePropertyInfo = '[ 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ActionStatePropertyInfo = IsAction
        type AttrSetTypeConstraint ActionStatePropertyInfo = (~) ()
        type AttrTransferTypeConstraint ActionStatePropertyInfo = (~) ()
        type AttrTransferType ActionStatePropertyInfo = ()
        type AttrGetType ActionStatePropertyInfo = (Maybe GVariant)
        type AttrLabel ActionStatePropertyInfo = "state"
        type AttrOrigin ActionStatePropertyInfo = Action
        attrGet = getActionState
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.state"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#g:attr:state"
            })
    #endif

    -- VVV Prop "state-type"
       -- Type: TInterface (Name {namespace = "GLib", name = "VariantType"})
       -- Flags: [PropertyReadable]
       -- Nullable: (Just True,Nothing)

    -- | Get the value of the “@state-type@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' action #stateType
    -- @
    getActionStateType :: (MonadIO m, IsAction o) => o -> m (Maybe GLib.VariantType.VariantType)
    getActionStateType :: forall (m :: * -> *) o.
    (MonadIO m, IsAction o) =>
    o -> m (Maybe VariantType)
    getActionStateType o
    obj = IO (Maybe VariantType) -> m (Maybe VariantType)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (Maybe VariantType) -> m (Maybe VariantType))
    -> IO (Maybe VariantType) -> m (Maybe VariantType)
    forall a b. (a -> b) -> a -> b
    $ o
    -> String
    -> (ManagedPtr VariantType -> VariantType)
    -> IO (Maybe VariantType)
    forall a b.
    (GObject a, GBoxed b) =>
    a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
    B.Properties.getObjectPropertyBoxed o
    obj String
    "state-type" ManagedPtr VariantType -> VariantType
    GLib.VariantType.VariantType

    #if defined(ENABLE_OVERLOADING)
    data ActionStateTypePropertyInfo
    instance AttrInfo ActionStateTypePropertyInfo where
        type AttrAllowedOps ActionStateTypePropertyInfo = '[ 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint ActionStateTypePropertyInfo = IsAction
        type AttrSetTypeConstraint ActionStateTypePropertyInfo = (~) ()
        type AttrTransferTypeConstraint ActionStateTypePropertyInfo = (~) ()
        type AttrTransferType ActionStateTypePropertyInfo = ()
        type AttrGetType ActionStateTypePropertyInfo = (Maybe GLib.VariantType.VariantType)
        type AttrLabel ActionStateTypePropertyInfo = "state-type"
        type AttrOrigin ActionStateTypePropertyInfo = Action
        attrGet = getActionStateType
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.stateType"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#g:attr:stateType"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList Action
    type instance O.AttributeList Action = ActionAttributeList
    type ActionAttributeList = ('[ '("enabled", ActionEnabledPropertyInfo), '("name", ActionNamePropertyInfo), '("parameterType", ActionParameterTypePropertyInfo), '("state", ActionStatePropertyInfo), '("stateType", ActionStateTypePropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    actionEnabled :: AttrLabelProxy "enabled"
    actionEnabled = AttrLabelProxy

    actionName :: AttrLabelProxy "name"
    actionName = AttrLabelProxy

    actionParameterType :: AttrLabelProxy "parameterType"
    actionParameterType = AttrLabelProxy

    actionState :: AttrLabelProxy "state"
    actionState = AttrLabelProxy

    actionStateType :: AttrLabelProxy "stateType"
    actionStateType = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveActionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveActionMethod "activate" o = ActionActivateMethodInfo
        ResolveActionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveActionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveActionMethod "changeState" o = ActionChangeStateMethodInfo
        ResolveActionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveActionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveActionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveActionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveActionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveActionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveActionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveActionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveActionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveActionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveActionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveActionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveActionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveActionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveActionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveActionMethod "getEnabled" o = ActionGetEnabledMethodInfo
        ResolveActionMethod "getName" o = ActionGetNameMethodInfo
        ResolveActionMethod "getParameterType" o = ActionGetParameterTypeMethodInfo
        ResolveActionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveActionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveActionMethod "getState" o = ActionGetStateMethodInfo
        ResolveActionMethod "getStateHint" o = ActionGetStateHintMethodInfo
        ResolveActionMethod "getStateType" o = ActionGetStateTypeMethodInfo
        ResolveActionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveActionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveActionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveActionMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveActionMethod t Action, O.OverloadedMethod info Action p) => OL.IsLabel t (Action -> 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 ~ ResolveActionMethod t Action, O.OverloadedMethod info Action p, R.HasField t Action p) => R.HasField t Action p where
        getField = O.overloadedMethod @info

    #endif

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

    #endif

    -- method Action::activate
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "parameter"
    --           , argType = TVariant
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the parameter to the activation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_activate" g_action_activate ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        Ptr GVariant ->                         -- parameter : TVariant
        IO ()

    -- | Activates the action.
    --
    -- /@parameter@/ must be the correct type of parameter for the action (ie:
    -- the parameter type given at construction time).  If the parameter
    -- type was 'P.Nothing' then /@parameter@/ must also be 'P.Nothing'.
    --
    -- If the /@parameter@/ GVariant is floating, it is consumed.
    --
    -- /Since: 2.28/
    actionActivate ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> Maybe (GVariant)
        -- ^ /@parameter@/: the parameter to the activation
        -> m ()
    actionActivate :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> Maybe GVariant -> m ()
    actionActivate a
    action 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        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
    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 Action -> Ptr GVariant -> IO ()
    g_action_activate Ptr Action
    action' Ptr GVariant
    maybeParameter
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    action
        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
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data ActionActivateMethodInfo
    instance (signature ~ (Maybe (GVariant) -> m ()), MonadIO m, IsAction a) => O.OverloadedMethod ActionActivateMethodInfo a signature where
        overloadedMethod = actionActivate

    instance O.OverloadedMethodInfo ActionActivateMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionActivate",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionActivate"
            })

    #endif

    -- method Action::change_state
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "value"
    --           , argType = TVariant
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the new state" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_change_state" g_action_change_state ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        Ptr GVariant ->                         -- value : TVariant
        IO ()

    -- | Request for the state of /@action@/ to be changed to /@value@/.
    --
    -- The action must be stateful and /@value@/ must be of the correct type.
    -- See 'GI.Gio.Interfaces.Action.actionGetStateType'.
    --
    -- This call merely requests a change.  The action may refuse to change
    -- its state or may change its state to something other than /@value@/.
    -- See 'GI.Gio.Interfaces.Action.actionGetStateHint'.
    --
    -- If the /@value@/ GVariant is floating, it is consumed.
    --
    -- /Since: 2.30/
    actionChangeState ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> GVariant
        -- ^ /@value@/: the new state
        -> m ()
    actionChangeState :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> GVariant -> m ()
    actionChangeState a
    action 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        Ptr GVariant
    value' <- GVariant -> IO (Ptr GVariant)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr GVariant
    value
        Ptr Action -> Ptr GVariant -> IO ()
    g_action_change_state Ptr Action
    action' Ptr GVariant
    value'
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    action
        GVariant -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr GVariant
    value
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data ActionChangeStateMethodInfo
    instance (signature ~ (GVariant -> m ()), MonadIO m, IsAction a) => O.OverloadedMethod ActionChangeStateMethodInfo a signature where
        overloadedMethod = actionChangeState

    instance O.OverloadedMethodInfo ActionChangeStateMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionChangeState",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionChangeState"
            })

    #endif

    -- method Action::get_enabled
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_enabled" g_action_get_enabled ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO CInt

    -- | Checks if /@action@/ is currently enabled.
    --
    -- An action must be enabled in order to be activated or in order to
    -- have its state changed from outside callers.
    --
    -- /Since: 2.28/
    actionGetEnabled ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m Bool
        -- ^ __Returns:__ whether the action is enabled
    actionGetEnabled :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m Bool
    actionGetEnabled a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        CInt
    result <- Ptr Action -> IO CInt
    g_action_get_enabled Ptr Action
    action'
        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
    action
        Bool -> IO Bool
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    #if defined(ENABLE_OVERLOADING)
    data ActionGetEnabledMethodInfo
    instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetEnabledMethodInfo a signature where
        overloadedMethod = actionGetEnabled

    instance O.OverloadedMethodInfo ActionGetEnabledMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetEnabled",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetEnabled"
            })

    #endif

    -- method Action::get_name
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUTF8)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_name" g_action_get_name ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO CString

    -- | Queries the name of /@action@/.
    --
    -- /Since: 2.28/
    actionGetName ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m T.Text
        -- ^ __Returns:__ the name of the action
    actionGetName :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m Text
    actionGetName a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        CString
    result <- Ptr Action -> IO CString
    g_action_get_name Ptr Action
    action'
        Text -> CString -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "actionGetName" CString
    result
        Text
    result' <- HasCallStack => CString -> IO Text
    CString -> IO Text
    cstringToText CString
    result
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    action
        Text -> IO Text
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Text
    result'

    #if defined(ENABLE_OVERLOADING)
    data ActionGetNameMethodInfo
    instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetNameMethodInfo a signature where
        overloadedMethod = actionGetName

    instance O.OverloadedMethodInfo ActionGetNameMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetName",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetName"
            })

    #endif

    -- method Action::get_parameter_type
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "GLib" , name = "VariantType" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_parameter_type" g_action_get_parameter_type ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO (Ptr GLib.VariantType.VariantType)

    -- | Queries the type of the parameter that must be given when activating
    -- /@action@/.
    --
    -- When activating the action using 'GI.Gio.Interfaces.Action.actionActivate', the t'GVariant'
    -- given to that function must be of the type returned by this function.
    --
    -- In the case that this function returns 'P.Nothing', you must not give any
    -- t'GVariant', but 'P.Nothing' instead.
    --
    -- /Since: 2.28/
    actionGetParameterType ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m (Maybe GLib.VariantType.VariantType)
        -- ^ __Returns:__ the parameter type
    actionGetParameterType :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m (Maybe VariantType)
    actionGetParameterType a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        Ptr VariantType
    result <- Ptr Action -> IO (Ptr VariantType)
    g_action_get_parameter_type Ptr Action
    action'
        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
    action
        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 ActionGetParameterTypeMethodInfo
    instance (signature ~ (m (Maybe GLib.VariantType.VariantType)), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetParameterTypeMethodInfo a signature where
        overloadedMethod = actionGetParameterType

    instance O.OverloadedMethodInfo ActionGetParameterTypeMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetParameterType",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetParameterType"
            })

    #endif

    -- method Action::get_state
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just TVariant
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_state" g_action_get_state ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO (Ptr GVariant)

    -- | Queries the current state of /@action@/.
    --
    -- If the action is not stateful then 'P.Nothing' will be returned.  If the
    -- action is stateful then the type of the return value is the type
    -- given by 'GI.Gio.Interfaces.Action.actionGetStateType'.
    --
    -- The return value (if non-'P.Nothing') should be freed with
    -- 'GI.GLib.Structs.Variant.variantUnref' when it is no longer required.
    --
    -- /Since: 2.28/
    actionGetState ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m (Maybe GVariant)
        -- ^ __Returns:__ the current state of the action
    actionGetState :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m (Maybe GVariant)
    actionGetState a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        Ptr GVariant
    result <- Ptr Action -> IO (Ptr GVariant)
    g_action_get_state Ptr Action
    action'
        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
    action
        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 ActionGetStateMethodInfo
    instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetStateMethodInfo a signature where
        overloadedMethod = actionGetState

    instance O.OverloadedMethodInfo ActionGetStateMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetState",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetState"
            })

    #endif

    -- method Action::get_state_hint
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just TVariant
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_state_hint" g_action_get_state_hint ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO (Ptr GVariant)

    -- | Requests a hint about the valid range of values for the state of
    -- /@action@/.
    --
    -- If 'P.Nothing' is returned it either means that the action is not stateful
    -- or that there is no hint about the valid range of values for the
    -- state of the action.
    --
    -- If a t'GVariant' array is returned then each item in the array is a
    -- possible value for the state.  If a t'GVariant' pair (ie: two-tuple) is
    -- returned then the tuple specifies the inclusive lower and upper bound
    -- of valid values for the state.
    --
    -- In any case, the information is merely a hint.  It may be possible to
    -- have a state value outside of the hinted range and setting a value
    -- within the range may fail.
    --
    -- The return value (if non-'P.Nothing') should be freed with
    -- 'GI.GLib.Structs.Variant.variantUnref' when it is no longer required.
    --
    -- /Since: 2.28/
    actionGetStateHint ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m (Maybe GVariant)
        -- ^ __Returns:__ the state range hint
    actionGetStateHint :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m (Maybe GVariant)
    actionGetStateHint a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        Ptr GVariant
    result <- Ptr Action -> IO (Ptr GVariant)
    g_action_get_state_hint Ptr Action
    action'
        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
    action
        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 ActionGetStateHintMethodInfo
    instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetStateHintMethodInfo a signature where
        overloadedMethod = actionGetStateHint

    instance O.OverloadedMethodInfo ActionGetStateHintMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetStateHint",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetStateHint"
            })

    #endif

    -- method Action::get_state_type
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "action"
    --           , argType = TInterface Name { namespace = "Gio" , name = "Action" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GAction" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "GLib" , name = "VariantType" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_get_state_type" g_action_get_state_type ::
        Ptr Action ->                           -- action : TInterface (Name {namespace = "Gio", name = "Action"})
        IO (Ptr GLib.VariantType.VariantType)

    -- | Queries the type of the state of /@action@/.
    --
    -- If the action is stateful (e.g. created with
    -- 'GI.Gio.Objects.SimpleAction.simpleActionNewStateful') then this function returns the
    -- t'GI.GLib.Structs.VariantType.VariantType' of the state.  This is the type of the initial value
    -- given as the state. All calls to 'GI.Gio.Interfaces.Action.actionChangeState' must give a
    -- t'GVariant' of this type and 'GI.Gio.Interfaces.Action.actionGetState' will return a
    -- t'GVariant' of the same type.
    --
    -- If the action is not stateful (e.g. created with 'GI.Gio.Objects.SimpleAction.simpleActionNew')
    -- then this function will return 'P.Nothing'. In that case, 'GI.Gio.Interfaces.Action.actionGetState'
    -- will return 'P.Nothing' and you must not call 'GI.Gio.Interfaces.Action.actionChangeState'.
    --
    -- /Since: 2.28/
    actionGetStateType ::
        (B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
        a
        -- ^ /@action@/: a t'GI.Gio.Interfaces.Action.Action'
        -> m (Maybe GLib.VariantType.VariantType)
        -- ^ __Returns:__ the state type, if the action is stateful
    actionGetStateType :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAction a) =>
    a -> m (Maybe VariantType)
    actionGetStateType a
    action = 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 Action
    action' <- a -> IO (Ptr Action)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    action
        Ptr VariantType
    result <- Ptr Action -> IO (Ptr VariantType)
    g_action_get_state_type Ptr Action
    action'
        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
    action
        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 ActionGetStateTypeMethodInfo
    instance (signature ~ (m (Maybe GLib.VariantType.VariantType)), MonadIO m, IsAction a) => O.OverloadedMethod ActionGetStateTypeMethodInfo a signature where
        overloadedMethod = actionGetStateType

    instance O.OverloadedMethodInfo ActionGetStateTypeMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.Action.actionGetStateType",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Interfaces-Action.html#v:actionGetStateType"
            })

    #endif

    -- method Action::name_is_valid
    -- method type : MemberFunction
    -- Args: [ Arg
    --           { argCName = "action_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a potential action name"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_name_is_valid" g_action_name_is_valid ::
        CString ->                              -- action_name : TBasicType TUTF8
        IO CInt

    -- | Checks if /@actionName@/ is valid.
    --
    -- /@actionName@/ is valid if it consists only of alphanumeric characters,
    -- plus \'-\' and \'.\'.  The empty string is not a valid action name.
    --
    -- It is an error to call this function with a non-utf8 /@actionName@/.
    -- /@actionName@/ must not be 'P.Nothing'.
    --
    -- /Since: 2.38/
    actionNameIsValid ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        T.Text
        -- ^ /@actionName@/: a potential action name
        -> m Bool
        -- ^ __Returns:__ 'P.True' if /@actionName@/ is valid
    actionNameIsValid :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Bool
    actionNameIsValid 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
        CString
    actionName' <- Text -> IO CString
    textToCString Text
    actionName
        CInt
    result <- CString -> IO CInt
    g_action_name_is_valid CString
    actionName'
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        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)
    #endif

    -- method Action::parse_detailed_name
    -- method type : MemberFunction
    -- Args: [ Arg
    --           { argCName = "detailed_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a detailed action name"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "action_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionOut
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the action name" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       , Arg
    --           { argCName = "target_value"
    --           , argType = TVariant
    --           , direction = DirectionOut
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the target value,\n  or %NULL for no target"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : True
    -- Skip return : False

    foreign import ccall "g_action_parse_detailed_name" g_action_parse_detailed_name ::
        CString ->                              -- detailed_name : TBasicType TUTF8
        Ptr CString ->                          -- action_name : TBasicType TUTF8
        Ptr (Ptr GVariant) ->                   -- target_value : TVariant
        Ptr (Ptr GError) ->                     -- error
        IO CInt

    -- | Parses a detailed action name into its separate name and target
    -- components.
    --
    -- Detailed action names can have three formats.
    --
    -- The first format is used to represent an action name with no target
    -- value and consists of just an action name containing no whitespace
    -- nor the characters @:@, @(@ or @)@.  For example: @app.action@.
    --
    -- The second format is used to represent an action with a target value
    -- that is a non-empty string consisting only of alphanumerics, plus @-@
    -- and @.@.  In that case, the action name and target value are
    -- separated by a double colon (@::@).  For example:
    -- @app.action::target@.
    --
    -- The third format is used to represent an action with any type of
    -- target value, including strings.  The target value follows the action
    -- name, surrounded in parens.  For example: @app.action(42)@.  The
    -- target value is parsed using 'GI.GLib.Functions.variantParse'.  If a tuple-typed
    -- value is desired, it must be specified in the same way, resulting in
    -- two sets of parens, for example: @app.action((1,2,3))@.  A string
    -- target can be specified this way as well: @app.action(\'target\')@.
    -- For strings, this third format must be used if target value is
    -- empty or contains characters other than alphanumerics, @-@ and @.@.
    --
    -- If this function returns 'P.True', a non-'P.Nothing' value is guaranteed to be returned
    -- in /@actionName@/ (if a pointer is passed in). A 'P.Nothing' value may still be
    -- returned in /@targetValue@/, as the /@detailedName@/ may not contain a target.
    --
    -- If returned, the t'GVariant' in /@targetValue@/ is guaranteed to not be floating.
    --
    -- /Since: 2.38/
    actionParseDetailedName ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        T.Text
        -- ^ /@detailedName@/: a detailed action name
        -> m ((T.Text, Maybe GVariant))
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    actionParseDetailedName :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    Text -> m (Text, Maybe GVariant)
    actionParseDetailedName Text
    detailedName = IO (Text, Maybe GVariant) -> m (Text, Maybe GVariant)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Text, Maybe GVariant) -> m (Text, Maybe GVariant))
    -> IO (Text, Maybe GVariant) -> m (Text, Maybe GVariant)
    forall a b. (a -> b) -> a -> b
    $ do
        CString
    detailedName' <- Text -> IO CString
    textToCString Text
    detailedName
        Ptr CString
    actionName <- IO (Ptr CString)
    forall a. Storable a => IO (Ptr a)
    callocMem :: IO (Ptr CString)
        Ptr (Ptr GVariant)
    targetValue <- IO (Ptr (Ptr GVariant))
    forall a. Storable a => IO (Ptr a)
    callocMem :: IO (Ptr (Ptr GVariant))
        IO (Text, Maybe GVariant) -> IO () -> IO (Text, Maybe GVariant)
    forall a b. IO a -> IO b -> IO a
    onException (do
            CInt
    _ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
    forall a. (Ptr (Ptr GError) -> IO a) -> IO a
    propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
    -> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ CString
    -> Ptr CString -> Ptr (Ptr GVariant) -> Ptr (Ptr GError) -> IO CInt
    g_action_parse_detailed_name CString
    detailedName' Ptr CString
    actionName Ptr (Ptr GVariant)
    targetValue
            CString
    actionName' <- Ptr CString -> IO CString
    forall a. Storable a => Ptr a -> IO a
    peek Ptr CString
    actionName
            Text
    actionName'' <- HasCallStack => CString -> IO Text
    CString -> IO Text
    cstringToText CString
    actionName'
            CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    actionName'
            Ptr GVariant
    targetValue' <- Ptr (Ptr GVariant) -> IO (Ptr GVariant)
    forall a. Storable a => Ptr a -> IO a
    peek Ptr (Ptr GVariant)
    targetValue
            Maybe GVariant
    maybeTargetValue' <- Ptr GVariant
    -> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
    forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
    convertIfNonNull Ptr GVariant
    targetValue' ((Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant))
    -> (Ptr GVariant -> IO GVariant) -> IO (Maybe GVariant)
    forall a b. (a -> b) -> a -> b
    $ \Ptr GVariant
    targetValue'' -> do
                GVariant
    targetValue''' <- Ptr GVariant -> IO GVariant
    B.GVariant.wrapGVariantPtr Ptr GVariant
    targetValue''
                GVariant -> IO GVariant
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return GVariant
    targetValue'''
            CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    detailedName'
            Ptr CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr CString
    actionName
            Ptr (Ptr GVariant) -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr (Ptr GVariant)
    targetValue
            (Text, Maybe GVariant) -> IO (Text, Maybe GVariant)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Text
    actionName'', Maybe GVariant
    maybeTargetValue')
         ) (do
            CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    detailedName'
            Ptr CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr CString
    actionName
            Ptr (Ptr GVariant) -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr (Ptr GVariant)
    targetValue
         )

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method Action::print_detailed_name
    -- method type : MemberFunction
    -- Args: [ Arg
    --           { argCName = "action_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a valid action name"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "target_value"
    --           , argType = TVariant
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GVariant target value, or %NULL"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUTF8)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_action_print_detailed_name" g_action_print_detailed_name ::
        CString ->                              -- action_name : TBasicType TUTF8
        Ptr GVariant ->                         -- target_value : TVariant
        IO CString

    -- | Formats a detailed action name from /@actionName@/ and /@targetValue@/.
    --
    -- It is an error to call this function with an invalid action name.
    --
    -- This function is the opposite of 'GI.Gio.Functions.actionParseDetailedName'.
    -- It will produce a string that can be parsed back to the /@actionName@/
    -- and /@targetValue@/ by that function.
    --
    -- See that function for the types of strings that will be printed by
    -- this function.
    --
    -- /Since: 2.38/
    actionPrintDetailedName ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        T.Text
        -- ^ /@actionName@/: a valid action name
        -> Maybe (GVariant)
        -- ^ /@targetValue@/: a t'GVariant' target value, or 'P.Nothing'
        -> m T.Text
        -- ^ __Returns:__ a detailed format string
    actionPrintDetailedName :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    Text -> Maybe GVariant -> m Text
    actionPrintDetailedName Text
    actionName Maybe GVariant
    targetValue = 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
        CString
    actionName' <- Text -> IO CString
    textToCString Text
    actionName
        Ptr GVariant
    maybeTargetValue <- case Maybe GVariant
    targetValue 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
    nullPtr
            Just GVariant
    jTargetValue -> do
                Ptr GVariant
    jTargetValue' <- GVariant -> IO (Ptr GVariant)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr GVariant
    jTargetValue
                Ptr GVariant -> IO (Ptr GVariant)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr GVariant
    jTargetValue'
        CString
    result <- CString -> Ptr GVariant -> IO CString
    g_action_print_detailed_name CString
    actionName' Ptr GVariant
    maybeTargetValue
        Text -> CString -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "actionPrintDetailedName" CString
    result
        Text
    result' <- HasCallStack => CString -> IO Text
    CString -> IO Text
    cstringToText CString
    result
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    result
        Maybe GVariant -> (GVariant -> IO ()) -> IO ()
    forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
    whenJust Maybe GVariant
    targetValue GVariant -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    actionName'
        Text -> IO Text
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Text
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList Action = ActionSignalList
    type ActionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif