#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GObject.Structs.SignalInvocationHint
(
SignalInvocationHint(..) ,
newZeroSignalInvocationHint ,
noSignalInvocationHint ,
getSignalInvocationHintDetail ,
setSignalInvocationHintDetail ,
#if ENABLE_OVERLOADING
signalInvocationHint_detail ,
#endif
getSignalInvocationHintRunType ,
setSignalInvocationHintRunType ,
#if ENABLE_OVERLOADING
signalInvocationHint_runType ,
#endif
getSignalInvocationHintSignalId ,
setSignalInvocationHintSignalId ,
#if ENABLE_OVERLOADING
signalInvocationHint_signalId ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import {-# SOURCE #-} qualified GI.GObject.Flags as GObject.Flags
newtype SignalInvocationHint = SignalInvocationHint (ManagedPtr SignalInvocationHint)
instance WrappedPtr SignalInvocationHint where
wrappedPtrCalloc = callocBytes 12
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 12 >=> wrapPtr SignalInvocationHint)
wrappedPtrFree = Just ptr_to_g_free
newZeroSignalInvocationHint :: MonadIO m => m SignalInvocationHint
newZeroSignalInvocationHint = liftIO $ wrappedPtrCalloc >>= wrapPtr SignalInvocationHint
instance tag ~ 'AttrSet => Constructible SignalInvocationHint tag where
new _ attrs = do
o <- newZeroSignalInvocationHint
GI.Attributes.set o attrs
return o
noSignalInvocationHint :: Maybe SignalInvocationHint
noSignalInvocationHint = Nothing
getSignalInvocationHintSignalId :: MonadIO m => SignalInvocationHint -> m Word32
getSignalInvocationHintSignalId s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Word32
return val
setSignalInvocationHintSignalId :: MonadIO m => SignalInvocationHint -> Word32 -> m ()
setSignalInvocationHintSignalId s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: Word32)
#if ENABLE_OVERLOADING
data SignalInvocationHintSignalIdFieldInfo
instance AttrInfo SignalInvocationHintSignalIdFieldInfo where
type AttrAllowedOps SignalInvocationHintSignalIdFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalInvocationHintSignalIdFieldInfo = (~) Word32
type AttrBaseTypeConstraint SignalInvocationHintSignalIdFieldInfo = (~) SignalInvocationHint
type AttrGetType SignalInvocationHintSignalIdFieldInfo = Word32
type AttrLabel SignalInvocationHintSignalIdFieldInfo = "signal_id"
type AttrOrigin SignalInvocationHintSignalIdFieldInfo = SignalInvocationHint
attrGet _ = getSignalInvocationHintSignalId
attrSet _ = setSignalInvocationHintSignalId
attrConstruct = undefined
attrClear _ = undefined
signalInvocationHint_signalId :: AttrLabelProxy "signalId"
signalInvocationHint_signalId = AttrLabelProxy
#endif
getSignalInvocationHintDetail :: MonadIO m => SignalInvocationHint -> m Word32
getSignalInvocationHintDetail s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO Word32
return val
setSignalInvocationHintDetail :: MonadIO m => SignalInvocationHint -> Word32 -> m ()
setSignalInvocationHintDetail s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 4) (val :: Word32)
#if ENABLE_OVERLOADING
data SignalInvocationHintDetailFieldInfo
instance AttrInfo SignalInvocationHintDetailFieldInfo where
type AttrAllowedOps SignalInvocationHintDetailFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalInvocationHintDetailFieldInfo = (~) Word32
type AttrBaseTypeConstraint SignalInvocationHintDetailFieldInfo = (~) SignalInvocationHint
type AttrGetType SignalInvocationHintDetailFieldInfo = Word32
type AttrLabel SignalInvocationHintDetailFieldInfo = "detail"
type AttrOrigin SignalInvocationHintDetailFieldInfo = SignalInvocationHint
attrGet _ = getSignalInvocationHintDetail
attrSet _ = setSignalInvocationHintDetail
attrConstruct = undefined
attrClear _ = undefined
signalInvocationHint_detail :: AttrLabelProxy "detail"
signalInvocationHint_detail = AttrLabelProxy
#endif
getSignalInvocationHintRunType :: MonadIO m => SignalInvocationHint -> m [GObject.Flags.SignalFlags]
getSignalInvocationHintRunType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CUInt
let val' = wordToGFlags val
return val'
setSignalInvocationHintRunType :: MonadIO m => SignalInvocationHint -> [GObject.Flags.SignalFlags] -> m ()
setSignalInvocationHintRunType s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = gflagsToWord val
poke (ptr `plusPtr` 8) (val' :: CUInt)
#if ENABLE_OVERLOADING
data SignalInvocationHintRunTypeFieldInfo
instance AttrInfo SignalInvocationHintRunTypeFieldInfo where
type AttrAllowedOps SignalInvocationHintRunTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalInvocationHintRunTypeFieldInfo = (~) [GObject.Flags.SignalFlags]
type AttrBaseTypeConstraint SignalInvocationHintRunTypeFieldInfo = (~) SignalInvocationHint
type AttrGetType SignalInvocationHintRunTypeFieldInfo = [GObject.Flags.SignalFlags]
type AttrLabel SignalInvocationHintRunTypeFieldInfo = "run_type"
type AttrOrigin SignalInvocationHintRunTypeFieldInfo = SignalInvocationHint
attrGet _ = getSignalInvocationHintRunType
attrSet _ = setSignalInvocationHintRunType
attrConstruct = undefined
attrClear _ = undefined
signalInvocationHint_runType :: AttrLabelProxy "runType"
signalInvocationHint_runType = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList SignalInvocationHint
type instance O.AttributeList SignalInvocationHint = SignalInvocationHintAttributeList
type SignalInvocationHintAttributeList = ('[ '("signalId", SignalInvocationHintSignalIdFieldInfo), '("detail", SignalInvocationHintDetailFieldInfo), '("runType", SignalInvocationHintRunTypeFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveSignalInvocationHintMethod (t :: Symbol) (o :: *) :: * where
ResolveSignalInvocationHintMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSignalInvocationHintMethod t SignalInvocationHint, O.MethodInfo info SignalInvocationHint p) => OL.IsLabel t (SignalInvocationHint -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif