#define ENABLE_OVERLOADING \
(!defined(__HADDOCK_VERSION__))
module GI.GObject.Structs.TypeInfo
(
TypeInfo(..) ,
newZeroTypeInfo ,
noTypeInfo ,
clearTypeInfoBaseFinalize ,
getTypeInfoBaseFinalize ,
setTypeInfoBaseFinalize ,
#if ENABLE_OVERLOADING
typeInfo_baseFinalize ,
#endif
clearTypeInfoBaseInit ,
getTypeInfoBaseInit ,
setTypeInfoBaseInit ,
#if ENABLE_OVERLOADING
typeInfo_baseInit ,
#endif
clearTypeInfoClassData ,
getTypeInfoClassData ,
setTypeInfoClassData ,
#if ENABLE_OVERLOADING
typeInfo_classData ,
#endif
clearTypeInfoClassFinalize ,
getTypeInfoClassFinalize ,
setTypeInfoClassFinalize ,
#if ENABLE_OVERLOADING
typeInfo_classFinalize ,
#endif
clearTypeInfoClassInit ,
getTypeInfoClassInit ,
setTypeInfoClassInit ,
#if ENABLE_OVERLOADING
typeInfo_classInit ,
#endif
getTypeInfoClassSize ,
setTypeInfoClassSize ,
#if ENABLE_OVERLOADING
typeInfo_classSize ,
#endif
clearTypeInfoInstanceInit ,
getTypeInfoInstanceInit ,
setTypeInfoInstanceInit ,
#if ENABLE_OVERLOADING
typeInfo_instanceInit ,
#endif
getTypeInfoInstanceSize ,
setTypeInfoInstanceSize ,
#if ENABLE_OVERLOADING
typeInfo_instanceSize ,
#endif
getTypeInfoNPreallocs ,
setTypeInfoNPreallocs ,
#if ENABLE_OVERLOADING
typeInfo_nPreallocs ,
#endif
clearTypeInfoValueTable ,
getTypeInfoValueTable ,
setTypeInfoValueTable ,
#if ENABLE_OVERLOADING
typeInfo_valueTable ,
#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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Callbacks as GObject.Callbacks
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeValueTable as GObject.TypeValueTable
newtype TypeInfo = TypeInfo (ManagedPtr TypeInfo)
instance WrappedPtr TypeInfo where
wrappedPtrCalloc :: IO (Ptr TypeInfo)
wrappedPtrCalloc = Int -> IO (Ptr TypeInfo)
forall a. Int -> IO (Ptr a)
callocBytes 72
wrappedPtrCopy :: TypeInfo -> IO TypeInfo
wrappedPtrCopy = \p :: TypeInfo
p -> TypeInfo -> (Ptr TypeInfo -> IO TypeInfo) -> IO TypeInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
p (Int -> Ptr TypeInfo -> IO (Ptr TypeInfo)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 72 (Ptr TypeInfo -> IO (Ptr TypeInfo))
-> (Ptr TypeInfo -> IO TypeInfo) -> Ptr TypeInfo -> IO TypeInfo
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr TypeInfo -> TypeInfo) -> Ptr TypeInfo -> IO TypeInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TypeInfo -> TypeInfo
TypeInfo)
wrappedPtrFree :: Maybe (FunPtr (Ptr TypeInfo -> IO ()))
wrappedPtrFree = FunPtr (Ptr TypeInfo -> IO ())
-> Maybe (FunPtr (Ptr TypeInfo -> IO ()))
forall a. a -> Maybe a
Just FunPtr (Ptr TypeInfo -> IO ())
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroTypeInfo :: MonadIO m => m TypeInfo
newZeroTypeInfo :: m TypeInfo
newZeroTypeInfo = IO TypeInfo -> m TypeInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TypeInfo -> m TypeInfo) -> IO TypeInfo -> m TypeInfo
forall a b. (a -> b) -> a -> b
$ IO (Ptr TypeInfo)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr TypeInfo) -> (Ptr TypeInfo -> IO TypeInfo) -> IO TypeInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TypeInfo -> TypeInfo) -> Ptr TypeInfo -> IO TypeInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TypeInfo -> TypeInfo
TypeInfo
instance tag ~ 'AttrSet => Constructible TypeInfo tag where
new :: (ManagedPtr TypeInfo -> TypeInfo)
-> [AttrOp TypeInfo tag] -> m TypeInfo
new _ attrs :: [AttrOp TypeInfo tag]
attrs = do
TypeInfo
o <- m TypeInfo
forall (m :: * -> *). MonadIO m => m TypeInfo
newZeroTypeInfo
TypeInfo -> [AttrOp TypeInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set TypeInfo
o [AttrOp TypeInfo tag]
[AttrOp TypeInfo 'AttrSet]
attrs
TypeInfo -> m TypeInfo
forall (m :: * -> *) a. Monad m => a -> m a
return TypeInfo
o
noTypeInfo :: Maybe TypeInfo
noTypeInfo :: Maybe TypeInfo
noTypeInfo = Maybe TypeInfo
forall a. Maybe a
Nothing
getTypeInfoClassSize :: MonadIO m => TypeInfo -> m Word16
getTypeInfoClassSize :: TypeInfo -> m Word16
getTypeInfoClassSize s :: TypeInfo
s = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO Word16) -> IO Word16)
-> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Word16
val <- Ptr Word16 -> IO Word16
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO Word16
Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
val
setTypeInfoClassSize :: MonadIO m => TypeInfo -> Word16 -> m ()
setTypeInfoClassSize :: TypeInfo -> Word16 -> m ()
setTypeInfoClassSize s :: TypeInfo
s val :: Word16
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr Word16 -> Word16 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Word16
val :: Word16)
#if ENABLE_OVERLOADING
data TypeInfoClassSizeFieldInfo
instance AttrInfo TypeInfoClassSizeFieldInfo where
type AttrAllowedOps TypeInfoClassSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TypeInfoClassSizeFieldInfo = (~) Word16
type AttrBaseTypeConstraint TypeInfoClassSizeFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoClassSizeFieldInfo = Word16
type AttrLabel TypeInfoClassSizeFieldInfo = "class_size"
type AttrOrigin TypeInfoClassSizeFieldInfo = TypeInfo
attrGet _ = getTypeInfoClassSize
attrSet _ = setTypeInfoClassSize
attrConstruct = undefined
attrClear _ = undefined
typeInfo_classSize :: AttrLabelProxy "classSize"
typeInfo_classSize = AttrLabelProxy
#endif
getTypeInfoBaseInit :: MonadIO m => TypeInfo -> m (Maybe GObject.Callbacks.BaseInitFunc)
getTypeInfoBaseInit :: TypeInfo -> m (Maybe BaseInitFunc)
getTypeInfoBaseInit s :: TypeInfo
s = IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc))
-> (Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
FunPtr C_BaseInitFunc
val <- Ptr (FunPtr C_BaseInitFunc) -> IO (FunPtr C_BaseInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (FunPtr GObject.Callbacks.C_BaseInitFunc)
Maybe BaseInitFunc
result <- FunPtr C_BaseInitFunc
-> (FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BaseInitFunc
val ((FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc))
-> (FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_BaseInitFunc
val' -> do
let val'' :: BaseInitFunc
val'' = FunPtr C_BaseInitFunc -> BaseInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BaseInitFunc -> TypeClass -> m ()
GObject.Callbacks.dynamic_BaseInitFunc FunPtr C_BaseInitFunc
val'
BaseInitFunc -> IO BaseInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInitFunc
val''
Maybe BaseInitFunc -> IO (Maybe BaseInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BaseInitFunc
result
setTypeInfoBaseInit :: MonadIO m => TypeInfo -> FunPtr GObject.Callbacks.C_BaseInitFunc -> m ()
setTypeInfoBaseInit :: TypeInfo -> FunPtr C_BaseInitFunc -> m ()
setTypeInfoBaseInit s :: TypeInfo
s val :: FunPtr C_BaseInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_BaseInitFunc) -> FunPtr C_BaseInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr C_BaseInitFunc
val :: FunPtr GObject.Callbacks.C_BaseInitFunc)
clearTypeInfoBaseInit :: MonadIO m => TypeInfo -> m ()
clearTypeInfoBaseInit :: TypeInfo -> m ()
clearTypeInfoBaseInit s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_BaseInitFunc) -> FunPtr C_BaseInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr C_BaseInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_BaseInitFunc)
#if ENABLE_OVERLOADING
data TypeInfoBaseInitFieldInfo
instance AttrInfo TypeInfoBaseInitFieldInfo where
type AttrAllowedOps TypeInfoBaseInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoBaseInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_BaseInitFunc)
type AttrBaseTypeConstraint TypeInfoBaseInitFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoBaseInitFieldInfo = Maybe GObject.Callbacks.BaseInitFunc
type AttrLabel TypeInfoBaseInitFieldInfo = "base_init"
type AttrOrigin TypeInfoBaseInitFieldInfo = TypeInfo
attrGet _ = getTypeInfoBaseInit
attrSet _ = setTypeInfoBaseInit
attrConstruct = undefined
attrClear _ = clearTypeInfoBaseInit
typeInfo_baseInit :: AttrLabelProxy "baseInit"
typeInfo_baseInit = AttrLabelProxy
#endif
getTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m (Maybe GObject.Callbacks.BaseFinalizeFunc)
getTypeInfoBaseFinalize :: TypeInfo -> m (Maybe BaseInitFunc)
getTypeInfoBaseFinalize s :: TypeInfo
s = IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc) -> m (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc))
-> (Ptr TypeInfo -> IO (Maybe BaseInitFunc))
-> IO (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
FunPtr C_BaseInitFunc
val <- Ptr (FunPtr C_BaseInitFunc) -> IO (FunPtr C_BaseInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO (FunPtr GObject.Callbacks.C_BaseFinalizeFunc)
Maybe BaseInitFunc
result <- FunPtr C_BaseInitFunc
-> (FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BaseInitFunc
val ((FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc))
-> (FunPtr C_BaseInitFunc -> IO BaseInitFunc)
-> IO (Maybe BaseInitFunc)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_BaseInitFunc
val' -> do
let val'' :: BaseInitFunc
val'' = FunPtr C_BaseInitFunc -> BaseInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BaseInitFunc -> TypeClass -> m ()
GObject.Callbacks.dynamic_BaseFinalizeFunc FunPtr C_BaseInitFunc
val'
BaseInitFunc -> IO BaseInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInitFunc
val''
Maybe BaseInitFunc -> IO (Maybe BaseInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BaseInitFunc
result
setTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> FunPtr GObject.Callbacks.C_BaseFinalizeFunc -> m ()
setTypeInfoBaseFinalize :: TypeInfo -> FunPtr C_BaseInitFunc -> m ()
setTypeInfoBaseFinalize s :: TypeInfo
s val :: FunPtr C_BaseInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_BaseInitFunc) -> FunPtr C_BaseInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr C_BaseInitFunc
val :: FunPtr GObject.Callbacks.C_BaseFinalizeFunc)
clearTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m ()
clearTypeInfoBaseFinalize :: TypeInfo -> m ()
clearTypeInfoBaseFinalize s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_BaseInitFunc) -> FunPtr C_BaseInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_BaseInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr C_BaseInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_BaseFinalizeFunc)
#if ENABLE_OVERLOADING
data TypeInfoBaseFinalizeFieldInfo
instance AttrInfo TypeInfoBaseFinalizeFieldInfo where
type AttrAllowedOps TypeInfoBaseFinalizeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoBaseFinalizeFieldInfo = (~) (FunPtr GObject.Callbacks.C_BaseFinalizeFunc)
type AttrBaseTypeConstraint TypeInfoBaseFinalizeFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoBaseFinalizeFieldInfo = Maybe GObject.Callbacks.BaseFinalizeFunc
type AttrLabel TypeInfoBaseFinalizeFieldInfo = "base_finalize"
type AttrOrigin TypeInfoBaseFinalizeFieldInfo = TypeInfo
attrGet _ = getTypeInfoBaseFinalize
attrSet _ = setTypeInfoBaseFinalize
attrConstruct = undefined
attrClear _ = clearTypeInfoBaseFinalize
typeInfo_baseFinalize :: AttrLabelProxy "baseFinalize"
typeInfo_baseFinalize = AttrLabelProxy
#endif
getTypeInfoClassInit :: MonadIO m => TypeInfo -> m (Maybe GObject.Callbacks.ClassInitFunc)
getTypeInfoClassInit :: TypeInfo -> m (Maybe ClassInitFunc)
getTypeInfoClassInit s :: TypeInfo
s = IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc))
-> (Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
FunPtr C_ClassInitFunc
val <- Ptr (FunPtr C_ClassInitFunc) -> IO (FunPtr C_ClassInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO (FunPtr GObject.Callbacks.C_ClassInitFunc)
Maybe ClassInitFunc
result <- FunPtr C_ClassInitFunc
-> (FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_ClassInitFunc
val ((FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc))
-> (FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_ClassInitFunc
val' -> do
let val'' :: ClassInitFunc
val'' = FunPtr C_ClassInitFunc -> ClassInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ClassInitFunc -> TypeClass -> Ptr () -> m ()
GObject.Callbacks.dynamic_ClassInitFunc FunPtr C_ClassInitFunc
val'
ClassInitFunc -> IO ClassInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ClassInitFunc
val''
Maybe ClassInitFunc -> IO (Maybe ClassInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ClassInitFunc
result
setTypeInfoClassInit :: MonadIO m => TypeInfo -> FunPtr GObject.Callbacks.C_ClassInitFunc -> m ()
setTypeInfoClassInit :: TypeInfo -> FunPtr C_ClassInitFunc -> m ()
setTypeInfoClassInit s :: TypeInfo
s val :: FunPtr C_ClassInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_ClassInitFunc) -> FunPtr C_ClassInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_ClassInitFunc
val :: FunPtr GObject.Callbacks.C_ClassInitFunc)
clearTypeInfoClassInit :: MonadIO m => TypeInfo -> m ()
clearTypeInfoClassInit :: TypeInfo -> m ()
clearTypeInfoClassInit s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_ClassInitFunc) -> FunPtr C_ClassInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_ClassInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ClassInitFunc)
#if ENABLE_OVERLOADING
data TypeInfoClassInitFieldInfo
instance AttrInfo TypeInfoClassInitFieldInfo where
type AttrAllowedOps TypeInfoClassInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoClassInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_ClassInitFunc)
type AttrBaseTypeConstraint TypeInfoClassInitFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoClassInitFieldInfo = Maybe GObject.Callbacks.ClassInitFunc
type AttrLabel TypeInfoClassInitFieldInfo = "class_init"
type AttrOrigin TypeInfoClassInitFieldInfo = TypeInfo
attrGet _ = getTypeInfoClassInit
attrSet _ = setTypeInfoClassInit
attrConstruct = undefined
attrClear _ = clearTypeInfoClassInit
typeInfo_classInit :: AttrLabelProxy "classInit"
typeInfo_classInit = AttrLabelProxy
#endif
getTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m (Maybe GObject.Callbacks.ClassFinalizeFunc)
getTypeInfoClassFinalize :: TypeInfo -> m (Maybe ClassInitFunc)
getTypeInfoClassFinalize s :: TypeInfo
s = IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc) -> m (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc))
-> (Ptr TypeInfo -> IO (Maybe ClassInitFunc))
-> IO (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
FunPtr C_ClassInitFunc
val <- Ptr (FunPtr C_ClassInitFunc) -> IO (FunPtr C_ClassInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) :: IO (FunPtr GObject.Callbacks.C_ClassFinalizeFunc)
Maybe ClassInitFunc
result <- FunPtr C_ClassInitFunc
-> (FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_ClassInitFunc
val ((FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc))
-> (FunPtr C_ClassInitFunc -> IO ClassInitFunc)
-> IO (Maybe ClassInitFunc)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_ClassInitFunc
val' -> do
let val'' :: ClassInitFunc
val'' = FunPtr C_ClassInitFunc -> ClassInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ClassInitFunc -> TypeClass -> Ptr () -> m ()
GObject.Callbacks.dynamic_ClassFinalizeFunc FunPtr C_ClassInitFunc
val'
ClassInitFunc -> IO ClassInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ClassInitFunc
val''
Maybe ClassInitFunc -> IO (Maybe ClassInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ClassInitFunc
result
setTypeInfoClassFinalize :: MonadIO m => TypeInfo -> FunPtr GObject.Callbacks.C_ClassFinalizeFunc -> m ()
setTypeInfoClassFinalize :: TypeInfo -> FunPtr C_ClassInitFunc -> m ()
setTypeInfoClassFinalize s :: TypeInfo
s val :: FunPtr C_ClassInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_ClassInitFunc) -> FunPtr C_ClassInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (FunPtr C_ClassInitFunc
val :: FunPtr GObject.Callbacks.C_ClassFinalizeFunc)
clearTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m ()
clearTypeInfoClassFinalize :: TypeInfo -> m ()
clearTypeInfoClassFinalize s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_ClassInitFunc) -> FunPtr C_ClassInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_ClassInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (FunPtr C_ClassInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ClassFinalizeFunc)
#if ENABLE_OVERLOADING
data TypeInfoClassFinalizeFieldInfo
instance AttrInfo TypeInfoClassFinalizeFieldInfo where
type AttrAllowedOps TypeInfoClassFinalizeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoClassFinalizeFieldInfo = (~) (FunPtr GObject.Callbacks.C_ClassFinalizeFunc)
type AttrBaseTypeConstraint TypeInfoClassFinalizeFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoClassFinalizeFieldInfo = Maybe GObject.Callbacks.ClassFinalizeFunc
type AttrLabel TypeInfoClassFinalizeFieldInfo = "class_finalize"
type AttrOrigin TypeInfoClassFinalizeFieldInfo = TypeInfo
attrGet _ = getTypeInfoClassFinalize
attrSet _ = setTypeInfoClassFinalize
attrConstruct = undefined
attrClear _ = clearTypeInfoClassFinalize
typeInfo_classFinalize :: AttrLabelProxy "classFinalize"
typeInfo_classFinalize = AttrLabelProxy
#endif
getTypeInfoClassData :: MonadIO m => TypeInfo -> m (Ptr ())
getTypeInfoClassData :: TypeInfo -> m (Ptr ())
getTypeInfoClassData s :: TypeInfo
s = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO (Ptr ())) -> IO (Ptr ())
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr TypeInfo -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr ()
val <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) :: IO (Ptr ())
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
val
setTypeInfoClassData :: MonadIO m => TypeInfo -> Ptr () -> m ()
setTypeInfoClassData :: TypeInfo -> Ptr () -> m ()
setTypeInfoClassData s :: TypeInfo
s val :: Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr ()
val :: Ptr ())
clearTypeInfoClassData :: MonadIO m => TypeInfo -> m ()
clearTypeInfoClassData :: TypeInfo -> m ()
clearTypeInfoClassData s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())
#if ENABLE_OVERLOADING
data TypeInfoClassDataFieldInfo
instance AttrInfo TypeInfoClassDataFieldInfo where
type AttrAllowedOps TypeInfoClassDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoClassDataFieldInfo = (~) (Ptr ())
type AttrBaseTypeConstraint TypeInfoClassDataFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoClassDataFieldInfo = Ptr ()
type AttrLabel TypeInfoClassDataFieldInfo = "class_data"
type AttrOrigin TypeInfoClassDataFieldInfo = TypeInfo
attrGet _ = getTypeInfoClassData
attrSet _ = setTypeInfoClassData
attrConstruct = undefined
attrClear _ = clearTypeInfoClassData
typeInfo_classData :: AttrLabelProxy "classData"
typeInfo_classData = AttrLabelProxy
#endif
getTypeInfoInstanceSize :: MonadIO m => TypeInfo -> m Word16
getTypeInfoInstanceSize :: TypeInfo -> m Word16
getTypeInfoInstanceSize s :: TypeInfo
s = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO Word16) -> IO Word16)
-> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Word16
val <- Ptr Word16 -> IO Word16
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) :: IO Word16
Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
val
setTypeInfoInstanceSize :: MonadIO m => TypeInfo -> Word16 -> m ()
setTypeInfoInstanceSize :: TypeInfo -> Word16 -> m ()
setTypeInfoInstanceSize s :: TypeInfo
s val :: Word16
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr Word16 -> Word16 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) (Word16
val :: Word16)
#if ENABLE_OVERLOADING
data TypeInfoInstanceSizeFieldInfo
instance AttrInfo TypeInfoInstanceSizeFieldInfo where
type AttrAllowedOps TypeInfoInstanceSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TypeInfoInstanceSizeFieldInfo = (~) Word16
type AttrBaseTypeConstraint TypeInfoInstanceSizeFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoInstanceSizeFieldInfo = Word16
type AttrLabel TypeInfoInstanceSizeFieldInfo = "instance_size"
type AttrOrigin TypeInfoInstanceSizeFieldInfo = TypeInfo
attrGet _ = getTypeInfoInstanceSize
attrSet _ = setTypeInfoInstanceSize
attrConstruct = undefined
attrClear _ = undefined
typeInfo_instanceSize :: AttrLabelProxy "instanceSize"
typeInfo_instanceSize = AttrLabelProxy
#endif
getTypeInfoNPreallocs :: MonadIO m => TypeInfo -> m Word16
getTypeInfoNPreallocs :: TypeInfo -> m Word16
getTypeInfoNPreallocs s :: TypeInfo
s = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO Word16) -> IO Word16)
-> (Ptr TypeInfo -> IO Word16) -> IO Word16
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Word16
val <- Ptr Word16 -> IO Word16
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 50) :: IO Word16
Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
val
setTypeInfoNPreallocs :: MonadIO m => TypeInfo -> Word16 -> m ()
setTypeInfoNPreallocs :: TypeInfo -> Word16 -> m ()
setTypeInfoNPreallocs s :: TypeInfo
s val :: Word16
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr Word16 -> Word16 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr Word16
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 50) (Word16
val :: Word16)
#if ENABLE_OVERLOADING
data TypeInfoNPreallocsFieldInfo
instance AttrInfo TypeInfoNPreallocsFieldInfo where
type AttrAllowedOps TypeInfoNPreallocsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TypeInfoNPreallocsFieldInfo = (~) Word16
type AttrBaseTypeConstraint TypeInfoNPreallocsFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoNPreallocsFieldInfo = Word16
type AttrLabel TypeInfoNPreallocsFieldInfo = "n_preallocs"
type AttrOrigin TypeInfoNPreallocsFieldInfo = TypeInfo
attrGet _ = getTypeInfoNPreallocs
attrSet _ = setTypeInfoNPreallocs
attrConstruct = undefined
attrClear _ = undefined
typeInfo_nPreallocs :: AttrLabelProxy "nPreallocs"
typeInfo_nPreallocs = AttrLabelProxy
#endif
getTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m (Maybe GObject.Callbacks.InstanceInitFunc)
getTypeInfoInstanceInit :: TypeInfo -> m (Maybe InstanceInitFunc)
getTypeInfoInstanceInit s :: TypeInfo
s = IO (Maybe InstanceInitFunc) -> m (Maybe InstanceInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe InstanceInitFunc) -> m (Maybe InstanceInitFunc))
-> IO (Maybe InstanceInitFunc) -> m (Maybe InstanceInitFunc)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe InstanceInitFunc))
-> IO (Maybe InstanceInitFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe InstanceInitFunc))
-> IO (Maybe InstanceInitFunc))
-> (Ptr TypeInfo -> IO (Maybe InstanceInitFunc))
-> IO (Maybe InstanceInitFunc)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
FunPtr C_InstanceInitFunc
val <- Ptr (FunPtr C_InstanceInitFunc) -> IO (FunPtr C_InstanceInitFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_InstanceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56) :: IO (FunPtr GObject.Callbacks.C_InstanceInitFunc)
Maybe InstanceInitFunc
result <- FunPtr C_InstanceInitFunc
-> (FunPtr C_InstanceInitFunc -> IO InstanceInitFunc)
-> IO (Maybe InstanceInitFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_InstanceInitFunc
val ((FunPtr C_InstanceInitFunc -> IO InstanceInitFunc)
-> IO (Maybe InstanceInitFunc))
-> (FunPtr C_InstanceInitFunc -> IO InstanceInitFunc)
-> IO (Maybe InstanceInitFunc)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_InstanceInitFunc
val' -> do
let val'' :: InstanceInitFunc
val'' = FunPtr C_InstanceInitFunc -> InstanceInitFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_InstanceInitFunc -> TypeInstance -> TypeClass -> m ()
GObject.Callbacks.dynamic_InstanceInitFunc FunPtr C_InstanceInitFunc
val'
InstanceInitFunc -> IO InstanceInitFunc
forall (m :: * -> *) a. Monad m => a -> m a
return InstanceInitFunc
val''
Maybe InstanceInitFunc -> IO (Maybe InstanceInitFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe InstanceInitFunc
result
setTypeInfoInstanceInit :: MonadIO m => TypeInfo -> FunPtr GObject.Callbacks.C_InstanceInitFunc -> m ()
setTypeInfoInstanceInit :: TypeInfo -> FunPtr C_InstanceInitFunc -> m ()
setTypeInfoInstanceInit s :: TypeInfo
s val :: FunPtr C_InstanceInitFunc
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_InstanceInitFunc)
-> FunPtr C_InstanceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_InstanceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56) (FunPtr C_InstanceInitFunc
val :: FunPtr GObject.Callbacks.C_InstanceInitFunc)
clearTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m ()
clearTypeInfoInstanceInit :: TypeInfo -> m ()
clearTypeInfoInstanceInit s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (FunPtr C_InstanceInitFunc)
-> FunPtr C_InstanceInitFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (FunPtr C_InstanceInitFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56) (FunPtr C_InstanceInitFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GObject.Callbacks.C_InstanceInitFunc)
#if ENABLE_OVERLOADING
data TypeInfoInstanceInitFieldInfo
instance AttrInfo TypeInfoInstanceInitFieldInfo where
type AttrAllowedOps TypeInfoInstanceInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoInstanceInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_InstanceInitFunc)
type AttrBaseTypeConstraint TypeInfoInstanceInitFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoInstanceInitFieldInfo = Maybe GObject.Callbacks.InstanceInitFunc
type AttrLabel TypeInfoInstanceInitFieldInfo = "instance_init"
type AttrOrigin TypeInfoInstanceInitFieldInfo = TypeInfo
attrGet _ = getTypeInfoInstanceInit
attrSet _ = setTypeInfoInstanceInit
attrConstruct = undefined
attrClear _ = clearTypeInfoInstanceInit
typeInfo_instanceInit :: AttrLabelProxy "instanceInit"
typeInfo_instanceInit = AttrLabelProxy
#endif
getTypeInfoValueTable :: MonadIO m => TypeInfo -> m (Maybe GObject.TypeValueTable.TypeValueTable)
getTypeInfoValueTable :: TypeInfo -> m (Maybe TypeValueTable)
getTypeInfoValueTable s :: TypeInfo
s = IO (Maybe TypeValueTable) -> m (Maybe TypeValueTable)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TypeValueTable) -> m (Maybe TypeValueTable))
-> IO (Maybe TypeValueTable) -> m (Maybe TypeValueTable)
forall a b. (a -> b) -> a -> b
$ TypeInfo
-> (Ptr TypeInfo -> IO (Maybe TypeValueTable))
-> IO (Maybe TypeValueTable)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO (Maybe TypeValueTable))
-> IO (Maybe TypeValueTable))
-> (Ptr TypeInfo -> IO (Maybe TypeValueTable))
-> IO (Maybe TypeValueTable)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr TypeValueTable
val <- Ptr (Ptr TypeValueTable) -> IO (Ptr TypeValueTable)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr TypeValueTable)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64) :: IO (Ptr GObject.TypeValueTable.TypeValueTable)
Maybe TypeValueTable
result <- Ptr TypeValueTable
-> (Ptr TypeValueTable -> IO TypeValueTable)
-> IO (Maybe TypeValueTable)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr TypeValueTable
val ((Ptr TypeValueTable -> IO TypeValueTable)
-> IO (Maybe TypeValueTable))
-> (Ptr TypeValueTable -> IO TypeValueTable)
-> IO (Maybe TypeValueTable)
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr TypeValueTable
val' -> do
TypeValueTable
val'' <- ((ManagedPtr TypeValueTable -> TypeValueTable)
-> Ptr TypeValueTable -> IO TypeValueTable
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr TypeValueTable -> TypeValueTable
GObject.TypeValueTable.TypeValueTable) Ptr TypeValueTable
val'
TypeValueTable -> IO TypeValueTable
forall (m :: * -> *) a. Monad m => a -> m a
return TypeValueTable
val''
Maybe TypeValueTable -> IO (Maybe TypeValueTable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TypeValueTable
result
setTypeInfoValueTable :: MonadIO m => TypeInfo -> Ptr GObject.TypeValueTable.TypeValueTable -> m ()
setTypeInfoValueTable :: TypeInfo -> Ptr TypeValueTable -> m ()
setTypeInfoValueTable s :: TypeInfo
s val :: Ptr TypeValueTable
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (Ptr TypeValueTable) -> Ptr TypeValueTable -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr TypeValueTable)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64) (Ptr TypeValueTable
val :: Ptr GObject.TypeValueTable.TypeValueTable)
clearTypeInfoValueTable :: MonadIO m => TypeInfo -> m ()
clearTypeInfoValueTable :: TypeInfo -> m ()
clearTypeInfoValueTable s :: TypeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TypeInfo -> (Ptr TypeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TypeInfo
s ((Ptr TypeInfo -> IO ()) -> IO ())
-> (Ptr TypeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TypeInfo
ptr -> do
Ptr (Ptr TypeValueTable) -> Ptr TypeValueTable -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TypeInfo
ptr Ptr TypeInfo -> Int -> Ptr (Ptr TypeValueTable)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64) (Ptr TypeValueTable
forall a. Ptr a
FP.nullPtr :: Ptr GObject.TypeValueTable.TypeValueTable)
#if ENABLE_OVERLOADING
data TypeInfoValueTableFieldInfo
instance AttrInfo TypeInfoValueTableFieldInfo where
type AttrAllowedOps TypeInfoValueTableFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TypeInfoValueTableFieldInfo = (~) (Ptr GObject.TypeValueTable.TypeValueTable)
type AttrBaseTypeConstraint TypeInfoValueTableFieldInfo = (~) TypeInfo
type AttrGetType TypeInfoValueTableFieldInfo = Maybe GObject.TypeValueTable.TypeValueTable
type AttrLabel TypeInfoValueTableFieldInfo = "value_table"
type AttrOrigin TypeInfoValueTableFieldInfo = TypeInfo
attrGet _ = getTypeInfoValueTable
attrSet _ = setTypeInfoValueTable
attrConstruct = undefined
attrClear _ = clearTypeInfoValueTable
typeInfo_valueTable :: AttrLabelProxy "valueTable"
typeInfo_valueTable = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList TypeInfo
type instance O.AttributeList TypeInfo = TypeInfoAttributeList
type TypeInfoAttributeList = ('[ '("classSize", TypeInfoClassSizeFieldInfo), '("baseInit", TypeInfoBaseInitFieldInfo), '("baseFinalize", TypeInfoBaseFinalizeFieldInfo), '("classInit", TypeInfoClassInitFieldInfo), '("classFinalize", TypeInfoClassFinalizeFieldInfo), '("classData", TypeInfoClassDataFieldInfo), '("instanceSize", TypeInfoInstanceSizeFieldInfo), '("nPreallocs", TypeInfoNPreallocsFieldInfo), '("instanceInit", TypeInfoInstanceInitFieldInfo), '("valueTable", TypeInfoValueTableFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveTypeInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveTypeInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTypeInfoMethod t TypeInfo, O.MethodInfo info TypeInfo p) => O.IsLabelProxy t (TypeInfo -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTypeInfoMethod t TypeInfo, O.MethodInfo info TypeInfo p) => O.IsLabel t (TypeInfo -> 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
#endif