{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.ActionGroup
(
ActionGroup(..) ,
IsActionGroup ,
toActionGroup ,
#if defined(ENABLE_OVERLOADING)
ResolveActionGroupMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ActionGroupAddActionMethodInfo ,
#endif
actionGroupAddAction ,
#if defined(ENABLE_OVERLOADING)
ActionGroupAddActionWithAccelMethodInfo ,
#endif
actionGroupAddActionWithAccel ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetAccelGroupMethodInfo ,
#endif
actionGroupGetAccelGroup ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetActionMethodInfo ,
#endif
actionGroupGetAction ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetNameMethodInfo ,
#endif
actionGroupGetName ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetSensitiveMethodInfo ,
#endif
actionGroupGetSensitive ,
#if defined(ENABLE_OVERLOADING)
ActionGroupGetVisibleMethodInfo ,
#endif
actionGroupGetVisible ,
#if defined(ENABLE_OVERLOADING)
ActionGroupListActionsMethodInfo ,
#endif
actionGroupListActions ,
actionGroupNew ,
#if defined(ENABLE_OVERLOADING)
ActionGroupRemoveActionMethodInfo ,
#endif
actionGroupRemoveAction ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSetAccelGroupMethodInfo ,
#endif
actionGroupSetAccelGroup ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSetSensitiveMethodInfo ,
#endif
actionGroupSetSensitive ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSetTranslateFuncMethodInfo ,
#endif
actionGroupSetTranslateFunc ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSetTranslationDomainMethodInfo,
#endif
actionGroupSetTranslationDomain ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSetVisibleMethodInfo ,
#endif
actionGroupSetVisible ,
#if defined(ENABLE_OVERLOADING)
ActionGroupTranslateStringMethodInfo ,
#endif
actionGroupTranslateString ,
#if defined(ENABLE_OVERLOADING)
ActionGroupAccelGroupPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
actionGroupAccelGroup ,
#endif
clearActionGroupAccelGroup ,
constructActionGroupAccelGroup ,
getActionGroupAccelGroup ,
setActionGroupAccelGroup ,
#if defined(ENABLE_OVERLOADING)
ActionGroupNamePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
actionGroupName ,
#endif
constructActionGroupName ,
getActionGroupName ,
#if defined(ENABLE_OVERLOADING)
ActionGroupSensitivePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
actionGroupSensitive ,
#endif
constructActionGroupSensitive ,
getActionGroupSensitive ,
setActionGroupSensitive ,
#if defined(ENABLE_OVERLOADING)
ActionGroupVisiblePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
actionGroupVisible ,
#endif
constructActionGroupVisible ,
getActionGroupVisible ,
setActionGroupVisible ,
ActionGroupConnectProxyCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupConnectProxySignalInfo ,
#endif
afterActionGroupConnectProxy ,
onActionGroupConnectProxy ,
ActionGroupDisconnectProxyCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupDisconnectProxySignalInfo ,
#endif
afterActionGroupDisconnectProxy ,
onActionGroupDisconnectProxy ,
ActionGroupPostActivateCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupPostActivateSignalInfo ,
#endif
afterActionGroupPostActivate ,
onActionGroupPostActivate ,
ActionGroupPreActivateCallback ,
#if defined(ENABLE_OVERLOADING)
ActionGroupPreActivateSignalInfo ,
#endif
afterActionGroupPreActivate ,
onActionGroupPreActivate ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GLib.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 (SP.ManagedPtr ActionGroup)
deriving (ActionGroup -> ActionGroup -> Bool
(ActionGroup -> ActionGroup -> Bool)
-> (ActionGroup -> ActionGroup -> Bool) -> Eq ActionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionGroup -> ActionGroup -> Bool
== :: ActionGroup -> ActionGroup -> Bool
$c/= :: ActionGroup -> ActionGroup -> Bool
/= :: ActionGroup -> ActionGroup -> Bool
Eq)
instance SP.ManagedPtrNewtype ActionGroup where
toManagedPtr :: ActionGroup -> ManagedPtr ActionGroup
toManagedPtr (ActionGroup ManagedPtr ActionGroup
p) = ManagedPtr ActionGroup
p
foreign import ccall "gtk_action_group_get_type"
c_gtk_action_group_get_type :: IO B.Types.GType
instance B.Types.TypedObject ActionGroup where
glibType :: IO GType
glibType = IO GType
c_gtk_action_group_get_type
instance B.Types.GObject ActionGroup
class (SP.GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance (SP.GObject o, O.IsDescendantOf ActionGroup o) => IsActionGroup o
instance O.HasParentTypes ActionGroup
type instance O.ParentTypes ActionGroup = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toActionGroup :: (MIO.MonadIO m, IsActionGroup o) => o -> m ActionGroup
toActionGroup :: forall (m :: * -> *) o.
(MonadIO m, IsActionGroup o) =>
o -> m ActionGroup
toActionGroup = IO ActionGroup -> m ActionGroup
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ActionGroup -> m ActionGroup)
-> (o -> IO ActionGroup) -> o -> m ActionGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ActionGroup -> ActionGroup) -> o -> IO ActionGroup
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ActionGroup -> ActionGroup
ActionGroup
instance B.GValue.IsGValue (Maybe ActionGroup) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_action_group_get_type
gvalueSet_ :: Ptr GValue -> Maybe ActionGroup -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ActionGroup
P.Nothing = Ptr GValue -> Ptr ActionGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ActionGroup
forall a. Ptr a
FP.nullPtr :: FP.Ptr ActionGroup)
gvalueSet_ Ptr GValue
gv (P.Just ActionGroup
obj) = ActionGroup -> (Ptr ActionGroup -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ActionGroup
obj (Ptr GValue -> Ptr ActionGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe ActionGroup)
gvalueGet_ Ptr GValue
gv = do
Ptr ActionGroup
ptr <- Ptr GValue -> IO (Ptr ActionGroup)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ActionGroup)
if Ptr ActionGroup
ptr Ptr ActionGroup -> Ptr ActionGroup -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ActionGroup
forall a. Ptr a
FP.nullPtr
then ActionGroup -> Maybe ActionGroup
forall a. a -> Maybe a
P.Just (ActionGroup -> Maybe ActionGroup)
-> IO ActionGroup -> IO (Maybe ActionGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ActionGroup -> ActionGroup)
-> Ptr ActionGroup -> IO ActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ActionGroup -> ActionGroup
ActionGroup Ptr ActionGroup
ptr
else Maybe ActionGroup -> IO (Maybe ActionGroup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ActionGroup
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveActionGroupMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod info ActionGroup p) => OL.IsLabel t (ActionGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.OverloadedMethod info ActionGroup p, R.HasField t ActionGroup p) => R.HasField t ActionGroup p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveActionGroupMethod t ActionGroup, O.OverloadedMethodInfo info ActionGroup) => OL.IsLabel t (O.MethodProxy info ActionGroup) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
{-# DEPRECATED ActionGroupConnectProxyCallback ["(Since version 3.10)"] #-}
type ActionGroupConnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
type C_ActionGroupConnectProxyCallback =
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupConnectProxyCallback :: C_ActionGroupConnectProxyCallback -> IO (FunPtr C_ActionGroupConnectProxyCallback)
wrap_ActionGroupConnectProxyCallback ::
GObject a => (a -> ActionGroupConnectProxyCallback) ->
C_ActionGroupConnectProxyCallback
wrap_ActionGroupConnectProxyCallback :: forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupConnectProxyCallback a -> ActionGroupConnectProxyCallback
gi'cb Ptr ActionGroup
gi'selfPtr Ptr Action
action Ptr Widget
proxy Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Widget
proxy' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
proxy
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ActionGroup
gi'self -> a -> ActionGroupConnectProxyCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Action
action' Widget
proxy'
onActionGroupConnectProxy :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupConnectProxyCallback) -> m SignalHandlerId
onActionGroupConnectProxy :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupConnectProxyCallback)
-> m SignalHandlerId
onActionGroupConnectProxy a
obj (?self::a) => ActionGroupConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupConnectProxyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupConnectProxyCallback
ActionGroupConnectProxyCallback
cb
let wrapped' :: C_ActionGroupConnectProxyCallback
wrapped' = (a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupConnectProxyCallback a -> ActionGroupConnectProxyCallback
wrapped
FunPtr C_ActionGroupConnectProxyCallback
wrapped'' <- C_ActionGroupConnectProxyCallback
-> IO (FunPtr C_ActionGroupConnectProxyCallback)
mk_ActionGroupConnectProxyCallback C_ActionGroupConnectProxyCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"connect-proxy" FunPtr C_ActionGroupConnectProxyCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterActionGroupConnectProxy :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupConnectProxyCallback) -> m SignalHandlerId
afterActionGroupConnectProxy :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupConnectProxyCallback)
-> m SignalHandlerId
afterActionGroupConnectProxy a
obj (?self::a) => ActionGroupConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupConnectProxyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupConnectProxyCallback
ActionGroupConnectProxyCallback
cb
let wrapped' :: C_ActionGroupConnectProxyCallback
wrapped' = (a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupConnectProxyCallback a -> ActionGroupConnectProxyCallback
wrapped
FunPtr C_ActionGroupConnectProxyCallback
wrapped'' <- C_ActionGroupConnectProxyCallback
-> IO (FunPtr C_ActionGroupConnectProxyCallback)
mk_ActionGroupConnectProxyCallback C_ActionGroupConnectProxyCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"connect-proxy" FunPtr C_ActionGroupConnectProxyCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ActionGroupConnectProxySignalInfo
instance SignalInfo ActionGroupConnectProxySignalInfo where
type HaskellCallbackType ActionGroupConnectProxySignalInfo = ActionGroupConnectProxyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupConnectProxyCallback cb
cb'' <- mk_ActionGroupConnectProxyCallback cb'
connectSignalFunPtr obj "connect-proxy" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup::connect-proxy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:signal:connectProxy"})
#endif
{-# DEPRECATED ActionGroupDisconnectProxyCallback ["(Since version 3.10)"] #-}
type ActionGroupDisconnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
type C_ActionGroupDisconnectProxyCallback =
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupDisconnectProxyCallback :: C_ActionGroupDisconnectProxyCallback -> IO (FunPtr C_ActionGroupDisconnectProxyCallback)
wrap_ActionGroupDisconnectProxyCallback ::
GObject a => (a -> ActionGroupDisconnectProxyCallback) ->
C_ActionGroupDisconnectProxyCallback
wrap_ActionGroupDisconnectProxyCallback :: forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupDisconnectProxyCallback a -> ActionGroupConnectProxyCallback
gi'cb Ptr ActionGroup
gi'selfPtr Ptr Action
action Ptr Widget
proxy Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Widget
proxy' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
proxy
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ActionGroup
gi'self -> a -> ActionGroupConnectProxyCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Action
action' Widget
proxy'
onActionGroupDisconnectProxy :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupDisconnectProxyCallback) -> m SignalHandlerId
onActionGroupDisconnectProxy :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupConnectProxyCallback)
-> m SignalHandlerId
onActionGroupDisconnectProxy a
obj (?self::a) => ActionGroupConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupConnectProxyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupConnectProxyCallback
ActionGroupConnectProxyCallback
cb
let wrapped' :: C_ActionGroupConnectProxyCallback
wrapped' = (a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupDisconnectProxyCallback a -> ActionGroupConnectProxyCallback
wrapped
FunPtr C_ActionGroupConnectProxyCallback
wrapped'' <- C_ActionGroupConnectProxyCallback
-> IO (FunPtr C_ActionGroupConnectProxyCallback)
mk_ActionGroupDisconnectProxyCallback C_ActionGroupConnectProxyCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"disconnect-proxy" FunPtr C_ActionGroupConnectProxyCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterActionGroupDisconnectProxy :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupDisconnectProxyCallback) -> m SignalHandlerId
afterActionGroupDisconnectProxy :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupConnectProxyCallback)
-> m SignalHandlerId
afterActionGroupDisconnectProxy a
obj (?self::a) => ActionGroupConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupConnectProxyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupConnectProxyCallback
ActionGroupConnectProxyCallback
cb
let wrapped' :: C_ActionGroupConnectProxyCallback
wrapped' = (a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
forall a.
GObject a =>
(a -> ActionGroupConnectProxyCallback)
-> C_ActionGroupConnectProxyCallback
wrap_ActionGroupDisconnectProxyCallback a -> ActionGroupConnectProxyCallback
wrapped
FunPtr C_ActionGroupConnectProxyCallback
wrapped'' <- C_ActionGroupConnectProxyCallback
-> IO (FunPtr C_ActionGroupConnectProxyCallback)
mk_ActionGroupDisconnectProxyCallback C_ActionGroupConnectProxyCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"disconnect-proxy" FunPtr C_ActionGroupConnectProxyCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ActionGroupDisconnectProxySignalInfo
instance SignalInfo ActionGroupDisconnectProxySignalInfo where
type HaskellCallbackType ActionGroupDisconnectProxySignalInfo = ActionGroupDisconnectProxyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupDisconnectProxyCallback cb
cb'' <- mk_ActionGroupDisconnectProxyCallback cb'
connectSignalFunPtr obj "disconnect-proxy" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup::disconnect-proxy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:signal:disconnectProxy"})
#endif
{-# DEPRECATED ActionGroupPostActivateCallback ["(Since version 3.10)"] #-}
type ActionGroupPostActivateCallback =
Gtk.Action.Action
-> IO ()
type C_ActionGroupPostActivateCallback =
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupPostActivateCallback :: C_ActionGroupPostActivateCallback -> IO (FunPtr C_ActionGroupPostActivateCallback)
wrap_ActionGroupPostActivateCallback ::
GObject a => (a -> ActionGroupPostActivateCallback) ->
C_ActionGroupPostActivateCallback
wrap_ActionGroupPostActivateCallback :: forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPostActivateCallback a -> ActionGroupPostActivateCallback
gi'cb Ptr ActionGroup
gi'selfPtr Ptr Action
action Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ActionGroup
gi'self -> a -> ActionGroupPostActivateCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Action
action'
onActionGroupPostActivate :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupPostActivateCallback) -> m SignalHandlerId
onActionGroupPostActivate :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupPostActivateCallback)
-> m SignalHandlerId
onActionGroupPostActivate a
obj (?self::a) => ActionGroupPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupPostActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupPostActivateCallback
ActionGroupPostActivateCallback
cb
let wrapped' :: C_ActionGroupPostActivateCallback
wrapped' = (a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPostActivateCallback a -> ActionGroupPostActivateCallback
wrapped
FunPtr C_ActionGroupPostActivateCallback
wrapped'' <- C_ActionGroupPostActivateCallback
-> IO (FunPtr C_ActionGroupPostActivateCallback)
mk_ActionGroupPostActivateCallback C_ActionGroupPostActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"post-activate" FunPtr C_ActionGroupPostActivateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterActionGroupPostActivate :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupPostActivateCallback) -> m SignalHandlerId
afterActionGroupPostActivate :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupPostActivateCallback)
-> m SignalHandlerId
afterActionGroupPostActivate a
obj (?self::a) => ActionGroupPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupPostActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupPostActivateCallback
ActionGroupPostActivateCallback
cb
let wrapped' :: C_ActionGroupPostActivateCallback
wrapped' = (a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPostActivateCallback a -> ActionGroupPostActivateCallback
wrapped
FunPtr C_ActionGroupPostActivateCallback
wrapped'' <- C_ActionGroupPostActivateCallback
-> IO (FunPtr C_ActionGroupPostActivateCallback)
mk_ActionGroupPostActivateCallback C_ActionGroupPostActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"post-activate" FunPtr C_ActionGroupPostActivateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ActionGroupPostActivateSignalInfo
instance SignalInfo ActionGroupPostActivateSignalInfo where
type HaskellCallbackType ActionGroupPostActivateSignalInfo = ActionGroupPostActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupPostActivateCallback cb
cb'' <- mk_ActionGroupPostActivateCallback cb'
connectSignalFunPtr obj "post-activate" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup::post-activate"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:signal:postActivate"})
#endif
{-# DEPRECATED ActionGroupPreActivateCallback ["(Since version 3.10)"] #-}
type ActionGroupPreActivateCallback =
Gtk.Action.Action
-> IO ()
type C_ActionGroupPreActivateCallback =
Ptr ActionGroup ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ActionGroupPreActivateCallback :: C_ActionGroupPreActivateCallback -> IO (FunPtr C_ActionGroupPreActivateCallback)
wrap_ActionGroupPreActivateCallback ::
GObject a => (a -> ActionGroupPreActivateCallback) ->
C_ActionGroupPreActivateCallback
wrap_ActionGroupPreActivateCallback :: forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPreActivateCallback a -> ActionGroupPostActivateCallback
gi'cb Ptr ActionGroup
gi'selfPtr Ptr Action
action Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Ptr ActionGroup -> (ActionGroup -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr ActionGroup
gi'selfPtr ((ActionGroup -> IO ()) -> IO ())
-> (ActionGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ActionGroup
gi'self -> a -> ActionGroupPostActivateCallback
gi'cb (ActionGroup -> a
forall a b. Coercible a b => a -> b
Coerce.coerce ActionGroup
gi'self) Action
action'
onActionGroupPreActivate :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupPreActivateCallback) -> m SignalHandlerId
onActionGroupPreActivate :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupPostActivateCallback)
-> m SignalHandlerId
onActionGroupPreActivate a
obj (?self::a) => ActionGroupPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupPostActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupPostActivateCallback
ActionGroupPostActivateCallback
cb
let wrapped' :: C_ActionGroupPostActivateCallback
wrapped' = (a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPreActivateCallback a -> ActionGroupPostActivateCallback
wrapped
FunPtr C_ActionGroupPostActivateCallback
wrapped'' <- C_ActionGroupPostActivateCallback
-> IO (FunPtr C_ActionGroupPostActivateCallback)
mk_ActionGroupPreActivateCallback C_ActionGroupPostActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pre-activate" FunPtr C_ActionGroupPostActivateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterActionGroupPreActivate :: (IsActionGroup a, MonadIO m) => a -> ((?self :: a) => ActionGroupPreActivateCallback) -> m SignalHandlerId
afterActionGroupPreActivate :: forall a (m :: * -> *).
(IsActionGroup a, MonadIO m) =>
a
-> ((?self::a) => ActionGroupPostActivateCallback)
-> m SignalHandlerId
afterActionGroupPreActivate a
obj (?self::a) => ActionGroupPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ActionGroupPostActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ActionGroupPostActivateCallback
ActionGroupPostActivateCallback
cb
let wrapped' :: C_ActionGroupPostActivateCallback
wrapped' = (a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
forall a.
GObject a =>
(a -> ActionGroupPostActivateCallback)
-> C_ActionGroupPostActivateCallback
wrap_ActionGroupPreActivateCallback a -> ActionGroupPostActivateCallback
wrapped
FunPtr C_ActionGroupPostActivateCallback
wrapped'' <- C_ActionGroupPostActivateCallback
-> IO (FunPtr C_ActionGroupPostActivateCallback)
mk_ActionGroupPreActivateCallback C_ActionGroupPostActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ActionGroupPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pre-activate" FunPtr C_ActionGroupPostActivateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ActionGroupPreActivateSignalInfo
instance SignalInfo ActionGroupPreActivateSignalInfo where
type HaskellCallbackType ActionGroupPreActivateSignalInfo = ActionGroupPreActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ActionGroupPreActivateCallback cb
cb'' <- mk_ActionGroupPreActivateCallback cb'
connectSignalFunPtr obj "pre-activate" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup::pre-activate"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:signal:preActivate"})
#endif
getActionGroupAccelGroup :: (MonadIO m, IsActionGroup o) => o -> m Gtk.AccelGroup.AccelGroup
getActionGroupAccelGroup :: forall (m :: * -> *) o.
(MonadIO m, IsActionGroup o) =>
o -> m AccelGroup
getActionGroupAccelGroup o
obj = IO AccelGroup -> m AccelGroup
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AccelGroup -> m AccelGroup) -> IO AccelGroup -> m AccelGroup
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe AccelGroup) -> IO AccelGroup
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getActionGroupAccelGroup" (IO (Maybe AccelGroup) -> IO AccelGroup)
-> IO (Maybe AccelGroup) -> IO AccelGroup
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr AccelGroup -> AccelGroup)
-> IO (Maybe AccelGroup)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"accel-group" ManagedPtr AccelGroup -> AccelGroup
Gtk.AccelGroup.AccelGroup
setActionGroupAccelGroup :: (MonadIO m, IsActionGroup o, Gtk.AccelGroup.IsAccelGroup a) => o -> a -> m ()
setActionGroupAccelGroup :: forall (m :: * -> *) o a.
(MonadIO m, IsActionGroup o, IsAccelGroup a) =>
o -> a -> m ()
setActionGroupAccelGroup o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"accel-group" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructActionGroupAccelGroup :: (IsActionGroup o, MIO.MonadIO m, Gtk.AccelGroup.IsAccelGroup a) => a -> m (GValueConstruct o)
constructActionGroupAccelGroup :: forall o (m :: * -> *) a.
(IsActionGroup o, MonadIO m, IsAccelGroup a) =>
a -> m (GValueConstruct o)
constructActionGroupAccelGroup a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"accel-group" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearActionGroupAccelGroup :: (MonadIO m, IsActionGroup o) => o -> m ()
clearActionGroupAccelGroup :: forall (m :: * -> *) o. (MonadIO m, IsActionGroup o) => o -> m ()
clearActionGroupAccelGroup o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe AccelGroup -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"accel-group" (Maybe AccelGroup
forall a. Maybe a
Nothing :: Maybe Gtk.AccelGroup.AccelGroup)
#if defined(ENABLE_OVERLOADING)
data ActionGroupAccelGroupPropertyInfo
instance AttrInfo ActionGroupAccelGroupPropertyInfo where
type AttrAllowedOps ActionGroupAccelGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ActionGroupAccelGroupPropertyInfo = IsActionGroup
type AttrSetTypeConstraint ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.IsAccelGroup
type AttrTransferTypeConstraint ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.IsAccelGroup
type AttrTransferType ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.AccelGroup
type AttrGetType ActionGroupAccelGroupPropertyInfo = Gtk.AccelGroup.AccelGroup
type AttrLabel ActionGroupAccelGroupPropertyInfo = "accel-group"
type AttrOrigin ActionGroupAccelGroupPropertyInfo = ActionGroup
attrGet = getActionGroupAccelGroup
attrSet = setActionGroupAccelGroup
attrTransfer _ v = do
unsafeCastTo Gtk.AccelGroup.AccelGroup v
attrConstruct = constructActionGroupAccelGroup
attrClear = clearActionGroupAccelGroup
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.accelGroup"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:attr:accelGroup"
})
#endif
getActionGroupName :: (MonadIO m, IsActionGroup o) => o -> m T.Text
getActionGroupName :: forall (m :: * -> *) o. (MonadIO m, IsActionGroup o) => o -> m Text
getActionGroupName o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getActionGroupName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"name"
constructActionGroupName :: (IsActionGroup o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructActionGroupName :: forall o (m :: * -> *).
(IsActionGroup o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructActionGroupName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ActionGroupNamePropertyInfo
instance AttrInfo ActionGroupNamePropertyInfo where
type AttrAllowedOps ActionGroupNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ActionGroupNamePropertyInfo = IsActionGroup
type AttrSetTypeConstraint ActionGroupNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ActionGroupNamePropertyInfo = (~) T.Text
type AttrTransferType ActionGroupNamePropertyInfo = T.Text
type AttrGetType ActionGroupNamePropertyInfo = T.Text
type AttrLabel ActionGroupNamePropertyInfo = "name"
type AttrOrigin ActionGroupNamePropertyInfo = ActionGroup
attrGet = getActionGroupName
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructActionGroupName
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:attr:name"
})
#endif
getActionGroupSensitive :: (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupSensitive :: forall (m :: * -> *) o. (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupSensitive o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"sensitive"
setActionGroupSensitive :: (MonadIO m, IsActionGroup o) => o -> Bool -> m ()
setActionGroupSensitive :: forall (m :: * -> *) o.
(MonadIO m, IsActionGroup o) =>
o -> Bool -> m ()
setActionGroupSensitive o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"sensitive" Bool
val
constructActionGroupSensitive :: (IsActionGroup o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructActionGroupSensitive :: forall o (m :: * -> *).
(IsActionGroup o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructActionGroupSensitive Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"sensitive" Bool
val
#if defined(ENABLE_OVERLOADING)
data ActionGroupSensitivePropertyInfo
instance AttrInfo ActionGroupSensitivePropertyInfo where
type AttrAllowedOps ActionGroupSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ActionGroupSensitivePropertyInfo = IsActionGroup
type AttrSetTypeConstraint ActionGroupSensitivePropertyInfo = (~) Bool
type AttrTransferTypeConstraint ActionGroupSensitivePropertyInfo = (~) Bool
type AttrTransferType ActionGroupSensitivePropertyInfo = Bool
type AttrGetType ActionGroupSensitivePropertyInfo = Bool
type AttrLabel ActionGroupSensitivePropertyInfo = "sensitive"
type AttrOrigin ActionGroupSensitivePropertyInfo = ActionGroup
attrGet = getActionGroupSensitive
attrSet = setActionGroupSensitive
attrTransfer _ v = do
return v
attrConstruct = constructActionGroupSensitive
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.sensitive"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:attr:sensitive"
})
#endif
getActionGroupVisible :: (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupVisible :: forall (m :: * -> *) o. (MonadIO m, IsActionGroup o) => o -> m Bool
getActionGroupVisible o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"visible"
setActionGroupVisible :: (MonadIO m, IsActionGroup o) => o -> Bool -> m ()
setActionGroupVisible :: forall (m :: * -> *) o.
(MonadIO m, IsActionGroup o) =>
o -> Bool -> m ()
setActionGroupVisible o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"visible" Bool
val
constructActionGroupVisible :: (IsActionGroup o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructActionGroupVisible :: forall o (m :: * -> *).
(IsActionGroup o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructActionGroupVisible Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"visible" Bool
val
#if defined(ENABLE_OVERLOADING)
data ActionGroupVisiblePropertyInfo
instance AttrInfo ActionGroupVisiblePropertyInfo where
type AttrAllowedOps ActionGroupVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ActionGroupVisiblePropertyInfo = IsActionGroup
type AttrSetTypeConstraint ActionGroupVisiblePropertyInfo = (~) Bool
type AttrTransferTypeConstraint ActionGroupVisiblePropertyInfo = (~) Bool
type AttrTransferType ActionGroupVisiblePropertyInfo = Bool
type AttrGetType ActionGroupVisiblePropertyInfo = Bool
type AttrLabel ActionGroupVisiblePropertyInfo = "visible"
type AttrOrigin ActionGroupVisiblePropertyInfo = ActionGroup
attrGet = getActionGroupVisible
attrSet = setActionGroupVisible
attrTransfer _ v = do
return v
attrConstruct = constructActionGroupVisible
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.visible"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#g:attr:visible"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ActionGroup
type instance O.AttributeList ActionGroup = ActionGroupAttributeList
type ActionGroupAttributeList = ('[ '("accelGroup", ActionGroupAccelGroupPropertyInfo), '("name", ActionGroupNamePropertyInfo), '("sensitive", ActionGroupSensitivePropertyInfo), '("visible", ActionGroupVisiblePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
actionGroupAccelGroup :: AttrLabelProxy "accelGroup"
actionGroupAccelGroup = AttrLabelProxy
actionGroupName :: AttrLabelProxy "name"
actionGroupName = AttrLabelProxy
actionGroupSensitive :: AttrLabelProxy "sensitive"
actionGroupSensitive = AttrLabelProxy
actionGroupVisible :: AttrLabelProxy "visible"
actionGroupVisible = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ActionGroup = ActionGroupSignalList
type ActionGroupSignalList = ('[ '("connectProxy", ActionGroupConnectProxySignalInfo), '("disconnectProxy", ActionGroupDisconnectProxySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postActivate", ActionGroupPostActivateSignalInfo), '("preActivate", ActionGroupPreActivateSignalInfo)] :: [(Symbol, DK.Type)])
#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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m ActionGroup
actionGroupNew Text
name = IO ActionGroup -> m ActionGroup
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ActionGroup -> m ActionGroup)
-> IO ActionGroup -> m ActionGroup
forall a b. (a -> b) -> a -> b
$ do
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr ActionGroup
result <- CString -> IO (Ptr ActionGroup)
gtk_action_group_new CString
name'
Text -> Ptr ActionGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"actionGroupNew" Ptr ActionGroup
result
ActionGroup
result' <- ((ManagedPtr ActionGroup -> ActionGroup)
-> Ptr ActionGroup -> IO ActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr ActionGroup -> ActionGroup
ActionGroup) Ptr ActionGroup
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
ActionGroup -> IO ActionGroup
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ActionGroup
result'
#if defined(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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsActionGroup a, IsAction b) =>
a -> b -> m ()
actionGroupAddAction a
actionGroup b
action = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr Action
action' <- b -> IO (Ptr Action)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
action
Ptr ActionGroup -> Ptr Action -> IO ()
gtk_action_group_add_action Ptr ActionGroup
actionGroup' Ptr Action
action'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
action
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupAddActionMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.OverloadedMethod ActionGroupAddActionMethodInfo a signature where
overloadedMethod = actionGroupAddAction
instance O.OverloadedMethodInfo ActionGroupAddActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupAddAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsActionGroup a, IsAction b) =>
a -> b -> Maybe Text -> m ()
actionGroupAddActionWithAccel a
actionGroup b
action Maybe Text
accelerator = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr Action
action' <- b -> IO (Ptr Action)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
action
CString
maybeAccelerator <- case Maybe Text
accelerator of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jAccelerator -> do
CString
jAccelerator' <- Text -> IO CString
textToCString Text
jAccelerator
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jAccelerator'
Ptr ActionGroup -> Ptr Action -> CString -> IO ()
gtk_action_group_add_action_with_accel Ptr ActionGroup
actionGroup' Ptr Action
action' CString
maybeAccelerator
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
action
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeAccelerator
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupAddActionWithAccelMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.OverloadedMethod ActionGroupAddActionWithAccelMethodInfo a signature where
overloadedMethod = actionGroupAddActionWithAccel
instance O.OverloadedMethodInfo ActionGroupAddActionWithAccelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupAddActionWithAccel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m AccelGroup
actionGroupGetAccelGroup a
actionGroup = IO AccelGroup -> m AccelGroup
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelGroup -> m AccelGroup) -> IO AccelGroup -> m AccelGroup
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr AccelGroup
result <- Ptr ActionGroup -> IO (Ptr AccelGroup)
gtk_action_group_get_accel_group Ptr ActionGroup
actionGroup'
Text -> Ptr AccelGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"actionGroupGetAccelGroup" Ptr AccelGroup
result
AccelGroup
result' <- ((ManagedPtr AccelGroup -> AccelGroup)
-> Ptr AccelGroup -> IO AccelGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AccelGroup -> AccelGroup
Gtk.AccelGroup.AccelGroup) Ptr AccelGroup
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
AccelGroup -> IO AccelGroup
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return AccelGroup
result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetAccelGroupMethodInfo
instance (signature ~ (m Gtk.AccelGroup.AccelGroup), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetAccelGroupMethodInfo a signature where
overloadedMethod = actionGroupGetAccelGroup
instance O.OverloadedMethodInfo ActionGroupGetAccelGroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupGetAccelGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m (Maybe Action)
actionGroupGetAction a
actionGroup Text
actionName = IO (Maybe Action) -> m (Maybe Action)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Action) -> m (Maybe Action))
-> IO (Maybe Action) -> m (Maybe Action)
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
actionName' <- Text -> IO CString
textToCString Text
actionName
Ptr Action
result <- Ptr ActionGroup -> CString -> IO (Ptr Action)
gtk_action_group_get_action Ptr ActionGroup
actionGroup' CString
actionName'
Maybe Action
maybeResult <- Ptr Action -> (Ptr Action -> IO Action) -> IO (Maybe Action)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Action
result ((Ptr Action -> IO Action) -> IO (Maybe Action))
-> (Ptr Action -> IO Action) -> IO (Maybe Action)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
result' -> do
Action
result'' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
result'
Action -> IO Action
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Action
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
actionName'
Maybe Action -> IO (Maybe Action)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Action
maybeResult
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetActionMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.Action.Action)), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetActionMethodInfo a signature where
overloadedMethod = actionGroupGetAction
instance O.OverloadedMethodInfo ActionGroupGetActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupGetAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m Text
actionGroupGetName a
actionGroup = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
result <- Ptr ActionGroup -> IO CString
gtk_action_group_get_name Ptr ActionGroup
actionGroup'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"actionGroupGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetNameMethodInfo a signature where
overloadedMethod = actionGroupGetName
instance O.OverloadedMethodInfo ActionGroupGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m Bool
actionGroupGetSensitive a
actionGroup = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CInt
result <- Ptr ActionGroup -> IO CInt
gtk_action_group_get_sensitive Ptr ActionGroup
actionGroup'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetSensitiveMethodInfo a signature where
overloadedMethod = actionGroupGetSensitive
instance O.OverloadedMethodInfo ActionGroupGetSensitiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupGetSensitive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m Bool
actionGroupGetVisible a
actionGroup = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CInt
result <- Ptr ActionGroup -> IO CInt
gtk_action_group_get_visible Ptr ActionGroup
actionGroup'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupGetVisibleMethodInfo a signature where
overloadedMethod = actionGroupGetVisible
instance O.OverloadedMethodInfo ActionGroupGetVisibleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupGetVisible",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> m [Action]
actionGroupListActions a
actionGroup = IO [Action] -> m [Action]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Action] -> m [Action]) -> IO [Action] -> m [Action]
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr (GList (Ptr Action))
result <- Ptr ActionGroup -> IO (Ptr (GList (Ptr Action)))
gtk_action_group_list_actions Ptr ActionGroup
actionGroup'
[Ptr Action]
result' <- Ptr (GList (Ptr Action)) -> IO [Ptr Action]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Action))
result
[Action]
result'' <- (Ptr Action -> IO Action) -> [Ptr Action] -> IO [Action]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) [Ptr Action]
result'
Ptr (GList (Ptr Action)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Action))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
[Action] -> IO [Action]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Action]
result''
#if defined(ENABLE_OVERLOADING)
data ActionGroupListActionsMethodInfo
instance (signature ~ (m [Gtk.Action.Action]), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupListActionsMethodInfo a signature where
overloadedMethod = actionGroupListActions
instance O.OverloadedMethodInfo ActionGroupListActionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupListActions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsActionGroup a, IsAction b) =>
a -> b -> m ()
actionGroupRemoveAction a
actionGroup b
action = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr Action
action' <- b -> IO (Ptr Action)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
action
Ptr ActionGroup -> Ptr Action -> IO ()
gtk_action_group_remove_action Ptr ActionGroup
actionGroup' Ptr Action
action'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
action
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupRemoveActionMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsActionGroup a, Gtk.Action.IsAction b) => O.OverloadedMethod ActionGroupRemoveActionMethodInfo a signature where
overloadedMethod = actionGroupRemoveAction
instance O.OverloadedMethodInfo ActionGroupRemoveActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupRemoveAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsActionGroup a, IsAccelGroup b) =>
a -> Maybe b -> m ()
actionGroupSetAccelGroup a
actionGroup Maybe b
accelGroup = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
Ptr AccelGroup
maybeAccelGroup <- case Maybe b
accelGroup of
Maybe b
Nothing -> Ptr AccelGroup -> IO (Ptr AccelGroup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AccelGroup
forall a. Ptr a
nullPtr
Just b
jAccelGroup -> do
Ptr AccelGroup
jAccelGroup' <- b -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jAccelGroup
Ptr AccelGroup -> IO (Ptr AccelGroup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AccelGroup
jAccelGroup'
Ptr ActionGroup -> Ptr AccelGroup -> IO ()
gtk_action_group_set_accel_group Ptr ActionGroup
actionGroup' Ptr AccelGroup
maybeAccelGroup
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
accelGroup b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupSetAccelGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsActionGroup a, Gtk.AccelGroup.IsAccelGroup b) => O.OverloadedMethod ActionGroupSetAccelGroupMethodInfo a signature where
overloadedMethod = actionGroupSetAccelGroup
instance O.OverloadedMethodInfo ActionGroupSetAccelGroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupSetAccelGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Bool -> m ()
actionGroupSetSensitive a
actionGroup Bool
sensitive = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
let sensitive' :: CInt
sensitive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
sensitive
Ptr ActionGroup -> CInt -> IO ()
gtk_action_group_set_sensitive Ptr ActionGroup
actionGroup' CInt
sensitive'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupSetSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupSetSensitiveMethodInfo a signature where
overloadedMethod = actionGroupSetSensitive
instance O.OverloadedMethodInfo ActionGroupSetSensitiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupSetSensitive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> (Text -> IO Text) -> m ()
actionGroupSetTranslateFunc a
actionGroup Text -> IO Text
func = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
FunPtr C_TranslateFunc
func' <- C_TranslateFunc -> IO (FunPtr C_TranslateFunc)
Gtk.Callbacks.mk_TranslateFunc (Maybe (Ptr (FunPtr C_TranslateFunc))
-> TranslateFunc_WithClosures -> C_TranslateFunc
Gtk.Callbacks.wrap_TranslateFunc Maybe (Ptr (FunPtr C_TranslateFunc))
forall a. Maybe a
Nothing ((Text -> IO Text) -> TranslateFunc_WithClosures
Gtk.Callbacks.drop_closures_TranslateFunc Text -> IO Text
func))
let data_ :: Ptr ()
data_ = FunPtr C_TranslateFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TranslateFunc
func'
let notify :: FunPtr (Ptr a -> IO ())
notify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr ActionGroup
-> FunPtr C_TranslateFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_action_group_set_translate_func Ptr ActionGroup
actionGroup' FunPtr C_TranslateFunc
func' Ptr ()
data_ FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
notify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupSetTranslateFuncMethodInfo
instance (signature ~ (Gtk.Callbacks.TranslateFunc -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupSetTranslateFuncMethodInfo a signature where
overloadedMethod = actionGroupSetTranslateFunc
instance O.OverloadedMethodInfo ActionGroupSetTranslateFuncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupSetTranslateFunc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Maybe Text -> m ()
actionGroupSetTranslationDomain a
actionGroup Maybe Text
domain = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
maybeDomain <- case Maybe Text
domain of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jDomain -> do
CString
jDomain' <- Text -> IO CString
textToCString Text
jDomain
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDomain'
Ptr ActionGroup -> CString -> IO ()
gtk_action_group_set_translation_domain Ptr ActionGroup
actionGroup' CString
maybeDomain
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDomain
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupSetTranslationDomainMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupSetTranslationDomainMethodInfo a signature where
overloadedMethod = actionGroupSetTranslationDomain
instance O.OverloadedMethodInfo ActionGroupSetTranslationDomainMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupSetTranslationDomain",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Bool -> m ()
actionGroupSetVisible a
actionGroup Bool
visible = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
let visible' :: CInt
visible' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
visible
Ptr ActionGroup -> CInt -> IO ()
gtk_action_group_set_visible Ptr ActionGroup
actionGroup' CInt
visible'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ActionGroupSetVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupSetVisibleMethodInfo a signature where
overloadedMethod = actionGroupSetVisible
instance O.OverloadedMethodInfo ActionGroupSetVisibleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupSetVisible",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsActionGroup a) =>
a -> Text -> m Text
actionGroupTranslateString a
actionGroup Text
string = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr ActionGroup
actionGroup' <- a -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
actionGroup
CString
string' <- Text -> IO CString
textToCString Text
string
CString
result <- Ptr ActionGroup -> CString -> IO CString
gtk_action_group_translate_string Ptr ActionGroup
actionGroup' CString
string'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"actionGroupTranslateString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
actionGroup
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ActionGroupTranslateStringMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsActionGroup a) => O.OverloadedMethod ActionGroupTranslateStringMethodInfo a signature where
overloadedMethod = actionGroupTranslateString
instance O.OverloadedMethodInfo ActionGroupTranslateStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.ActionGroup.actionGroupTranslateString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-ActionGroup.html#v:actionGroupTranslateString"
})
#endif