gi-gobject-2.0.24: GObject bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GObject.Structs.TypeInfo

Description

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

Exported types

newtype TypeInfo Source #

Memory-managed wrapper type.

Constructors

TypeInfo (ManagedPtr TypeInfo) 

Instances

Instances details
Eq TypeInfo Source # 
Instance details

Defined in GI.GObject.Structs.TypeInfo

CallocPtr TypeInfo Source # 
Instance details

Defined in GI.GObject.Structs.TypeInfo

BoxedPtr TypeInfo Source # 
Instance details

Defined in GI.GObject.Structs.TypeInfo

ManagedPtrNewtype TypeInfo Source # 
Instance details

Defined in GI.GObject.Structs.TypeInfo

tag ~ 'AttrSet => Constructible TypeInfo tag Source # 
Instance details

Defined in GI.GObject.Structs.TypeInfo

Methods

new :: MonadIO m => (ManagedPtr TypeInfo -> TypeInfo) -> [AttrOp TypeInfo tag] -> m TypeInfo #

newZeroTypeInfo :: MonadIO m => m TypeInfo Source #

Construct a TypeInfo struct initialized to zero.

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 ]