46
48
<th width="100%" align="center">GObject Reference Manual</th>
47
49
<td><a accesskey="n" href="GTypeModule.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
49
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2848811" class="shortcut">Top</a>
51
<a href="#id2849166" class="shortcut">Description</a>
53
<a href="#id2849117" class="shortcut">Object Hierarchy</a>
55
<a href="#id2849142" class="shortcut">Known Implementations</a></nobr></td></tr>
51
<tr><td colspan="5" class="shortcuts">
52
<a href="#GTypePlugin.synopsis" class="shortcut">Top</a>
54
<a href="#GTypePlugin.description" class="shortcut">Description</a>
56
<a href="#GTypePlugin.object-hierarchy" class="shortcut">Object Hierarchy</a>
58
<a href="#GTypePlugin.implementations" class="shortcut">Known Implementations</a>
57
61
<div class="refentry" lang="en">
58
62
<a name="GTypePlugin"></a><div class="titlepage"></div>
59
63
<div class="refnamediv"><table width="100%"><tr>
62
<a name="id2848811"></a><span class="refentrytitle">GTypePlugin</span>
64
<p>GTypePlugin — An interface for dynamically loadable types</p>
65
<h2><span class="refentrytitle"><a name="GTypePlugin.top_of_page"></a>GTypePlugin</span></h2>
66
<p>GTypePlugin — An interface for dynamically loadable types</p>
66
68
<td valign="top" align="right"></td>
67
69
</tr></table></div>
68
70
<div class="refsynopsisdiv">
71
<a name="GTypePlugin.synopsis"></a><h2>Synopsis</h2>
70
72
<pre class="synopsis">
72
74
#include <glib-object.h>
75
<a class="link" href="GTypePlugin.html#GTypePlugin-struct">GTypePlugin</a>;
76
<a class="link" href="GTypePlugin.html#GTypePluginClass">GTypePluginClass</a>;
77
void (<a class="link" href="GTypePlugin.html#GTypePluginUse">*GTypePluginUse</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
78
void (<a class="link" href="GTypePlugin.html#GTypePluginUnuse">*GTypePluginUnuse</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
79
void (<a class="link" href="GTypePlugin.html#GTypePluginCompleteTypeInfo">*GTypePluginCompleteTypeInfo</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
80
<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type,
81
<a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
82
<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a> *value_table);
83
void (<a class="link" href="GTypePlugin.html#GTypePluginCompleteInterfaceInfo">*GTypePluginCompleteInterfaceInfo</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
84
<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
85
<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
86
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);
87
void <a class="link" href="GTypePlugin.html#g-type-plugin-use">g_type_plugin_use</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
88
void <a class="link" href="GTypePlugin.html#g-type-plugin-unuse">g_type_plugin_unuse</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
89
void <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info">g_type_plugin_complete_type_info</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
90
<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type,
91
<a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
92
<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a> *value_table);
93
void <a class="link" href="GTypePlugin.html#g-type-plugin-complete-interface-info">g_type_plugin_complete_interface_info</a>
76
<a class="link" href="GTypePlugin.html#GTypePlugin-struct" title="GTypePlugin">GTypePlugin</a>;
77
<a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass">GTypePluginClass</a>;
78
void (<a class="link" href="GTypePlugin.html#GTypePluginUse" title="GTypePluginUse ()">*GTypePluginUse</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
79
void (<a class="link" href="GTypePlugin.html#GTypePluginUnuse" title="GTypePluginUnuse ()">*GTypePluginUnuse</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
80
void (<a class="link" href="GTypePlugin.html#GTypePluginCompleteTypeInfo" title="GTypePluginCompleteTypeInfo ()">*GTypePluginCompleteTypeInfo</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
81
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> g_type,
82
<a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo">GTypeInfo</a> *info,
83
<a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable">GTypeValueTable</a> *value_table);
84
void (<a class="link" href="GTypePlugin.html#GTypePluginCompleteInterfaceInfo" title="GTypePluginCompleteInterfaceInfo ()">*GTypePluginCompleteInterfaceInfo</a>) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
85
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> instance_type,
86
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> interface_type,
87
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo">GInterfaceInfo</a> *info);
88
void <a class="link" href="GTypePlugin.html#g-type-plugin-use" title="g_type_plugin_use ()">g_type_plugin_use</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
89
void <a class="link" href="GTypePlugin.html#g-type-plugin-unuse" title="g_type_plugin_unuse ()">g_type_plugin_unuse</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
90
void <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()">g_type_plugin_complete_type_info</a> (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
91
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> g_type,
92
<a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo">GTypeInfo</a> *info,
93
<a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable">GTypeValueTable</a> *value_table);
94
void <a class="link" href="GTypePlugin.html#g-type-plugin-complete-interface-info" title="g_type_plugin_complete_interface_info ()">g_type_plugin_complete_interface_info</a>
94
95
(<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
95
<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
96
<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
97
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);
96
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> instance_type,
97
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> interface_type,
98
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo">GInterfaceInfo</a> *info);
101
101
<div class="refsect1" lang="en">
102
<a name="id2849117"></a><h2>Object Hierarchy</h2>
102
<a name="GTypePlugin.object-hierarchy"></a><h2>Object Hierarchy</h2>
103
103
<pre class="synopsis">
109
108
<div class="refsect1" lang="en">
110
<a name="id2849142"></a><h2>Known Implementations</h2>
109
<a name="GTypePlugin.implementations"></a><h2>Known Implementations</h2>
112
111
GTypePlugin is implemented by
113
112
<a class="link" href="GTypeModule.html" title="GTypeModule">GTypeModule</a>.</p>
115
114
<div class="refsect1" lang="en">
116
<a name="id2849166"></a><h2>Description</h2>
115
<a name="GTypePlugin.description"></a><h2>Description</h2>
118
The GObject type system supports dynamic loading of types. The <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
119
interface is used to handle the lifecycle of dynamically loaded types.
117
The GObject type system supports dynamic loading of types. The
118
<a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> interface is used to handle the lifecycle of
119
dynamically loaded types. It goes as follows:
124
123
<div class="orderedlist"><ol type="1">
126
126
The type is initially introduced (usually upon loading the module
127
127
the first time, or by your main application that knows what modules
128
128
introduces what types), like this:
129
<code class="literal">new_type_id = g_type_register_dynamic (parent_type_id,
130
<div class="informalexample"><pre class="programlisting">
131
new_type_id = g_type_register_dynamic (parent_type_id,
134
137
where <code class="literal">new_type_plugin</code> is an implementation of the
135
138
<a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> interface.
138
142
The type's implementation is referenced, e.g. through
139
<a class="link" href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a> or through <a class="link" href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a> (this is
140
being called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a>) or through one of the above done on
143
<a class="link" href="gobject-Type-Information.html#g-type-class-ref" title="g_type_class_ref ()"><code class="function">g_type_class_ref()</code></a> or through <a class="link" href="gobject-Type-Information.html#g-type-create-instance" title="g_type_create_instance ()"><code class="function">g_type_create_instance()</code></a> (this is
144
being called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a>) or through one of the above done on
141
145
a type derived from <code class="literal">new_type_id</code>.
144
148
This causes the type system to load the type's implementation by calling
145
<a class="link" href="GTypePlugin.html#g-type-plugin-use"><code class="function">g_type_plugin_use()</code></a> and <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a> on
149
<a class="link" href="GTypePlugin.html#g-type-plugin-use" title="g_type_plugin_use ()"><code class="function">g_type_plugin_use()</code></a> and <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()"><code class="function">g_type_plugin_complete_type_info()</code></a> on
146
150
<code class="literal">new_type_plugin</code>.
149
153
At some point the type's implementation isn't required anymore, e.g. after
150
<a class="link" href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> or <a class="link" href="gobject-Type-Information.html#g-type-free-instance"><code class="function">g_type_free_instance()</code></a> (called when the reference
154
<a class="link" href="gobject-Type-Information.html#g-type-class-unref" title="g_type_class_unref ()"><code class="function">g_type_class_unref()</code></a> or <a class="link" href="gobject-Type-Information.html#g-type-free-instance" title="g_type_free_instance ()"><code class="function">g_type_free_instance()</code></a> (called when the reference
151
155
count of an instance drops to zero).
154
158
This causes the type system to throw away the information retrieved from
155
<a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a> and then it calls
156
<a class="link" href="GTypePlugin.html#g-type-plugin-unuse"><code class="function">g_type_plugin_unuse()</code></a> on <code class="literal">new_type_plugin</code>.
159
<a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()"><code class="function">g_type_plugin_complete_type_info()</code></a> and then it calls
160
<a class="link" href="GTypePlugin.html#g-type-plugin-unuse" title="g_type_plugin_unuse ()"><code class="function">g_type_plugin_unuse()</code></a> on <code class="literal">new_type_plugin</code>.
159
163
Things may repeat from the second step.
165
So basically, you need to implement a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> type that carries a
166
use_count, once use_count goes from zero to one, you need to load the
167
implementation to successfully handle the upcoming
168
<a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a> call. Later, maybe after succeeding
169
use/unuse calls, once use_count drops to zero, you can unload the
170
implementation again. The type system makes sure to call <a class="link" href="GTypePlugin.html#g-type-plugin-use"><code class="function">g_type_plugin_use()</code></a>
171
and <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a> again when the type is needed again.
169
So basically, you need to implement a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> type that
170
carries a use_count, once use_count goes from zero to one, you need
171
to load the implementation to successfully handle the upcoming
172
<a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()"><code class="function">g_type_plugin_complete_type_info()</code></a> call. Later, maybe after
173
succeeding use/unuse calls, once use_count drops to zero, you can
174
unload the implementation again. The type system makes sure to call
175
<a class="link" href="GTypePlugin.html#g-type-plugin-use" title="g_type_plugin_use ()"><code class="function">g_type_plugin_use()</code></a> and <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()"><code class="function">g_type_plugin_complete_type_info()</code></a> again
176
when the type is needed again.
174
<a class="link" href="GTypeModule.html" title="GTypeModule"><span class="type">GTypeModule</span></a> is an implementation of <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> that already implements
175
most of this except for the actual module loading and unloading. It even
176
handles multiple registered types per module.
179
<a class="link" href="GTypeModule.html" title="GTypeModule"><span class="type">GTypeModule</span></a> is an implementation of <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> that already
180
implements most of this except for the actual module loading and
181
unloading. It even handles multiple registered types per module.</p>
179
185
<div class="refsect1" lang="en">
180
<a name="id2849454"></a><h2>Details</h2>
186
<a name="GTypePlugin.details"></a><h2>Details</h2>
181
187
<div class="refsect2" lang="en">
182
<a name="id2849464"></a><h3>
183
<a name="GTypePlugin-struct"></a>GTypePlugin</h3>
184
<a class="indexterm" name="id2849477"></a><pre class="programlisting">typedef struct _GTypePlugin GTypePlugin;</pre>
188
<a name="GTypePlugin-struct"></a><h3>GTypePlugin</h3>
189
<pre class="programlisting">typedef struct _GTypePlugin GTypePlugin;</pre>
186
191
The <span class="structname">GTypePlugin</span> typedef is used as a placeholder
187
192
for objects that implement the <span class="structname">GTypePlugin</span>
192
198
<div class="refsect2" lang="en">
193
<a name="id2849501"></a><h3>
194
<a name="GTypePluginClass"></a>GTypePluginClass</h3>
195
<a class="indexterm" name="id2849513"></a><pre class="programlisting">typedef struct {
199
<a name="GTypePluginClass"></a><h3>GTypePluginClass</h3>
200
<pre class="programlisting">typedef struct {
196
201
GTypePluginUse use_plugin;
197
202
GTypePluginUnuse unuse_plugin;
198
203
GTypePluginCompleteTypeInfo complete_type_info;
203
208
The <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> interface is used by the type system in order to handle
204
the lifecycle of dynamically loaded types.
206
<div class="variablelist"><table border="0">
207
<col align="left" valign="top">
210
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginUse">GTypePluginUse</a> <em class="structfield"><code>use_plugin</code></em>;</span></p></td>
211
<td>Increases the use count of the plugin.
215
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginUnuse">GTypePluginUnuse</a> <em class="structfield"><code>unuse_plugin</code></em>;</span></p></td>
216
<td>Decreases the use count of the plugin.
220
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginCompleteTypeInfo">GTypePluginCompleteTypeInfo</a> <em class="structfield"><code>complete_type_info</code></em>;</span></p></td>
221
<td>Fills in the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> and
222
<a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> structs for the type. The structs are initialized
223
with <code class="literal">memset(s, 0, sizeof (s))</code> before calling
228
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginCompleteInterfaceInfo">GTypePluginCompleteInterfaceInfo</a> <em class="structfield"><code>complete_interface_info</code></em>;</span></p></td>
229
<td>Fills in missing parts of the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a>
230
for the interface. The structs is initialized with
231
<code class="literal">memset(s, 0, sizeof (s))</code> before calling
240
<div class="refsect2" lang="en">
241
<a name="id2849672"></a><h3>
242
<a name="GTypePluginUse"></a>GTypePluginUse ()</h3>
243
<a class="indexterm" name="id2849685"></a><pre class="programlisting">void (*GTypePluginUse) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
245
The type of the <em class="parameter"><code>use_plugin</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a>, which gets called
246
to increase the use count of <em class="parameter"><code>plugin</code></em>.
248
<div class="variablelist"><table border="0">
249
<col align="left" valign="top">
251
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
252
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> whose use count should be increased
260
<div class="refsect2" lang="en">
261
<a name="id2849761"></a><h3>
262
<a name="GTypePluginUnuse"></a>GTypePluginUnuse ()</h3>
263
<a class="indexterm" name="id2849773"></a><pre class="programlisting">void (*GTypePluginUnuse) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
265
The type of the <em class="parameter"><code>unuse_plugin</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a>.
267
<div class="variablelist"><table border="0">
268
<col align="left" valign="top">
270
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
271
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> whose use count should be decreased
279
<div class="refsect2" lang="en">
280
<a name="id2849843"></a><h3>
281
<a name="GTypePluginCompleteTypeInfo"></a>GTypePluginCompleteTypeInfo ()</h3>
282
<a class="indexterm" name="id2849857"></a><pre class="programlisting">void (*GTypePluginCompleteTypeInfo) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
283
<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type,
284
<a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
285
<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a> *value_table);</pre>
287
The type of the <em class="parameter"><code>complete_type_info</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a>.
289
<div class="variablelist"><table border="0">
290
<col align="left" valign="top">
293
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
294
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
298
<td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
299
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> whose info is completed
303
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
304
<td>the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> struct to fill in
308
<td><p><span class="term"><em class="parameter"><code>value_table</code></em> :</span></p></td>
309
<td>the <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> to fill in
318
<div class="refsect2" lang="en">
319
<a name="id2850015"></a><h3>
320
<a name="GTypePluginCompleteInterfaceInfo"></a>GTypePluginCompleteInterfaceInfo ()</h3>
321
<a class="indexterm" name="id2850029"></a><pre class="programlisting">void (*GTypePluginCompleteInterfaceInfo) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
322
<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
323
<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
324
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
326
The type of the <em class="parameter"><code>complete_interface_info</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a>.
328
<div class="variablelist"><table border="0">
329
<col align="left" valign="top">
332
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
333
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
337
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
338
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of an instantiable type to which the interface
343
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
344
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the interface whose info is completed
348
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
349
<td>the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> to fill in
358
<div class="refsect2" lang="en">
359
<a name="id2850190"></a><h3>
360
<a name="g-type-plugin-use"></a>g_type_plugin_use ()</h3>
361
<a class="indexterm" name="id2850202"></a><pre class="programlisting">void g_type_plugin_use (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
363
Calls the <em class="parameter"><code>use_plugin</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a> of <em class="parameter"><code>plugin</code></em>.
364
There should be no need to use this function outside of the GObject
367
<div class="variablelist"><table border="0">
368
<col align="left" valign="top">
370
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
371
<td>a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
379
<div class="refsect2" lang="en">
380
<a name="id2850278"></a><h3>
381
<a name="g-type-plugin-unuse"></a>g_type_plugin_unuse ()</h3>
382
<a class="indexterm" name="id2850292"></a><pre class="programlisting">void g_type_plugin_unuse (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
384
Calls the <em class="parameter"><code>unuse_plugin</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a> of <em class="parameter"><code>plugin</code></em>.
385
There should be no need to use this function outside of the GObject
388
<div class="variablelist"><table border="0">
389
<col align="left" valign="top">
391
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
392
<td>a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
400
<div class="refsect2" lang="en">
401
<a name="id2850367"></a><h3>
402
<a name="g-type-plugin-complete-type-info"></a>g_type_plugin_complete_type_info ()</h3>
403
<a class="indexterm" name="id2850380"></a><pre class="programlisting">void g_type_plugin_complete_type_info (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
404
<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type,
405
<a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
406
<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a> *value_table);</pre>
408
Calls the <em class="parameter"><code>complete_type_info</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a> of <em class="parameter"><code>plugin</code></em>.
409
There should be no need to use this function outside of the GObject
412
<div class="variablelist"><table border="0">
413
<col align="left" valign="top">
416
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
417
<td>a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
421
<td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
422
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> whose info is completed
426
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
427
<td>the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> struct to fill in
431
<td><p><span class="term"><em class="parameter"><code>value_table</code></em> :</span></p></td>
432
<td>the <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> to fill in
441
<div class="refsect2" lang="en">
442
<a name="id2850547"></a><h3>
443
<a name="g-type-plugin-complete-interface-info"></a>g_type_plugin_complete_interface_info ()</h3>
444
<a class="indexterm" name="id2850561"></a><pre class="programlisting">void g_type_plugin_complete_interface_info
209
the lifecycle of dynamically loaded types.</p>
212
<div class="variablelist"><table border="0">
213
<col align="left" valign="top">
216
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginUse" title="GTypePluginUse ()">GTypePluginUse</a> <em class="structfield"><code>use_plugin</code></em>;</span></p></td>
217
<td> Increases the use count of the plugin.
221
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginUnuse" title="GTypePluginUnuse ()">GTypePluginUnuse</a> <em class="structfield"><code>unuse_plugin</code></em>;</span></p></td>
222
<td> Decreases the use count of the plugin.
226
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginCompleteTypeInfo" title="GTypePluginCompleteTypeInfo ()">GTypePluginCompleteTypeInfo</a> <em class="structfield"><code>complete_type_info</code></em>;</span></p></td>
227
<td> Fills in the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo"><span class="type">GTypeInfo</span></a> and
228
<a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable"><span class="type">GTypeValueTable</span></a> structs for the type. The structs are initialized
229
with <code class="literal">memset(s, 0, sizeof (s))</code> before calling
234
<td><p><span class="term"><a class="link" href="GTypePlugin.html#GTypePluginCompleteInterfaceInfo" title="GTypePluginCompleteInterfaceInfo ()">GTypePluginCompleteInterfaceInfo</a> <em class="structfield"><code>complete_interface_info</code></em>;</span></p></td>
235
<td> Fills in missing parts of the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo"><span class="type">GInterfaceInfo</span></a>
236
for the interface. The structs is initialized with
237
<code class="literal">memset(s, 0, sizeof (s))</code> before calling
245
<div class="refsect2" lang="en">
246
<a name="GTypePluginUse"></a><h3>GTypePluginUse ()</h3>
247
<pre class="programlisting">void (*GTypePluginUse) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
249
The type of the <em class="parameter"><code>use_plugin</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a>, which gets called
250
to increase the use count of <em class="parameter"><code>plugin</code></em>.</p>
253
<div class="variablelist"><table border="0">
254
<col align="left" valign="top">
256
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
257
<td> the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> whose use count should be increased
263
<div class="refsect2" lang="en">
264
<a name="GTypePluginUnuse"></a><h3>GTypePluginUnuse ()</h3>
265
<pre class="programlisting">void (*GTypePluginUnuse) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
267
The type of the <em class="parameter"><code>unuse_plugin</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a>.</p>
270
<div class="variablelist"><table border="0">
271
<col align="left" valign="top">
273
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
274
<td> the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> whose use count should be decreased
280
<div class="refsect2" lang="en">
281
<a name="GTypePluginCompleteTypeInfo"></a><h3>GTypePluginCompleteTypeInfo ()</h3>
282
<pre class="programlisting">void (*GTypePluginCompleteTypeInfo) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
283
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> g_type,
284
<a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo">GTypeInfo</a> *info,
285
<a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable">GTypeValueTable</a> *value_table);</pre>
287
The type of the <em class="parameter"><code>complete_type_info</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a>.</p>
290
<div class="variablelist"><table border="0">
291
<col align="left" valign="top">
294
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
295
<td> the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
299
<td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
300
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> whose info is completed
304
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
305
<td> the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo"><span class="type">GTypeInfo</span></a> struct to fill in
309
<td><p><span class="term"><em class="parameter"><code>value_table</code></em> :</span></p></td>
310
<td> the <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable"><span class="type">GTypeValueTable</span></a> to fill in
317
<div class="refsect2" lang="en">
318
<a name="GTypePluginCompleteInterfaceInfo"></a><h3>GTypePluginCompleteInterfaceInfo ()</h3>
319
<pre class="programlisting">void (*GTypePluginCompleteInterfaceInfo) (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
320
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> instance_type,
321
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> interface_type,
322
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
324
The type of the <em class="parameter"><code>complete_interface_info</code></em> function of <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a>.</p>
327
<div class="variablelist"><table border="0">
328
<col align="left" valign="top">
331
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
332
<td> the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
336
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
337
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of an instantiable type to which the interface
342
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
343
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the interface whose info is completed
347
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
348
<td> the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> to fill in
355
<div class="refsect2" lang="en">
356
<a name="g-type-plugin-use"></a><h3>g_type_plugin_use ()</h3>
357
<pre class="programlisting">void g_type_plugin_use (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
359
Calls the <em class="parameter"><code>use_plugin</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a> of
360
<em class="parameter"><code>plugin</code></em>. There should be no need to use this function outside of
361
the GObject type system itself.</p>
364
<div class="variablelist"><table border="0">
365
<col align="left" valign="top">
367
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
368
<td> a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
374
<div class="refsect2" lang="en">
375
<a name="g-type-plugin-unuse"></a><h3>g_type_plugin_unuse ()</h3>
376
<pre class="programlisting">void g_type_plugin_unuse (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
378
Calls the <em class="parameter"><code>unuse_plugin</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a> of
379
<em class="parameter"><code>plugin</code></em>. There should be no need to use this function outside of
380
the GObject type system itself.</p>
383
<div class="variablelist"><table border="0">
384
<col align="left" valign="top">
386
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
387
<td> a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
393
<div class="refsect2" lang="en">
394
<a name="g-type-plugin-complete-type-info"></a><h3>g_type_plugin_complete_type_info ()</h3>
395
<pre class="programlisting">void g_type_plugin_complete_type_info (<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
396
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> g_type,
397
<a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo">GTypeInfo</a> *info,
398
<a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable">GTypeValueTable</a> *value_table);</pre>
400
Calls the <em class="parameter"><code>complete_type_info</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a> of <em class="parameter"><code>plugin</code></em>.
401
There should be no need to use this function outside of the GObject
402
type system itself.</p>
405
<div class="variablelist"><table border="0">
406
<col align="left" valign="top">
409
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
410
<td> a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
414
<td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
415
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> whose info is completed
419
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
420
<td> the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo"><span class="type">GTypeInfo</span></a> struct to fill in
424
<td><p><span class="term"><em class="parameter"><code>value_table</code></em> :</span></p></td>
425
<td> the <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="GTypeValueTable"><span class="type">GTypeValueTable</span></a> to fill in
432
<div class="refsect2" lang="en">
433
<a name="g-type-plugin-complete-interface-info"></a><h3>g_type_plugin_complete_interface_info ()</h3>
434
<pre class="programlisting">void g_type_plugin_complete_interface_info
445
435
(<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
446
<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
447
<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
448
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
450
Calls the <em class="parameter"><code>complete_interface_info</code></em> function from the <a class="link" href="GTypePlugin.html#GTypePluginClass"><span class="type">GTypePluginClass</span></a>
451
of <em class="parameter"><code>plugin</code></em>. There should be no need to use this function outside of the
452
GObject type system itself.
436
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> instance_type,
437
<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> interface_type,
438
<a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
440
Calls the <em class="parameter"><code>complete_interface_info</code></em> function from the
441
<a class="link" href="GTypePlugin.html#GTypePluginClass" title="GTypePluginClass"><span class="type">GTypePluginClass</span></a> of <em class="parameter"><code>plugin</code></em>. There should be no need to use this
442
function outside of the GObject type system itself.</p>
454
445
<div class="variablelist"><table border="0">
455
446
<col align="left" valign="top">
458
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
459
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
463
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
464
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of an instantiable type to which the interface
469
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
470
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the interface whose info is completed
474
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
475
<td>the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> to fill in
449
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
450
<td> the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
454
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
455
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of an instantiable type to which the interface
460
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
461
<td> the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the interface whose info is completed
465
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
466
<td> the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> to fill in