#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.Action
(
Action(..) ,
IsAction ,
toAction ,
noAction ,
#if ENABLE_OVERLOADING
ActionActivateMethodInfo ,
#endif
actionActivate ,
#if ENABLE_OVERLOADING
ActionBlockActivateMethodInfo ,
#endif
actionBlockActivate ,
#if ENABLE_OVERLOADING
ActionConnectAcceleratorMethodInfo ,
#endif
actionConnectAccelerator ,
#if ENABLE_OVERLOADING
ActionCreateIconMethodInfo ,
#endif
actionCreateIcon ,
#if ENABLE_OVERLOADING
ActionCreateMenuMethodInfo ,
#endif
actionCreateMenu ,
#if ENABLE_OVERLOADING
ActionCreateMenuItemMethodInfo ,
#endif
actionCreateMenuItem ,
#if ENABLE_OVERLOADING
ActionCreateToolItemMethodInfo ,
#endif
actionCreateToolItem ,
#if ENABLE_OVERLOADING
ActionDisconnectAcceleratorMethodInfo ,
#endif
actionDisconnectAccelerator ,
#if ENABLE_OVERLOADING
ActionGetAccelClosureMethodInfo ,
#endif
actionGetAccelClosure ,
#if ENABLE_OVERLOADING
ActionGetAccelPathMethodInfo ,
#endif
actionGetAccelPath ,
#if ENABLE_OVERLOADING
ActionGetAlwaysShowImageMethodInfo ,
#endif
actionGetAlwaysShowImage ,
#if ENABLE_OVERLOADING
ActionGetGiconMethodInfo ,
#endif
actionGetGicon ,
#if ENABLE_OVERLOADING
ActionGetIconNameMethodInfo ,
#endif
actionGetIconName ,
#if ENABLE_OVERLOADING
ActionGetIsImportantMethodInfo ,
#endif
actionGetIsImportant ,
#if ENABLE_OVERLOADING
ActionGetLabelMethodInfo ,
#endif
actionGetLabel ,
#if ENABLE_OVERLOADING
ActionGetNameMethodInfo ,
#endif
actionGetName ,
#if ENABLE_OVERLOADING
ActionGetProxiesMethodInfo ,
#endif
actionGetProxies ,
#if ENABLE_OVERLOADING
ActionGetSensitiveMethodInfo ,
#endif
actionGetSensitive ,
#if ENABLE_OVERLOADING
ActionGetShortLabelMethodInfo ,
#endif
actionGetShortLabel ,
#if ENABLE_OVERLOADING
ActionGetStockIdMethodInfo ,
#endif
actionGetStockId ,
#if ENABLE_OVERLOADING
ActionGetTooltipMethodInfo ,
#endif
actionGetTooltip ,
#if ENABLE_OVERLOADING
ActionGetVisibleMethodInfo ,
#endif
actionGetVisible ,
#if ENABLE_OVERLOADING
ActionGetVisibleHorizontalMethodInfo ,
#endif
actionGetVisibleHorizontal ,
#if ENABLE_OVERLOADING
ActionGetVisibleVerticalMethodInfo ,
#endif
actionGetVisibleVertical ,
#if ENABLE_OVERLOADING
ActionIsSensitiveMethodInfo ,
#endif
actionIsSensitive ,
#if ENABLE_OVERLOADING
ActionIsVisibleMethodInfo ,
#endif
actionIsVisible ,
actionNew ,
#if ENABLE_OVERLOADING
ActionSetAccelGroupMethodInfo ,
#endif
actionSetAccelGroup ,
#if ENABLE_OVERLOADING
ActionSetAccelPathMethodInfo ,
#endif
actionSetAccelPath ,
#if ENABLE_OVERLOADING
ActionSetAlwaysShowImageMethodInfo ,
#endif
actionSetAlwaysShowImage ,
#if ENABLE_OVERLOADING
ActionSetGiconMethodInfo ,
#endif
actionSetGicon ,
#if ENABLE_OVERLOADING
ActionSetIconNameMethodInfo ,
#endif
actionSetIconName ,
#if ENABLE_OVERLOADING
ActionSetIsImportantMethodInfo ,
#endif
actionSetIsImportant ,
#if ENABLE_OVERLOADING
ActionSetLabelMethodInfo ,
#endif
actionSetLabel ,
#if ENABLE_OVERLOADING
ActionSetSensitiveMethodInfo ,
#endif
actionSetSensitive ,
#if ENABLE_OVERLOADING
ActionSetShortLabelMethodInfo ,
#endif
actionSetShortLabel ,
#if ENABLE_OVERLOADING
ActionSetStockIdMethodInfo ,
#endif
actionSetStockId ,
#if ENABLE_OVERLOADING
ActionSetTooltipMethodInfo ,
#endif
actionSetTooltip ,
#if ENABLE_OVERLOADING
ActionSetVisibleMethodInfo ,
#endif
actionSetVisible ,
#if ENABLE_OVERLOADING
ActionSetVisibleHorizontalMethodInfo ,
#endif
actionSetVisibleHorizontal ,
#if ENABLE_OVERLOADING
ActionSetVisibleVerticalMethodInfo ,
#endif
actionSetVisibleVertical ,
#if ENABLE_OVERLOADING
ActionUnblockActivateMethodInfo ,
#endif
actionUnblockActivate ,
#if ENABLE_OVERLOADING
ActionActionGroupPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionActionGroup ,
#endif
clearActionActionGroup ,
constructActionActionGroup ,
getActionActionGroup ,
setActionActionGroup ,
#if ENABLE_OVERLOADING
ActionAlwaysShowImagePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionAlwaysShowImage ,
#endif
constructActionAlwaysShowImage ,
getActionAlwaysShowImage ,
setActionAlwaysShowImage ,
#if ENABLE_OVERLOADING
ActionGiconPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionGicon ,
#endif
constructActionGicon ,
getActionGicon ,
setActionGicon ,
#if ENABLE_OVERLOADING
ActionHideIfEmptyPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionHideIfEmpty ,
#endif
constructActionHideIfEmpty ,
getActionHideIfEmpty ,
setActionHideIfEmpty ,
#if ENABLE_OVERLOADING
ActionIconNamePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionIconName ,
#endif
constructActionIconName ,
getActionIconName ,
setActionIconName ,
#if ENABLE_OVERLOADING
ActionIsImportantPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionIsImportant ,
#endif
constructActionIsImportant ,
getActionIsImportant ,
setActionIsImportant ,
#if ENABLE_OVERLOADING
ActionLabelPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionLabel ,
#endif
constructActionLabel ,
getActionLabel ,
setActionLabel ,
#if ENABLE_OVERLOADING
ActionNamePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionName ,
#endif
constructActionName ,
getActionName ,
#if ENABLE_OVERLOADING
ActionSensitivePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionSensitive ,
#endif
constructActionSensitive ,
getActionSensitive ,
setActionSensitive ,
#if ENABLE_OVERLOADING
ActionShortLabelPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionShortLabel ,
#endif
constructActionShortLabel ,
getActionShortLabel ,
setActionShortLabel ,
#if ENABLE_OVERLOADING
ActionStockIdPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionStockId ,
#endif
constructActionStockId ,
getActionStockId ,
setActionStockId ,
#if ENABLE_OVERLOADING
ActionTooltipPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionTooltip ,
#endif
constructActionTooltip ,
getActionTooltip ,
setActionTooltip ,
#if ENABLE_OVERLOADING
ActionVisiblePropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionVisible ,
#endif
constructActionVisible ,
getActionVisible ,
setActionVisible ,
#if ENABLE_OVERLOADING
ActionVisibleHorizontalPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionVisibleHorizontal ,
#endif
constructActionVisibleHorizontal ,
getActionVisibleHorizontal ,
setActionVisibleHorizontal ,
#if ENABLE_OVERLOADING
ActionVisibleOverflownPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionVisibleOverflown ,
#endif
constructActionVisibleOverflown ,
getActionVisibleOverflown ,
setActionVisibleOverflown ,
#if ENABLE_OVERLOADING
ActionVisibleVerticalPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
actionVisibleVertical ,
#endif
constructActionVisibleVertical ,
getActionVisibleVertical ,
setActionVisibleVertical ,
ActionActivateCallback ,
#if ENABLE_OVERLOADING
ActionActivateSignalInfo ,
#endif
C_ActionActivateCallback ,
afterActionActivate ,
genClosure_ActionActivate ,
mk_ActionActivateCallback ,
noActionActivateCallback ,
onActionActivate ,
wrap_ActionActivateCallback ,
) 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.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
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.ActionGroup as Gtk.ActionGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype Action = Action (ManagedPtr Action)
foreign import ccall "gtk_action_get_type"
c_gtk_action_get_type :: IO GType
instance GObject Action where
gobjectType = c_gtk_action_get_type
class (GObject o, O.IsDescendantOf Action o) => IsAction o
instance (GObject o, O.IsDescendantOf Action o) => IsAction o
instance O.HasParentTypes Action
type instance O.ParentTypes Action = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toAction :: (MonadIO m, IsAction o) => o -> m Action
toAction = liftIO . unsafeCastTo Action
noAction :: Maybe Action
noAction = Nothing
#if ENABLE_OVERLOADING
type family ResolveActionMethod (t :: Symbol) (o :: *) :: * where
ResolveActionMethod "activate" o = ActionActivateMethodInfo
ResolveActionMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveActionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveActionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveActionMethod "blockActivate" o = ActionBlockActivateMethodInfo
ResolveActionMethod "connectAccelerator" o = ActionConnectAcceleratorMethodInfo
ResolveActionMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveActionMethod "createIcon" o = ActionCreateIconMethodInfo
ResolveActionMethod "createMenu" o = ActionCreateMenuMethodInfo
ResolveActionMethod "createMenuItem" o = ActionCreateMenuItemMethodInfo
ResolveActionMethod "createToolItem" o = ActionCreateToolItemMethodInfo
ResolveActionMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveActionMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveActionMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveActionMethod "disconnectAccelerator" o = ActionDisconnectAcceleratorMethodInfo
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 "isSensitive" o = ActionIsSensitiveMethodInfo
ResolveActionMethod "isVisible" o = ActionIsVisibleMethodInfo
ResolveActionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveActionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveActionMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
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 "unblockActivate" o = ActionUnblockActivateMethodInfo
ResolveActionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveActionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveActionMethod "getAccelClosure" o = ActionGetAccelClosureMethodInfo
ResolveActionMethod "getAccelPath" o = ActionGetAccelPathMethodInfo
ResolveActionMethod "getAlwaysShowImage" o = ActionGetAlwaysShowImageMethodInfo
ResolveActionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveActionMethod "getGicon" o = ActionGetGiconMethodInfo
ResolveActionMethod "getIconName" o = ActionGetIconNameMethodInfo
ResolveActionMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveActionMethod "getIsImportant" o = ActionGetIsImportantMethodInfo
ResolveActionMethod "getLabel" o = ActionGetLabelMethodInfo
ResolveActionMethod "getName" o = ActionGetNameMethodInfo
ResolveActionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveActionMethod "getProxies" o = ActionGetProxiesMethodInfo
ResolveActionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveActionMethod "getSensitive" o = ActionGetSensitiveMethodInfo
ResolveActionMethod "getShortLabel" o = ActionGetShortLabelMethodInfo
ResolveActionMethod "getStockId" o = ActionGetStockIdMethodInfo
ResolveActionMethod "getTooltip" o = ActionGetTooltipMethodInfo
ResolveActionMethod "getVisible" o = ActionGetVisibleMethodInfo
ResolveActionMethod "getVisibleHorizontal" o = ActionGetVisibleHorizontalMethodInfo
ResolveActionMethod "getVisibleVertical" o = ActionGetVisibleVerticalMethodInfo
ResolveActionMethod "setAccelGroup" o = ActionSetAccelGroupMethodInfo
ResolveActionMethod "setAccelPath" o = ActionSetAccelPathMethodInfo
ResolveActionMethod "setAlwaysShowImage" o = ActionSetAlwaysShowImageMethodInfo
ResolveActionMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveActionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveActionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveActionMethod "setGicon" o = ActionSetGiconMethodInfo
ResolveActionMethod "setIconName" o = ActionSetIconNameMethodInfo
ResolveActionMethod "setIsImportant" o = ActionSetIsImportantMethodInfo
ResolveActionMethod "setLabel" o = ActionSetLabelMethodInfo
ResolveActionMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveActionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveActionMethod "setSensitive" o = ActionSetSensitiveMethodInfo
ResolveActionMethod "setShortLabel" o = ActionSetShortLabelMethodInfo
ResolveActionMethod "setStockId" o = ActionSetStockIdMethodInfo
ResolveActionMethod "setTooltip" o = ActionSetTooltipMethodInfo
ResolveActionMethod "setVisible" o = ActionSetVisibleMethodInfo
ResolveActionMethod "setVisibleHorizontal" o = ActionSetVisibleHorizontalMethodInfo
ResolveActionMethod "setVisibleVertical" o = ActionSetVisibleVerticalMethodInfo
ResolveActionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveActionMethod t Action, O.MethodInfo info Action p) => OL.IsLabel t (Action -> 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 ActionActivateCallback ["(Since version 3.10)","Use 'GI.Gio.Objects.SimpleAction.SimpleAction'::@/activate/@ instead"] #-}
type ActionActivateCallback =
IO ()
noActionActivateCallback :: Maybe ActionActivateCallback
noActionActivateCallback = Nothing
type C_ActionActivateCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionActivateCallback :: C_ActionActivateCallback -> IO (FunPtr C_ActionActivateCallback)
genClosure_ActionActivate :: MonadIO m => ActionActivateCallback -> m (GClosure C_ActionActivateCallback)
genClosure_ActionActivate cb = liftIO $ do
let cb' = wrap_ActionActivateCallback cb
mk_ActionActivateCallback cb' >>= B.GClosure.newGClosure
wrap_ActionActivateCallback ::
ActionActivateCallback ->
C_ActionActivateCallback
wrap_ActionActivateCallback _cb _ _ = do
_cb
onActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
onActionActivate obj cb = liftIO $ do
let cb' = wrap_ActionActivateCallback cb
cb'' <- mk_ActionActivateCallback cb'
connectSignalFunPtr obj "activate" cb'' SignalConnectBefore
afterActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
afterActionActivate obj cb = liftIO $ do
let cb' = wrap_ActionActivateCallback cb
cb'' <- mk_ActionActivateCallback cb'
connectSignalFunPtr obj "activate" cb'' SignalConnectAfter
getActionActionGroup :: (MonadIO m, IsAction o) => o -> m (Maybe Gtk.ActionGroup.ActionGroup)
getActionActionGroup obj = liftIO $ B.Properties.getObjectPropertyObject obj "action-group" Gtk.ActionGroup.ActionGroup
setActionActionGroup :: (MonadIO m, IsAction o, Gtk.ActionGroup.IsActionGroup a) => o -> a -> m ()
setActionActionGroup obj val = liftIO $ B.Properties.setObjectPropertyObject obj "action-group" (Just val)
constructActionActionGroup :: (IsAction o, Gtk.ActionGroup.IsActionGroup a) => a -> IO (GValueConstruct o)
constructActionActionGroup val = B.Properties.constructObjectPropertyObject "action-group" (Just val)
clearActionActionGroup :: (MonadIO m, IsAction o) => o -> m ()
clearActionActionGroup obj = liftIO $ B.Properties.setObjectPropertyObject obj "action-group" (Nothing :: Maybe Gtk.ActionGroup.ActionGroup)
#if ENABLE_OVERLOADING
data ActionActionGroupPropertyInfo
instance AttrInfo ActionActionGroupPropertyInfo where
type AttrAllowedOps ActionActionGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionActionGroupPropertyInfo = Gtk.ActionGroup.IsActionGroup
type AttrBaseTypeConstraint ActionActionGroupPropertyInfo = IsAction
type AttrGetType ActionActionGroupPropertyInfo = (Maybe Gtk.ActionGroup.ActionGroup)
type AttrLabel ActionActionGroupPropertyInfo = "action-group"
type AttrOrigin ActionActionGroupPropertyInfo = Action
attrGet _ = getActionActionGroup
attrSet _ = setActionActionGroup
attrConstruct _ = constructActionActionGroup
attrClear _ = clearActionActionGroup
#endif
getActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> m Bool
getActionAlwaysShowImage obj = liftIO $ B.Properties.getObjectPropertyBool obj "always-show-image"
setActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionAlwaysShowImage obj val = liftIO $ B.Properties.setObjectPropertyBool obj "always-show-image" val
constructActionAlwaysShowImage :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionAlwaysShowImage val = B.Properties.constructObjectPropertyBool "always-show-image" val
#if ENABLE_OVERLOADING
data ActionAlwaysShowImagePropertyInfo
instance AttrInfo ActionAlwaysShowImagePropertyInfo where
type AttrAllowedOps ActionAlwaysShowImagePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionAlwaysShowImagePropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionAlwaysShowImagePropertyInfo = IsAction
type AttrGetType ActionAlwaysShowImagePropertyInfo = Bool
type AttrLabel ActionAlwaysShowImagePropertyInfo = "always-show-image"
type AttrOrigin ActionAlwaysShowImagePropertyInfo = Action
attrGet _ = getActionAlwaysShowImage
attrSet _ = setActionAlwaysShowImage
attrConstruct _ = constructActionAlwaysShowImage
attrClear _ = undefined
#endif
getActionGicon :: (MonadIO m, IsAction o) => o -> m Gio.Icon.Icon
getActionGicon obj = liftIO $ checkUnexpectedNothing "getActionGicon" $ B.Properties.getObjectPropertyObject obj "gicon" Gio.Icon.Icon
setActionGicon :: (MonadIO m, IsAction o, Gio.Icon.IsIcon a) => o -> a -> m ()
setActionGicon obj val = liftIO $ B.Properties.setObjectPropertyObject obj "gicon" (Just val)
constructActionGicon :: (IsAction o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructActionGicon val = B.Properties.constructObjectPropertyObject "gicon" (Just val)
#if ENABLE_OVERLOADING
data ActionGiconPropertyInfo
instance AttrInfo ActionGiconPropertyInfo where
type AttrAllowedOps ActionGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionGiconPropertyInfo = Gio.Icon.IsIcon
type AttrBaseTypeConstraint ActionGiconPropertyInfo = IsAction
type AttrGetType ActionGiconPropertyInfo = Gio.Icon.Icon
type AttrLabel ActionGiconPropertyInfo = "gicon"
type AttrOrigin ActionGiconPropertyInfo = Action
attrGet _ = getActionGicon
attrSet _ = setActionGicon
attrConstruct _ = constructActionGicon
attrClear _ = undefined
#endif
getActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> m Bool
getActionHideIfEmpty obj = liftIO $ B.Properties.getObjectPropertyBool obj "hide-if-empty"
setActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionHideIfEmpty obj val = liftIO $ B.Properties.setObjectPropertyBool obj "hide-if-empty" val
constructActionHideIfEmpty :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionHideIfEmpty val = B.Properties.constructObjectPropertyBool "hide-if-empty" val
#if ENABLE_OVERLOADING
data ActionHideIfEmptyPropertyInfo
instance AttrInfo ActionHideIfEmptyPropertyInfo where
type AttrAllowedOps ActionHideIfEmptyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionHideIfEmptyPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionHideIfEmptyPropertyInfo = IsAction
type AttrGetType ActionHideIfEmptyPropertyInfo = Bool
type AttrLabel ActionHideIfEmptyPropertyInfo = "hide-if-empty"
type AttrOrigin ActionHideIfEmptyPropertyInfo = Action
attrGet _ = getActionHideIfEmpty
attrSet _ = setActionHideIfEmpty
attrConstruct _ = constructActionHideIfEmpty
attrClear _ = undefined
#endif
getActionIconName :: (MonadIO m, IsAction o) => o -> m T.Text
getActionIconName obj = liftIO $ checkUnexpectedNothing "getActionIconName" $ B.Properties.getObjectPropertyString obj "icon-name"
setActionIconName :: (MonadIO m, IsAction o) => o -> T.Text -> m ()
setActionIconName obj val = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Just val)
constructActionIconName :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionIconName val = B.Properties.constructObjectPropertyString "icon-name" (Just val)
#if ENABLE_OVERLOADING
data ActionIconNamePropertyInfo
instance AttrInfo ActionIconNamePropertyInfo where
type AttrAllowedOps ActionIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionIconNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionIconNamePropertyInfo = IsAction
type AttrGetType ActionIconNamePropertyInfo = T.Text
type AttrLabel ActionIconNamePropertyInfo = "icon-name"
type AttrOrigin ActionIconNamePropertyInfo = Action
attrGet _ = getActionIconName
attrSet _ = setActionIconName
attrConstruct _ = constructActionIconName
attrClear _ = undefined
#endif
getActionIsImportant :: (MonadIO m, IsAction o) => o -> m Bool
getActionIsImportant obj = liftIO $ B.Properties.getObjectPropertyBool obj "is-important"
setActionIsImportant :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionIsImportant obj val = liftIO $ B.Properties.setObjectPropertyBool obj "is-important" val
constructActionIsImportant :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionIsImportant val = B.Properties.constructObjectPropertyBool "is-important" val
#if ENABLE_OVERLOADING
data ActionIsImportantPropertyInfo
instance AttrInfo ActionIsImportantPropertyInfo where
type AttrAllowedOps ActionIsImportantPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionIsImportantPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionIsImportantPropertyInfo = IsAction
type AttrGetType ActionIsImportantPropertyInfo = Bool
type AttrLabel ActionIsImportantPropertyInfo = "is-important"
type AttrOrigin ActionIsImportantPropertyInfo = Action
attrGet _ = getActionIsImportant
attrSet _ = setActionIsImportant
attrConstruct _ = constructActionIsImportant
attrClear _ = undefined
#endif
getActionLabel :: (MonadIO m, IsAction o) => o -> m T.Text
getActionLabel obj = liftIO $ checkUnexpectedNothing "getActionLabel" $ B.Properties.getObjectPropertyString obj "label"
setActionLabel :: (MonadIO m, IsAction o) => o -> T.Text -> m ()
setActionLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "label" (Just val)
constructActionLabel :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionLabel val = B.Properties.constructObjectPropertyString "label" (Just val)
#if ENABLE_OVERLOADING
data ActionLabelPropertyInfo
instance AttrInfo ActionLabelPropertyInfo where
type AttrAllowedOps ActionLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionLabelPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionLabelPropertyInfo = IsAction
type AttrGetType ActionLabelPropertyInfo = T.Text
type AttrLabel ActionLabelPropertyInfo = "label"
type AttrOrigin ActionLabelPropertyInfo = Action
attrGet _ = getActionLabel
attrSet _ = setActionLabel
attrConstruct _ = constructActionLabel
attrClear _ = undefined
#endif
getActionName :: (MonadIO m, IsAction o) => o -> m T.Text
getActionName obj = liftIO $ checkUnexpectedNothing "getActionName" $ B.Properties.getObjectPropertyString obj "name"
constructActionName :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionName val = B.Properties.constructObjectPropertyString "name" (Just val)
#if ENABLE_OVERLOADING
data ActionNamePropertyInfo
instance AttrInfo ActionNamePropertyInfo where
type AttrAllowedOps ActionNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ActionNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionNamePropertyInfo = IsAction
type AttrGetType ActionNamePropertyInfo = T.Text
type AttrLabel ActionNamePropertyInfo = "name"
type AttrOrigin ActionNamePropertyInfo = Action
attrGet _ = getActionName
attrSet _ = undefined
attrConstruct _ = constructActionName
attrClear _ = undefined
#endif
getActionSensitive :: (MonadIO m, IsAction o) => o -> m Bool
getActionSensitive obj = liftIO $ B.Properties.getObjectPropertyBool obj "sensitive"
setActionSensitive :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionSensitive obj val = liftIO $ B.Properties.setObjectPropertyBool obj "sensitive" val
constructActionSensitive :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionSensitive val = B.Properties.constructObjectPropertyBool "sensitive" val
#if ENABLE_OVERLOADING
data ActionSensitivePropertyInfo
instance AttrInfo ActionSensitivePropertyInfo where
type AttrAllowedOps ActionSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionSensitivePropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionSensitivePropertyInfo = IsAction
type AttrGetType ActionSensitivePropertyInfo = Bool
type AttrLabel ActionSensitivePropertyInfo = "sensitive"
type AttrOrigin ActionSensitivePropertyInfo = Action
attrGet _ = getActionSensitive
attrSet _ = setActionSensitive
attrConstruct _ = constructActionSensitive
attrClear _ = undefined
#endif
getActionShortLabel :: (MonadIO m, IsAction o) => o -> m T.Text
getActionShortLabel obj = liftIO $ checkUnexpectedNothing "getActionShortLabel" $ B.Properties.getObjectPropertyString obj "short-label"
setActionShortLabel :: (MonadIO m, IsAction o) => o -> T.Text -> m ()
setActionShortLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "short-label" (Just val)
constructActionShortLabel :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionShortLabel val = B.Properties.constructObjectPropertyString "short-label" (Just val)
#if ENABLE_OVERLOADING
data ActionShortLabelPropertyInfo
instance AttrInfo ActionShortLabelPropertyInfo where
type AttrAllowedOps ActionShortLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionShortLabelPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionShortLabelPropertyInfo = IsAction
type AttrGetType ActionShortLabelPropertyInfo = T.Text
type AttrLabel ActionShortLabelPropertyInfo = "short-label"
type AttrOrigin ActionShortLabelPropertyInfo = Action
attrGet _ = getActionShortLabel
attrSet _ = setActionShortLabel
attrConstruct _ = constructActionShortLabel
attrClear _ = undefined
#endif
getActionStockId :: (MonadIO m, IsAction o) => o -> m T.Text
getActionStockId obj = liftIO $ checkUnexpectedNothing "getActionStockId" $ B.Properties.getObjectPropertyString obj "stock-id"
setActionStockId :: (MonadIO m, IsAction o) => o -> T.Text -> m ()
setActionStockId obj val = liftIO $ B.Properties.setObjectPropertyString obj "stock-id" (Just val)
constructActionStockId :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionStockId val = B.Properties.constructObjectPropertyString "stock-id" (Just val)
#if ENABLE_OVERLOADING
data ActionStockIdPropertyInfo
instance AttrInfo ActionStockIdPropertyInfo where
type AttrAllowedOps ActionStockIdPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionStockIdPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionStockIdPropertyInfo = IsAction
type AttrGetType ActionStockIdPropertyInfo = T.Text
type AttrLabel ActionStockIdPropertyInfo = "stock-id"
type AttrOrigin ActionStockIdPropertyInfo = Action
attrGet _ = getActionStockId
attrSet _ = setActionStockId
attrConstruct _ = constructActionStockId
attrClear _ = undefined
#endif
getActionTooltip :: (MonadIO m, IsAction o) => o -> m T.Text
getActionTooltip obj = liftIO $ checkUnexpectedNothing "getActionTooltip" $ B.Properties.getObjectPropertyString obj "tooltip"
setActionTooltip :: (MonadIO m, IsAction o) => o -> T.Text -> m ()
setActionTooltip obj val = liftIO $ B.Properties.setObjectPropertyString obj "tooltip" (Just val)
constructActionTooltip :: (IsAction o) => T.Text -> IO (GValueConstruct o)
constructActionTooltip val = B.Properties.constructObjectPropertyString "tooltip" (Just val)
#if ENABLE_OVERLOADING
data ActionTooltipPropertyInfo
instance AttrInfo ActionTooltipPropertyInfo where
type AttrAllowedOps ActionTooltipPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionTooltipPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ActionTooltipPropertyInfo = IsAction
type AttrGetType ActionTooltipPropertyInfo = T.Text
type AttrLabel ActionTooltipPropertyInfo = "tooltip"
type AttrOrigin ActionTooltipPropertyInfo = Action
attrGet _ = getActionTooltip
attrSet _ = setActionTooltip
attrConstruct _ = constructActionTooltip
attrClear _ = undefined
#endif
getActionVisible :: (MonadIO m, IsAction o) => o -> m Bool
getActionVisible obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible"
setActionVisible :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionVisible obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible" val
constructActionVisible :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionVisible val = B.Properties.constructObjectPropertyBool "visible" val
#if ENABLE_OVERLOADING
data ActionVisiblePropertyInfo
instance AttrInfo ActionVisiblePropertyInfo where
type AttrAllowedOps ActionVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionVisiblePropertyInfo = IsAction
type AttrGetType ActionVisiblePropertyInfo = Bool
type AttrLabel ActionVisiblePropertyInfo = "visible"
type AttrOrigin ActionVisiblePropertyInfo = Action
attrGet _ = getActionVisible
attrSet _ = setActionVisible
attrConstruct _ = constructActionVisible
attrClear _ = undefined
#endif
getActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> m Bool
getActionVisibleHorizontal obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible-horizontal"
setActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionVisibleHorizontal obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible-horizontal" val
constructActionVisibleHorizontal :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionVisibleHorizontal val = B.Properties.constructObjectPropertyBool "visible-horizontal" val
#if ENABLE_OVERLOADING
data ActionVisibleHorizontalPropertyInfo
instance AttrInfo ActionVisibleHorizontalPropertyInfo where
type AttrAllowedOps ActionVisibleHorizontalPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionVisibleHorizontalPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionVisibleHorizontalPropertyInfo = IsAction
type AttrGetType ActionVisibleHorizontalPropertyInfo = Bool
type AttrLabel ActionVisibleHorizontalPropertyInfo = "visible-horizontal"
type AttrOrigin ActionVisibleHorizontalPropertyInfo = Action
attrGet _ = getActionVisibleHorizontal
attrSet _ = setActionVisibleHorizontal
attrConstruct _ = constructActionVisibleHorizontal
attrClear _ = undefined
#endif
getActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> m Bool
getActionVisibleOverflown obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible-overflown"
setActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionVisibleOverflown obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible-overflown" val
constructActionVisibleOverflown :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionVisibleOverflown val = B.Properties.constructObjectPropertyBool "visible-overflown" val
#if ENABLE_OVERLOADING
data ActionVisibleOverflownPropertyInfo
instance AttrInfo ActionVisibleOverflownPropertyInfo where
type AttrAllowedOps ActionVisibleOverflownPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionVisibleOverflownPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionVisibleOverflownPropertyInfo = IsAction
type AttrGetType ActionVisibleOverflownPropertyInfo = Bool
type AttrLabel ActionVisibleOverflownPropertyInfo = "visible-overflown"
type AttrOrigin ActionVisibleOverflownPropertyInfo = Action
attrGet _ = getActionVisibleOverflown
attrSet _ = setActionVisibleOverflown
attrConstruct _ = constructActionVisibleOverflown
attrClear _ = undefined
#endif
getActionVisibleVertical :: (MonadIO m, IsAction o) => o -> m Bool
getActionVisibleVertical obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible-vertical"
setActionVisibleVertical :: (MonadIO m, IsAction o) => o -> Bool -> m ()
setActionVisibleVertical obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible-vertical" val
constructActionVisibleVertical :: (IsAction o) => Bool -> IO (GValueConstruct o)
constructActionVisibleVertical val = B.Properties.constructObjectPropertyBool "visible-vertical" val
#if ENABLE_OVERLOADING
data ActionVisibleVerticalPropertyInfo
instance AttrInfo ActionVisibleVerticalPropertyInfo where
type AttrAllowedOps ActionVisibleVerticalPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ActionVisibleVerticalPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ActionVisibleVerticalPropertyInfo = IsAction
type AttrGetType ActionVisibleVerticalPropertyInfo = Bool
type AttrLabel ActionVisibleVerticalPropertyInfo = "visible-vertical"
type AttrOrigin ActionVisibleVerticalPropertyInfo = Action
attrGet _ = getActionVisibleVertical
attrSet _ = setActionVisibleVertical
attrConstruct _ = constructActionVisibleVertical
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList Action
type instance O.AttributeList Action = ActionAttributeList
type ActionAttributeList = ('[ '("actionGroup", ActionActionGroupPropertyInfo), '("alwaysShowImage", ActionAlwaysShowImagePropertyInfo), '("gicon", ActionGiconPropertyInfo), '("hideIfEmpty", ActionHideIfEmptyPropertyInfo), '("iconName", ActionIconNamePropertyInfo), '("isImportant", ActionIsImportantPropertyInfo), '("label", ActionLabelPropertyInfo), '("name", ActionNamePropertyInfo), '("sensitive", ActionSensitivePropertyInfo), '("shortLabel", ActionShortLabelPropertyInfo), '("stockId", ActionStockIdPropertyInfo), '("tooltip", ActionTooltipPropertyInfo), '("visible", ActionVisiblePropertyInfo), '("visibleHorizontal", ActionVisibleHorizontalPropertyInfo), '("visibleOverflown", ActionVisibleOverflownPropertyInfo), '("visibleVertical", ActionVisibleVerticalPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
actionActionGroup :: AttrLabelProxy "actionGroup"
actionActionGroup = AttrLabelProxy
actionAlwaysShowImage :: AttrLabelProxy "alwaysShowImage"
actionAlwaysShowImage = AttrLabelProxy
actionGicon :: AttrLabelProxy "gicon"
actionGicon = AttrLabelProxy
actionHideIfEmpty :: AttrLabelProxy "hideIfEmpty"
actionHideIfEmpty = AttrLabelProxy
actionIconName :: AttrLabelProxy "iconName"
actionIconName = AttrLabelProxy
actionIsImportant :: AttrLabelProxy "isImportant"
actionIsImportant = AttrLabelProxy
actionLabel :: AttrLabelProxy "label"
actionLabel = AttrLabelProxy
actionName :: AttrLabelProxy "name"
actionName = AttrLabelProxy
actionSensitive :: AttrLabelProxy "sensitive"
actionSensitive = AttrLabelProxy
actionShortLabel :: AttrLabelProxy "shortLabel"
actionShortLabel = AttrLabelProxy
actionStockId :: AttrLabelProxy "stockId"
actionStockId = AttrLabelProxy
actionTooltip :: AttrLabelProxy "tooltip"
actionTooltip = AttrLabelProxy
actionVisible :: AttrLabelProxy "visible"
actionVisible = AttrLabelProxy
actionVisibleHorizontal :: AttrLabelProxy "visibleHorizontal"
actionVisibleHorizontal = AttrLabelProxy
actionVisibleOverflown :: AttrLabelProxy "visibleOverflown"
actionVisibleOverflown = AttrLabelProxy
actionVisibleVertical :: AttrLabelProxy "visibleVertical"
actionVisibleVertical = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data ActionActivateSignalInfo
instance SignalInfo ActionActivateSignalInfo where
type HaskellCallbackType ActionActivateSignalInfo = ActionActivateCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ActionActivateCallback cb
cb'' <- mk_ActionActivateCallback cb'
connectSignalFunPtr obj "activate" cb'' connectMode
type instance O.SignalList Action = ActionSignalList
type ActionSignalList = ('[ '("activate", ActionActivateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_action_new" gtk_action_new ::
CString ->
CString ->
CString ->
CString ->
IO (Ptr Action)
{-# DEPRECATED actionNew ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, associating it to a widget with","'GI.Gtk.Interfaces.Actionable.Actionable' or creating a 'GI.Gtk.Objects.Menu.Menu' with 'GI.Gtk.Objects.Menu.menuNewFromModel'"] #-}
actionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m Action
actionNew name label tooltip stockId = liftIO $ do
name' <- textToCString name
maybeLabel <- case label of
Nothing -> return nullPtr
Just jLabel -> do
jLabel' <- textToCString jLabel
return jLabel'
maybeTooltip <- case tooltip of
Nothing -> return nullPtr
Just jTooltip -> do
jTooltip' <- textToCString jTooltip
return jTooltip'
maybeStockId <- case stockId of
Nothing -> return nullPtr
Just jStockId -> do
jStockId' <- textToCString jStockId
return jStockId'
result <- gtk_action_new name' maybeLabel maybeTooltip maybeStockId
checkUnexpectedReturnNULL "actionNew" result
result' <- (wrapObject Action) result
freeMem name'
freeMem maybeLabel
freeMem maybeTooltip
freeMem maybeStockId
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_action_activate" gtk_action_activate ::
Ptr Action ->
IO ()
{-# DEPRECATED actionActivate ["(Since version 3.10)","Use 'GI.Gio.Interfaces.ActionGroup.actionGroupActivateAction' on a 'GI.Gio.Interfaces.Action.Action' instead"] #-}
actionActivate ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m ()
actionActivate action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_action_activate action'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionActivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAction a) => O.MethodInfo ActionActivateMethodInfo a signature where
overloadedMethod _ = actionActivate
#endif
foreign import ccall "gtk_action_block_activate" gtk_action_block_activate ::
Ptr Action ->
IO ()
{-# DEPRECATED actionBlockActivate ["(Since version 3.10)","Use 'GI.Gio.Objects.SimpleAction.simpleActionSetEnabled' to disable the","'GI.Gio.Objects.SimpleAction.SimpleAction' instead"] #-}
actionBlockActivate ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m ()
actionBlockActivate action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_action_block_activate action'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionBlockActivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAction a) => O.MethodInfo ActionBlockActivateMethodInfo a signature where
overloadedMethod _ = actionBlockActivate
#endif
foreign import ccall "gtk_action_connect_accelerator" gtk_action_connect_accelerator ::
Ptr Action ->
IO ()
{-# DEPRECATED actionConnectAccelerator ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and the accelerator group on an associated","'GI.Gtk.Objects.Menu.Menu' instead"] #-}
actionConnectAccelerator ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m ()
actionConnectAccelerator action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_action_connect_accelerator action'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionConnectAcceleratorMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAction a) => O.MethodInfo ActionConnectAcceleratorMethodInfo a signature where
overloadedMethod _ = actionConnectAccelerator
#endif
foreign import ccall "gtk_action_create_icon" gtk_action_create_icon ::
Ptr Action ->
Int32 ->
IO (Ptr Gtk.Widget.Widget)
{-# DEPRECATED actionCreateIcon ["(Since version 3.10)","Use 'GI.Gio.Objects.MenuItem.menuItemSetIcon' to set an icon on a 'GI.Gio.Objects.MenuItem.MenuItem',","or 'GI.Gtk.Objects.Container.containerAdd' to add a 'GI.Gtk.Objects.Image.Image' to a 'GI.Gtk.Objects.Button.Button'"] #-}
actionCreateIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Int32
-> m Gtk.Widget.Widget
actionCreateIcon action iconSize = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_create_icon action' iconSize
checkUnexpectedReturnNULL "actionCreateIcon" result
result' <- (newObject Gtk.Widget.Widget) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionCreateIconMethodInfo
instance (signature ~ (Int32 -> m Gtk.Widget.Widget), MonadIO m, IsAction a) => O.MethodInfo ActionCreateIconMethodInfo a signature where
overloadedMethod _ = actionCreateIcon
#endif
foreign import ccall "gtk_action_create_menu" gtk_action_create_menu ::
Ptr Action ->
IO (Ptr Gtk.Widget.Widget)
{-# DEPRECATED actionCreateMenu ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and 'GI.Gio.Objects.MenuModel.MenuModel' instead, and create a","'GI.Gtk.Objects.Menu.Menu' with 'GI.Gtk.Objects.Menu.menuNewFromModel'"] #-}
actionCreateMenu ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Gtk.Widget.Widget
actionCreateMenu action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_create_menu action'
checkUnexpectedReturnNULL "actionCreateMenu" result
result' <- (newObject Gtk.Widget.Widget) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionCreateMenuMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsAction a) => O.MethodInfo ActionCreateMenuMethodInfo a signature where
overloadedMethod _ = actionCreateMenu
#endif
foreign import ccall "gtk_action_create_menu_item" gtk_action_create_menu_item ::
Ptr Action ->
IO (Ptr Gtk.Widget.Widget)
{-# DEPRECATED actionCreateMenuItem ["(Since version 3.10)","Use 'GI.Gio.Objects.MenuItem.menuItemNew' and associate it with a 'GI.Gio.Interfaces.Action.Action'","instead."] #-}
actionCreateMenuItem ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Gtk.Widget.Widget
actionCreateMenuItem action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_create_menu_item action'
checkUnexpectedReturnNULL "actionCreateMenuItem" result
result' <- (newObject Gtk.Widget.Widget) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionCreateMenuItemMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsAction a) => O.MethodInfo ActionCreateMenuItemMethodInfo a signature where
overloadedMethod _ = actionCreateMenuItem
#endif
foreign import ccall "gtk_action_create_tool_item" gtk_action_create_tool_item ::
Ptr Action ->
IO (Ptr Gtk.Widget.Widget)
{-# DEPRECATED actionCreateToolItem ["(Since version 3.10)","Use a 'GI.Gtk.Objects.ToolItem.ToolItem' and associate it with a 'GI.Gio.Interfaces.Action.Action' using","'GI.Gtk.Interfaces.Actionable.actionableSetActionName' instead"] #-}
actionCreateToolItem ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Gtk.Widget.Widget
actionCreateToolItem action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_create_tool_item action'
checkUnexpectedReturnNULL "actionCreateToolItem" result
result' <- (newObject Gtk.Widget.Widget) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionCreateToolItemMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsAction a) => O.MethodInfo ActionCreateToolItemMethodInfo a signature where
overloadedMethod _ = actionCreateToolItem
#endif
foreign import ccall "gtk_action_disconnect_accelerator" gtk_action_disconnect_accelerator ::
Ptr Action ->
IO ()
{-# DEPRECATED actionDisconnectAccelerator ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and the accelerator group on an associated","'GI.Gtk.Objects.Menu.Menu' instead"] #-}
actionDisconnectAccelerator ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m ()
actionDisconnectAccelerator action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_action_disconnect_accelerator action'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionDisconnectAcceleratorMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAction a) => O.MethodInfo ActionDisconnectAcceleratorMethodInfo a signature where
overloadedMethod _ = actionDisconnectAccelerator
#endif
foreign import ccall "gtk_action_get_accel_closure" gtk_action_get_accel_closure ::
Ptr Action ->
IO (Ptr (GClosure ()))
{-# DEPRECATED actionGetAccelClosure ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and 'GI.Gtk.Objects.Menu.Menu' instead, which have no","equivalent for getting the accel closure"] #-}
actionGetAccelClosure ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m (GClosure b)
actionGetAccelClosure action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_accel_closure action'
checkUnexpectedReturnNULL "actionGetAccelClosure" result
result' <- (B.GClosure.newGClosureFromPtr . FP.castPtr) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetAccelClosureMethodInfo
instance (signature ~ (m (GClosure b)), MonadIO m, IsAction a) => O.MethodInfo ActionGetAccelClosureMethodInfo a signature where
overloadedMethod _ = actionGetAccelClosure
#endif
foreign import ccall "gtk_action_get_accel_path" gtk_action_get_accel_path ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetAccelPath ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and the accelerator path on an associated","'GI.Gtk.Objects.Menu.Menu' instead"] #-}
actionGetAccelPath ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetAccelPath action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_accel_path action'
checkUnexpectedReturnNULL "actionGetAccelPath" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetAccelPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetAccelPathMethodInfo a signature where
overloadedMethod _ = actionGetAccelPath
#endif
foreign import ccall "gtk_action_get_always_show_image" gtk_action_get_always_show_image ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetAlwaysShowImage ["(Since version 3.10)","Use 'GI.Gio.Objects.MenuItem.menuItemGetAttributeValue' on a 'GI.Gio.Objects.MenuItem.MenuItem'","instead"] #-}
actionGetAlwaysShowImage ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetAlwaysShowImage action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_always_show_image action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetAlwaysShowImageMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetAlwaysShowImageMethodInfo a signature where
overloadedMethod _ = actionGetAlwaysShowImage
#endif
foreign import ccall "gtk_action_get_gicon" gtk_action_get_gicon ::
Ptr Action ->
IO (Ptr Gio.Icon.Icon)
{-# DEPRECATED actionGetGicon ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and","'GI.Gio.Objects.MenuItem.menuItemGetAttributeValue' to get an icon from a 'GI.Gio.Objects.MenuItem.MenuItem'","associated with a 'GI.Gio.Interfaces.Action.Action'"] #-}
actionGetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Gio.Icon.Icon
actionGetGicon action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_gicon action'
checkUnexpectedReturnNULL "actionGetGicon" result
result' <- (newObject Gio.Icon.Icon) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetGiconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m, IsAction a) => O.MethodInfo ActionGetGiconMethodInfo a signature where
overloadedMethod _ = actionGetGicon
#endif
foreign import ccall "gtk_action_get_icon_name" gtk_action_get_icon_name ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetIconName ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and","'GI.Gio.Objects.MenuItem.menuItemGetAttributeValue' to get an icon from a 'GI.Gio.Objects.MenuItem.MenuItem'","associated with a 'GI.Gio.Interfaces.Action.Action'"] #-}
actionGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetIconName action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_icon_name action'
checkUnexpectedReturnNULL "actionGetIconName" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetIconNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetIconNameMethodInfo a signature where
overloadedMethod _ = actionGetIconName
#endif
foreign import ccall "gtk_action_get_is_important" gtk_action_get_is_important ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetIsImportant ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor whether","labels are shown directly"] #-}
actionGetIsImportant ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetIsImportant action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_is_important action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetIsImportantMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetIsImportantMethodInfo a signature where
overloadedMethod _ = actionGetIsImportant
#endif
foreign import ccall "gtk_action_get_label" gtk_action_get_label ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetLabel ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and get a label from a menu item","with 'GI.Gio.Objects.MenuItem.menuItemGetAttributeValue'. For 'GI.Gtk.Interfaces.Actionable.Actionable' widgets, use the","widget-specific API to get a label"] #-}
actionGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetLabel action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_label action'
checkUnexpectedReturnNULL "actionGetLabel" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetLabelMethodInfo a signature where
overloadedMethod _ = actionGetLabel
#endif
foreign import ccall "gtk_action_get_name" gtk_action_get_name ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetName ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.actionGetName' on a 'GI.Gio.Interfaces.Action.Action' instead"] #-}
actionGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetName action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_name action'
checkUnexpectedReturnNULL "actionGetName" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetNameMethodInfo a signature where
overloadedMethod _ = actionGetName
#endif
foreign import ccall "gtk_action_get_proxies" gtk_action_get_proxies ::
Ptr Action ->
IO (Ptr (GSList (Ptr Gtk.Widget.Widget)))
{-# DEPRECATED actionGetProxies ["(Since version 3.10)"] #-}
actionGetProxies ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m [Gtk.Widget.Widget]
actionGetProxies action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_proxies action'
result' <- unpackGSList result
result'' <- mapM (newObject Gtk.Widget.Widget) result'
touchManagedPtr action
return result''
#if ENABLE_OVERLOADING
data ActionGetProxiesMethodInfo
instance (signature ~ (m [Gtk.Widget.Widget]), MonadIO m, IsAction a) => O.MethodInfo ActionGetProxiesMethodInfo a signature where
overloadedMethod _ = actionGetProxies
#endif
foreign import ccall "gtk_action_get_sensitive" gtk_action_get_sensitive ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetSensitive ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.actionGetEnabled' on a 'GI.Gio.Interfaces.Action.Action'","instead"] #-}
actionGetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetSensitive action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_sensitive action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetSensitiveMethodInfo a signature where
overloadedMethod _ = actionGetSensitive
#endif
foreign import ccall "gtk_action_get_short_label" gtk_action_get_short_label ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetShortLabel ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, which has no equivalent of short","labels"] #-}
actionGetShortLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetShortLabel action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_short_label action'
checkUnexpectedReturnNULL "actionGetShortLabel" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetShortLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetShortLabelMethodInfo a signature where
overloadedMethod _ = actionGetShortLabel
#endif
foreign import ccall "gtk_action_get_stock_id" gtk_action_get_stock_id ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetStockId ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, which has no equivalent of stock","items"] #-}
actionGetStockId ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetStockId action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_stock_id action'
checkUnexpectedReturnNULL "actionGetStockId" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetStockIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetStockIdMethodInfo a signature where
overloadedMethod _ = actionGetStockId
#endif
foreign import ccall "gtk_action_get_tooltip" gtk_action_get_tooltip ::
Ptr Action ->
IO CString
{-# DEPRECATED actionGetTooltip ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and get tooltips from associated","'GI.Gtk.Interfaces.Actionable.Actionable' widgets with 'GI.Gtk.Objects.Widget.widgetGetTooltipText'"] #-}
actionGetTooltip ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m T.Text
actionGetTooltip action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_tooltip action'
checkUnexpectedReturnNULL "actionGetTooltip" result
result' <- cstringToText result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetTooltipMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAction a) => O.MethodInfo ActionGetTooltipMethodInfo a signature where
overloadedMethod _ = actionGetTooltip
#endif
foreign import ccall "gtk_action_get_visible" gtk_action_get_visible ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetVisible ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the state of","'GI.Gtk.Interfaces.Actionable.Actionable' widgets directly"] #-}
actionGetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetVisible action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_visible action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetVisibleMethodInfo a signature where
overloadedMethod _ = actionGetVisible
#endif
foreign import ccall "gtk_action_get_visible_horizontal" gtk_action_get_visible_horizontal ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetVisibleHorizontal ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the","visibility of associated widgets and menu items directly"] #-}
actionGetVisibleHorizontal ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetVisibleHorizontal action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_visible_horizontal action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetVisibleHorizontalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetVisibleHorizontalMethodInfo a signature where
overloadedMethod _ = actionGetVisibleHorizontal
#endif
foreign import ccall "gtk_action_get_visible_vertical" gtk_action_get_visible_vertical ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionGetVisibleVertical ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the","visibility of associated widgets and menu items directly"] #-}
actionGetVisibleVertical ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionGetVisibleVertical action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_get_visible_vertical action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionGetVisibleVerticalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionGetVisibleVerticalMethodInfo a signature where
overloadedMethod _ = actionGetVisibleVertical
#endif
foreign import ccall "gtk_action_is_sensitive" gtk_action_is_sensitive ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionIsSensitive ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.actionGetEnabled' on a 'GI.Gio.Interfaces.Action.Action'","instead"] #-}
actionIsSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionIsSensitive action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_is_sensitive action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionIsSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionIsSensitiveMethodInfo a signature where
overloadedMethod _ = actionIsSensitive
#endif
foreign import ccall "gtk_action_is_visible" gtk_action_is_visible ::
Ptr Action ->
IO CInt
{-# DEPRECATED actionIsVisible ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the state of","'GI.Gtk.Interfaces.Actionable.Actionable' widgets directly"] #-}
actionIsVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m Bool
actionIsVisible action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
result <- gtk_action_is_visible action'
let result' = (/= 0) result
touchManagedPtr action
return result'
#if ENABLE_OVERLOADING
data ActionIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAction a) => O.MethodInfo ActionIsVisibleMethodInfo a signature where
overloadedMethod _ = actionIsVisible
#endif
foreign import ccall "gtk_action_set_accel_group" gtk_action_set_accel_group ::
Ptr Action ->
Ptr Gtk.AccelGroup.AccelGroup ->
IO ()
{-# DEPRECATED actionSetAccelGroup ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and the accelerator group on an associated","'GI.Gtk.Objects.Menu.Menu' instead"] #-}
actionSetAccelGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a, Gtk.AccelGroup.IsAccelGroup b) =>
a
-> Maybe (b)
-> m ()
actionSetAccelGroup action accelGroup = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
maybeAccelGroup <- case accelGroup of
Nothing -> return nullPtr
Just jAccelGroup -> do
jAccelGroup' <- unsafeManagedPtrCastPtr jAccelGroup
return jAccelGroup'
gtk_action_set_accel_group action' maybeAccelGroup
touchManagedPtr action
whenJust accelGroup touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data ActionSetAccelGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsAction a, Gtk.AccelGroup.IsAccelGroup b) => O.MethodInfo ActionSetAccelGroupMethodInfo a signature where
overloadedMethod _ = actionSetAccelGroup
#endif
foreign import ccall "gtk_action_set_accel_path" gtk_action_set_accel_path ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetAccelPath ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' and the accelerator path on an associated","'GI.Gtk.Objects.Menu.Menu' instead"] #-}
actionSetAccelPath ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetAccelPath action accelPath = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
accelPath' <- textToCString accelPath
gtk_action_set_accel_path action' accelPath'
touchManagedPtr action
freeMem accelPath'
return ()
#if ENABLE_OVERLOADING
data ActionSetAccelPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetAccelPathMethodInfo a signature where
overloadedMethod _ = actionSetAccelPath
#endif
foreign import ccall "gtk_action_set_always_show_image" gtk_action_set_always_show_image ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetAlwaysShowImage ["(Since version 3.10)","Use 'GI.Gio.Objects.MenuItem.menuItemSetIcon' on a 'GI.Gio.Objects.MenuItem.MenuItem' instead, if the","item should have an image"] #-}
actionSetAlwaysShowImage ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetAlwaysShowImage action alwaysShow = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let alwaysShow' = (fromIntegral . fromEnum) alwaysShow
gtk_action_set_always_show_image action' alwaysShow'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetAlwaysShowImageMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetAlwaysShowImageMethodInfo a signature where
overloadedMethod _ = actionSetAlwaysShowImage
#endif
foreign import ccall "gtk_action_set_gicon" gtk_action_set_gicon ::
Ptr Action ->
Ptr Gio.Icon.Icon ->
IO ()
{-# DEPRECATED actionSetGicon ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and 'GI.Gio.Objects.MenuItem.menuItemSetIcon' to set an","icon on a 'GI.Gio.Objects.MenuItem.MenuItem' associated with a 'GI.Gio.Interfaces.Action.Action', or 'GI.Gtk.Objects.Container.containerAdd' to","add a 'GI.Gtk.Objects.Image.Image' to a 'GI.Gtk.Objects.Button.Button'"] #-}
actionSetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a, Gio.Icon.IsIcon b) =>
a
-> b
-> m ()
actionSetGicon action icon = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
icon' <- unsafeManagedPtrCastPtr icon
gtk_action_set_gicon action' icon'
touchManagedPtr action
touchManagedPtr icon
return ()
#if ENABLE_OVERLOADING
data ActionSetGiconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsAction a, Gio.Icon.IsIcon b) => O.MethodInfo ActionSetGiconMethodInfo a signature where
overloadedMethod _ = actionSetGicon
#endif
foreign import ccall "gtk_action_set_icon_name" gtk_action_set_icon_name ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetIconName ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and 'GI.Gio.Objects.MenuItem.menuItemSetIcon' to set an","icon on a 'GI.Gio.Objects.MenuItem.MenuItem' associated with a 'GI.Gio.Interfaces.Action.Action', or 'GI.Gtk.Objects.Container.containerAdd' to","add a 'GI.Gtk.Objects.Image.Image' to a 'GI.Gtk.Objects.Button.Button'"] #-}
actionSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetIconName action iconName = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
iconName' <- textToCString iconName
gtk_action_set_icon_name action' iconName'
touchManagedPtr action
freeMem iconName'
return ()
#if ENABLE_OVERLOADING
data ActionSetIconNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetIconNameMethodInfo a signature where
overloadedMethod _ = actionSetIconName
#endif
foreign import ccall "gtk_action_set_is_important" gtk_action_set_is_important ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetIsImportant ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor whether","labels are shown directly"] #-}
actionSetIsImportant ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetIsImportant action isImportant = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let isImportant' = (fromIntegral . fromEnum) isImportant
gtk_action_set_is_important action' isImportant'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetIsImportantMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetIsImportantMethodInfo a signature where
overloadedMethod _ = actionSetIsImportant
#endif
foreign import ccall "gtk_action_set_label" gtk_action_set_label ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetLabel ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and set a label on a menu item with","'GI.Gio.Objects.MenuItem.menuItemSetLabel'. For 'GI.Gtk.Interfaces.Actionable.Actionable' widgets, use the widget-specific","API to set a label"] #-}
actionSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetLabel action label = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
label' <- textToCString label
gtk_action_set_label action' label'
touchManagedPtr action
freeMem label'
return ()
#if ENABLE_OVERLOADING
data ActionSetLabelMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetLabelMethodInfo a signature where
overloadedMethod _ = actionSetLabel
#endif
foreign import ccall "gtk_action_set_sensitive" gtk_action_set_sensitive ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetSensitive ["(Since version 3.10)","Use 'GI.Gio.Objects.SimpleAction.simpleActionSetEnabled' on a 'GI.Gio.Objects.SimpleAction.SimpleAction'","instead"] #-}
actionSetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetSensitive action sensitive = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let sensitive' = (fromIntegral . fromEnum) sensitive
gtk_action_set_sensitive action' sensitive'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetSensitiveMethodInfo a signature where
overloadedMethod _ = actionSetSensitive
#endif
foreign import ccall "gtk_action_set_short_label" gtk_action_set_short_label ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetShortLabel ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, which has no equivalent of short","labels"] #-}
actionSetShortLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetShortLabel action shortLabel = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
shortLabel' <- textToCString shortLabel
gtk_action_set_short_label action' shortLabel'
touchManagedPtr action
freeMem shortLabel'
return ()
#if ENABLE_OVERLOADING
data ActionSetShortLabelMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetShortLabelMethodInfo a signature where
overloadedMethod _ = actionSetShortLabel
#endif
foreign import ccall "gtk_action_set_stock_id" gtk_action_set_stock_id ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetStockId ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, which has no equivalent of stock","items"] #-}
actionSetStockId ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetStockId action stockId = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
stockId' <- textToCString stockId
gtk_action_set_stock_id action' stockId'
touchManagedPtr action
freeMem stockId'
return ()
#if ENABLE_OVERLOADING
data ActionSetStockIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetStockIdMethodInfo a signature where
overloadedMethod _ = actionSetStockId
#endif
foreign import ccall "gtk_action_set_tooltip" gtk_action_set_tooltip ::
Ptr Action ->
CString ->
IO ()
{-# DEPRECATED actionSetTooltip ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and set tooltips on associated","'GI.Gtk.Interfaces.Actionable.Actionable' widgets with 'GI.Gtk.Objects.Widget.widgetSetTooltipText'"] #-}
actionSetTooltip ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> T.Text
-> m ()
actionSetTooltip action tooltip = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
tooltip' <- textToCString tooltip
gtk_action_set_tooltip action' tooltip'
touchManagedPtr action
freeMem tooltip'
return ()
#if ENABLE_OVERLOADING
data ActionSetTooltipMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetTooltipMethodInfo a signature where
overloadedMethod _ = actionSetTooltip
#endif
foreign import ccall "gtk_action_set_visible" gtk_action_set_visible ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetVisible ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the state of","'GI.Gtk.Interfaces.Actionable.Actionable' widgets directly"] #-}
actionSetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetVisible action visible = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let visible' = (fromIntegral . fromEnum) visible
gtk_action_set_visible action' visible'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetVisibleMethodInfo a signature where
overloadedMethod _ = actionSetVisible
#endif
foreign import ccall "gtk_action_set_visible_horizontal" gtk_action_set_visible_horizontal ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetVisibleHorizontal ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the","visibility of associated widgets and menu items directly"] #-}
actionSetVisibleHorizontal ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetVisibleHorizontal action visibleHorizontal = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let visibleHorizontal' = (fromIntegral . fromEnum) visibleHorizontal
gtk_action_set_visible_horizontal action' visibleHorizontal'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetVisibleHorizontalMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetVisibleHorizontalMethodInfo a signature where
overloadedMethod _ = actionSetVisibleHorizontal
#endif
foreign import ccall "gtk_action_set_visible_vertical" gtk_action_set_visible_vertical ::
Ptr Action ->
CInt ->
IO ()
{-# DEPRECATED actionSetVisibleVertical ["(Since version 3.10)","Use 'GI.Gio.Interfaces.Action.Action' instead, and control and monitor the","visibility of associated widgets and menu items directly"] #-}
actionSetVisibleVertical ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> Bool
-> m ()
actionSetVisibleVertical action visibleVertical = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
let visibleVertical' = (fromIntegral . fromEnum) visibleVertical
gtk_action_set_visible_vertical action' visibleVertical'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionSetVisibleVerticalMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAction a) => O.MethodInfo ActionSetVisibleVerticalMethodInfo a signature where
overloadedMethod _ = actionSetVisibleVertical
#endif
foreign import ccall "gtk_action_unblock_activate" gtk_action_unblock_activate ::
Ptr Action ->
IO ()
{-# DEPRECATED actionUnblockActivate ["(Since version 3.10)","Use 'GI.Gio.Objects.SimpleAction.simpleActionSetEnabled' to enable the","'GI.Gio.Objects.SimpleAction.SimpleAction' instead"] #-}
actionUnblockActivate ::
(B.CallStack.HasCallStack, MonadIO m, IsAction a) =>
a
-> m ()
actionUnblockActivate action = liftIO $ do
action' <- unsafeManagedPtrCastPtr action
gtk_action_unblock_activate action'
touchManagedPtr action
return ()
#if ENABLE_OVERLOADING
data ActionUnblockActivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAction a) => O.MethodInfo ActionUnblockActivateMethodInfo a signature where
overloadedMethod _ = actionUnblockActivate
#endif