mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
docs: Move the GTypeModule SECTION
Move the content to the struct docs. Helps: #3037
This commit is contained in:
parent
bc084d8780
commit
7eba4e8f49
@ -26,41 +26,40 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtypemodule
|
* GTypeModule:
|
||||||
* @short_description: Type loading modules
|
* @name: the name of the module
|
||||||
* @see_also: #GTypePlugin, #GModule
|
|
||||||
* @title: GTypeModule
|
|
||||||
*
|
*
|
||||||
* #GTypeModule provides a simple implementation of the #GTypePlugin
|
* `GTypeModule` provides a simple implementation of the `GTypePlugin`
|
||||||
* interface.
|
* interface.
|
||||||
*
|
*
|
||||||
* The model of #GTypeModule is a dynamically loaded module which
|
* The model of `GTypeModule` is a dynamically loaded module which
|
||||||
* implements some number of types and interface implementations.
|
* implements some number of types and interface implementations.
|
||||||
*
|
*
|
||||||
* When the module is loaded, it registers its types and interfaces
|
* When the module is loaded, it registers its types and interfaces
|
||||||
* using g_type_module_register_type() and g_type_module_add_interface().
|
* using [method@GObject.TypeModule.register_type] and
|
||||||
|
* [method@GObject.TypeModule.add_interface].
|
||||||
* As long as any instances of these types and interface implementations
|
* As long as any instances of these types and interface implementations
|
||||||
* are in use, the module is kept loaded. When the types and interfaces
|
* are in use, the module is kept loaded. When the types and interfaces
|
||||||
* are gone, the module may be unloaded. If the types and interfaces
|
* are gone, the module may be unloaded. If the types and interfaces
|
||||||
* become used again, the module will be reloaded. Note that the last
|
* become used again, the module will be reloaded. Note that the last
|
||||||
* reference cannot be released from within the module code, since that
|
* reference cannot be released from within the module code, since that
|
||||||
* would lead to the caller's code being unloaded before g_object_unref()
|
* would lead to the caller's code being unloaded before `g_object_unref()`
|
||||||
* returns to it.
|
* returns to it.
|
||||||
*
|
*
|
||||||
* Keeping track of whether the module should be loaded or not is done by
|
* Keeping track of whether the module should be loaded or not is done by
|
||||||
* using a use count - it starts at zero, and whenever it is greater than
|
* using a use count - it starts at zero, and whenever it is greater than
|
||||||
* zero, the module is loaded. The use count is maintained internally by
|
* zero, the module is loaded. The use count is maintained internally by
|
||||||
* the type system, but also can be explicitly controlled by
|
* the type system, but also can be explicitly controlled by
|
||||||
* g_type_module_use() and g_type_module_unuse(). Typically, when loading
|
* [func@GObject.type_module_use] and [func@GObject.type_module_unuse].
|
||||||
* a module for the first type, g_type_module_use() will be used to load
|
* Typically, when loading a module for the first type, `g_type_module_use()`
|
||||||
* it so that it can initialize its types. At some later point, when the
|
* will be used to load it so that it can initialize its types. At some later
|
||||||
* module no longer needs to be loaded except for the type
|
* point, when the module no longer needs to be loaded except for the type
|
||||||
* implementations it contains, g_type_module_unuse() is called.
|
* implementations it contains, `g_type_module_unuse()` is called.
|
||||||
*
|
*
|
||||||
* #GTypeModule does not actually provide any implementation of module
|
* `GTypeModule` does not actually provide any implementation of module
|
||||||
* loading and unloading. To create a particular module type you must
|
* loading and unloading. To create a particular module type you must
|
||||||
* derive from #GTypeModule and implement the load and unload functions
|
* derive from `GTypeModule` and implement the load and unload functions
|
||||||
* in #GTypeModuleClass.
|
* in `GTypeModuleClass`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _ModuleTypeInfo ModuleTypeInfo;
|
typedef struct _ModuleTypeInfo ModuleTypeInfo;
|
||||||
|
@ -40,13 +40,6 @@ typedef struct _GTypeModuleClass GTypeModuleClass;
|
|||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeModule, g_object_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeModule, g_object_unref)
|
||||||
|
|
||||||
/**
|
|
||||||
* GTypeModule:
|
|
||||||
* @name: the name of the module
|
|
||||||
*
|
|
||||||
* The members of the GTypeModule structure should not
|
|
||||||
* be accessed directly, except for the @name field.
|
|
||||||
*/
|
|
||||||
struct _GTypeModule
|
struct _GTypeModule
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user