{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.BindingEntry
(
BindingEntry(..) ,
newZeroBindingEntry ,
noBindingEntry ,
#if defined(ENABLE_OVERLOADING)
ResolveBindingEntryMethod ,
#endif
bindingEntryAddSignalFromString ,
bindingEntryAddSignall ,
bindingEntryRemove ,
bindingEntrySkip ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_bindingSet ,
#endif
clearBindingEntryBindingSet ,
getBindingEntryBindingSet ,
setBindingEntryBindingSet ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_destroyed ,
#endif
getBindingEntryDestroyed ,
setBindingEntryDestroyed ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_hashNext ,
#endif
clearBindingEntryHashNext ,
getBindingEntryHashNext ,
setBindingEntryHashNext ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_inEmission ,
#endif
getBindingEntryInEmission ,
setBindingEntryInEmission ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_keyval ,
#endif
getBindingEntryKeyval ,
setBindingEntryKeyval ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_marksUnbound ,
#endif
getBindingEntryMarksUnbound ,
setBindingEntryMarksUnbound ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_modifiers ,
#endif
getBindingEntryModifiers ,
setBindingEntryModifiers ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_setNext ,
#endif
clearBindingEntrySetNext ,
getBindingEntrySetNext ,
setBindingEntrySetNext ,
#if defined(ENABLE_OVERLOADING)
bindingEntry_signals ,
#endif
clearBindingEntrySignals ,
getBindingEntrySignals ,
setBindingEntrySignals ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Enums as GLib.Enums
import qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Structs.BindingArg as Gtk.BindingArg
import {-# SOURCE #-} qualified GI.Gtk.Structs.BindingSet as Gtk.BindingSet
import {-# SOURCE #-} qualified GI.Gtk.Structs.BindingSignal as Gtk.BindingSignal
newtype BindingEntry = BindingEntry (ManagedPtr BindingEntry)
deriving (BindingEntry -> BindingEntry -> Bool
(BindingEntry -> BindingEntry -> Bool)
-> (BindingEntry -> BindingEntry -> Bool) -> Eq BindingEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BindingEntry -> BindingEntry -> Bool
$c/= :: BindingEntry -> BindingEntry -> Bool
== :: BindingEntry -> BindingEntry -> Bool
$c== :: BindingEntry -> BindingEntry -> Bool
Eq)
instance WrappedPtr BindingEntry where
wrappedPtrCalloc :: IO (Ptr BindingEntry)
wrappedPtrCalloc = Int -> IO (Ptr BindingEntry)
forall a. Int -> IO (Ptr a)
callocBytes 56
wrappedPtrCopy :: BindingEntry -> IO BindingEntry
wrappedPtrCopy = \p :: BindingEntry
p -> BindingEntry
-> (Ptr BindingEntry -> IO BindingEntry) -> IO BindingEntry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
p (Int -> Ptr BindingEntry -> IO (Ptr BindingEntry)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 56 (Ptr BindingEntry -> IO (Ptr BindingEntry))
-> (Ptr BindingEntry -> IO BindingEntry)
-> Ptr BindingEntry
-> IO BindingEntry
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr BindingEntry -> BindingEntry
BindingEntry)
wrappedPtrFree :: Maybe (GDestroyNotify BindingEntry)
wrappedPtrFree = GDestroyNotify BindingEntry -> Maybe (GDestroyNotify BindingEntry)
forall a. a -> Maybe a
Just GDestroyNotify BindingEntry
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroBindingEntry :: MonadIO m => m BindingEntry
newZeroBindingEntry :: m BindingEntry
newZeroBindingEntry = IO BindingEntry -> m BindingEntry
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BindingEntry -> m BindingEntry)
-> IO BindingEntry -> m BindingEntry
forall a b. (a -> b) -> a -> b
$ IO (Ptr BindingEntry)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr BindingEntry)
-> (Ptr BindingEntry -> IO BindingEntry) -> IO BindingEntry
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr BindingEntry -> BindingEntry
BindingEntry
instance tag ~ 'AttrSet => Constructible BindingEntry tag where
new :: (ManagedPtr BindingEntry -> BindingEntry)
-> [AttrOp BindingEntry tag] -> m BindingEntry
new _ attrs :: [AttrOp BindingEntry tag]
attrs = do
BindingEntry
o <- m BindingEntry
forall (m :: * -> *). MonadIO m => m BindingEntry
newZeroBindingEntry
BindingEntry -> [AttrOp BindingEntry 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set BindingEntry
o [AttrOp BindingEntry tag]
[AttrOp BindingEntry 'AttrSet]
attrs
BindingEntry -> m BindingEntry
forall (m :: * -> *) a. Monad m => a -> m a
return BindingEntry
o
noBindingEntry :: Maybe BindingEntry
noBindingEntry :: Maybe BindingEntry
noBindingEntry = Maybe BindingEntry
forall a. Maybe a
Nothing
getBindingEntryKeyval :: MonadIO m => BindingEntry -> m Word32
getBindingEntryKeyval :: BindingEntry -> m Word32
getBindingEntryKeyval s :: BindingEntry
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO Word32) -> IO Word32)
-> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setBindingEntryKeyval :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryKeyval :: BindingEntry -> Word32 -> m ()
setBindingEntryKeyval s :: BindingEntry
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data BindingEntryKeyvalFieldInfo
instance AttrInfo BindingEntryKeyvalFieldInfo where
type AttrBaseTypeConstraint BindingEntryKeyvalFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryKeyvalFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BindingEntryKeyvalFieldInfo = (~) Word32
type AttrTransferTypeConstraint BindingEntryKeyvalFieldInfo = (~)Word32
type AttrTransferType BindingEntryKeyvalFieldInfo = Word32
type AttrGetType BindingEntryKeyvalFieldInfo = Word32
type AttrLabel BindingEntryKeyvalFieldInfo = "keyval"
type AttrOrigin BindingEntryKeyvalFieldInfo = BindingEntry
attrGet = getBindingEntryKeyval
attrSet = setBindingEntryKeyval
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
bindingEntry_keyval :: AttrLabelProxy "keyval"
bindingEntry_keyval = AttrLabelProxy
#endif
getBindingEntryModifiers :: MonadIO m => BindingEntry -> m [Gdk.Flags.ModifierType]
getBindingEntryModifiers :: BindingEntry -> m [ModifierType]
getBindingEntryModifiers s :: BindingEntry
s = 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
$ BindingEntry
-> (Ptr BindingEntry -> IO [ModifierType]) -> IO [ModifierType]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO [ModifierType]) -> IO [ModifierType])
-> (Ptr BindingEntry -> IO [ModifierType]) -> IO [ModifierType]
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4) :: IO CUInt
let val' :: [ModifierType]
val' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
val'
setBindingEntryModifiers :: MonadIO m => BindingEntry -> [Gdk.Flags.ModifierType] -> m ()
setBindingEntryModifiers :: BindingEntry -> [ModifierType] -> m ()
setBindingEntryModifiers s :: BindingEntry
s val :: [ModifierType]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
let val' :: CUInt
val' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data BindingEntryModifiersFieldInfo
instance AttrInfo BindingEntryModifiersFieldInfo where
type AttrBaseTypeConstraint BindingEntryModifiersFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryModifiersFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BindingEntryModifiersFieldInfo = (~) [Gdk.Flags.ModifierType]
type AttrTransferTypeConstraint BindingEntryModifiersFieldInfo = (~)[Gdk.Flags.ModifierType]
type AttrTransferType BindingEntryModifiersFieldInfo = [Gdk.Flags.ModifierType]
type AttrGetType BindingEntryModifiersFieldInfo = [Gdk.Flags.ModifierType]
type AttrLabel BindingEntryModifiersFieldInfo = "modifiers"
type AttrOrigin BindingEntryModifiersFieldInfo = BindingEntry
attrGet = getBindingEntryModifiers
attrSet = setBindingEntryModifiers
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
bindingEntry_modifiers :: AttrLabelProxy "modifiers"
bindingEntry_modifiers = AttrLabelProxy
#endif
getBindingEntryBindingSet :: MonadIO m => BindingEntry -> m (Maybe Gtk.BindingSet.BindingSet)
getBindingEntryBindingSet :: BindingEntry -> m (Maybe BindingSet)
getBindingEntryBindingSet s :: BindingEntry
s = IO (Maybe BindingSet) -> m (Maybe BindingSet)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BindingSet) -> m (Maybe BindingSet))
-> IO (Maybe BindingSet) -> m (Maybe BindingSet)
forall a b. (a -> b) -> a -> b
$ BindingEntry
-> (Ptr BindingEntry -> IO (Maybe BindingSet))
-> IO (Maybe BindingSet)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO (Maybe BindingSet))
-> IO (Maybe BindingSet))
-> (Ptr BindingEntry -> IO (Maybe BindingSet))
-> IO (Maybe BindingSet)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr BindingSet
val <- Ptr (Ptr BindingSet) -> IO (Ptr BindingSet)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSet)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (Ptr Gtk.BindingSet.BindingSet)
Maybe BindingSet
result <- Ptr BindingSet
-> (Ptr BindingSet -> IO BindingSet) -> IO (Maybe BindingSet)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr BindingSet
val ((Ptr BindingSet -> IO BindingSet) -> IO (Maybe BindingSet))
-> (Ptr BindingSet -> IO BindingSet) -> IO (Maybe BindingSet)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr BindingSet
val' -> do
BindingSet
val'' <- ((ManagedPtr BindingSet -> BindingSet)
-> Ptr BindingSet -> IO BindingSet
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr BindingSet -> BindingSet
Gtk.BindingSet.BindingSet) Ptr BindingSet
val'
BindingSet -> IO BindingSet
forall (m :: * -> *) a. Monad m => a -> m a
return BindingSet
val''
Maybe BindingSet -> IO (Maybe BindingSet)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BindingSet
result
setBindingEntryBindingSet :: MonadIO m => BindingEntry -> Ptr Gtk.BindingSet.BindingSet -> m ()
setBindingEntryBindingSet :: BindingEntry -> Ptr BindingSet -> m ()
setBindingEntryBindingSet s :: BindingEntry
s val :: Ptr BindingSet
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingSet) -> Ptr BindingSet -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSet)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr BindingSet
val :: Ptr Gtk.BindingSet.BindingSet)
clearBindingEntryBindingSet :: MonadIO m => BindingEntry -> m ()
clearBindingEntryBindingSet :: BindingEntry -> m ()
clearBindingEntryBindingSet s :: BindingEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingSet) -> Ptr BindingSet -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSet)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr BindingSet
forall a. Ptr a
FP.nullPtr :: Ptr Gtk.BindingSet.BindingSet)
#if defined(ENABLE_OVERLOADING)
data BindingEntryBindingSetFieldInfo
instance AttrInfo BindingEntryBindingSetFieldInfo where
type AttrBaseTypeConstraint BindingEntryBindingSetFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryBindingSetFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BindingEntryBindingSetFieldInfo = (~) (Ptr Gtk.BindingSet.BindingSet)
type AttrTransferTypeConstraint BindingEntryBindingSetFieldInfo = (~)(Ptr Gtk.BindingSet.BindingSet)
type AttrTransferType BindingEntryBindingSetFieldInfo = (Ptr Gtk.BindingSet.BindingSet)
type AttrGetType BindingEntryBindingSetFieldInfo = Maybe Gtk.BindingSet.BindingSet
type AttrLabel BindingEntryBindingSetFieldInfo = "binding_set"
type AttrOrigin BindingEntryBindingSetFieldInfo = BindingEntry
attrGet = getBindingEntryBindingSet
attrSet = setBindingEntryBindingSet
attrConstruct = undefined
attrClear = clearBindingEntryBindingSet
attrTransfer _ v = do
return v
bindingEntry_bindingSet :: AttrLabelProxy "bindingSet"
bindingEntry_bindingSet = AttrLabelProxy
#endif
getBindingEntryDestroyed :: MonadIO m => BindingEntry -> m Word32
getBindingEntryDestroyed :: BindingEntry -> m Word32
getBindingEntryDestroyed s :: BindingEntry
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO Word32) -> IO Word32)
-> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setBindingEntryDestroyed :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryDestroyed :: BindingEntry -> Word32 -> m ()
setBindingEntryDestroyed s :: BindingEntry
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data BindingEntryDestroyedFieldInfo
instance AttrInfo BindingEntryDestroyedFieldInfo where
type AttrBaseTypeConstraint BindingEntryDestroyedFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryDestroyedFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BindingEntryDestroyedFieldInfo = (~) Word32
type AttrTransferTypeConstraint BindingEntryDestroyedFieldInfo = (~)Word32
type AttrTransferType BindingEntryDestroyedFieldInfo = Word32
type AttrGetType BindingEntryDestroyedFieldInfo = Word32
type AttrLabel BindingEntryDestroyedFieldInfo = "destroyed"
type AttrOrigin BindingEntryDestroyedFieldInfo = BindingEntry
attrGet = getBindingEntryDestroyed
attrSet = setBindingEntryDestroyed
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
bindingEntry_destroyed :: AttrLabelProxy "destroyed"
bindingEntry_destroyed = AttrLabelProxy
#endif
getBindingEntryInEmission :: MonadIO m => BindingEntry -> m Word32
getBindingEntryInEmission :: BindingEntry -> m Word32
getBindingEntryInEmission s :: BindingEntry
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO Word32) -> IO Word32)
-> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setBindingEntryInEmission :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryInEmission :: BindingEntry -> Word32 -> m ()
setBindingEntryInEmission s :: BindingEntry
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data BindingEntryInEmissionFieldInfo
instance AttrInfo BindingEntryInEmissionFieldInfo where
type AttrBaseTypeConstraint BindingEntryInEmissionFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryInEmissionFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BindingEntryInEmissionFieldInfo = (~) Word32
type AttrTransferTypeConstraint BindingEntryInEmissionFieldInfo = (~)Word32
type AttrTransferType BindingEntryInEmissionFieldInfo = Word32
type AttrGetType BindingEntryInEmissionFieldInfo = Word32
type AttrLabel BindingEntryInEmissionFieldInfo = "in_emission"
type AttrOrigin BindingEntryInEmissionFieldInfo = BindingEntry
attrGet = getBindingEntryInEmission
attrSet = setBindingEntryInEmission
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
bindingEntry_inEmission :: AttrLabelProxy "inEmission"
bindingEntry_inEmission = AttrLabelProxy
#endif
getBindingEntryMarksUnbound :: MonadIO m => BindingEntry -> m Word32
getBindingEntryMarksUnbound :: BindingEntry -> m Word32
getBindingEntryMarksUnbound s :: BindingEntry
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO Word32) -> IO Word32)
-> (Ptr BindingEntry -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setBindingEntryMarksUnbound :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryMarksUnbound :: BindingEntry -> Word32 -> m ()
setBindingEntryMarksUnbound s :: BindingEntry
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data BindingEntryMarksUnboundFieldInfo
instance AttrInfo BindingEntryMarksUnboundFieldInfo where
type AttrBaseTypeConstraint BindingEntryMarksUnboundFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryMarksUnboundFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BindingEntryMarksUnboundFieldInfo = (~) Word32
type AttrTransferTypeConstraint BindingEntryMarksUnboundFieldInfo = (~)Word32
type AttrTransferType BindingEntryMarksUnboundFieldInfo = Word32
type AttrGetType BindingEntryMarksUnboundFieldInfo = Word32
type AttrLabel BindingEntryMarksUnboundFieldInfo = "marks_unbound"
type AttrOrigin BindingEntryMarksUnboundFieldInfo = BindingEntry
attrGet = getBindingEntryMarksUnbound
attrSet = setBindingEntryMarksUnbound
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
bindingEntry_marksUnbound :: AttrLabelProxy "marksUnbound"
bindingEntry_marksUnbound = AttrLabelProxy
#endif
getBindingEntrySetNext :: MonadIO m => BindingEntry -> m (Maybe BindingEntry)
getBindingEntrySetNext :: BindingEntry -> m (Maybe BindingEntry)
getBindingEntrySetNext s :: BindingEntry
s = IO (Maybe BindingEntry) -> m (Maybe BindingEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BindingEntry) -> m (Maybe BindingEntry))
-> IO (Maybe BindingEntry) -> m (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ BindingEntry
-> (Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry))
-> (Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr BindingEntry
val <- Ptr (Ptr BindingEntry) -> IO (Ptr BindingEntry)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) :: IO (Ptr BindingEntry)
Maybe BindingEntry
result <- Ptr BindingEntry
-> (Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr BindingEntry
val ((Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry))
-> (Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr BindingEntry
val' -> do
BindingEntry
val'' <- ((ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr BindingEntry -> BindingEntry
BindingEntry) Ptr BindingEntry
val'
BindingEntry -> IO BindingEntry
forall (m :: * -> *) a. Monad m => a -> m a
return BindingEntry
val''
Maybe BindingEntry -> IO (Maybe BindingEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BindingEntry
result
setBindingEntrySetNext :: MonadIO m => BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntrySetNext :: BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntrySetNext s :: BindingEntry
s val :: Ptr BindingEntry
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingEntry) -> Ptr BindingEntry -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (Ptr BindingEntry
val :: Ptr BindingEntry)
clearBindingEntrySetNext :: MonadIO m => BindingEntry -> m ()
clearBindingEntrySetNext :: BindingEntry -> m ()
clearBindingEntrySetNext s :: BindingEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingEntry) -> Ptr BindingEntry -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (Ptr BindingEntry
forall a. Ptr a
FP.nullPtr :: Ptr BindingEntry)
#if defined(ENABLE_OVERLOADING)
data BindingEntrySetNextFieldInfo
instance AttrInfo BindingEntrySetNextFieldInfo where
type AttrBaseTypeConstraint BindingEntrySetNextFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntrySetNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BindingEntrySetNextFieldInfo = (~) (Ptr BindingEntry)
type AttrTransferTypeConstraint BindingEntrySetNextFieldInfo = (~)(Ptr BindingEntry)
type AttrTransferType BindingEntrySetNextFieldInfo = (Ptr BindingEntry)
type AttrGetType BindingEntrySetNextFieldInfo = Maybe BindingEntry
type AttrLabel BindingEntrySetNextFieldInfo = "set_next"
type AttrOrigin BindingEntrySetNextFieldInfo = BindingEntry
attrGet = getBindingEntrySetNext
attrSet = setBindingEntrySetNext
attrConstruct = undefined
attrClear = clearBindingEntrySetNext
attrTransfer _ v = do
return v
bindingEntry_setNext :: AttrLabelProxy "setNext"
bindingEntry_setNext = AttrLabelProxy
#endif
getBindingEntryHashNext :: MonadIO m => BindingEntry -> m (Maybe BindingEntry)
getBindingEntryHashNext :: BindingEntry -> m (Maybe BindingEntry)
getBindingEntryHashNext s :: BindingEntry
s = IO (Maybe BindingEntry) -> m (Maybe BindingEntry)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BindingEntry) -> m (Maybe BindingEntry))
-> IO (Maybe BindingEntry) -> m (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ BindingEntry
-> (Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry))
-> (Ptr BindingEntry -> IO (Maybe BindingEntry))
-> IO (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr BindingEntry
val <- Ptr (Ptr BindingEntry) -> IO (Ptr BindingEntry)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) :: IO (Ptr BindingEntry)
Maybe BindingEntry
result <- Ptr BindingEntry
-> (Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr BindingEntry
val ((Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry))
-> (Ptr BindingEntry -> IO BindingEntry) -> IO (Maybe BindingEntry)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr BindingEntry
val' -> do
BindingEntry
val'' <- ((ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr BindingEntry -> BindingEntry
BindingEntry) Ptr BindingEntry
val'
BindingEntry -> IO BindingEntry
forall (m :: * -> *) a. Monad m => a -> m a
return BindingEntry
val''
Maybe BindingEntry -> IO (Maybe BindingEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BindingEntry
result
setBindingEntryHashNext :: MonadIO m => BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntryHashNext :: BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntryHashNext s :: BindingEntry
s val :: Ptr BindingEntry
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingEntry) -> Ptr BindingEntry -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr BindingEntry
val :: Ptr BindingEntry)
clearBindingEntryHashNext :: MonadIO m => BindingEntry -> m ()
clearBindingEntryHashNext :: BindingEntry -> m ()
clearBindingEntryHashNext s :: BindingEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingEntry) -> Ptr BindingEntry -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingEntry)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr BindingEntry
forall a. Ptr a
FP.nullPtr :: Ptr BindingEntry)
#if defined(ENABLE_OVERLOADING)
data BindingEntryHashNextFieldInfo
instance AttrInfo BindingEntryHashNextFieldInfo where
type AttrBaseTypeConstraint BindingEntryHashNextFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntryHashNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BindingEntryHashNextFieldInfo = (~) (Ptr BindingEntry)
type AttrTransferTypeConstraint BindingEntryHashNextFieldInfo = (~)(Ptr BindingEntry)
type AttrTransferType BindingEntryHashNextFieldInfo = (Ptr BindingEntry)
type AttrGetType BindingEntryHashNextFieldInfo = Maybe BindingEntry
type AttrLabel BindingEntryHashNextFieldInfo = "hash_next"
type AttrOrigin BindingEntryHashNextFieldInfo = BindingEntry
attrGet = getBindingEntryHashNext
attrSet = setBindingEntryHashNext
attrConstruct = undefined
attrClear = clearBindingEntryHashNext
attrTransfer _ v = do
return v
bindingEntry_hashNext :: AttrLabelProxy "hashNext"
bindingEntry_hashNext = AttrLabelProxy
#endif
getBindingEntrySignals :: MonadIO m => BindingEntry -> m (Maybe Gtk.BindingSignal.BindingSignal)
getBindingEntrySignals :: BindingEntry -> m (Maybe BindingSignal)
getBindingEntrySignals s :: BindingEntry
s = IO (Maybe BindingSignal) -> m (Maybe BindingSignal)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BindingSignal) -> m (Maybe BindingSignal))
-> IO (Maybe BindingSignal) -> m (Maybe BindingSignal)
forall a b. (a -> b) -> a -> b
$ BindingEntry
-> (Ptr BindingEntry -> IO (Maybe BindingSignal))
-> IO (Maybe BindingSignal)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO (Maybe BindingSignal))
-> IO (Maybe BindingSignal))
-> (Ptr BindingEntry -> IO (Maybe BindingSignal))
-> IO (Maybe BindingSignal)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr BindingSignal
val <- Ptr (Ptr BindingSignal) -> IO (Ptr BindingSignal)
forall a. Storable a => Ptr a -> IO a
peek (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSignal)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) :: IO (Ptr Gtk.BindingSignal.BindingSignal)
Maybe BindingSignal
result <- Ptr BindingSignal
-> (Ptr BindingSignal -> IO BindingSignal)
-> IO (Maybe BindingSignal)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr BindingSignal
val ((Ptr BindingSignal -> IO BindingSignal)
-> IO (Maybe BindingSignal))
-> (Ptr BindingSignal -> IO BindingSignal)
-> IO (Maybe BindingSignal)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr BindingSignal
val' -> do
BindingSignal
val'' <- ((ManagedPtr BindingSignal -> BindingSignal)
-> Ptr BindingSignal -> IO BindingSignal
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr BindingSignal -> BindingSignal
Gtk.BindingSignal.BindingSignal) Ptr BindingSignal
val'
BindingSignal -> IO BindingSignal
forall (m :: * -> *) a. Monad m => a -> m a
return BindingSignal
val''
Maybe BindingSignal -> IO (Maybe BindingSignal)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BindingSignal
result
setBindingEntrySignals :: MonadIO m => BindingEntry -> Ptr Gtk.BindingSignal.BindingSignal -> m ()
setBindingEntrySignals :: BindingEntry -> Ptr BindingSignal -> m ()
setBindingEntrySignals s :: BindingEntry
s val :: Ptr BindingSignal
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingSignal) -> Ptr BindingSignal -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSignal)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) (Ptr BindingSignal
val :: Ptr Gtk.BindingSignal.BindingSignal)
clearBindingEntrySignals :: MonadIO m => BindingEntry -> m ()
clearBindingEntrySignals :: BindingEntry -> m ()
clearBindingEntrySignals s :: BindingEntry
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BindingEntry
s ((Ptr BindingEntry -> IO ()) -> IO ())
-> (Ptr BindingEntry -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr BindingEntry
ptr -> do
Ptr (Ptr BindingSignal) -> Ptr BindingSignal -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BindingEntry
ptr Ptr BindingEntry -> Int -> Ptr (Ptr BindingSignal)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) (Ptr BindingSignal
forall a. Ptr a
FP.nullPtr :: Ptr Gtk.BindingSignal.BindingSignal)
#if defined(ENABLE_OVERLOADING)
data BindingEntrySignalsFieldInfo
instance AttrInfo BindingEntrySignalsFieldInfo where
type AttrBaseTypeConstraint BindingEntrySignalsFieldInfo = (~) BindingEntry
type AttrAllowedOps BindingEntrySignalsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint BindingEntrySignalsFieldInfo = (~) (Ptr Gtk.BindingSignal.BindingSignal)
type AttrTransferTypeConstraint BindingEntrySignalsFieldInfo = (~)(Ptr Gtk.BindingSignal.BindingSignal)
type AttrTransferType BindingEntrySignalsFieldInfo = (Ptr Gtk.BindingSignal.BindingSignal)
type AttrGetType BindingEntrySignalsFieldInfo = Maybe Gtk.BindingSignal.BindingSignal
type AttrLabel BindingEntrySignalsFieldInfo = "signals"
type AttrOrigin BindingEntrySignalsFieldInfo = BindingEntry
attrGet = getBindingEntrySignals
attrSet = setBindingEntrySignals
attrConstruct = undefined
attrClear = clearBindingEntrySignals
attrTransfer _ v = do
return v
bindingEntry_signals :: AttrLabelProxy "signals"
bindingEntry_signals = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BindingEntry
type instance O.AttributeList BindingEntry = BindingEntryAttributeList
type BindingEntryAttributeList = ('[ '("keyval", BindingEntryKeyvalFieldInfo), '("modifiers", BindingEntryModifiersFieldInfo), '("bindingSet", BindingEntryBindingSetFieldInfo), '("destroyed", BindingEntryDestroyedFieldInfo), '("inEmission", BindingEntryInEmissionFieldInfo), '("marksUnbound", BindingEntryMarksUnboundFieldInfo), '("setNext", BindingEntrySetNextFieldInfo), '("hashNext", BindingEntryHashNextFieldInfo), '("signals", BindingEntrySignalsFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_binding_entry_add_signal_from_string" gtk_binding_entry_add_signal_from_string ::
Ptr Gtk.BindingSet.BindingSet ->
CString ->
IO CUInt
bindingEntryAddSignalFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gtk.BindingSet.BindingSet
-> T.Text
-> m GLib.Enums.TokenType
bindingEntryAddSignalFromString :: BindingSet -> Text -> m TokenType
bindingEntryAddSignalFromString bindingSet :: BindingSet
bindingSet signalDesc :: Text
signalDesc = IO TokenType -> m TokenType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TokenType -> m TokenType) -> IO TokenType -> m TokenType
forall a b. (a -> b) -> a -> b
$ do
Ptr BindingSet
bindingSet' <- BindingSet -> IO (Ptr BindingSet)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BindingSet
bindingSet
CString
signalDesc' <- Text -> IO CString
textToCString Text
signalDesc
CUInt
result <- Ptr BindingSet -> CString -> IO CUInt
gtk_binding_entry_add_signal_from_string Ptr BindingSet
bindingSet' CString
signalDesc'
let result' :: TokenType
result' = (Int -> TokenType
forall a. Enum a => Int -> a
toEnum (Int -> TokenType) -> (CUInt -> Int) -> CUInt -> TokenType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
BindingSet -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BindingSet
bindingSet
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
signalDesc'
TokenType -> IO TokenType
forall (m :: * -> *) a. Monad m => a -> m a
return TokenType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_binding_entry_add_signall" gtk_binding_entry_add_signall ::
Ptr Gtk.BindingSet.BindingSet ->
Word32 ->
CUInt ->
CString ->
Ptr (GSList (Ptr Gtk.BindingArg.BindingArg)) ->
IO ()
bindingEntryAddSignall ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gtk.BindingSet.BindingSet
-> Word32
-> [Gdk.Flags.ModifierType]
-> T.Text
-> [Gtk.BindingArg.BindingArg]
-> m ()
bindingEntryAddSignall :: BindingSet
-> Word32 -> [ModifierType] -> Text -> [BindingArg] -> m ()
bindingEntryAddSignall bindingSet :: BindingSet
bindingSet keyval :: Word32
keyval modifiers :: [ModifierType]
modifiers signalName :: Text
signalName bindingArgs :: [BindingArg]
bindingArgs = 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 BindingSet
bindingSet' <- BindingSet -> IO (Ptr BindingSet)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BindingSet
bindingSet
let modifiers' :: CUInt
modifiers' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifiers
CString
signalName' <- Text -> IO CString
textToCString Text
signalName
[Ptr BindingArg]
bindingArgs' <- (BindingArg -> IO (Ptr BindingArg))
-> [BindingArg] -> IO [Ptr BindingArg]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM BindingArg -> IO (Ptr BindingArg)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [BindingArg]
bindingArgs
Ptr (GSList (Ptr BindingArg))
bindingArgs'' <- [Ptr BindingArg] -> IO (Ptr (GSList (Ptr BindingArg)))
forall a. [Ptr a] -> IO (Ptr (GSList (Ptr a)))
packGSList [Ptr BindingArg]
bindingArgs'
Ptr BindingSet
-> Word32
-> CUInt
-> CString
-> Ptr (GSList (Ptr BindingArg))
-> IO ()
gtk_binding_entry_add_signall Ptr BindingSet
bindingSet' Word32
keyval CUInt
modifiers' CString
signalName' Ptr (GSList (Ptr BindingArg))
bindingArgs''
BindingSet -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BindingSet
bindingSet
(BindingArg -> IO ()) -> [BindingArg] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ BindingArg -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [BindingArg]
bindingArgs
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
signalName'
Ptr (GSList (Ptr BindingArg)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr BindingArg))
bindingArgs''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_binding_entry_remove" gtk_binding_entry_remove ::
Ptr Gtk.BindingSet.BindingSet ->
Word32 ->
CUInt ->
IO ()
bindingEntryRemove ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gtk.BindingSet.BindingSet
-> Word32
-> [Gdk.Flags.ModifierType]
-> m ()
bindingEntryRemove :: BindingSet -> Word32 -> [ModifierType] -> m ()
bindingEntryRemove bindingSet :: BindingSet
bindingSet keyval :: Word32
keyval modifiers :: [ModifierType]
modifiers = 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 BindingSet
bindingSet' <- BindingSet -> IO (Ptr BindingSet)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BindingSet
bindingSet
let modifiers' :: CUInt
modifiers' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifiers
Ptr BindingSet -> Word32 -> CUInt -> IO ()
gtk_binding_entry_remove Ptr BindingSet
bindingSet' Word32
keyval CUInt
modifiers'
BindingSet -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BindingSet
bindingSet
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_binding_entry_skip" gtk_binding_entry_skip ::
Ptr Gtk.BindingSet.BindingSet ->
Word32 ->
CUInt ->
IO ()
bindingEntrySkip ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gtk.BindingSet.BindingSet
-> Word32
-> [Gdk.Flags.ModifierType]
-> m ()
bindingEntrySkip :: BindingSet -> Word32 -> [ModifierType] -> m ()
bindingEntrySkip bindingSet :: BindingSet
bindingSet keyval :: Word32
keyval modifiers :: [ModifierType]
modifiers = 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 BindingSet
bindingSet' <- BindingSet -> IO (Ptr BindingSet)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BindingSet
bindingSet
let modifiers' :: CUInt
modifiers' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifiers
Ptr BindingSet -> Word32 -> CUInt -> IO ()
gtk_binding_entry_skip Ptr BindingSet
bindingSet' Word32
keyval CUInt
modifiers'
BindingSet -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BindingSet
bindingSet
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveBindingEntryMethod (t :: Symbol) (o :: *) :: * where
ResolveBindingEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBindingEntryMethod t BindingEntry, O.MethodInfo info BindingEntry p) => OL.IsLabel t (BindingEntry -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif