{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.AccelGroup
(
AccelGroup(..) ,
IsAccelGroup ,
toAccelGroup ,
#if defined(ENABLE_OVERLOADING)
ResolveAccelGroupMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AccelGroupActivateMethodInfo ,
#endif
accelGroupActivate ,
#if defined(ENABLE_OVERLOADING)
AccelGroupConnectMethodInfo ,
#endif
accelGroupConnect ,
#if defined(ENABLE_OVERLOADING)
AccelGroupConnectByPathMethodInfo ,
#endif
accelGroupConnectByPath ,
#if defined(ENABLE_OVERLOADING)
AccelGroupDisconnectMethodInfo ,
#endif
accelGroupDisconnect ,
#if defined(ENABLE_OVERLOADING)
AccelGroupDisconnectKeyMethodInfo ,
#endif
accelGroupDisconnectKey ,
#if defined(ENABLE_OVERLOADING)
AccelGroupFindMethodInfo ,
#endif
accelGroupFind ,
accelGroupFromAccelClosure ,
#if defined(ENABLE_OVERLOADING)
AccelGroupGetIsLockedMethodInfo ,
#endif
accelGroupGetIsLocked ,
#if defined(ENABLE_OVERLOADING)
AccelGroupGetModifierMaskMethodInfo ,
#endif
accelGroupGetModifierMask ,
#if defined(ENABLE_OVERLOADING)
AccelGroupLockMethodInfo ,
#endif
accelGroupLock ,
accelGroupNew ,
#if defined(ENABLE_OVERLOADING)
AccelGroupQueryMethodInfo ,
#endif
accelGroupQuery ,
#if defined(ENABLE_OVERLOADING)
AccelGroupUnlockMethodInfo ,
#endif
accelGroupUnlock ,
#if defined(ENABLE_OVERLOADING)
AccelGroupIsLockedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
accelGroupIsLocked ,
#endif
getAccelGroupIsLocked ,
#if defined(ENABLE_OVERLOADING)
AccelGroupModifierMaskPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
accelGroupModifierMask ,
#endif
getAccelGroupModifierMask ,
AccelGroupAccelActivateCallback ,
#if defined(ENABLE_OVERLOADING)
AccelGroupAccelActivateSignalInfo ,
#endif
C_AccelGroupAccelActivateCallback ,
afterAccelGroupAccelActivate ,
genClosure_AccelGroupAccelActivate ,
mk_AccelGroupAccelActivateCallback ,
noAccelGroupAccelActivateCallback ,
onAccelGroupAccelActivate ,
wrap_AccelGroupAccelActivateCallback ,
AccelGroupAccelChangedCallback ,
#if defined(ENABLE_OVERLOADING)
AccelGroupAccelChangedSignalInfo ,
#endif
C_AccelGroupAccelChangedCallback ,
afterAccelGroupAccelChanged ,
genClosure_AccelGroupAccelChanged ,
mk_AccelGroupAccelChangedCallback ,
noAccelGroupAccelChangedCallback ,
onAccelGroupAccelChanged ,
wrap_AccelGroupAccelChangedCallback ,
) 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.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.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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Structs.AccelGroupEntry as Gtk.AccelGroupEntry
import {-# SOURCE #-} qualified GI.Gtk.Structs.AccelKey as Gtk.AccelKey
newtype AccelGroup = AccelGroup (SP.ManagedPtr AccelGroup)
deriving (AccelGroup -> AccelGroup -> Bool
(AccelGroup -> AccelGroup -> Bool)
-> (AccelGroup -> AccelGroup -> Bool) -> Eq AccelGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelGroup -> AccelGroup -> Bool
$c/= :: AccelGroup -> AccelGroup -> Bool
== :: AccelGroup -> AccelGroup -> Bool
$c== :: AccelGroup -> AccelGroup -> Bool
Eq)
instance SP.ManagedPtrNewtype AccelGroup where
toManagedPtr :: AccelGroup -> ManagedPtr AccelGroup
toManagedPtr (AccelGroup ManagedPtr AccelGroup
p) = ManagedPtr AccelGroup
p
foreign import ccall "gtk_accel_group_get_type"
c_gtk_accel_group_get_type :: IO B.Types.GType
instance B.Types.TypedObject AccelGroup where
glibType :: IO GType
glibType = IO GType
c_gtk_accel_group_get_type
instance B.Types.GObject AccelGroup
class (SP.GObject o, O.IsDescendantOf AccelGroup o) => IsAccelGroup o
instance (SP.GObject o, O.IsDescendantOf AccelGroup o) => IsAccelGroup o
instance O.HasParentTypes AccelGroup
type instance O.ParentTypes AccelGroup = '[GObject.Object.Object]
toAccelGroup :: (MIO.MonadIO m, IsAccelGroup o) => o -> m AccelGroup
toAccelGroup :: forall (m :: * -> *) o.
(MonadIO m, IsAccelGroup o) =>
o -> m AccelGroup
toAccelGroup = IO AccelGroup -> m AccelGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AccelGroup -> m AccelGroup)
-> (o -> IO AccelGroup) -> o -> m AccelGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AccelGroup -> AccelGroup) -> o -> IO AccelGroup
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AccelGroup -> AccelGroup
AccelGroup
instance B.GValue.IsGValue (Maybe AccelGroup) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_accel_group_get_type
gvalueSet_ :: Ptr GValue -> Maybe AccelGroup -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AccelGroup
P.Nothing = Ptr GValue -> Ptr AccelGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AccelGroup
forall a. Ptr a
FP.nullPtr :: FP.Ptr AccelGroup)
gvalueSet_ Ptr GValue
gv (P.Just AccelGroup
obj) = AccelGroup -> (Ptr AccelGroup -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AccelGroup
obj (Ptr GValue -> Ptr AccelGroup -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AccelGroup)
gvalueGet_ Ptr GValue
gv = do
Ptr AccelGroup
ptr <- Ptr GValue -> IO (Ptr AccelGroup)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AccelGroup)
if Ptr AccelGroup
ptr Ptr AccelGroup -> Ptr AccelGroup -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AccelGroup
forall a. Ptr a
FP.nullPtr
then AccelGroup -> Maybe AccelGroup
forall a. a -> Maybe a
P.Just (AccelGroup -> Maybe AccelGroup)
-> IO AccelGroup -> IO (Maybe AccelGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AccelGroup -> AccelGroup)
-> Ptr AccelGroup -> IO AccelGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AccelGroup -> AccelGroup
AccelGroup Ptr AccelGroup
ptr
else Maybe AccelGroup -> IO (Maybe AccelGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AccelGroup
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAccelGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveAccelGroupMethod "activate" o = AccelGroupActivateMethodInfo
ResolveAccelGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAccelGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAccelGroupMethod "connect" o = AccelGroupConnectMethodInfo
ResolveAccelGroupMethod "connectByPath" o = AccelGroupConnectByPathMethodInfo
ResolveAccelGroupMethod "disconnect" o = AccelGroupDisconnectMethodInfo
ResolveAccelGroupMethod "disconnectKey" o = AccelGroupDisconnectKeyMethodInfo
ResolveAccelGroupMethod "find" o = AccelGroupFindMethodInfo
ResolveAccelGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAccelGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAccelGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAccelGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAccelGroupMethod "lock" o = AccelGroupLockMethodInfo
ResolveAccelGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAccelGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAccelGroupMethod "query" o = AccelGroupQueryMethodInfo
ResolveAccelGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAccelGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAccelGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAccelGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAccelGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAccelGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAccelGroupMethod "unlock" o = AccelGroupUnlockMethodInfo
ResolveAccelGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAccelGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAccelGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAccelGroupMethod "getIsLocked" o = AccelGroupGetIsLockedMethodInfo
ResolveAccelGroupMethod "getModifierMask" o = AccelGroupGetModifierMaskMethodInfo
ResolveAccelGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAccelGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAccelGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAccelGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAccelGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAccelGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAccelGroupMethod t AccelGroup, O.OverloadedMethod info AccelGroup p) => OL.IsLabel t (AccelGroup -> 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 ~ ResolveAccelGroupMethod t AccelGroup, O.OverloadedMethod info AccelGroup p, R.HasField t AccelGroup p) => R.HasField t AccelGroup p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAccelGroupMethod t AccelGroup, O.OverloadedMethodInfo info AccelGroup) => OL.IsLabel t (O.MethodProxy info AccelGroup) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type AccelGroupAccelActivateCallback =
GObject.Object.Object
-> Word32
-> [Gdk.Flags.ModifierType]
-> IO Bool
noAccelGroupAccelActivateCallback :: Maybe AccelGroupAccelActivateCallback
noAccelGroupAccelActivateCallback :: Maybe AccelGroupAccelActivateCallback
noAccelGroupAccelActivateCallback = Maybe AccelGroupAccelActivateCallback
forall a. Maybe a
Nothing
type C_AccelGroupAccelActivateCallback =
Ptr () ->
Ptr GObject.Object.Object ->
Word32 ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_AccelGroupAccelActivateCallback :: C_AccelGroupAccelActivateCallback -> IO (FunPtr C_AccelGroupAccelActivateCallback)
genClosure_AccelGroupAccelActivate :: MonadIO m => AccelGroupAccelActivateCallback -> m (GClosure C_AccelGroupAccelActivateCallback)
genClosure_AccelGroupAccelActivate :: forall (m :: * -> *).
MonadIO m =>
AccelGroupAccelActivateCallback
-> m (GClosure C_AccelGroupAccelActivateCallback)
genClosure_AccelGroupAccelActivate AccelGroupAccelActivateCallback
cb = IO (GClosure C_AccelGroupAccelActivateCallback)
-> m (GClosure C_AccelGroupAccelActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AccelGroupAccelActivateCallback)
-> m (GClosure C_AccelGroupAccelActivateCallback))
-> IO (GClosure C_AccelGroupAccelActivateCallback)
-> m (GClosure C_AccelGroupAccelActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_AccelGroupAccelActivateCallback
cb' = AccelGroupAccelActivateCallback
-> C_AccelGroupAccelActivateCallback
wrap_AccelGroupAccelActivateCallback AccelGroupAccelActivateCallback
cb
C_AccelGroupAccelActivateCallback
-> IO (FunPtr C_AccelGroupAccelActivateCallback)
mk_AccelGroupAccelActivateCallback C_AccelGroupAccelActivateCallback
cb' IO (FunPtr C_AccelGroupAccelActivateCallback)
-> (FunPtr C_AccelGroupAccelActivateCallback
-> IO (GClosure C_AccelGroupAccelActivateCallback))
-> IO (GClosure C_AccelGroupAccelActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AccelGroupAccelActivateCallback
-> IO (GClosure C_AccelGroupAccelActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_AccelGroupAccelActivateCallback ::
AccelGroupAccelActivateCallback ->
C_AccelGroupAccelActivateCallback
wrap_AccelGroupAccelActivateCallback :: AccelGroupAccelActivateCallback
-> C_AccelGroupAccelActivateCallback
wrap_AccelGroupAccelActivateCallback AccelGroupAccelActivateCallback
_cb Ptr ()
_ Ptr Object
acceleratable Word32
keyval CUInt
modifier Ptr ()
_ = do
Object
acceleratable' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
acceleratable
let modifier' :: [ModifierType]
modifier' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
modifier
Bool
result <- AccelGroupAccelActivateCallback
_cb Object
acceleratable' Word32
keyval [ModifierType]
modifier'
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onAccelGroupAccelActivate :: (IsAccelGroup a, MonadIO m) => a -> P.Maybe T.Text -> AccelGroupAccelActivateCallback -> m SignalHandlerId
onAccelGroupAccelActivate :: forall a (m :: * -> *).
(IsAccelGroup a, MonadIO m) =>
a
-> Maybe Text
-> AccelGroupAccelActivateCallback
-> m SignalHandlerId
onAccelGroupAccelActivate a
obj Maybe Text
detail AccelGroupAccelActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_AccelGroupAccelActivateCallback
cb' = AccelGroupAccelActivateCallback
-> C_AccelGroupAccelActivateCallback
wrap_AccelGroupAccelActivateCallback AccelGroupAccelActivateCallback
cb
FunPtr C_AccelGroupAccelActivateCallback
cb'' <- C_AccelGroupAccelActivateCallback
-> IO (FunPtr C_AccelGroupAccelActivateCallback)
mk_AccelGroupAccelActivateCallback C_AccelGroupAccelActivateCallback
cb'
a
-> Text
-> FunPtr C_AccelGroupAccelActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accel-activate" FunPtr C_AccelGroupAccelActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
detail
afterAccelGroupAccelActivate :: (IsAccelGroup a, MonadIO m) => a -> P.Maybe T.Text -> AccelGroupAccelActivateCallback -> m SignalHandlerId
afterAccelGroupAccelActivate :: forall a (m :: * -> *).
(IsAccelGroup a, MonadIO m) =>
a
-> Maybe Text
-> AccelGroupAccelActivateCallback
-> m SignalHandlerId
afterAccelGroupAccelActivate a
obj Maybe Text
detail AccelGroupAccelActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_AccelGroupAccelActivateCallback
cb' = AccelGroupAccelActivateCallback
-> C_AccelGroupAccelActivateCallback
wrap_AccelGroupAccelActivateCallback AccelGroupAccelActivateCallback
cb
FunPtr C_AccelGroupAccelActivateCallback
cb'' <- C_AccelGroupAccelActivateCallback
-> IO (FunPtr C_AccelGroupAccelActivateCallback)
mk_AccelGroupAccelActivateCallback C_AccelGroupAccelActivateCallback
cb'
a
-> Text
-> FunPtr C_AccelGroupAccelActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accel-activate" FunPtr C_AccelGroupAccelActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
detail
#if defined(ENABLE_OVERLOADING)
data AccelGroupAccelActivateSignalInfo
instance SignalInfo AccelGroupAccelActivateSignalInfo where
type HaskellCallbackType AccelGroupAccelActivateSignalInfo = AccelGroupAccelActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AccelGroupAccelActivateCallback cb
cb'' <- mk_AccelGroupAccelActivateCallback cb'
connectSignalFunPtr obj "accel-activate" cb'' connectMode detail
#endif
type AccelGroupAccelChangedCallback =
Word32
-> [Gdk.Flags.ModifierType]
-> GClosure ()
-> IO ()
noAccelGroupAccelChangedCallback :: Maybe AccelGroupAccelChangedCallback
noAccelGroupAccelChangedCallback :: Maybe AccelGroupAccelChangedCallback
noAccelGroupAccelChangedCallback = Maybe AccelGroupAccelChangedCallback
forall a. Maybe a
Nothing
type C_AccelGroupAccelChangedCallback =
Ptr () ->
Word32 ->
CUInt ->
Ptr (GClosure ()) ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_AccelGroupAccelChangedCallback :: C_AccelGroupAccelChangedCallback -> IO (FunPtr C_AccelGroupAccelChangedCallback)
genClosure_AccelGroupAccelChanged :: MonadIO m => AccelGroupAccelChangedCallback -> m (GClosure C_AccelGroupAccelChangedCallback)
genClosure_AccelGroupAccelChanged :: forall (m :: * -> *).
MonadIO m =>
AccelGroupAccelChangedCallback
-> m (GClosure C_AccelGroupAccelChangedCallback)
genClosure_AccelGroupAccelChanged AccelGroupAccelChangedCallback
cb = IO (GClosure C_AccelGroupAccelChangedCallback)
-> m (GClosure C_AccelGroupAccelChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AccelGroupAccelChangedCallback)
-> m (GClosure C_AccelGroupAccelChangedCallback))
-> IO (GClosure C_AccelGroupAccelChangedCallback)
-> m (GClosure C_AccelGroupAccelChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_AccelGroupAccelChangedCallback
cb' = AccelGroupAccelChangedCallback -> C_AccelGroupAccelChangedCallback
wrap_AccelGroupAccelChangedCallback AccelGroupAccelChangedCallback
cb
C_AccelGroupAccelChangedCallback
-> IO (FunPtr C_AccelGroupAccelChangedCallback)
mk_AccelGroupAccelChangedCallback C_AccelGroupAccelChangedCallback
cb' IO (FunPtr C_AccelGroupAccelChangedCallback)
-> (FunPtr C_AccelGroupAccelChangedCallback
-> IO (GClosure C_AccelGroupAccelChangedCallback))
-> IO (GClosure C_AccelGroupAccelChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AccelGroupAccelChangedCallback
-> IO (GClosure C_AccelGroupAccelChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_AccelGroupAccelChangedCallback ::
AccelGroupAccelChangedCallback ->
C_AccelGroupAccelChangedCallback
wrap_AccelGroupAccelChangedCallback :: AccelGroupAccelChangedCallback -> C_AccelGroupAccelChangedCallback
wrap_AccelGroupAccelChangedCallback AccelGroupAccelChangedCallback
_cb Ptr ()
_ Word32
keyval CUInt
modifier Ptr (GClosure ())
accelClosure Ptr ()
_ = do
let modifier' :: [ModifierType]
modifier' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
modifier
GClosure ()
accelClosure' <- (Ptr (GClosure ()) -> IO (GClosure ())
forall a. Ptr (GClosure a) -> IO (GClosure a)
B.GClosure.newGClosureFromPtr (Ptr (GClosure ()) -> IO (GClosure ()))
-> (Ptr (GClosure ()) -> Ptr (GClosure ()))
-> Ptr (GClosure ())
-> IO (GClosure ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (GClosure ()) -> Ptr (GClosure ())
forall a b. Ptr a -> Ptr b
FP.castPtr) Ptr (GClosure ())
accelClosure
AccelGroupAccelChangedCallback
_cb Word32
keyval [ModifierType]
modifier' GClosure ()
accelClosure'
onAccelGroupAccelChanged :: (IsAccelGroup a, MonadIO m) => a -> P.Maybe T.Text -> AccelGroupAccelChangedCallback -> m SignalHandlerId
onAccelGroupAccelChanged :: forall a (m :: * -> *).
(IsAccelGroup a, MonadIO m) =>
a
-> Maybe Text
-> AccelGroupAccelChangedCallback
-> m SignalHandlerId
onAccelGroupAccelChanged a
obj Maybe Text
detail AccelGroupAccelChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_AccelGroupAccelChangedCallback
cb' = AccelGroupAccelChangedCallback -> C_AccelGroupAccelChangedCallback
wrap_AccelGroupAccelChangedCallback AccelGroupAccelChangedCallback
cb
FunPtr C_AccelGroupAccelChangedCallback
cb'' <- C_AccelGroupAccelChangedCallback
-> IO (FunPtr C_AccelGroupAccelChangedCallback)
mk_AccelGroupAccelChangedCallback C_AccelGroupAccelChangedCallback
cb'
a
-> Text
-> FunPtr C_AccelGroupAccelChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accel-changed" FunPtr C_AccelGroupAccelChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
detail
afterAccelGroupAccelChanged :: (IsAccelGroup a, MonadIO m) => a -> P.Maybe T.Text -> AccelGroupAccelChangedCallback -> m SignalHandlerId
afterAccelGroupAccelChanged :: forall a (m :: * -> *).
(IsAccelGroup a, MonadIO m) =>
a
-> Maybe Text
-> AccelGroupAccelChangedCallback
-> m SignalHandlerId
afterAccelGroupAccelChanged a
obj Maybe Text
detail AccelGroupAccelChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_AccelGroupAccelChangedCallback
cb' = AccelGroupAccelChangedCallback -> C_AccelGroupAccelChangedCallback
wrap_AccelGroupAccelChangedCallback AccelGroupAccelChangedCallback
cb
FunPtr C_AccelGroupAccelChangedCallback
cb'' <- C_AccelGroupAccelChangedCallback
-> IO (FunPtr C_AccelGroupAccelChangedCallback)
mk_AccelGroupAccelChangedCallback C_AccelGroupAccelChangedCallback
cb'
a
-> Text
-> FunPtr C_AccelGroupAccelChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accel-changed" FunPtr C_AccelGroupAccelChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
detail
#if defined(ENABLE_OVERLOADING)
data AccelGroupAccelChangedSignalInfo
instance SignalInfo AccelGroupAccelChangedSignalInfo where
type HaskellCallbackType AccelGroupAccelChangedSignalInfo = AccelGroupAccelChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AccelGroupAccelChangedCallback cb
cb'' <- mk_AccelGroupAccelChangedCallback cb'
connectSignalFunPtr obj "accel-changed" cb'' connectMode detail
#endif
getAccelGroupIsLocked :: (MonadIO m, IsAccelGroup o) => o -> m Bool
getAccelGroupIsLocked :: forall (m :: * -> *) o. (MonadIO m, IsAccelGroup o) => o -> m Bool
getAccelGroupIsLocked o
obj = IO Bool -> m Bool
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
"is-locked"
#if defined(ENABLE_OVERLOADING)
data AccelGroupIsLockedPropertyInfo
instance AttrInfo AccelGroupIsLockedPropertyInfo where
type AttrAllowedOps AccelGroupIsLockedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint AccelGroupIsLockedPropertyInfo = IsAccelGroup
type AttrSetTypeConstraint AccelGroupIsLockedPropertyInfo = (~) ()
type AttrTransferTypeConstraint AccelGroupIsLockedPropertyInfo = (~) ()
type AttrTransferType AccelGroupIsLockedPropertyInfo = ()
type AttrGetType AccelGroupIsLockedPropertyInfo = Bool
type AttrLabel AccelGroupIsLockedPropertyInfo = "is-locked"
type AttrOrigin AccelGroupIsLockedPropertyInfo = AccelGroup
attrGet = getAccelGroupIsLocked
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getAccelGroupModifierMask :: (MonadIO m, IsAccelGroup o) => o -> m [Gdk.Flags.ModifierType]
getAccelGroupModifierMask :: forall (m :: * -> *) o.
(MonadIO m, IsAccelGroup o) =>
o -> m [ModifierType]
getAccelGroupModifierMask o
obj = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [ModifierType]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"modifier-mask"
#if defined(ENABLE_OVERLOADING)
data AccelGroupModifierMaskPropertyInfo
instance AttrInfo AccelGroupModifierMaskPropertyInfo where
type AttrAllowedOps AccelGroupModifierMaskPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint AccelGroupModifierMaskPropertyInfo = IsAccelGroup
type AttrSetTypeConstraint AccelGroupModifierMaskPropertyInfo = (~) ()
type AttrTransferTypeConstraint AccelGroupModifierMaskPropertyInfo = (~) ()
type AttrTransferType AccelGroupModifierMaskPropertyInfo = ()
type AttrGetType AccelGroupModifierMaskPropertyInfo = [Gdk.Flags.ModifierType]
type AttrLabel AccelGroupModifierMaskPropertyInfo = "modifier-mask"
type AttrOrigin AccelGroupModifierMaskPropertyInfo = AccelGroup
attrGet = getAccelGroupModifierMask
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AccelGroup
type instance O.AttributeList AccelGroup = AccelGroupAttributeList
type AccelGroupAttributeList = ('[ '("isLocked", AccelGroupIsLockedPropertyInfo), '("modifierMask", AccelGroupModifierMaskPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
accelGroupIsLocked :: AttrLabelProxy "isLocked"
accelGroupIsLocked = AttrLabelProxy
accelGroupModifierMask :: AttrLabelProxy "modifierMask"
accelGroupModifierMask = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AccelGroup = AccelGroupSignalList
type AccelGroupSignalList = ('[ '("accelActivate", AccelGroupAccelActivateSignalInfo), '("accelChanged", AccelGroupAccelChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_accel_group_new" gtk_accel_group_new ::
IO (Ptr AccelGroup)
accelGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m AccelGroup
accelGroupNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m AccelGroup
accelGroupNew = IO AccelGroup -> m AccelGroup
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 AccelGroup
result <- IO (Ptr AccelGroup)
gtk_accel_group_new
Text -> Ptr AccelGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"accelGroupNew" 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
wrapObject ManagedPtr AccelGroup -> AccelGroup
AccelGroup) Ptr AccelGroup
result
AccelGroup -> IO AccelGroup
forall (m :: * -> *) a. Monad m => a -> m a
return AccelGroup
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_accel_group_activate" gtk_accel_group_activate ::
Ptr AccelGroup ->
Word32 ->
Ptr GObject.Object.Object ->
Word32 ->
CUInt ->
IO CInt
accelGroupActivate ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a, GObject.Object.IsObject b) =>
a
-> Word32
-> b
-> Word32
-> [Gdk.Flags.ModifierType]
-> m Bool
accelGroupActivate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAccelGroup a, IsObject b) =>
a -> Word32 -> b -> Word32 -> [ModifierType] -> m Bool
accelGroupActivate a
accelGroup Word32
accelQuark b
acceleratable Word32
accelKey [ModifierType]
accelMods = IO Bool -> m Bool
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 AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
Ptr Object
acceleratable' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
acceleratable
let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
CInt
result <- Ptr AccelGroup
-> Word32 -> Ptr Object -> Word32 -> CUInt -> IO CInt
gtk_accel_group_activate Ptr AccelGroup
accelGroup' Word32
accelQuark Ptr Object
acceleratable' Word32
accelKey CUInt
accelMods'
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
accelGroup
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
acceleratable
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupActivateMethodInfo
instance (signature ~ (Word32 -> b -> Word32 -> [Gdk.Flags.ModifierType] -> m Bool), MonadIO m, IsAccelGroup a, GObject.Object.IsObject b) => O.OverloadedMethod AccelGroupActivateMethodInfo a signature where
overloadedMethod = accelGroupActivate
instance O.OverloadedMethodInfo AccelGroupActivateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupActivate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupActivate"
}
#endif
foreign import ccall "gtk_accel_group_connect" gtk_accel_group_connect ::
Ptr AccelGroup ->
Word32 ->
CUInt ->
CUInt ->
Ptr (GClosure Gtk.Callbacks.C_AccelGroupActivate) ->
IO ()
accelGroupConnect ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Word32
-> [Gdk.Flags.ModifierType]
-> [Gtk.Flags.AccelFlags]
-> GClosure Gtk.Callbacks.C_AccelGroupActivate
-> m ()
accelGroupConnect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Word32
-> [ModifierType]
-> [AccelFlags]
-> GClosure C_AccelGroupActivate
-> m ()
accelGroupConnect a
accelGroup Word32
accelKey [ModifierType]
accelMods [AccelFlags]
accelFlags GClosure C_AccelGroupActivate
closure = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
let accelFlags' :: CUInt
accelFlags' = [AccelFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AccelFlags]
accelFlags
Ptr (GClosure C_AccelGroupActivate)
closure' <- GClosure C_AccelGroupActivate
-> IO (Ptr (GClosure C_AccelGroupActivate))
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GClosure C_AccelGroupActivate
closure
Ptr AccelGroup
-> Word32
-> CUInt
-> CUInt
-> Ptr (GClosure C_AccelGroupActivate)
-> IO ()
gtk_accel_group_connect Ptr AccelGroup
accelGroup' Word32
accelKey CUInt
accelMods' CUInt
accelFlags' Ptr (GClosure C_AccelGroupActivate)
closure'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
GClosure C_AccelGroupActivate -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GClosure C_AccelGroupActivate
closure
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AccelGroupConnectMethodInfo
instance (signature ~ (Word32 -> [Gdk.Flags.ModifierType] -> [Gtk.Flags.AccelFlags] -> GClosure Gtk.Callbacks.C_AccelGroupActivate -> m ()), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupConnectMethodInfo a signature where
overloadedMethod = accelGroupConnect
instance O.OverloadedMethodInfo AccelGroupConnectMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupConnect",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupConnect"
}
#endif
foreign import ccall "gtk_accel_group_connect_by_path" gtk_accel_group_connect_by_path ::
Ptr AccelGroup ->
CString ->
Ptr (GClosure ()) ->
IO ()
accelGroupConnectByPath ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> T.Text
-> GClosure b
-> m ()
accelGroupConnectByPath :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> Text -> GClosure b -> m ()
accelGroupConnectByPath a
accelGroup Text
accelPath GClosure b
closure = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
CString
accelPath' <- Text -> IO CString
textToCString Text
accelPath
Ptr (GClosure ())
closure' <- GClosure b -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure b
closure
Ptr AccelGroup -> CString -> Ptr (GClosure ()) -> IO ()
gtk_accel_group_connect_by_path Ptr AccelGroup
accelGroup' CString
accelPath' Ptr (GClosure ())
closure'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
GClosure b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GClosure b
closure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
accelPath'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AccelGroupConnectByPathMethodInfo
instance (signature ~ (T.Text -> GClosure b -> m ()), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupConnectByPathMethodInfo a signature where
overloadedMethod = accelGroupConnectByPath
instance O.OverloadedMethodInfo AccelGroupConnectByPathMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupConnectByPath",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupConnectByPath"
}
#endif
foreign import ccall "gtk_accel_group_disconnect" gtk_accel_group_disconnect ::
Ptr AccelGroup ->
Ptr (GClosure ()) ->
IO CInt
accelGroupDisconnect ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Maybe (GClosure b)
-> m Bool
accelGroupDisconnect :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> Maybe (GClosure b) -> m Bool
accelGroupDisconnect a
accelGroup Maybe (GClosure b)
closure = IO Bool -> m Bool
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 AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
Ptr (GClosure ())
maybeClosure <- case Maybe (GClosure b)
closure of
Maybe (GClosure b)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
nullPtr
Just GClosure b
jClosure -> do
Ptr (GClosure ())
jClosure' <- GClosure b -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure b
jClosure
Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
jClosure'
CInt
result <- Ptr AccelGroup -> Ptr (GClosure ()) -> IO CInt
gtk_accel_group_disconnect Ptr AccelGroup
accelGroup' Ptr (GClosure ())
maybeClosure
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
accelGroup
Maybe (GClosure b) -> (GClosure b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe (GClosure b)
closure GClosure b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupDisconnectMethodInfo
instance (signature ~ (Maybe (GClosure b) -> m Bool), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupDisconnectMethodInfo a signature where
overloadedMethod = accelGroupDisconnect
instance O.OverloadedMethodInfo AccelGroupDisconnectMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupDisconnect",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupDisconnect"
}
#endif
foreign import ccall "gtk_accel_group_disconnect_key" gtk_accel_group_disconnect_key ::
Ptr AccelGroup ->
Word32 ->
CUInt ->
IO CInt
accelGroupDisconnectKey ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Word32
-> [Gdk.Flags.ModifierType]
-> m Bool
accelGroupDisconnectKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> Word32 -> [ModifierType] -> m Bool
accelGroupDisconnectKey a
accelGroup Word32
accelKey [ModifierType]
accelMods = IO Bool -> m Bool
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 AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
CInt
result <- Ptr AccelGroup -> Word32 -> CUInt -> IO CInt
gtk_accel_group_disconnect_key Ptr AccelGroup
accelGroup' Word32
accelKey CUInt
accelMods'
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
accelGroup
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupDisconnectKeyMethodInfo
instance (signature ~ (Word32 -> [Gdk.Flags.ModifierType] -> m Bool), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupDisconnectKeyMethodInfo a signature where
overloadedMethod = accelGroupDisconnectKey
instance O.OverloadedMethodInfo AccelGroupDisconnectKeyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupDisconnectKey",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupDisconnectKey"
}
#endif
foreign import ccall "gtk_accel_group_find" gtk_accel_group_find ::
Ptr AccelGroup ->
FunPtr Gtk.Callbacks.C_AccelGroupFindFunc ->
Ptr () ->
IO (Ptr Gtk.AccelKey.AccelKey)
accelGroupFind ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Gtk.Callbacks.AccelGroupFindFunc
-> m Gtk.AccelKey.AccelKey
accelGroupFind :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> AccelGroupFindFunc -> m AccelKey
accelGroupFind a
accelGroup AccelGroupFindFunc
findFunc = IO AccelKey -> m AccelKey
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelKey -> m AccelKey) -> IO AccelKey -> m AccelKey
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
FunPtr C_AccelGroupFindFunc
findFunc' <- C_AccelGroupFindFunc -> IO (FunPtr C_AccelGroupFindFunc)
Gtk.Callbacks.mk_AccelGroupFindFunc (Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
-> AccelGroupFindFunc_WithClosures -> C_AccelGroupFindFunc
Gtk.Callbacks.wrap_AccelGroupFindFunc Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
forall a. Maybe a
Nothing (AccelGroupFindFunc -> AccelGroupFindFunc_WithClosures
Gtk.Callbacks.drop_closures_AccelGroupFindFunc AccelGroupFindFunc
findFunc))
let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
Ptr AccelKey
result <- Ptr AccelGroup
-> FunPtr C_AccelGroupFindFunc -> Ptr () -> IO (Ptr AccelKey)
gtk_accel_group_find Ptr AccelGroup
accelGroup' FunPtr C_AccelGroupFindFunc
findFunc' Ptr ()
forall a. Ptr a
data_
Text -> Ptr AccelKey -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"accelGroupFind" Ptr AccelKey
result
AccelKey
result' <- ((ManagedPtr AccelKey -> AccelKey) -> Ptr AccelKey -> IO AccelKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr AccelKey -> AccelKey
Gtk.AccelKey.AccelKey) Ptr AccelKey
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_AccelGroupFindFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_AccelGroupFindFunc
findFunc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
AccelKey -> IO AccelKey
forall (m :: * -> *) a. Monad m => a -> m a
return AccelKey
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupFindMethodInfo
instance (signature ~ (Gtk.Callbacks.AccelGroupFindFunc -> m Gtk.AccelKey.AccelKey), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupFindMethodInfo a signature where
overloadedMethod = accelGroupFind
instance O.OverloadedMethodInfo AccelGroupFindMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupFind",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupFind"
}
#endif
foreign import ccall "gtk_accel_group_get_is_locked" gtk_accel_group_get_is_locked ::
Ptr AccelGroup ->
IO CInt
accelGroupGetIsLocked ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> m Bool
accelGroupGetIsLocked :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> m Bool
accelGroupGetIsLocked a
accelGroup = IO Bool -> m Bool
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 AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
CInt
result <- Ptr AccelGroup -> IO CInt
gtk_accel_group_get_is_locked Ptr AccelGroup
accelGroup'
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
accelGroup
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupGetIsLockedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupGetIsLockedMethodInfo a signature where
overloadedMethod = accelGroupGetIsLocked
instance O.OverloadedMethodInfo AccelGroupGetIsLockedMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupGetIsLocked",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupGetIsLocked"
}
#endif
foreign import ccall "gtk_accel_group_get_modifier_mask" gtk_accel_group_get_modifier_mask ::
Ptr AccelGroup ->
IO CUInt
accelGroupGetModifierMask ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> m [Gdk.Flags.ModifierType]
accelGroupGetModifierMask :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> m [ModifierType]
accelGroupGetModifierMask a
accelGroup = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
CUInt
result <- Ptr AccelGroup -> IO CUInt
gtk_accel_group_get_modifier_mask Ptr AccelGroup
accelGroup'
let result' :: [ModifierType]
result' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
result'
#if defined(ENABLE_OVERLOADING)
data AccelGroupGetModifierMaskMethodInfo
instance (signature ~ (m [Gdk.Flags.ModifierType]), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupGetModifierMaskMethodInfo a signature where
overloadedMethod = accelGroupGetModifierMask
instance O.OverloadedMethodInfo AccelGroupGetModifierMaskMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupGetModifierMask",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupGetModifierMask"
}
#endif
foreign import ccall "gtk_accel_group_lock" gtk_accel_group_lock ::
Ptr AccelGroup ->
IO ()
accelGroupLock ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> m ()
accelGroupLock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> m ()
accelGroupLock a
accelGroup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
Ptr AccelGroup -> IO ()
gtk_accel_group_lock Ptr AccelGroup
accelGroup'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AccelGroupLockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupLockMethodInfo a signature where
overloadedMethod = accelGroupLock
instance O.OverloadedMethodInfo AccelGroupLockMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupLock",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupLock"
}
#endif
foreign import ccall "gtk_accel_group_query" gtk_accel_group_query ::
Ptr AccelGroup ->
Word32 ->
CUInt ->
Ptr Word32 ->
IO (Ptr Gtk.AccelGroupEntry.AccelGroupEntry)
accelGroupQuery ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> Word32
-> [Gdk.Flags.ModifierType]
-> m (Maybe [Gtk.AccelGroupEntry.AccelGroupEntry])
accelGroupQuery :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> Word32 -> [ModifierType] -> m (Maybe [AccelGroupEntry])
accelGroupQuery a
accelGroup Word32
accelKey [ModifierType]
accelMods = IO (Maybe [AccelGroupEntry]) -> m (Maybe [AccelGroupEntry])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [AccelGroupEntry]) -> m (Maybe [AccelGroupEntry]))
-> IO (Maybe [AccelGroupEntry]) -> m (Maybe [AccelGroupEntry])
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
Ptr Word32
nEntries <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr AccelGroupEntry
result <- Ptr AccelGroup
-> Word32 -> CUInt -> Ptr Word32 -> IO (Ptr AccelGroupEntry)
gtk_accel_group_query Ptr AccelGroup
accelGroup' Word32
accelKey CUInt
accelMods' Ptr Word32
nEntries
Word32
nEntries' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
nEntries
Maybe [AccelGroupEntry]
maybeResult <- Ptr AccelGroupEntry
-> (Ptr AccelGroupEntry -> IO [AccelGroupEntry])
-> IO (Maybe [AccelGroupEntry])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr AccelGroupEntry
result ((Ptr AccelGroupEntry -> IO [AccelGroupEntry])
-> IO (Maybe [AccelGroupEntry]))
-> (Ptr AccelGroupEntry -> IO [AccelGroupEntry])
-> IO (Maybe [AccelGroupEntry])
forall a b. (a -> b) -> a -> b
$ \Ptr AccelGroupEntry
result' -> do
[Ptr AccelGroupEntry]
result'' <- (Int -> Word32 -> Ptr AccelGroupEntry -> IO [Ptr AccelGroupEntry]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
32 Word32
nEntries') Ptr AccelGroupEntry
result'
[AccelGroupEntry]
result''' <- (Ptr AccelGroupEntry -> IO AccelGroupEntry)
-> [Ptr AccelGroupEntry] -> IO [AccelGroupEntry]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr AccelGroupEntry -> AccelGroupEntry)
-> Ptr AccelGroupEntry -> IO AccelGroupEntry
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr AccelGroupEntry -> AccelGroupEntry
Gtk.AccelGroupEntry.AccelGroupEntry) [Ptr AccelGroupEntry]
result''
[AccelGroupEntry] -> IO [AccelGroupEntry]
forall (m :: * -> *) a. Monad m => a -> m a
return [AccelGroupEntry]
result'''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
nEntries
Maybe [AccelGroupEntry] -> IO (Maybe [AccelGroupEntry])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [AccelGroupEntry]
maybeResult
#if defined(ENABLE_OVERLOADING)
data AccelGroupQueryMethodInfo
instance (signature ~ (Word32 -> [Gdk.Flags.ModifierType] -> m (Maybe [Gtk.AccelGroupEntry.AccelGroupEntry])), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupQueryMethodInfo a signature where
overloadedMethod = accelGroupQuery
instance O.OverloadedMethodInfo AccelGroupQueryMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupQuery",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupQuery"
}
#endif
foreign import ccall "gtk_accel_group_unlock" gtk_accel_group_unlock ::
Ptr AccelGroup ->
IO ()
accelGroupUnlock ::
(B.CallStack.HasCallStack, MonadIO m, IsAccelGroup a) =>
a
-> m ()
accelGroupUnlock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccelGroup a) =>
a -> m ()
accelGroupUnlock a
accelGroup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
Ptr AccelGroup -> IO ()
gtk_accel_group_unlock Ptr AccelGroup
accelGroup'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AccelGroupUnlockMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAccelGroup a) => O.OverloadedMethod AccelGroupUnlockMethodInfo a signature where
overloadedMethod = accelGroupUnlock
instance O.OverloadedMethodInfo AccelGroupUnlockMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AccelGroup.accelGroupUnlock",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-AccelGroup.html#v:accelGroupUnlock"
}
#endif
foreign import ccall "gtk_accel_group_from_accel_closure" gtk_accel_group_from_accel_closure ::
Ptr (GClosure ()) ->
IO (Ptr AccelGroup)
accelGroupFromAccelClosure ::
(B.CallStack.HasCallStack, MonadIO m) =>
GClosure a
-> m (Maybe AccelGroup)
accelGroupFromAccelClosure :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m) =>
GClosure a -> m (Maybe AccelGroup)
accelGroupFromAccelClosure GClosure a
closure = IO (Maybe AccelGroup) -> m (Maybe AccelGroup)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe AccelGroup) -> m (Maybe AccelGroup))
-> IO (Maybe AccelGroup) -> m (Maybe AccelGroup)
forall a b. (a -> b) -> a -> b
$ do
Ptr (GClosure ())
closure' <- GClosure a -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure a
closure
Ptr AccelGroup
result <- Ptr (GClosure ()) -> IO (Ptr AccelGroup)
gtk_accel_group_from_accel_closure Ptr (GClosure ())
closure'
Maybe AccelGroup
maybeResult <- Ptr AccelGroup
-> (Ptr AccelGroup -> IO AccelGroup) -> IO (Maybe AccelGroup)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr AccelGroup
result ((Ptr AccelGroup -> IO AccelGroup) -> IO (Maybe AccelGroup))
-> (Ptr AccelGroup -> IO AccelGroup) -> IO (Maybe AccelGroup)
forall a b. (a -> b) -> a -> b
$ \Ptr AccelGroup
result' -> do
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
AccelGroup) Ptr AccelGroup
result'
AccelGroup -> IO AccelGroup
forall (m :: * -> *) a. Monad m => a -> m a
return AccelGroup
result''
GClosure a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GClosure a
closure
Maybe AccelGroup -> IO (Maybe AccelGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AccelGroup
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif