GObject.TypeInfo - Structures - GObject 2.0 (original) (raw)

Fields

Name Type Access Description
base_finalize GObject.BaseFinalizeFunc r/w Location of the base finalization function (optional)
base_init GObject.BaseInitFunc r/w Location of the base initialization function (optional)
class_data object r/w User-supplied data passed to the class init/finalize functions
class_finalize GObject.ClassFinalizeFunc r/w Location of the class finalization function for classed and instantiatable types. Location of the default vtable finalization function for interface types. (optional)
class_init GObject.ClassInitFunc r/w Location of the class initialization function for classed and instantiatable types. Location of the default vtable initialization 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.
class_size int r/w Size of the class structure (required for interface, classed and instantiatable types)
instance_init GObject.InstanceInitFunc r/w Location of the instance initialization function (optional, for instantiatable types only)
instance_size int r/w Size of the instance (object) structure (required for instantiatable types only)
n_preallocs int r/w 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 this field is ignored.
value_table GObject.TypeValueTable r/w A GObject.TypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types)

Methods

None

Details

class GObject.TypeInfo

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 GObject.type_register_static() function (or is copied into the provided GObject.TypeInfo structure in theGObject.TypePlugin.complete_type_info()). The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of GObject.type_register_static().