Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
This structure is used to provide the type system with the information required to initialize and destruct (finalize) a type's class and its instances.
The initialized structure is passed to the typeRegisterStatic
function
(or is copied into the provided TypeInfo
structure in the
typePluginCompleteTypeInfo
). The type system will perform a deep
copy of this structure, so its memory does not need to be persistent
across invocation of typeRegisterStatic
.
Synopsis
- newtype TypeInfo = TypeInfo (ManagedPtr TypeInfo)
- newZeroTypeInfo :: MonadIO m => m TypeInfo
- noTypeInfo :: Maybe TypeInfo
- clearTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m ()
- getTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m (Maybe BaseFinalizeFunc)
- setTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> FunPtr C_BaseFinalizeFunc -> m ()
- clearTypeInfoBaseInit :: MonadIO m => TypeInfo -> m ()
- getTypeInfoBaseInit :: MonadIO m => TypeInfo -> m (Maybe BaseInitFunc)
- setTypeInfoBaseInit :: MonadIO m => TypeInfo -> FunPtr C_BaseInitFunc -> m ()
- clearTypeInfoClassData :: MonadIO m => TypeInfo -> m ()
- getTypeInfoClassData :: MonadIO m => TypeInfo -> m (Ptr ())
- setTypeInfoClassData :: MonadIO m => TypeInfo -> Ptr () -> m ()
- clearTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m ()
- getTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m (Maybe ClassFinalizeFunc)
- setTypeInfoClassFinalize :: MonadIO m => TypeInfo -> FunPtr C_ClassFinalizeFunc -> m ()
- clearTypeInfoClassInit :: MonadIO m => TypeInfo -> m ()
- getTypeInfoClassInit :: MonadIO m => TypeInfo -> m (Maybe ClassInitFunc)
- setTypeInfoClassInit :: MonadIO m => TypeInfo -> FunPtr C_ClassInitFunc -> m ()
- getTypeInfoClassSize :: MonadIO m => TypeInfo -> m Word16
- setTypeInfoClassSize :: MonadIO m => TypeInfo -> Word16 -> m ()
- clearTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m ()
- getTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m (Maybe InstanceInitFunc)
- setTypeInfoInstanceInit :: MonadIO m => TypeInfo -> FunPtr C_InstanceInitFunc -> m ()
- getTypeInfoInstanceSize :: MonadIO m => TypeInfo -> m Word16
- setTypeInfoInstanceSize :: MonadIO m => TypeInfo -> Word16 -> m ()
- getTypeInfoNPreallocs :: MonadIO m => TypeInfo -> m Word16
- setTypeInfoNPreallocs :: MonadIO m => TypeInfo -> Word16 -> m ()
- clearTypeInfoValueTable :: MonadIO m => TypeInfo -> m ()
- getTypeInfoValueTable :: MonadIO m => TypeInfo -> m (Maybe TypeValueTable)
- setTypeInfoValueTable :: MonadIO m => TypeInfo -> Ptr TypeValueTable -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq TypeInfo Source # | |
WrappedPtr TypeInfo Source # | |
Defined in GI.GObject.Structs.TypeInfo wrappedPtrCalloc :: IO (Ptr TypeInfo) # wrappedPtrCopy :: TypeInfo -> IO TypeInfo # | |
tag ~ 'AttrSet => Constructible TypeInfo tag Source # | |
Defined in GI.GObject.Structs.TypeInfo |
Methods
Overloaded methods
Properties
baseFinalize
Location of the base finalization function (optional)
clearTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “base_finalize
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#baseFinalize
getTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> m (Maybe BaseFinalizeFunc) Source #
Get the value of the “base_finalize
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #baseFinalize
setTypeInfoBaseFinalize :: MonadIO m => TypeInfo -> FunPtr C_BaseFinalizeFunc -> m () Source #
Set the value of the “base_finalize
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #baseFinalize:=
value ]
baseInit
Location of the base initialization function (optional)
clearTypeInfoBaseInit :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “base_init
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#baseInit
getTypeInfoBaseInit :: MonadIO m => TypeInfo -> m (Maybe BaseInitFunc) Source #
Get the value of the “base_init
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #baseInit
setTypeInfoBaseInit :: MonadIO m => TypeInfo -> FunPtr C_BaseInitFunc -> m () Source #
Set the value of the “base_init
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #baseInit:=
value ]
classData
User-supplied data passed to the class init/finalize functions
clearTypeInfoClassData :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “class_data
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#classData
getTypeInfoClassData :: MonadIO m => TypeInfo -> m (Ptr ()) Source #
Get the value of the “class_data
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #classData
setTypeInfoClassData :: MonadIO m => TypeInfo -> Ptr () -> m () Source #
Set the value of the “class_data
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #classData:=
value ]
classFinalize
Location of the class finalization function for classed and instantiatable types. Location of the default vtable finalization function for interface types. (optional)
clearTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “class_finalize
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#classFinalize
getTypeInfoClassFinalize :: MonadIO m => TypeInfo -> m (Maybe ClassFinalizeFunc) Source #
Get the value of the “class_finalize
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #classFinalize
setTypeInfoClassFinalize :: MonadIO m => TypeInfo -> FunPtr C_ClassFinalizeFunc -> m () Source #
Set the value of the “class_finalize
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #classFinalize:=
value ]
classInit
Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
clearTypeInfoClassInit :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “class_init
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#classInit
getTypeInfoClassInit :: MonadIO m => TypeInfo -> m (Maybe ClassInitFunc) Source #
Get the value of the “class_init
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #classInit
setTypeInfoClassInit :: MonadIO m => TypeInfo -> FunPtr C_ClassInitFunc -> m () Source #
Set the value of the “class_init
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #classInit:=
value ]
classSize
Size of the class structure (required for interface, classed and instantiatable types)
getTypeInfoClassSize :: MonadIO m => TypeInfo -> m Word16 Source #
Get the value of the “class_size
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #classSize
setTypeInfoClassSize :: MonadIO m => TypeInfo -> Word16 -> m () Source #
Set the value of the “class_size
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #classSize:=
value ]
instanceInit
Location of the instance initialization function (optional, for instantiatable types only)
clearTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “instance_init
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#instanceInit
getTypeInfoInstanceInit :: MonadIO m => TypeInfo -> m (Maybe InstanceInitFunc) Source #
Get the value of the “instance_init
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #instanceInit
setTypeInfoInstanceInit :: MonadIO m => TypeInfo -> FunPtr C_InstanceInitFunc -> m () Source #
Set the value of the “instance_init
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #instanceInit:=
value ]
instanceSize
Size of the instance (object) structure (required for instantiatable types only)
getTypeInfoInstanceSize :: MonadIO m => TypeInfo -> m Word16 Source #
Get the value of the “instance_size
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #instanceSize
setTypeInfoInstanceSize :: MonadIO m => TypeInfo -> Word16 -> m () Source #
Set the value of the “instance_size
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #instanceSize:=
value ]
nPreallocs
Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now.
getTypeInfoNPreallocs :: MonadIO m => TypeInfo -> m Word16 Source #
Get the value of the “n_preallocs
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #nPreallocs
setTypeInfoNPreallocs :: MonadIO m => TypeInfo -> Word16 -> m () Source #
Set the value of the “n_preallocs
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #nPreallocs:=
value ]
valueTable
A TypeValueTable
function table for generic handling of GValues
of this type (usually only useful for fundamental types)
clearTypeInfoValueTable :: MonadIO m => TypeInfo -> m () Source #
Set the value of the “value_table
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#valueTable
getTypeInfoValueTable :: MonadIO m => TypeInfo -> m (Maybe TypeValueTable) Source #
Get the value of the “value_table
” field.
When overloading is enabled, this is equivalent to
get
typeInfo #valueTable
setTypeInfoValueTable :: MonadIO m => TypeInfo -> Ptr TypeValueTable -> m () Source #
Set the value of the “value_table
” field.
When overloading is enabled, this is equivalent to
set
typeInfo [ #valueTable:=
value ]