{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.Gtk.Objects.ActionGroup
    ( 

-- * Exported types
    ActionGroup(..)                         ,
    ActionGroupK                            ,
    toActionGroup                           ,
    noActionGroup                           ,


 -- * Methods
-- ** actionGroupAddAction
    actionGroupAddAction                    ,


-- ** actionGroupAddActionWithAccel
    actionGroupAddActionWithAccel           ,


-- ** actionGroupGetAccelGroup
    actionGroupGetAccelGroup                ,


-- ** actionGroupGetAction
    actionGroupGetAction                    ,


-- ** actionGroupGetName
    actionGroupGetName                      ,


-- ** actionGroupGetSensitive
    actionGroupGetSensitive                 ,


-- ** actionGroupGetVisible
    actionGroupGetVisible                   ,


-- ** actionGroupListActions
    actionGroupListActions                  ,


-- ** actionGroupNew
    actionGroupNew                          ,


-- ** actionGroupRemoveAction
    actionGroupRemoveAction                 ,


-- ** actionGroupSetAccelGroup
    actionGroupSetAccelGroup                ,


-- ** actionGroupSetSensitive
    actionGroupSetSensitive                 ,


-- ** actionGroupSetTranslateFunc
    actionGroupSetTranslateFunc             ,


-- ** actionGroupSetTranslationDomain
    actionGroupSetTranslationDomain         ,


-- ** actionGroupSetVisible
    actionGroupSetVisible                   ,


-- ** actionGroupTranslateString
    actionGroupTranslateString              ,




 -- * Properties
-- ** AccelGroup
    ActionGroupAccelGroupPropertyInfo       ,
    constructActionGroupAccelGroup          ,
    getActionGroupAccelGroup                ,
    setActionGroupAccelGroup                ,


-- ** Name
    ActionGroupNamePropertyInfo             ,
    constructActionGroupName                ,
    getActionGroupName                      ,


-- ** Sensitive
    ActionGroupSensitivePropertyInfo        ,
    constructActionGroupSensitive           ,
    getActionGroupSensitive                 ,
    setActionGroupSensitive                 ,


-- ** Visible
    ActionGroupVisiblePropertyInfo          ,
    constructActionGroupVisible             ,
    getActionGroupVisible                   ,
    setActionGroupVisible                   ,




 -- * Signals
-- ** ConnectProxy
    ActionGroupConnectProxyCallback         ,
    ActionGroupConnectProxyCallbackC        ,
    ActionGroupConnectProxySignalInfo       ,
    actionGroupConnectProxyCallbackWrapper  ,
    actionGroupConnectProxyClosure          ,
    afterActionGroupConnectProxy            ,
    mkActionGroupConnectProxyCallback       ,
    noActionGroupConnectProxyCallback       ,
    onActionGroupConnectProxy               ,


-- ** DisconnectProxy
    ActionGroupDisconnectProxyCallback      ,
    ActionGroupDisconnectProxyCallbackC     ,
    ActionGroupDisconnectProxySignalInfo    ,
    actionGroupDisconnectProxyCallbackWrapper,
    actionGroupDisconnectProxyClosure       ,
    afterActionGroupDisconnectProxy         ,
    mkActionGroupDisconnectProxyCallback    ,
    noActionGroupDisconnectProxyCallback    ,
    onActionGroupDisconnectProxy            ,


-- ** PostActivate
    ActionGroupPostActivateCallback         ,
    ActionGroupPostActivateCallbackC        ,
    ActionGroupPostActivateSignalInfo       ,
    actionGroupPostActivateCallbackWrapper  ,
    actionGroupPostActivateClosure          ,
    afterActionGroupPostActivate            ,
    mkActionGroupPostActivateCallback       ,
    noActionGroupPostActivateCallback       ,
    onActionGroupPostActivate               ,


-- ** PreActivate
    ActionGroupPreActivateCallback          ,
    ActionGroupPreActivateCallbackC         ,
    ActionGroupPreActivateSignalInfo        ,
    actionGroupPreActivateCallbackWrapper   ,
    actionGroupPreActivateClosure           ,
    afterActionGroupPreActivate             ,
    mkActionGroupPreActivateCallback        ,
    noActionGroupPreActivateCallback        ,
    onActionGroupPreActivate                ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.GLib as GLib
import qualified GI.GObject as GObject

newtype ActionGroup = ActionGroup (ForeignPtr ActionGroup)
foreign import ccall "gtk_action_group_get_type"
    c_gtk_action_group_get_type :: IO GType

type instance ParentTypes ActionGroup = ActionGroupParentTypes
type ActionGroupParentTypes = '[GObject.Object, Buildable]

instance GObject ActionGroup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_action_group_get_type
    

class GObject o => ActionGroupK o
instance (GObject o, IsDescendantOf ActionGroup o) => ActionGroupK o

toActionGroup :: ActionGroupK o => o -> IO ActionGroup
toActionGroup = unsafeCastTo ActionGroup

noActionGroup :: Maybe ActionGroup
noActionGroup = Nothing

-- signal ActionGroup::connect-proxy
type ActionGroupConnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noActionGroupConnectProxyCallback :: Maybe ActionGroupConnectProxyCallback
noActionGroupConnectProxyCallback = Nothing

type ActionGroupConnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupConnectProxyCallback :: ActionGroupConnectProxyCallbackC -> IO (FunPtr ActionGroupConnectProxyCallbackC)

actionGroupConnectProxyClosure :: ActionGroupConnectProxyCallback -> IO Closure
actionGroupConnectProxyClosure cb = newCClosure =<< mkActionGroupConnectProxyCallback wrapped
    where wrapped = actionGroupConnectProxyCallbackWrapper cb

actionGroupConnectProxyCallbackWrapper ::
    ActionGroupConnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
actionGroupConnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onActionGroupConnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
onActionGroupConnectProxy obj cb = liftIO $ connectActionGroupConnectProxy obj cb SignalConnectBefore
afterActionGroupConnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
afterActionGroupConnectProxy obj cb = connectActionGroupConnectProxy obj cb SignalConnectAfter

connectActionGroupConnectProxy :: (GObject a, MonadIO m) =>
                                  a -> ActionGroupConnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupConnectProxy obj cb after = liftIO $ do
    cb' <- mkActionGroupConnectProxyCallback (actionGroupConnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "connect-proxy" cb' after

-- signal ActionGroup::disconnect-proxy
type ActionGroupDisconnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noActionGroupDisconnectProxyCallback :: Maybe ActionGroupDisconnectProxyCallback
noActionGroupDisconnectProxyCallback = Nothing

type ActionGroupDisconnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupDisconnectProxyCallback :: ActionGroupDisconnectProxyCallbackC -> IO (FunPtr ActionGroupDisconnectProxyCallbackC)

actionGroupDisconnectProxyClosure :: ActionGroupDisconnectProxyCallback -> IO Closure
actionGroupDisconnectProxyClosure cb = newCClosure =<< mkActionGroupDisconnectProxyCallback wrapped
    where wrapped = actionGroupDisconnectProxyCallbackWrapper cb

actionGroupDisconnectProxyCallbackWrapper ::
    ActionGroupDisconnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
actionGroupDisconnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onActionGroupDisconnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
onActionGroupDisconnectProxy obj cb = liftIO $ connectActionGroupDisconnectProxy obj cb SignalConnectBefore
afterActionGroupDisconnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
afterActionGroupDisconnectProxy obj cb = connectActionGroupDisconnectProxy obj cb SignalConnectAfter

connectActionGroupDisconnectProxy :: (GObject a, MonadIO m) =>
                                     a -> ActionGroupDisconnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupDisconnectProxy obj cb after = liftIO $ do
    cb' <- mkActionGroupDisconnectProxyCallback (actionGroupDisconnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "disconnect-proxy" cb' after

-- signal ActionGroup::post-activate
type ActionGroupPostActivateCallback =
    Action ->
    IO ()

noActionGroupPostActivateCallback :: Maybe ActionGroupPostActivateCallback
noActionGroupPostActivateCallback = Nothing

type ActionGroupPostActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupPostActivateCallback :: ActionGroupPostActivateCallbackC -> IO (FunPtr ActionGroupPostActivateCallbackC)

actionGroupPostActivateClosure :: ActionGroupPostActivateCallback -> IO Closure
actionGroupPostActivateClosure cb = newCClosure =<< mkActionGroupPostActivateCallback wrapped
    where wrapped = actionGroupPostActivateCallbackWrapper cb

actionGroupPostActivateCallbackWrapper ::
    ActionGroupPostActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
actionGroupPostActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onActionGroupPostActivate :: (GObject a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
onActionGroupPostActivate obj cb = liftIO $ connectActionGroupPostActivate obj cb SignalConnectBefore
afterActionGroupPostActivate :: (GObject a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
afterActionGroupPostActivate obj cb = connectActionGroupPostActivate obj cb SignalConnectAfter

connectActionGroupPostActivate :: (GObject a, MonadIO m) =>
                                  a -> ActionGroupPostActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupPostActivate obj cb after = liftIO $ do
    cb' <- mkActionGroupPostActivateCallback (actionGroupPostActivateCallbackWrapper cb)
    connectSignalFunPtr obj "post-activate" cb' after

-- signal ActionGroup::pre-activate
type ActionGroupPreActivateCallback =
    Action ->
    IO ()

noActionGroupPreActivateCallback :: Maybe ActionGroupPreActivateCallback
noActionGroupPreActivateCallback = Nothing

type ActionGroupPreActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupPreActivateCallback :: ActionGroupPreActivateCallbackC -> IO (FunPtr ActionGroupPreActivateCallbackC)

actionGroupPreActivateClosure :: ActionGroupPreActivateCallback -> IO Closure
actionGroupPreActivateClosure cb = newCClosure =<< mkActionGroupPreActivateCallback wrapped
    where wrapped = actionGroupPreActivateCallbackWrapper cb

actionGroupPreActivateCallbackWrapper ::
    ActionGroupPreActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
actionGroupPreActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onActionGroupPreActivate :: (GObject a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
onActionGroupPreActivate obj cb = liftIO $ connectActionGroupPreActivate obj cb SignalConnectBefore
afterActionGroupPreActivate :: (GObject a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
afterActionGroupPreActivate obj cb = connectActionGroupPreActivate obj cb SignalConnectAfter

connectActionGroupPreActivate :: (GObject a, MonadIO m) =>
                                 a -> ActionGroupPreActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupPreActivate obj cb after = liftIO $ do
    cb' <- mkActionGroupPreActivateCallback (actionGroupPreActivateCallbackWrapper cb)
    connectSignalFunPtr obj "pre-activate" cb' after

-- VVV Prop "accel-group"
   -- Type: TInterface "Gtk" "AccelGroup"
   -- Flags: [PropertyReadable,PropertyWritable]

getActionGroupAccelGroup :: (MonadIO m, ActionGroupK o) => o -> m AccelGroup
getActionGroupAccelGroup obj = liftIO $ getObjectPropertyObject obj "accel-group" AccelGroup

setActionGroupAccelGroup :: (MonadIO m, ActionGroupK o, AccelGroupK a) => o -> a -> m ()
setActionGroupAccelGroup obj val = liftIO $ setObjectPropertyObject obj "accel-group" val

constructActionGroupAccelGroup :: (AccelGroupK a) => a -> IO ([Char], GValue)
constructActionGroupAccelGroup val = constructObjectPropertyObject "accel-group" val

data ActionGroupAccelGroupPropertyInfo
instance AttrInfo ActionGroupAccelGroupPropertyInfo where
    type AttrAllowedOps ActionGroupAccelGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint ActionGroupAccelGroupPropertyInfo = AccelGroupK
    type AttrBaseTypeConstraint ActionGroupAccelGroupPropertyInfo = ActionGroupK
    type AttrGetType ActionGroupAccelGroupPropertyInfo = AccelGroup
    type AttrLabel ActionGroupAccelGroupPropertyInfo = "ActionGroup::accel-group"
    attrGet _ = getActionGroupAccelGroup
    attrSet _ = setActionGroupAccelGroup
    attrConstruct _ = constructActionGroupAccelGroup

-- VVV Prop "name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]

getActionGroupName :: (MonadIO m, ActionGroupK o) => o -> m T.Text
getActionGroupName obj = liftIO $ getObjectPropertyString obj "name"

constructActionGroupName :: T.Text -> IO ([Char], GValue)
constructActionGroupName val = constructObjectPropertyString "name" val

data ActionGroupNamePropertyInfo
instance AttrInfo ActionGroupNamePropertyInfo where
    type AttrAllowedOps ActionGroupNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint ActionGroupNamePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint ActionGroupNamePropertyInfo = ActionGroupK
    type AttrGetType ActionGroupNamePropertyInfo = T.Text
    type AttrLabel ActionGroupNamePropertyInfo = "ActionGroup::name"
    attrGet _ = getActionGroupName
    attrSet _ = undefined
    attrConstruct _ = constructActionGroupName

-- VVV Prop "sensitive"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getActionGroupSensitive :: (MonadIO m, ActionGroupK o) => o -> m Bool
getActionGroupSensitive obj = liftIO $ getObjectPropertyBool obj "sensitive"

setActionGroupSensitive :: (MonadIO m, ActionGroupK o) => o -> Bool -> m ()
setActionGroupSensitive obj val = liftIO $ setObjectPropertyBool obj "sensitive" val

constructActionGroupSensitive :: Bool -> IO ([Char], GValue)
constructActionGroupSensitive val = constructObjectPropertyBool "sensitive" val

data ActionGroupSensitivePropertyInfo
instance AttrInfo ActionGroupSensitivePropertyInfo where
    type AttrAllowedOps ActionGroupSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint ActionGroupSensitivePropertyInfo = (~) Bool
    type AttrBaseTypeConstraint ActionGroupSensitivePropertyInfo = ActionGroupK
    type AttrGetType ActionGroupSensitivePropertyInfo = Bool
    type AttrLabel ActionGroupSensitivePropertyInfo = "ActionGroup::sensitive"
    attrGet _ = getActionGroupSensitive
    attrSet _ = setActionGroupSensitive
    attrConstruct _ = constructActionGroupSensitive

-- VVV Prop "visible"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getActionGroupVisible :: (MonadIO m, ActionGroupK o) => o -> m Bool
getActionGroupVisible obj = liftIO $ getObjectPropertyBool obj "visible"

setActionGroupVisible :: (MonadIO m, ActionGroupK o) => o -> Bool -> m ()
setActionGroupVisible obj val = liftIO $ setObjectPropertyBool obj "visible" val

constructActionGroupVisible :: Bool -> IO ([Char], GValue)
constructActionGroupVisible val = constructObjectPropertyBool "visible" val

data ActionGroupVisiblePropertyInfo
instance AttrInfo ActionGroupVisiblePropertyInfo where
    type AttrAllowedOps ActionGroupVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint ActionGroupVisiblePropertyInfo = (~) Bool
    type AttrBaseTypeConstraint ActionGroupVisiblePropertyInfo = ActionGroupK
    type AttrGetType ActionGroupVisiblePropertyInfo = Bool
    type AttrLabel ActionGroupVisiblePropertyInfo = "ActionGroup::visible"
    attrGet _ = getActionGroupVisible
    attrSet _ = setActionGroupVisible
    attrConstruct _ = constructActionGroupVisible

type instance AttributeList ActionGroup = ActionGroupAttributeList
type ActionGroupAttributeList = ('[ '("accel-group", ActionGroupAccelGroupPropertyInfo), '("name", ActionGroupNamePropertyInfo), '("sensitive", ActionGroupSensitivePropertyInfo), '("visible", ActionGroupVisiblePropertyInfo)] :: [(Symbol, *)])

data ActionGroupConnectProxySignalInfo
instance SignalInfo ActionGroupConnectProxySignalInfo where
    type HaskellCallbackType ActionGroupConnectProxySignalInfo = ActionGroupConnectProxyCallback
    connectSignal _ = connectActionGroupConnectProxy

data ActionGroupDisconnectProxySignalInfo
instance SignalInfo ActionGroupDisconnectProxySignalInfo where
    type HaskellCallbackType ActionGroupDisconnectProxySignalInfo = ActionGroupDisconnectProxyCallback
    connectSignal _ = connectActionGroupDisconnectProxy

data ActionGroupPostActivateSignalInfo
instance SignalInfo ActionGroupPostActivateSignalInfo where
    type HaskellCallbackType ActionGroupPostActivateSignalInfo = ActionGroupPostActivateCallback
    connectSignal _ = connectActionGroupPostActivate

data ActionGroupPreActivateSignalInfo
instance SignalInfo ActionGroupPreActivateSignalInfo where
    type HaskellCallbackType ActionGroupPreActivateSignalInfo = ActionGroupPreActivateCallback
    connectSignal _ = connectActionGroupPreActivate

type instance SignalList ActionGroup = ActionGroupSignalList
type ActionGroupSignalList = ('[ '("connect-proxy", ActionGroupConnectProxySignalInfo), '("disconnect-proxy", ActionGroupDisconnectProxySignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("post-activate", ActionGroupPostActivateSignalInfo), '("pre-activate", ActionGroupPreActivateSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method ActionGroup::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ActionGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_new" gtk_action_group_new :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr ActionGroup)

{-# DEPRECATED actionGroupNew ["(Since version 3.10)"]#-}
actionGroupNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m ActionGroup
actionGroupNew name = liftIO $ do
    name' <- textToCString name
    result <- gtk_action_group_new name'
    checkUnexpectedReturnNULL "gtk_action_group_new" result
    result' <- (wrapObject ActionGroup) result
    freeMem name'
    return result'

-- method ActionGroup::add_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_add_action" gtk_action_group_add_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionGroupAddAction ["(Since version 3.10)"]#-}
actionGroupAddAction ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
actionGroupAddAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_action_group_add_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method ActionGroup::add_action_with_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_add_action_with_accel" gtk_action_group_add_action_with_accel :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    CString ->                              -- accelerator : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionGroupAddActionWithAccel ["(Since version 3.10)"]#-}
actionGroupAddActionWithAccel ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    Maybe (T.Text) ->                       -- accelerator
    m ()
actionGroupAddActionWithAccel _obj action accelerator = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    maybeAccelerator <- case accelerator of
        Nothing -> return nullPtr
        Just jAccelerator -> do
            jAccelerator' <- textToCString jAccelerator
            return jAccelerator'
    gtk_action_group_add_action_with_accel _obj' action' maybeAccelerator
    touchManagedPtr _obj
    touchManagedPtr action
    freeMem maybeAccelerator
    return ()

-- method ActionGroup::get_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_accel_group" gtk_action_group_get_accel_group :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO (Ptr AccelGroup)

{-# DEPRECATED actionGroupGetAccelGroup ["(Since version 3.10)"]#-}
actionGroupGetAccelGroup ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m AccelGroup
actionGroupGetAccelGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_accel_group _obj'
    checkUnexpectedReturnNULL "gtk_action_group_get_accel_group" result
    result' <- (newObject AccelGroup) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_action" gtk_action_group_get_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- action_name : TBasicType TUTF8
    IO (Ptr Action)

{-# DEPRECATED actionGroupGetAction ["(Since version 3.10)"]#-}
actionGroupGetAction ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- action_name
    m Action
actionGroupGetAction _obj action_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    action_name' <- textToCString action_name
    result <- gtk_action_group_get_action _obj' action_name'
    checkUnexpectedReturnNULL "gtk_action_group_get_action" result
    result' <- (newObject Action) result
    touchManagedPtr _obj
    freeMem action_name'
    return result'

-- method ActionGroup::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_name" gtk_action_group_get_name :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CString

{-# DEPRECATED actionGroupGetName ["(Since version 3.10)"]#-}
actionGroupGetName ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m T.Text
actionGroupGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_name _obj'
    checkUnexpectedReturnNULL "gtk_action_group_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_sensitive" gtk_action_group_get_sensitive :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CInt

{-# DEPRECATED actionGroupGetSensitive ["(Since version 3.10)"]#-}
actionGroupGetSensitive ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m Bool
actionGroupGetSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_visible" gtk_action_group_get_visible :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CInt

{-# DEPRECATED actionGroupGetVisible ["(Since version 3.10)"]#-}
actionGroupGetVisible ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m Bool
actionGroupGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::list_actions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Action")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_list_actions" gtk_action_group_list_actions :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO (Ptr (GList (Ptr Action)))

{-# DEPRECATED actionGroupListActions ["(Since version 3.10)"]#-}
actionGroupListActions ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m [Action]
actionGroupListActions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_list_actions _obj'
    checkUnexpectedReturnNULL "gtk_action_group_list_actions" result
    result' <- unpackGList result
    result'' <- mapM (newObject Action) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method ActionGroup::remove_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_remove_action" gtk_action_group_remove_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionGroupRemoveAction ["(Since version 3.10)"]#-}
actionGroupRemoveAction ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
actionGroupRemoveAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_action_group_remove_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method ActionGroup::set_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_accel_group" gtk_action_group_set_accel_group :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()

{-# DEPRECATED actionGroupSetAccelGroup ["(Since version 3.10)"]#-}
actionGroupSetAccelGroup ::
    (MonadIO m, ActionGroupK a, AccelGroupK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- accel_group
    m ()
actionGroupSetAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    gtk_action_group_set_accel_group _obj' maybeAccel_group
    touchManagedPtr _obj
    whenJust accel_group touchManagedPtr
    return ()

-- method ActionGroup::set_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_sensitive" gtk_action_group_set_sensitive :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionGroupSetSensitive ["(Since version 3.10)"]#-}
actionGroupSetSensitive ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- sensitive
    m ()
actionGroupSetSensitive _obj sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_action_group_set_sensitive _obj' sensitive'
    touchManagedPtr _obj
    return ()

-- method ActionGroup::set_translate_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_translate_func" gtk_action_group_set_translate_func :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    FunPtr TranslateFuncC ->                -- func : TInterface "Gtk" "TranslateFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- notify : TInterface "GLib" "DestroyNotify"
    IO ()

{-# DEPRECATED actionGroupSetTranslateFunc ["(Since version 3.10)"]#-}
actionGroupSetTranslateFunc ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    TranslateFunc ->                        -- func
    m ()
actionGroupSetTranslateFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTranslateFunc (translateFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let notify = safeFreeFunPtrPtr
    gtk_action_group_set_translate_func _obj' func' data_ notify
    touchManagedPtr _obj
    return ()

-- method ActionGroup::set_translation_domain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_translation_domain" gtk_action_group_set_translation_domain :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- domain : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionGroupSetTranslationDomain ["(Since version 3.10)"]#-}
actionGroupSetTranslationDomain ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- domain
    m ()
actionGroupSetTranslationDomain _obj domain = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDomain <- case domain of
        Nothing -> return nullPtr
        Just jDomain -> do
            jDomain' <- textToCString jDomain
            return jDomain'
    gtk_action_group_set_translation_domain _obj' maybeDomain
    touchManagedPtr _obj
    freeMem maybeDomain
    return ()

-- method ActionGroup::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_visible" gtk_action_group_set_visible :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionGroupSetVisible ["(Since version 3.10)"]#-}
actionGroupSetVisible ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
actionGroupSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_action_group_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method ActionGroup::translate_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_translate_string" gtk_action_group_translate_string :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- string : TBasicType TUTF8
    IO CString

{-# DEPRECATED actionGroupTranslateString ["(Since version 3.10)"]#-}
actionGroupTranslateString ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- string
    m T.Text
actionGroupTranslateString _obj string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    string' <- textToCString string
    result <- gtk_action_group_translate_string _obj' string'
    checkUnexpectedReturnNULL "gtk_action_group_translate_string" result
    result' <- cstringToText result
    touchManagedPtr _obj
    freeMem string'
    return result'