TypeModule.registerType

Looks up or registers a type that is implemented with a particular type plugin. If a type with name @type_name was previously registered, the #GType identifier for the type is returned, otherwise the type is newly registered, and the resulting #GType identifier returned.

When reregistering a type (typically because a module is unloaded then reloaded, and reinitialized), @module and @parent_type must be the same as they were previously.

As long as any instances of the type exist, the type plugin will not be unloaded.

class TypeModule
registerType

Parameters

parentType GType

the type for the parent class

typeName string

name for the type

typeInfo GTypeInfo*

type information structure

flags GTypeFlags

flags field providing details about the type

Return Value

Type: GType

the new or existing type ID

Meta