{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Each key binding element of a binding sets binding list is
-- represented by a GtkBindingEntry.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Structs.BindingEntry
    ( 

-- * Exported types
    BindingEntry(..)                        ,
    newZeroBindingEntry                     ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveBindingEntryMethod               ,
#endif


-- ** addSignalFromString #method:addSignalFromString#

    bindingEntryAddSignalFromString         ,


-- ** addSignall #method:addSignall#

    bindingEntryAddSignall                  ,


-- ** remove #method:remove#

    bindingEntryRemove                      ,


-- ** skip #method:skip#

    bindingEntrySkip                        ,




 -- * Properties
-- ** bindingSet #attr:bindingSet#
-- | binding set this entry belongs to

#if defined(ENABLE_OVERLOADING)
    bindingEntry_bindingSet                 ,
#endif
    clearBindingEntryBindingSet             ,
    getBindingEntryBindingSet               ,
    setBindingEntryBindingSet               ,


-- ** destroyed #attr:destroyed#
-- | implementation detail

#if defined(ENABLE_OVERLOADING)
    bindingEntry_destroyed                  ,
#endif
    getBindingEntryDestroyed                ,
    setBindingEntryDestroyed                ,


-- ** hashNext #attr:hashNext#
-- | implementation detail

#if defined(ENABLE_OVERLOADING)
    bindingEntry_hashNext                   ,
#endif
    clearBindingEntryHashNext               ,
    getBindingEntryHashNext                 ,
    setBindingEntryHashNext                 ,


-- ** inEmission #attr:inEmission#
-- | implementation detail

#if defined(ENABLE_OVERLOADING)
    bindingEntry_inEmission                 ,
#endif
    getBindingEntryInEmission               ,
    setBindingEntryInEmission               ,


-- ** keyval #attr:keyval#
-- | key value to match

#if defined(ENABLE_OVERLOADING)
    bindingEntry_keyval                     ,
#endif
    getBindingEntryKeyval                   ,
    setBindingEntryKeyval                   ,


-- ** marksUnbound #attr:marksUnbound#
-- | implementation detail

#if defined(ENABLE_OVERLOADING)
    bindingEntry_marksUnbound               ,
#endif
    getBindingEntryMarksUnbound             ,
    setBindingEntryMarksUnbound             ,


-- ** modifiers #attr:modifiers#
-- | key modifiers to match

#if defined(ENABLE_OVERLOADING)
    bindingEntry_modifiers                  ,
#endif
    getBindingEntryModifiers                ,
    setBindingEntryModifiers                ,


-- ** setNext #attr:setNext#
-- | linked list of entries maintained by binding set

#if defined(ENABLE_OVERLOADING)
    bindingEntry_setNext                    ,
#endif
    clearBindingEntrySetNext                ,
    getBindingEntrySetNext                  ,
    setBindingEntrySetNext                  ,


-- ** signals #attr:signals#
-- | action signals of this entry

#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.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 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

-- | Memory-managed wrapper type.
newtype BindingEntry = BindingEntry (SP.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 SP.ManagedPtrNewtype BindingEntry where
    toManagedPtr :: BindingEntry -> ManagedPtr BindingEntry
toManagedPtr (BindingEntry ManagedPtr BindingEntry
p) = ManagedPtr BindingEntry
p

instance BoxedPtr BindingEntry where
    boxedPtrCopy :: BindingEntry -> IO BindingEntry
boxedPtrCopy = \BindingEntry
p -> BindingEntry
-> (Ptr BindingEntry -> IO BindingEntry) -> IO BindingEntry
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BindingEntry
p (Int -> Ptr BindingEntry -> IO (Ptr BindingEntry)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
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, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr BindingEntry -> BindingEntry
BindingEntry)
    boxedPtrFree :: BindingEntry -> IO ()
boxedPtrFree = \BindingEntry
x -> BindingEntry -> (Ptr BindingEntry -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr BindingEntry
x Ptr BindingEntry -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr BindingEntry where
    boxedPtrCalloc :: IO (Ptr BindingEntry)
boxedPtrCalloc = Int -> IO (Ptr BindingEntry)
forall a. Int -> IO (Ptr a)
callocBytes Int
56


-- | Construct a `BindingEntry` struct initialized to zero.
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. CallocPtr a => IO (Ptr a)
boxedPtrCalloc 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, BoxedPtr 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 ManagedPtr BindingEntry -> BindingEntry
_ [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


-- | Get the value of the “@keyval@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #keyval
-- @
getBindingEntryKeyval :: MonadIO m => BindingEntry -> m Word32
getBindingEntryKeyval :: BindingEntry -> m Word32
getBindingEntryKeyval 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 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` Int
0) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@keyval@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #keyval 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryKeyval :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryKeyval :: BindingEntry -> Word32 -> m ()
setBindingEntryKeyval BindingEntry
s 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 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` Int
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


-- | Get the value of the “@modifiers@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #modifiers
-- @
getBindingEntryModifiers :: MonadIO m => BindingEntry -> m [Gdk.Flags.ModifierType]
getBindingEntryModifiers :: BindingEntry -> m [ModifierType]
getBindingEntryModifiers 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 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` Int
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'

-- | Set the value of the “@modifiers@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #modifiers 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryModifiers :: MonadIO m => BindingEntry -> [Gdk.Flags.ModifierType] -> m ()
setBindingEntryModifiers :: BindingEntry -> [ModifierType] -> m ()
setBindingEntryModifiers BindingEntry
s [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 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` Int
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


-- | Get the value of the “@binding_set@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #bindingSet
-- @
getBindingEntryBindingSet :: MonadIO m => BindingEntry -> m (Maybe Gtk.BindingSet.BindingSet)
getBindingEntryBindingSet :: BindingEntry -> m (Maybe BindingSet)
getBindingEntryBindingSet 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 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` Int
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
$ \Ptr BindingSet
val' -> do
        BindingSet
val'' <- ((ManagedPtr BindingSet -> BindingSet)
-> Ptr BindingSet -> IO BindingSet
forall a.
(HasCallStack, BoxedPtr 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

-- | Set the value of the “@binding_set@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #bindingSet 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryBindingSet :: MonadIO m => BindingEntry -> Ptr Gtk.BindingSet.BindingSet -> m ()
setBindingEntryBindingSet :: BindingEntry -> Ptr BindingSet -> m ()
setBindingEntryBindingSet BindingEntry
s 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 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` Int
8) (Ptr BindingSet
val :: Ptr Gtk.BindingSet.BindingSet)

-- | Set the value of the “@binding_set@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #bindingSet
-- @
clearBindingEntryBindingSet :: MonadIO m => BindingEntry -> m ()
clearBindingEntryBindingSet :: BindingEntry -> m ()
clearBindingEntryBindingSet 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 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` Int
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


-- | Get the value of the “@destroyed@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #destroyed
-- @
getBindingEntryDestroyed :: MonadIO m => BindingEntry -> m Word32
getBindingEntryDestroyed :: BindingEntry -> m Word32
getBindingEntryDestroyed 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 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` Int
16) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@destroyed@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #destroyed 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryDestroyed :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryDestroyed :: BindingEntry -> Word32 -> m ()
setBindingEntryDestroyed BindingEntry
s 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 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` Int
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


-- | Get the value of the “@in_emission@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #inEmission
-- @
getBindingEntryInEmission :: MonadIO m => BindingEntry -> m Word32
getBindingEntryInEmission :: BindingEntry -> m Word32
getBindingEntryInEmission 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 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` Int
20) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@in_emission@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #inEmission 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryInEmission :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryInEmission :: BindingEntry -> Word32 -> m ()
setBindingEntryInEmission BindingEntry
s 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 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` Int
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


-- | Get the value of the “@marks_unbound@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #marksUnbound
-- @
getBindingEntryMarksUnbound :: MonadIO m => BindingEntry -> m Word32
getBindingEntryMarksUnbound :: BindingEntry -> m Word32
getBindingEntryMarksUnbound 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 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` Int
24) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@marks_unbound@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #marksUnbound 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryMarksUnbound :: MonadIO m => BindingEntry -> Word32 -> m ()
setBindingEntryMarksUnbound :: BindingEntry -> Word32 -> m ()
setBindingEntryMarksUnbound BindingEntry
s 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 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` Int
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


-- | Get the value of the “@set_next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #setNext
-- @
getBindingEntrySetNext :: MonadIO m => BindingEntry -> m (Maybe BindingEntry)
getBindingEntrySetNext :: BindingEntry -> m (Maybe BindingEntry)
getBindingEntrySetNext 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 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` Int
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
$ \Ptr BindingEntry
val' -> do
        BindingEntry
val'' <- ((ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, BoxedPtr 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

-- | Set the value of the “@set_next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #setNext 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntrySetNext :: MonadIO m => BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntrySetNext :: BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntrySetNext BindingEntry
s 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 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` Int
32) (Ptr BindingEntry
val :: Ptr BindingEntry)

-- | Set the value of the “@set_next@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #setNext
-- @
clearBindingEntrySetNext :: MonadIO m => BindingEntry -> m ()
clearBindingEntrySetNext :: BindingEntry -> m ()
clearBindingEntrySetNext 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 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` Int
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


-- | Get the value of the “@hash_next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #hashNext
-- @
getBindingEntryHashNext :: MonadIO m => BindingEntry -> m (Maybe BindingEntry)
getBindingEntryHashNext :: BindingEntry -> m (Maybe BindingEntry)
getBindingEntryHashNext 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 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` Int
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
$ \Ptr BindingEntry
val' -> do
        BindingEntry
val'' <- ((ManagedPtr BindingEntry -> BindingEntry)
-> Ptr BindingEntry -> IO BindingEntry
forall a.
(HasCallStack, BoxedPtr 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

-- | Set the value of the “@hash_next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #hashNext 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntryHashNext :: MonadIO m => BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntryHashNext :: BindingEntry -> Ptr BindingEntry -> m ()
setBindingEntryHashNext BindingEntry
s 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 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` Int
40) (Ptr BindingEntry
val :: Ptr BindingEntry)

-- | Set the value of the “@hash_next@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #hashNext
-- @
clearBindingEntryHashNext :: MonadIO m => BindingEntry -> m ()
clearBindingEntryHashNext :: BindingEntry -> m ()
clearBindingEntryHashNext 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 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` Int
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


-- | Get the value of the “@signals@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bindingEntry #signals
-- @
getBindingEntrySignals :: MonadIO m => BindingEntry -> m (Maybe Gtk.BindingSignal.BindingSignal)
getBindingEntrySignals :: BindingEntry -> m (Maybe BindingSignal)
getBindingEntrySignals 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 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` Int
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
$ \Ptr BindingSignal
val' -> do
        BindingSignal
val'' <- ((ManagedPtr BindingSignal -> BindingSignal)
-> Ptr BindingSignal -> IO BindingSignal
forall a.
(HasCallStack, BoxedPtr 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

-- | Set the value of the “@signals@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' bindingEntry [ #signals 'Data.GI.Base.Attributes.:=' value ]
-- @
setBindingEntrySignals :: MonadIO m => BindingEntry -> Ptr Gtk.BindingSignal.BindingSignal -> m ()
setBindingEntrySignals :: BindingEntry -> Ptr BindingSignal -> m ()
setBindingEntrySignals BindingEntry
s 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 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` Int
48) (Ptr BindingSignal
val :: Ptr Gtk.BindingSignal.BindingSignal)

-- | Set the value of the “@signals@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #signals
-- @
clearBindingEntrySignals :: MonadIO m => BindingEntry -> m ()
clearBindingEntrySignals :: BindingEntry -> m ()
clearBindingEntrySignals 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 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` Int
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

-- method BindingEntry::add_signal_from_string
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "binding_set"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "BindingSet" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkBindingSet" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signal_desc"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a signal description"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GLib" , name = "TokenType" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_add_signal_from_string" gtk_binding_entry_add_signal_from_string :: 
    Ptr Gtk.BindingSet.BindingSet ->        -- binding_set : TInterface (Name {namespace = "Gtk", name = "BindingSet"})
    CString ->                              -- signal_desc : TBasicType TUTF8
    IO CUInt

-- | Parses a signal description from /@signalDesc@/ and incorporates
-- it into /@bindingSet@/.
-- 
-- Signal descriptions may either bind a key combination to
-- one or more signals:
-- >
-- >  bind "key" {
-- >    "signalname" (param, ...)
-- >    ...
-- >  }
-- 
-- 
-- Or they may also unbind a key combination:
-- >
-- >  unbind "key"
-- 
-- 
-- Key combinations must be in a format that can be parsed by
-- 'GI.Gtk.Functions.acceleratorParse'.
-- 
-- /Since: 3.0/
bindingEntryAddSignalFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.BindingSet.BindingSet
    -- ^ /@bindingSet@/: a t'GI.Gtk.Structs.BindingSet.BindingSet'
    -> T.Text
    -- ^ /@signalDesc@/: a signal description
    -> m GLib.Enums.TokenType
    -- ^ __Returns:__ 'GI.GLib.Enums.TokenTypeNone' if the signal was successfully parsed and added,
    --     the expected token otherwise
bindingEntryAddSignalFromString :: BindingSet -> Text -> m TokenType
bindingEntryAddSignalFromString BindingSet
bindingSet 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

-- method BindingEntry::add_signall
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "binding_set"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "BindingSet" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkBindingSet to add a signal to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyval"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "modifiers"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key modifier" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signal_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "signal name to be bound"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "binding_args"
--           , argType =
--               TGSList
--                 (TInterface Name { namespace = "Gtk" , name = "BindingArg" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "\n    list of #GtkBindingArg signal arguments"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_add_signall" gtk_binding_entry_add_signall :: 
    Ptr Gtk.BindingSet.BindingSet ->        -- binding_set : TInterface (Name {namespace = "Gtk", name = "BindingSet"})
    Word32 ->                               -- keyval : TBasicType TUInt
    CUInt ->                                -- modifiers : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    CString ->                              -- signal_name : TBasicType TUTF8
    Ptr (GSList (Ptr Gtk.BindingArg.BindingArg)) -> -- binding_args : TGSList (TInterface (Name {namespace = "Gtk", name = "BindingArg"}))
    IO ()

-- | Override or install a new key binding for /@keyval@/ with /@modifiers@/ on
-- /@bindingSet@/.
bindingEntryAddSignall ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.BindingSet.BindingSet
    -- ^ /@bindingSet@/: a t'GI.Gtk.Structs.BindingSet.BindingSet' to add a signal to
    -> Word32
    -- ^ /@keyval@/: key value
    -> [Gdk.Flags.ModifierType]
    -- ^ /@modifiers@/: key modifier
    -> T.Text
    -- ^ /@signalName@/: signal name to be bound
    -> [Gtk.BindingArg.BindingArg]
    -- ^ /@bindingArgs@/: 
    --     list of t'GI.Gtk.Structs.BindingArg.BindingArg' signal arguments
    -> m ()
bindingEntryAddSignall :: BindingSet
-> Word32 -> [ModifierType] -> Text -> [BindingArg] -> m ()
bindingEntryAddSignall BindingSet
bindingSet Word32
keyval [ModifierType]
modifiers Text
signalName [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

-- method BindingEntry::remove
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "binding_set"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "BindingSet" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkBindingSet to remove an entry of"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyval"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key value of binding to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "modifiers"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key modifier of binding to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_remove" gtk_binding_entry_remove :: 
    Ptr Gtk.BindingSet.BindingSet ->        -- binding_set : TInterface (Name {namespace = "Gtk", name = "BindingSet"})
    Word32 ->                               -- keyval : TBasicType TUInt
    CUInt ->                                -- modifiers : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO ()

-- | Remove a binding previously installed via
-- @/gtk_binding_entry_add_signal()/@ on /@bindingSet@/.
bindingEntryRemove ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.BindingSet.BindingSet
    -- ^ /@bindingSet@/: a t'GI.Gtk.Structs.BindingSet.BindingSet' to remove an entry of
    -> Word32
    -- ^ /@keyval@/: key value of binding to remove
    -> [Gdk.Flags.ModifierType]
    -- ^ /@modifiers@/: key modifier of binding to remove
    -> m ()
bindingEntryRemove :: BindingSet -> Word32 -> [ModifierType] -> m ()
bindingEntryRemove BindingSet
bindingSet Word32
keyval [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

-- method BindingEntry::skip
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "binding_set"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "BindingSet" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkBindingSet to skip an entry of"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyval"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key value of binding to skip"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "modifiers"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "key modifier of binding to skip"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_skip" gtk_binding_entry_skip :: 
    Ptr Gtk.BindingSet.BindingSet ->        -- binding_set : TInterface (Name {namespace = "Gtk", name = "BindingSet"})
    Word32 ->                               -- keyval : TBasicType TUInt
    CUInt ->                                -- modifiers : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO ()

-- | Install a binding on /@bindingSet@/ which causes key lookups
-- to be aborted, to prevent bindings from lower priority sets
-- to be activated.
-- 
-- /Since: 2.12/
bindingEntrySkip ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.BindingSet.BindingSet
    -- ^ /@bindingSet@/: a t'GI.Gtk.Structs.BindingSet.BindingSet' to skip an entry of
    -> Word32
    -- ^ /@keyval@/: key value of binding to skip
    -> [Gdk.Flags.ModifierType]
    -- ^ /@modifiers@/: key modifier of binding to skip
    -> m ()
bindingEntrySkip :: BindingSet -> Word32 -> [ModifierType] -> m ()
bindingEntrySkip BindingSet
bindingSet Word32
keyval [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