#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.ActionGroup
(
ActionGroup(..) ,
IsActionGroup ,
toActionGroup ,
noActionGroup ,
#if ENABLE_OVERLOADING
ActionGroupAddActionMethodInfo ,
#endif
actionGroupAddAction ,
#if ENABLE_OVERLOADING
ActionGroupAddActionWithAccelMethodInfo ,
#endif
actionGroupAddActionWithAccel ,
#if ENABLE_OVERLOADING
ActionGroupGetAccelGroupMethodInfo ,
#endif
actionGroupGetAccelGroup ,
#if ENABLE_OVERLOADING
ActionGroupGetActionMethodInfo ,
#endif
actionGroupGetAction ,
#if ENABLE_OVERLOADING
ActionGroupGetNameMethodInfo ,
#endif
actionGroupGetName ,
#if ENABLE_OVERLOADING
ActionGroupGetSensitiveMethodInfo ,
#endif
actionGroupGetSensitive ,
#if ENABLE_OVERLOADING
ActionGroupGetVisibleMethodInfo ,
#endif
actionGroupGetVisible ,
#if ENABLE_OVERLOADING
ActionGroupListActionsMethodInfo ,
#endif
actionGroupListActions ,
actionGroupNew ,
#if ENABLE_OVERLOADING
ActionGroupRemoveActionMethodInfo ,
#endif
actionGroupRemoveAction ,
#if ENABLE_OVERLOADING
ActionGroupSetAccelGroupMethodInfo ,
#endif
actionGroupSetAccelGroup ,
#if ENABLE_OVERLOADING
ActionGroupSetSensitiveMethodInfo ,
#endif
actionGroupSetSensitive ,
#if ENABLE_OVERLOADING
ActionGroupSetTranslateFuncMethodInfo ,
#endif
actionGroupSetTranslateFunc ,
#if ENABLE_OVERLOADING
ActionGroupSetTranslationDomainMethodInfo,
#endif
actionGroupSetTranslationDomain ,
#if ENABLE_OVERLOADING
ActionGroupSetVisibleMethodInfo ,
#endif
actionGroupSetVisible ,
#if ENABLE_OVERLOADING
ActionGroupTranslateStringMethodInfo ,
#endif
actionGroupTranslateString ,
#if ENABLE_OVERLOADING
ActionGroupAccelGroupPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionGroupAccelGroup ,
#endif
clearActionGroupAccelGroup ,
constructActionGroupAccelGroup ,
getActionGroupAccelGroup ,
setActionGroupAccelGroup ,
#if ENABLE_OVERLOADING
ActionGroupNamePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionGroupName ,
#endif
constructActionGroupName ,
getActionGroupName ,
#if ENABLE_OVERLOADING
ActionGroupSensitivePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionGroupSensitive ,
#endif
constructActionGroupSensitive ,
getActionGroupSensitive ,
setActionGroupSensitive ,
#if ENABLE_OVERLOADING
ActionGroupVisiblePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionGroupVisible ,
#endif
constructActionGroupVisible ,
getActionGroupVisible ,
setActionGroupVisible ,
ActionGroupConnectProxyCallback ,
#if ENABLE_OVERLOADING
ActionGroupConnectProxySignalInfo ,
#endif
C_ActionGroupConnectProxyCallback ,
afterActionGroupConnectProxy ,
genClosure_ActionGroupConnectProxy ,
mk_ActionGroupConnectProxyCallback ,
noActionGroupConnectProxyCallback ,
onActionGroupConnectProxy ,
wrap_ActionGroupConnectProxyCallback ,
ActionGroupDisconnectProxyCallback ,
#if ENABLE_OVERLOADING
ActionGroupDisconnectProxySignalInfo ,
#endif
C_ActionGroupDisconnectProxyCallback ,
afterActionGroupDisconnectProxy ,
genClosure_ActionGroupDisconnectProxy ,
mk_ActionGroupDisconnectProxyCallback ,
noActionGroupDisconnectProxyCallback ,
onActionGroupDisconnectProxy ,
wrap_ActionGroupDisconnectProxyCallback ,
ActionGroupPostActivateCallback ,
#if ENABLE_OVERLOADING
ActionGroupPostActivateSignalInfo ,
#endif
C_ActionGroupPostActivateCallback ,
afterActionGroupPostActivate ,
genClosure_ActionGroupPostActivate ,
mk_ActionGroupPostActivateCallback ,
noActionGroupPostActivateCallback ,
onActionGroupPostActivate ,
wrap_ActionGroupPostActivateCallback ,
ActionGroupPreActivateCallback ,
#if ENABLE_OVERLOADING
ActionGroupPreActivateSignalInfo ,
#endif
C_ActionGroupPreActivateCallback ,
afterActionGroupPreActivate ,
genClosure_ActionGroupPreActivate ,
mk_ActionGroupPreActivateCallback ,
noActionGroupPreActivateCallback ,
onActionGroupPreActivate ,
wrap_ActionGroupPreActivateCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.AccelGroup as Gtk.AccelGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Action as Gtk.Action
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype ActionGroup = ActionGroup (ManagedPtr ActionGroup)
foreign import ccall "gtk_action_group_get_type"
c_gtk_action_group_get_type :: IO GType
instance GObject ActionGroup where
gobjectType = c_gtk_action_group_get_type
class (GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance (GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance O.HasParentTypes ActionGroup
type instance O.ParentTypes ActionGroup = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toActionGroup :: (MonadIO m, IsActionGroup o) => o -> m ActionGroup
toActionGroup = liftIO . unsafeCastTo ActionGroup
noActionGroup :: Maybe ActionGroup
noActionGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveActionGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveActionGroupMethod "addAction" o = ActionGroupAddActionMethodInfo
ResolveActionGroupMethod "addActionWithAccel" o = ActionGroupAddActionWithAccelMethodInfo
ResolveActionGroupMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveActionGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveActionGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveActionGroupMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveActionGroupMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveActionGroupMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveActionGroupMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveActionGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveActionGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveActionGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveActionGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveActionGroupMethod "listActions" o = ActionGroupListActionsMethodInfo
ResolveActionGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveActionGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveActionGroupMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveActionGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveActionGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveActionGroupMethod "removeAction" o = ActionGroupRemoveActionMethodInfo
ResolveActionGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveActionGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveActionGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveActionGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveActionGroupMethod "translateString" o = ActionGroupTranslateStringMethodInfo
ResolveActionGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveActionGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveActionGroupMethod "getAccelGroup" o = ActionGroupGetAccelGroupMethodInfo
ResolveActionGroupMethod "getAction" o = ActionGroupGetActionMethodInfo
ResolveActionGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveActionGroupMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveActionGroupMethod "getName" o = ActionGroupGetNameMethodInfo
ResolveActionGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveActionGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveActionGroupMethod "getSensitive" o = ActionGroupGetSensitiveMethodInfo
ResolveActionGroupMethod "getVisible" o = ActionGroupGetVisibleMethodInfo
ResolveActionGroupMethod "setAccelGroup" o = ActionGroupSetAccelGroupMethodInfo
ResolveActionGroupMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveActionGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveActionGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveActionGroupMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveActionGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveActionGroupMethod "setSensitive" o = ActionGroupSetSensitiveMethodInfo
ResolveActionGroupMethod "setTranslateFunc" o = ActionGroupSetTranslateFuncMethodInfo
ResolveActionGroupMethod "setTranslationDomain" o = ActionGroupSetTranslationDomainMethodInfo
ResolveActionGroupMethod "setVisible" o = ActionGroupSetVisibleMethodInfo
ResolveActionGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.MethodInfo info ActionGroup p) => OL.IsLabel t (ActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
{-# DEPRECATED ActionGroupConnectProxyCallback ["(Since version 3.10)"] #-}
type ActionGroupConnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
noActionGroupConnectProxyCallback :: Maybe ActionGroupConnectProxyCallback
noActionGroupConnectProxyCallback = Nothing
type C_ActionGroupConnectProxyCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupConnectProxyCallback :: C_ActionGroupConnectProxyCallback -> IO (FunPtr C_ActionGroupConnectProxyCallback)
genClosure_ActionGroupConnectProxy :: MonadIO m => ActionGroupConnectProxyCallback -> m (GClosure C_ActionGroupConnectProxyCallback)
genClosure_ActionGroupConnectProxy cb = liftIO $ do
let cb' = wrap_ActionGroupConnectProxyCallback cb
mk_ActionGroupConnectProxyCallback cb' >>= B.GClosure.newGClosure
wrap_ActionGroupConnectProxyCallback ::
ActionGroupConnectProxyCallback ->
C_ActionGroupConnectProxyCallback
wrap_ActionGroupConnectProxyCallback _cb _ action proxy _ = do
action' <- (newObject Gtk.Action.Action) action
proxy' <- (newObject Gtk.Widget.Widget) proxy
_cb action' proxy'
onActionGroupConnectProxy :: (IsActionGroup a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
onActionGroupConnectProxy obj cb = liftIO $ do
let cb' = wrap_ActionGroupConnectProxyCallback cb
cb'' <- mk_ActionGroupConnectProxyCallback cb'
connectSignalFunPtr obj "connect-proxy" cb'' SignalConnectBefore
afterActionGroupConnectProxy :: (IsActionGroup a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
afterActionGroupConnectProxy obj cb = liftIO $ do
let cb' = wrap_ActionGroupConnectProxyCallback cb
cb'' <- mk_ActionGroupConnectProxyCallback cb'
connectSignalFunPtr obj "connect-proxy" cb'' SignalConnectAfter
{-# DEPRECATED ActionGroupDisconnectProxyCallback ["(Since version 3.10)"] #-}
type ActionGroupDisconnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
noActionGroupDisconnectProxyCallback :: Maybe ActionGroupDisconnectProxyCallback
noActionGroupDisconnectProxyCallback = Nothing
type C_ActionGroupDisconnectProxyCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupDisconnectProxyCallback :: C_ActionGroupDisconnectProxyCallback -> IO (FunPtr C_ActionGroupDisconnectProxyCallback)
genClosure_ActionGroupDisconnectProxy :: MonadIO m => ActionGroupDisconnectProxyCallback -> m (GClosure C_ActionGroupDisconnectProxyCallback)
genClosure_ActionGroupDisconnectProxy cb = liftIO $ do
let cb' = wrap_ActionGroupDisconnectProxyCallback cb
mk_ActionGroupDisconnectProxyCallback cb' >>= B.GClosure.newGClosure
wrap_ActionGroupDisconnectProxyCallback ::
ActionGroupDisconnectProxyCallback ->
C_ActionGroupDisconnectProxyCallback
wrap_ActionGroupDisconnectProxyCallback _cb _ action proxy _ = do
action' <- (newObject Gtk.Action.Action) action
proxy' <- (newObject Gtk.Widget.Widget) proxy
_cb action' proxy'
onActionGroupDisconnectProxy :: (IsActionGroup a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
onActionGroupDisconnectProxy obj cb = liftIO $ do
let cb' = wrap_ActionGroupDisconnectProxyCallback cb
cb'' <- mk_ActionGroupDisconnectProxyCallback cb'
connectSignalFunPtr obj "disconnect-proxy" cb'' SignalConnectBefore
afterActionGroupDisconnectProxy :: (IsActionGroup a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
afterActionGroupDisconnectProxy obj cb = liftIO $ do
let cb' = wrap_ActionGroupDisconnectProxyCallback cb
cb'' <- mk_ActionGroupDisconnectProxyCallback cb'
connectSignalFunPtr obj "disconnect-proxy" cb'' SignalConnectAfter
{-# DEPRECATED ActionGroupPostActivateCallback ["(Since version 3.10)"] #-}
type ActionGroupPostActivateCallback =
Gtk.Action.Action
-> IO ()
noActionGroupPostActivateCallback :: Maybe ActionGroupPostActivateCallback
noActionGroupPostActivateCallback = Nothing
type C_ActionGroupPostActivateCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupPostActivateCallback :: C_ActionGroupPostActivateCallback -> IO (FunPtr C_ActionGroupPostActivateCallback)
genClosure_ActionGroupPostActivate :: MonadIO m => ActionGroupPostActivateCallback -> m (GClosure C_ActionGroupPostActivateCallback)
genClosure_ActionGroupPostActivate cb = liftIO $ do
let cb' = wrap_ActionGroupPostActivateCallback cb
mk_ActionGroupPostActivateCallback cb' >>= B.GClosure.newGClosure
wrap_ActionGroupPostActivateCallback ::
ActionGroupPostActivateCallback ->
C_ActionGroupPostActivateCallback
wrap_ActionGroupPostActivateCallback _cb _ action _ = do
action' <- (newObject Gtk.Action.Action) action
_cb action'
onActionGroupPostActivate :: (IsActionGroup a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
onActionGroupPostActivate obj cb = liftIO $ do
let cb' = wrap_ActionGroupPostActivateCallback cb
cb'' <- mk_ActionGroupPostActivateCallback cb'
connectSignalFunPtr obj "post-activate" cb'' SignalConnectBefore
afterActionGroupPostActivate :: (IsActionGroup a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
afterActionGroupPostActivate obj cb = liftIO $ do
let cb' = wrap_ActionGroupPostActivateCallback cb
cb'' <- mk_ActionGroupPostActivateCallback cb'
connectSignalFunPtr obj "post-activate" cb'' SignalConnectAfter
{-# DEPRECATED ActionGroupPreActivateCallback ["(Since version 3.10)"] #-}
type ActionGroupPreActivateCallback =
Gtk.Action.Action
-> IO ()
noActionGroupPreActivateCallback :: Maybe ActionGroupPreActivateCallback
noActionGroupPreActivateCallback = Nothing
type C_ActionGroupPreActivateCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupPreActivateCallback :: C_ActionGroupPreActivateCallback -> IO (FunPtr C_ActionGroupPreActivateCallback)
genClosure_ActionGroupPreActivate :: MonadIO m => ActionGroupPreActivateCallback -> m (GClosure C_ActionGroupPreActivateCallback)
genClosure_ActionGroupPreActivate cb = liftIO $ do
let cb' = wrap_ActionGroupPreActivateCallback cb
mk_ActionGroupPreActivateCallback cb' >>= B.GClosure.newGClosure
wrap_ActionGroupPreActivateCallback ::
ActionGroupPreActivateCallback ->
C_ActionGroupPreActivateCallback
wrap_ActionGroupPreActivateCallback _cb _ action _ = do
action' <- (newObject Gtk.Action.Action) action
_cb action'
onActionGroupPreActivate :: (IsActionGroup a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
onActionGroupPreActivate obj cb = liftIO $ do
let cb' = wrap_ActionGroupPreActivateCallback cb
cb'' <- mk_ActionGroupPreActivateCallback cb'
connectSignalFunPtr obj "pre-activate" cb'' SignalConnectBefore
afterActionGroupPreActivate :: (IsActionGroup a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
afterActionGroupPreActivate obj cb = liftIO $ do
let cb' = wrap_ActionGroupPreActivateCallback cb
cb'' <- mk_ActionGroupPreActivateCallback cb'
connectSignalFunPtr obj "pre-activate" cb'' SignalConnectAfter
getActionGroupAccelGroup :: (MonadIO m, IsActionGroup o) => o -> m Gtk.AccelGroup.AccelGroup
getActionGroupAccelGroup obj = liftIO $ checkUnexpectedNothing "getActionGroupAccelGroup" $ B.Properties.getObjectPropertyObject obj "accel-group" Gtk.AccelGroup.AccelGroup
setActionGroupAccelGroup :: (MonadIO m, IsActionGroup o, Gtk.AccelGroup.IsAccelGroup a) => o -> a -> m ()
setActionGroupAccelGroup obj val = liftIO $ B.Properties.setObjectPropertyObject obj "accel-group" (Just val)
constructActionGroupAccelGroup :: (IsActionGroup o, Gtk.AccelGroup.IsAccelGroup a) => a -> IO (GValueConstruct o)
constructActionGroupAccelGroup val = B.Properties.constructObjectPropertyObject "accel-group" (Just val)
clearActionGroupAccelGroup :: (MonadIO m, IsActionGroup o) => o -> m ()
clearActionGroupAccelGroup obj = liftIO $ B.Properties.setObjectPropertyObject obj "accel-group" (Nothing :: Maybe Gtk.AccelGroup.AccelGroup)
#if ENABLE_OVERLOADING
data ActionGroupAccelGroupPropertyInfo
instance AttrInfo ActionGroupAccelGroupPropertyInfo where
type AttrAllowedOps ActionGroupAccelGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.IsAccelGroup
type AttrBaseTypeConstraint ActionGroupAccelGroupPropertyInfo = IsActionGroup
type AttrGetType ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.AccelGroup
type AttrLabel ActionGroupAccelGroupPropertyInfo = "accel-group"
type AttrOrigin ActionGroupAccelGroupPropertyInfo = ActionGroup
attrGet _ = getActionGroupAccelGroup
attrSet _ = setActionGroupAccelGroup
attrConstruct _ = constructActionGroupAccelGroup
attrClear _ = clearActionGroupAccelGroup
#endif
getActionGroupName :: (MonadIO m, IsActionGroup o) => o -> m T.Text
getActionGroupName obj = liftIO $ checkUnexpectedNothing "getActionGroupName" $ B.Properties.getObjectPropertyString obj "name"
constructActionGroupName :: (IsActionGroup o) => T.Text -> IO (GValueConstruct o)
constructActionGroupName val = B.Properties.constructObjectPropertyString "name" (Just val)
#if ENABLE_OVERLOADING
data ActionGroupNamePropertyInfo
instance AttrInfo ActionGroupNamePropertyInfo where
type AttrAllowedOps ActionGroupNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionGroupNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionGroupNamePropertyInfo = IsActionGroup
type AttrGetType ActionGroupNamePropertyInfo = T.Text
type AttrLabel ActionGroupNamePropertyInfo = "name"
type AttrOrigin ActionGroupNamePropertyInfo = ActionGroup
attrGet _ = getActionGroupName
attrSet _ = undefined
attrConstruct _ = constructActionGroupName
attrClear _ = undefined
#endif
getActionGroupSensitive :: (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupSensitive obj = liftIO $ B.Properties.getObjectPropertyBool obj "sensitive"
setActionGroupSensitive :: (MonadIO m, IsActionGroup o) => o -> Bool -> m ()
setActionGroupSensitive obj val = liftIO $ B.Properties.setObjectPropertyBool obj "sensitive" val
constructActionGroupSensitive :: (IsActionGroup o) => Bool -> IO (GValueConstruct o)
constructActionGroupSensitive val = B.Properties.constructObjectPropertyBool "sensitive" val
#if ENABLE_OVERLOADING
data ActionGroupSensitivePropertyInfo
instance AttrInfo ActionGroupSensitivePropertyInfo where
type AttrAllowedOps ActionGroupSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionGroupSensitivePropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionGroupSensitivePropertyInfo = IsActionGroup
type AttrGetType ActionGroupSensitivePropertyInfo = Bool
type AttrLabel ActionGroupSensitivePropertyInfo = "sensitive"
type AttrOrigin ActionGroupSensitivePropertyInfo = ActionGroup
attrGet _ = getActionGroupSensitive
attrSet _ = setActionGroupSensitive
attrConstruct _ = constructActionGroupSensitive
attrClear _ = undefined
#endif
getActionGroupVisible :: (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupVisible obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible"
setActionGroupVisible :: (MonadIO m, IsActionGroup o) => o -> Bool -> m ()
setActionGroupVisible obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible" val
constructActionGroupVisible :: (IsActionGroup o) => Bool -> IO (GValueConstruct o)
constructActionGroupVisible val = B.Properties.constructObjectPropertyBool "visible" val
#if ENABLE_OVERLOADING
data ActionGroupVisiblePropertyInfo
instance AttrInfo ActionGroupVisiblePropertyInfo where
type AttrAllowedOps ActionGroupVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionGroupVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionGroupVisiblePropertyInfo = IsActionGroup
type AttrGetType ActionGroupVisiblePropertyInfo = Bool
type AttrLabel ActionGroupVisiblePropertyInfo = "visible"
type AttrOrigin ActionGroupVisiblePropertyInfo = ActionGroup
attrGet _ = getActionGroupVisible
attrSet _ = setActionGroupVisible
attrConstruct _ = constructActionGroupVisible
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ActionGroup
type instance O.AttributeList ActionGroup = ActionGroupAttributeList
type ActionGroupAttributeList = ('[ '("accelGroup", ActionGroupAccelGroupPropertyInfo), '("name", ActionGroupNamePropertyInfo), '("sensitive", ActionGroupSensitivePropertyInfo), '("visible", ActionGroupVisiblePropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
actionGroupAccelGroup :: AttrLabelProxy "accelGroup"
actionGroupAccelGroup = AttrLabelProxy
actionGroupName :: AttrLabelProxy "name"
actionGroupName = AttrLabelProxy
actionGroupSensitive :: AttrLabelProxy "sensitive"
actionGroupSensitive = AttrLabelProxy
actionGroupVisible :: AttrLabelProxy "visible"
actionGroupVisible = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data ActionGroupConnectProxySignalInfo
instance SignalInfo ActionGroupConnectProxySignalInfo where
type HaskellCallbackType ActionGroupConnectProxySignalInfo = ActionGroupConnectProxyCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ActionGroupConnectProxyCallback cb
cb'' <- mk_ActionGroupConnectProxyCallback cb'
connectSignalFunPtr obj "connect-proxy" cb'' connectMode
data ActionGroupDisconnectProxySignalInfo
instance SignalInfo ActionGroupDisconnectProxySignalInfo where
type HaskellCallbackType ActionGroupDisconnectProxySignalInfo = ActionGroupDisconnectProxyCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ActionGroupDisconnectProxyCallback cb
cb'' <- mk_ActionGroupDisconnectProxyCallback cb'
connectSignalFunPtr obj "disconnect-proxy" cb'' connectMode
data ActionGroupPostActivateSignalInfo
instance SignalInfo ActionGroupPostActivateSignalInfo where
type HaskellCallbackType ActionGroupPostActivateSignalInfo = ActionGroupPostActivateCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ActionGroupPostActivateCallback cb
cb'' <- mk_ActionGroupPostActivateCallback cb'
connectSignalFunPtr obj "post-activate" cb'' connectMode
data ActionGroupPreActivateSignalInfo
instance SignalInfo ActionGroupPreActivateSignalInfo where
type HaskellCallbackType ActionGroupPreActivateSignalInfo = ActionGroupPreActivateCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ActionGroupPreActivateCallback cb
cb'' <- mk_ActionGroupPreActivateCallback cb'
connectSignalFunPtr obj "pre-activate" cb'' connectMode
type instance O.SignalList ActionGroup = ActionGroupSignalList
type ActionGroupSignalList = ('[ '("connectProxy", ActionGroupConnectProxySignalInfo), '("disconnectProxy", ActionGroupDisconnectProxySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postActivate", ActionGroupPostActivateSignalInfo), '("preActivate", ActionGroupPreActivateSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_action_group_new" gtk_action_group_new ::
CString ->
IO (Ptr ActionGroup)
{-# DEPRECATED actionGroupNew ["(Since version 3.10)"] #-}
actionGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m ActionGroup
actionGroupNew name = liftIO $ do
name' <- textToCString name
result <- gtk_action_group_new name'
checkUnexpectedReturnNULL "actionGroupNew" result
result' <- (wrapObject ActionGroup) result
freeMem name'
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_action_group_add_action" gtk_action_group_add_action ::
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
IO ()
{-# DEPRECATED actionGroupAddAction ["(Since version 3.10)"] #-}
actionGroupAddAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) =>
a
-> b
-> m ()
actionGroupAddAction actionGroup action = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
action' <- unsafeManagedPtrCastPtr action
gtk_action_group_add_action actionGroup' action'
touchManagedPtr actionGroup
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionGroupAddActionMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.MethodInfo ActionGroupAddActionMethodInfo a signature where
overloadedMethod _ = actionGroupAddAction
#endif
foreign import ccall "gtk_action_group_add_action_with_accel" gtk_action_group_add_action_with_accel ::
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
CString ->
IO ()
{-# DEPRECATED actionGroupAddActionWithAccel ["(Since version 3.10)"] #-}
actionGroupAddActionWithAccel ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) =>
a
-> b
-> Maybe (T.Text)
-> m ()
actionGroupAddActionWithAccel actionGroup action accelerator = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
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 actionGroup' action' maybeAccelerator
touchManagedPtr actionGroup
touchManagedPtr action
freeMem maybeAccelerator
return ()
#if ENABLE_OVERLOADING
data ActionGroupAddActionWithAccelMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.MethodInfo ActionGroupAddActionWithAccelMethodInfo a signature where
overloadedMethod _ = actionGroupAddActionWithAccel
#endif
foreign import ccall "gtk_action_group_get_accel_group" gtk_action_group_get_accel_group ::
Ptr ActionGroup ->
IO (Ptr Gtk.AccelGroup.AccelGroup)
{-# DEPRECATED actionGroupGetAccelGroup ["(Since version 3.10)"] #-}
actionGroupGetAccelGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m Gtk.AccelGroup.AccelGroup
actionGroupGetAccelGroup actionGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
result <- gtk_action_group_get_accel_group actionGroup'
checkUnexpectedReturnNULL "actionGroupGetAccelGroup" result
result' <- (newObject Gtk.AccelGroup.AccelGroup) result
touchManagedPtr actionGroup
return result'
#if ENABLE_OVERLOADING
data ActionGroupGetAccelGroupMethodInfo
instance (signature ~ (m Gtk.AccelGroup.AccelGroup), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupGetAccelGroupMethodInfo a signature where
overloadedMethod _ = actionGroupGetAccelGroup
#endif
foreign import ccall "gtk_action_group_get_action" gtk_action_group_get_action ::
Ptr ActionGroup ->
CString ->
IO (Ptr Gtk.Action.Action)
{-# DEPRECATED actionGroupGetAction ["(Since version 3.10)"] #-}
actionGroupGetAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m (Maybe Gtk.Action.Action)
actionGroupGetAction actionGroup actionName = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
actionName' <- textToCString actionName
result <- gtk_action_group_get_action actionGroup' actionName'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gtk.Action.Action) result'
return result''
touchManagedPtr actionGroup
freeMem actionName'
return maybeResult
#if ENABLE_OVERLOADING
data ActionGroupGetActionMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.Action.Action)), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupGetActionMethodInfo a signature where
overloadedMethod _ = actionGroupGetAction
#endif
foreign import ccall "gtk_action_group_get_name" gtk_action_group_get_name ::
Ptr ActionGroup ->
IO CString
{-# DEPRECATED actionGroupGetName ["(Since version 3.10)"] #-}
actionGroupGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m T.Text
actionGroupGetName actionGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
result <- gtk_action_group_get_name actionGroup'
checkUnexpectedReturnNULL "actionGroupGetName" result
result' <- cstringToText result
touchManagedPtr actionGroup
return result'
#if ENABLE_OVERLOADING
data ActionGroupGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupGetNameMethodInfo a signature where
overloadedMethod _ = actionGroupGetName
#endif
foreign import ccall "gtk_action_group_get_sensitive" gtk_action_group_get_sensitive ::
Ptr ActionGroup ->
IO CInt
{-# DEPRECATED actionGroupGetSensitive ["(Since version 3.10)"] #-}
actionGroupGetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m Bool
actionGroupGetSensitive actionGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
result <- gtk_action_group_get_sensitive actionGroup'
let result' = (/= 0) result
touchManagedPtr actionGroup
return result'
#if ENABLE_OVERLOADING
data ActionGroupGetSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupGetSensitiveMethodInfo a signature where
overloadedMethod _ = actionGroupGetSensitive
#endif
foreign import ccall "gtk_action_group_get_visible" gtk_action_group_get_visible ::
Ptr ActionGroup ->
IO CInt
{-# DEPRECATED actionGroupGetVisible ["(Since version 3.10)"] #-}
actionGroupGetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m Bool
actionGroupGetVisible actionGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
result <- gtk_action_group_get_visible actionGroup'
let result' = (/= 0) result
touchManagedPtr actionGroup
return result'
#if ENABLE_OVERLOADING
data ActionGroupGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupGetVisibleMethodInfo a signature where
overloadedMethod _ = actionGroupGetVisible
#endif
foreign import ccall "gtk_action_group_list_actions" gtk_action_group_list_actions ::
Ptr ActionGroup ->
IO (Ptr (GList (Ptr Gtk.Action.Action)))
{-# DEPRECATED actionGroupListActions ["(Since version 3.10)"] #-}
actionGroupListActions ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> m [Gtk.Action.Action]
actionGroupListActions actionGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
result <- gtk_action_group_list_actions actionGroup'
result' <- unpackGList result
result'' <- mapM (newObject Gtk.Action.Action) result'
g_list_free result
touchManagedPtr actionGroup
return result''
#if ENABLE_OVERLOADING
data ActionGroupListActionsMethodInfo
instance (signature ~ (m [Gtk.Action.Action]), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupListActionsMethodInfo a signature where
overloadedMethod _ = actionGroupListActions
#endif
foreign import ccall "gtk_action_group_remove_action" gtk_action_group_remove_action ::
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
IO ()
{-# DEPRECATED actionGroupRemoveAction ["(Since version 3.10)"] #-}
actionGroupRemoveAction ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) =>
a
-> b
-> m ()
actionGroupRemoveAction actionGroup action = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
action' <- unsafeManagedPtrCastPtr action
gtk_action_group_remove_action actionGroup' action'
touchManagedPtr actionGroup
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionGroupRemoveActionMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.MethodInfo ActionGroupRemoveActionMethodInfo a signature where
overloadedMethod _ = actionGroupRemoveAction
#endif
foreign import ccall "gtk_action_group_set_accel_group" gtk_action_group_set_accel_group ::
Ptr ActionGroup ->
Ptr Gtk.AccelGroup.AccelGroup ->
IO ()
{-# DEPRECATED actionGroupSetAccelGroup ["(Since version 3.10)"] #-}
actionGroupSetAccelGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a, Gtk.AccelGroup.IsAccelGroup b) =>
a
-> Maybe (b)
-> m ()
actionGroupSetAccelGroup actionGroup accelGroup = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
maybeAccelGroup <- case accelGroup of
Nothing -> return nullPtr
Just jAccelGroup -> do
jAccelGroup' <- unsafeManagedPtrCastPtr jAccelGroup
return jAccelGroup'
gtk_action_group_set_accel_group actionGroup' maybeAccelGroup
touchManagedPtr actionGroup
whenJust accelGroup touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data ActionGroupSetAccelGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsActionGroup a, Gtk.AccelGroup.IsAccelGroup b) => O.MethodInfo ActionGroupSetAccelGroupMethodInfo a signature where
overloadedMethod _ = actionGroupSetAccelGroup
#endif
foreign import ccall "gtk_action_group_set_sensitive" gtk_action_group_set_sensitive ::
Ptr ActionGroup ->
CInt ->
IO ()
{-# DEPRECATED actionGroupSetSensitive ["(Since version 3.10)"] #-}
actionGroupSetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> Bool
-> m ()
actionGroupSetSensitive actionGroup sensitive = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
let sensitive' = (fromIntegral . fromEnum) sensitive
gtk_action_group_set_sensitive actionGroup' sensitive'
touchManagedPtr actionGroup
return ()
#if ENABLE_OVERLOADING
data ActionGroupSetSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupSetSensitiveMethodInfo a signature where
overloadedMethod _ = actionGroupSetSensitive
#endif
foreign import ccall "gtk_action_group_set_translate_func" gtk_action_group_set_translate_func ::
Ptr ActionGroup ->
FunPtr Gtk.Callbacks.C_TranslateFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
{-# DEPRECATED actionGroupSetTranslateFunc ["(Since version 3.10)"] #-}
actionGroupSetTranslateFunc ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> Gtk.Callbacks.TranslateFunc
-> m ()
actionGroupSetTranslateFunc actionGroup func = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
func' <- Gtk.Callbacks.mk_TranslateFunc (Gtk.Callbacks.wrap_TranslateFunc Nothing (Gtk.Callbacks.drop_closures_TranslateFunc func))
let data_ = castFunPtrToPtr func'
let notify = safeFreeFunPtrPtr
gtk_action_group_set_translate_func actionGroup' func' data_ notify
touchManagedPtr actionGroup
return ()
#if ENABLE_OVERLOADING
data ActionGroupSetTranslateFuncMethodInfo
instance (signature ~ (Gtk.Callbacks.TranslateFunc -> m ()), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupSetTranslateFuncMethodInfo a signature where
overloadedMethod _ = actionGroupSetTranslateFunc
#endif
foreign import ccall "gtk_action_group_set_translation_domain" gtk_action_group_set_translation_domain ::
Ptr ActionGroup ->
CString ->
IO ()
{-# DEPRECATED actionGroupSetTranslationDomain ["(Since version 3.10)"] #-}
actionGroupSetTranslationDomain ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> Maybe (T.Text)
-> m ()
actionGroupSetTranslationDomain actionGroup domain = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
maybeDomain <- case domain of
Nothing -> return nullPtr
Just jDomain -> do
jDomain' <- textToCString jDomain
return jDomain'
gtk_action_group_set_translation_domain actionGroup' maybeDomain
touchManagedPtr actionGroup
freeMem maybeDomain
return ()
#if ENABLE_OVERLOADING
data ActionGroupSetTranslationDomainMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupSetTranslationDomainMethodInfo a signature where
overloadedMethod _ = actionGroupSetTranslationDomain
#endif
foreign import ccall "gtk_action_group_set_visible" gtk_action_group_set_visible ::
Ptr ActionGroup ->
CInt ->
IO ()
{-# DEPRECATED actionGroupSetVisible ["(Since version 3.10)"] #-}
actionGroupSetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> Bool
-> m ()
actionGroupSetVisible actionGroup visible = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
let visible' = (fromIntegral . fromEnum) visible
gtk_action_group_set_visible actionGroup' visible'
touchManagedPtr actionGroup
return ()
#if ENABLE_OVERLOADING
data ActionGroupSetVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupSetVisibleMethodInfo a signature where
overloadedMethod _ = actionGroupSetVisible
#endif
foreign import ccall "gtk_action_group_translate_string" gtk_action_group_translate_string ::
Ptr ActionGroup ->
CString ->
IO CString
{-# DEPRECATED actionGroupTranslateString ["(Since version 3.10)"] #-}
actionGroupTranslateString ::
(B.CallStack.HasCallStack, MonadIO m, IsActionGroup a) =>
a
-> T.Text
-> m T.Text
actionGroupTranslateString actionGroup string = liftIO $ do
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
string' <- textToCString string
result <- gtk_action_group_translate_string actionGroup' string'
checkUnexpectedReturnNULL "actionGroupTranslateString" result
result' <- cstringToText result
touchManagedPtr actionGroup
freeMem string'
return result'
#if ENABLE_OVERLOADING
data ActionGroupTranslateStringMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsActionGroup a) => O.MethodInfo ActionGroupTranslateStringMethodInfo a signature where
overloadedMethod _ = actionGroupTranslateString
#endif