added g_list_insert_before().
[platform/upstream/glib.git] / docs / reference / gobject / tmpl / gtypemodule.sgml
1 <!-- ##### SECTION Title ##### -->
2 GTypeModule
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Type Loading Modules
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 #GTypeModule provides a simple implementation of the #GTypePlugin
10 interface. The model of #GTypeModule is a dynamically loaded module
11 which implements some number of types and interface
12 implementations. When the module is loaded, it registerse its types
13 and interfaces using g_type_module_register_type() and
14 g_type_module_add_interface().  As long as any instances of these
15 types and interface implementations are in use, the module is kept
16 loaded. When the types and interfaces are gone, the module may be
17 unloaded. If the types and interfaces become used again, the module
18 will be reloaded.
19 </para>
20 <para>
21 Keeping track of whether the module should be loaded or not is done by
22 using a use count - it starts at zero, and whenever it is greater than
23 zero, the module is loaded. The use count is maintained internally by
24 the type system, but also can be explicitely controlled by
25 g_type_module_use() and g_type_module_unuse(). Typically, when loading
26 a module for the first type, g_type_module_use() will be used to load
27 it so that it can initialize its types. At some later point, when the
28 module no longer needs to be loaded except for the type
29 implementations it contains, g_type_module_unuse() is called.
30 </para>
31 <para>
32 #GTypeModule does not actually provide any implementation of module
33 loading and unloading. To create a particular module type you must
34 derive from #GTypeModule and implement the load and unload functions
35 in #GTypeModuleClass.
36 </para>
37
38 <!-- ##### SECTION See_Also ##### -->
39 <para>
40 <variablelist>
41
42 <varlistentry>
43 <term>#GTypePlugin</term>
44 <listitem><para>The abstract type loader interface.</para></listitem>
45 </varlistentry>
46
47 <varlistentry>
48 <term>#GModule</term>
49 <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem>
50 </varlistentry>
51
52 </variablelist>
53 </para>
54
55 <!-- ##### STRUCT GTypeModule ##### -->
56 <para>
57
58 </para>
59
60 @parent_instance: 
61 @use_count: 
62 @type_infos: 
63 @interface_infos: 
64 @name: 
65
66 <!-- ##### FUNCTION g_type_module_use ##### -->
67 <para>
68
69 </para>
70
71 @module: 
72 @Returns: 
73
74
75 <!-- ##### FUNCTION g_type_module_unuse ##### -->
76 <para>
77
78 </para>
79
80 @module: 
81
82
83 <!-- ##### FUNCTION g_type_module_set_name ##### -->
84 <para>
85
86 </para>
87
88 @module: 
89 @name: 
90
91
92 <!-- ##### FUNCTION g_type_module_register_type ##### -->
93 <para>
94
95 </para>
96
97 @module: 
98 @parent_type: 
99 @type_name: 
100 @type_info: 
101 @flags: 
102 @Returns: 
103
104
105 <!-- ##### FUNCTION g_type_module_add_interface ##### -->
106 <para>
107
108 </para>
109
110 @module: 
111 @instance_type: 
112 @interface_type: 
113 @interface_info: 
114
115