26
26
<a href="#gi-GIBaseInfo.description" class="shortcut">Description</a>
29
<div class="refentry" title="GIBaseInfo">
29
<div class="refentry">
30
30
<a name="gi-GIBaseInfo"></a><div class="titlepage"></div>
31
31
<div class="refnamediv"><table width="100%"><tr>
33
33
<h2><span class="refentrytitle"><a name="gi-GIBaseInfo.top_of_page"></a>GIBaseInfo</span></h2>
34
<p>GIBaseInfo — Base struct for all GTypelib structs</p>
34
<p>GIBaseInfo — Base struct for all GITypelib structs</p>
36
36
<td valign="top" align="right"></td>
37
37
</tr></table></div>
38
<div class="refsynopsisdiv" title="Synopsis">
38
<div class="refsynopsisdiv">
39
39
<a name="gi-GIBaseInfo.synopsis"></a><h2>Synopsis</h2>
40
40
<pre class="synopsis">enum <a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType">GIInfoType</a>;
41
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-info-type-to-string" title="g_info_type_to_string ()">g_info_type_to_string</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> type</code></em>);
41
42
<a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter">GIAttributeIter</a>;
42
43
typedef <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo">GIBaseInfo</a>;
43
<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-ref" title="g_base_info_ref ()">g_base_info_ref</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
44
<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-ref" title="g_base_info_ref ()">g_base_info_ref</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
44
45
<span class="returnvalue">void</span> <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()">g_base_info_unref</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
45
46
<a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="returnvalue">GIInfoType</span></a> <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-type" title="g_base_info_get_type ()">g_base_info_get_type</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
46
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-name" title="g_base_info_get_name ()">g_base_info_get_name</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
47
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-namespace" title="g_base_info_get_namespace ()">g_base_info_get_namespace</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
47
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-name" title="g_base_info_get_name ()">g_base_info_get_name</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
48
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-namespace" title="g_base_info_get_namespace ()">g_base_info_get_namespace</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
48
49
<span class="returnvalue">gboolean</span> <a class="link" href="gi-GIBaseInfo.html#g-base-info-is-deprecated" title="g_base_info_is_deprecated ()">g_base_info_is_deprecated</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
49
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-attribute" title="g_base_info_get_attribute ()">g_base_info_get_attribute</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
50
const <span class="returnvalue">gchar</span> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-attribute" title="g_base_info_get_attribute ()">g_base_info_get_attribute</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
50
51
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
51
52
<span class="returnvalue">gboolean</span> <a class="link" href="gi-GIBaseInfo.html#g-base-info-iterate-attributes" title="g_base_info_iterate_attributes ()">g_base_info_iterate_attributes</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
52
53
<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
53
54
<em class="parameter"><code><span class="type">char</span> **name</code></em>,
54
55
<em class="parameter"><code><span class="type">char</span> **value</code></em>);
55
<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-container" title="g_base_info_get_container ()">g_base_info_get_container</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
56
<a class="link" href="gi-girepository.html#GTypelib" title="GTypelib"><span class="returnvalue">GTypelib</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-typelib" title="g_base_info_get_typelib ()">g_base_info_get_typelib</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
56
<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-container" title="g_base_info_get_container ()">g_base_info_get_container</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
57
<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> * <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-typelib" title="g_base_info_get_typelib ()">g_base_info_get_typelib</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
57
58
<span class="returnvalue">gboolean</span> <a class="link" href="gi-GIBaseInfo.html#g-base-info-equal" title="g_base_info_equal ()">g_base_info_equal</a> (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info1</code></em>,
58
59
<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info2</code></em>);
61
<div class="refsect1" title="Description">
62
<div class="refsect1">
62
63
<a name="gi-GIBaseInfo.description"></a><h2>Description</h2>
64
65
GIBaseInfo is the common base struct of all other *Info structs
66
67
All other structs can be casted to a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>, for instance:
68
69
<div class="example">
69
<a name="id2826527"></a><p class="title"><b>Example 1. Casting a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> to <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a></b></p>
70
<a name="id479793"></a><p class="title"><b>Example 1. Casting a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> to <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a></b></p>
70
71
<div class="example-contents">
71
72
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
74
75
<td class="listing_lines" align="right"><pre>1
76
<td class="listing_code"><pre class="programlisting"><span class="normal"><a href="gi-GIFunctionInfo.html#GIFunctionInfo">GIFunctionInfo</a> </span><span class="symbol">*</span><span class="normal">function_info </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">...;</span>
77
<span class="normal"><a href="gi-GIBaseInfo.html#GIBaseInfo">GIBaseInfo</a> </span><span class="symbol">*</span><span class="normal">info </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gi-GIBaseInfo.html#GIBaseInfo">GIBaseInfo</a></span><span class="symbol">*)</span><span class="normal">function_info</span><span class="symbol">;</span></pre></td>
77
<td class="listing_code"><pre class="programlisting">GIFunctionInfo *function_info = ...;
78
GIBaseInfo *info = (GIBaseInfo*)function_info;</pre></td>
98
99
<td class="listing_lines" align="right"><pre>1
101
<td class="listing_code"><pre class="programlisting"><span class="normal"><a href="gi-GIBaseInfo.html#GIBaseInfo">GIBaseInfo</a> </span><span class="symbol">*</span><span class="normal">button_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gi-girepository.html#g-irepository-find-by-name">g_irepository_find_by_name</a></span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Gtk"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Button"</span><span class="symbol">);</span>
102
<span class="symbol">...</span><span class="normal"> use button_info </span><span class="symbol">...</span>
103
<span class="function"><a href="gi-GIBaseInfo.html#g-base-info-unref">g_base_info_unref</a></span><span class="symbol">(</span><span class="normal">button_info</span><span class="symbol">);</span></pre></td>
102
<td class="listing_code"><pre class="programlisting">GIBaseInfo *button_info = g_irepository_find_by_name(<span class="number">NULL</span>, <span class="number">"Gtk"</span>, <span class="number">"Button"</span>);
103
... use button_info ...
104
g_base_info_unref(button_info);</pre></td>
110
111
<p><br class="example-break">
113
<div class="refsect1" title="Details">
115
<div class="refsect1">
116
<a name="gi-gibaseinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
117
<pre class="synopsis">
119
+----<a class="link" href="gi-GIArgInfo.html" title="GIArgInfo">GIArgInfo</a>
120
+----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
121
+----<a class="link" href="gi-GIConstantInfo.html" title="GIConstantInfo">GIConstantInfo</a>
122
+----<a class="link" href="gi-GIErrorDomainInfo.html" title="GIErrorDomainInfo">GIErrorDomainInfo</a>
123
+----<a class="link" href="gi-GIFieldInfo.html" title="GIFieldInfo">GIFieldInfo</a>
124
+----<a class="link" href="gi-GIPropertyInfo.html" title="GIPropertyInfo">GIPropertyInfo</a>
125
+----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
126
+----<a class="link" href="gi-GITypeInfo.html" title="GITypeInfo">GITypeInfo</a>
132
<div class="refsect1">
114
133
<a name="gi-GIBaseInfo.details"></a><h2>Details</h2>
115
<div class="refsect2" title="enum GIInfoType">
134
<div class="refsect2">
116
135
<a name="GIInfoType"></a><h3>enum GIInfoType</h3>
117
136
<pre class="programlisting">typedef enum
163
182
<td><p><a name="GI-INFO-TYPE-STRUCT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_STRUCT</code></span></p></td>
164
<td>struct, see <a class="link" href="gi-gistructinfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
183
<td>struct, see <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
168
187
<td><p><a name="GI-INFO-TYPE-BOXED:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_BOXED</code></span></p></td>
169
<td>boxed, see <a class="link" href="gi-gistructinfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or <a class="link" href="gi-giunioninfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
188
<td>boxed, see <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
183
202
<td><p><a name="GI-INFO-TYPE-OBJECT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_OBJECT</code></span></p></td>
184
<td>object, see <a class="link" href="gi-giobjectinfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
203
<td>object, see <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
188
207
<td><p><a name="GI-INFO-TYPE-INTERFACE:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_INTERFACE</code></span></p></td>
189
<td>interface, see <a class="link" href="gi-giinterfaceinfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
208
<td>interface, see <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
193
212
<td><p><a name="GI-INFO-TYPE-CONSTANT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_CONSTANT</code></span></p></td>
194
<td>contant, see <a class="link" href="gi-giconstantinfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>
213
<td>contant, see <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>
213
232
<td><p><a name="GI-INFO-TYPE-SIGNAL:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_SIGNAL</code></span></p></td>
214
<td>signal, see <a class="link" href="gi-gisignalinfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>
233
<td>signal, see <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>
218
237
<td><p><a name="GI-INFO-TYPE-VFUNC:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_VFUNC</code></span></p></td>
219
<td>virtual function, see <a class="link" href="gi-givfuncinfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
238
<td>virtual function, see <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
223
242
<td><p><a name="GI-INFO-TYPE-PROPERTY:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_PROPERTY</code></span></p></td>
224
<td>GObject property, see <a class="link" href="gi-gipropertyinfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
243
<td>GObject property, see <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
252
<div class="refsect2" title="GIAttributeIter">
271
<div class="refsect2">
272
<a name="g-info-type-to-string"></a><h3>g_info_type_to_string ()</h3>
273
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_info_type_to_string (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> type</code></em>);</pre>
275
Obtain a string representation of <em class="parameter"><code>type</code></em>
277
<div class="variablelist"><table border="0">
278
<col align="left" valign="top">
281
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
282
<td>the info type</td>
285
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
292
<div class="refsect2">
253
293
<a name="GIAttributeIter"></a><h3>GIAttributeIter</h3>
254
294
<pre class="programlisting">typedef struct {
255
295
} GIAttributeIter;
326
365
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
327
<td> the info type of <em class="parameter"><code>info</code></em>
366
<td>the info type of <em class="parameter"><code>info</code></em>
334
<div class="refsect2" title="g_base_info_get_name ()">
373
<div class="refsect2">
335
374
<a name="g-base-info-get-name"></a><h3>g_base_info_get_name ()</h3>
336
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_name (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
375
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_name (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
338
377
Obtain the name of the <em class="parameter"><code>info</code></em>. What the name represents depends on
339
378
the <a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> of the <em class="parameter"><code>info</code></em>. For instance for <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> it is
351
390
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
352
<td> the name of <em class="parameter"><code>info</code></em> or <code class="literal">NULL</code> if it lacks a name.
391
<td>the name of <em class="parameter"><code>info</code></em> or <code class="literal">NULL</code> if it lacks a name.</td>
359
<div class="refsect2" title="g_base_info_get_namespace ()">
397
<div class="refsect2">
360
398
<a name="g-base-info-get-namespace"></a><h3>g_base_info_get_namespace ()</h3>
361
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_namespace (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
399
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_namespace (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
363
401
Obtain the namespace of <em class="parameter"><code>info</code></em>.
398
435
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
399
<td> <code class="literal">TRUE</code> if deprecated
437
<code class="literal">TRUE</code> if deprecated</td>
406
<div class="refsect2" title="g_base_info_get_attribute ()">
443
<div class="refsect2">
407
444
<a name="g-base-info-get-attribute"></a><h3>g_base_info_get_attribute ()</h3>
408
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_attribute (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
445
<pre class="programlisting">const <span class="returnvalue">gchar</span> * g_base_info_get_attribute (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
409
446
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
411
448
Retrieve an arbitrary attribute associated with this node.
422
459
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
423
<td>a freeform string naming an attribute
460
<td>a freeform string naming an attribute</td>
427
463
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
428
<td> The value of the attribute, or <code class="literal">NULL</code> if no such attribute exists
464
<td>The value of the attribute, or <code class="literal">NULL</code> if no such attribute exists</td>
435
<div class="refsect2" title="g_base_info_iterate_attributes ()">
470
<div class="refsect2">
436
471
<a name="g-base-info-iterate-attributes"></a><h3>g_base_info_iterate_attributes ()</h3>
437
472
<pre class="programlisting"><span class="returnvalue">gboolean</span> g_base_info_iterate_attributes (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
438
473
<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
469
504
<td class="listing_code"><pre class="programlisting"><span class="type">void</span>
470
<span class="function">print_attributes</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gi-GIBaseInfo.html#GIBaseInfo">GIBaseInfo</a> </span><span class="symbol">*</span><span class="normal">info</span><span class="symbol">)</span>
471
<span class="cbracket">{</span>
472
<span class="normal"> <a href="gi-GIBaseInfo.html#GIAttributeIter">GIAttributeIter</a> iter </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">;</span>
473
<span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">;</span>
474
<span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">;</span>
475
<span class="normal"> </span><span class="keyword">while</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="gi-GIBaseInfo.html#g-base-info-iterate-attributes">g_base_info_iterate_attributes</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">info</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">iter</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">name</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">value</span><span class="symbol">))</span>
476
<span class="normal"> </span><span class="cbracket">{</span>
477
<span class="normal"> </span><span class="function">g_print</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"attribute name: %s value: %s"</span><span class="symbol">,</span><span class="normal"> name</span><span class="symbol">,</span><span class="normal"> value</span><span class="symbol">);</span>
478
<span class="normal"> </span><span class="cbracket">}</span>
479
<span class="cbracket">}</span></pre></td>
505
print_attributes (GIBaseInfo *info)
507
GIAttributeIter iter = { <span class="number">0</span>, };
508
<span class="type">char</span> *name;
509
<span class="type">char</span> *value;
510
<span class="keyword">while</span> (g_base_info_iterate_attributes (info, &iter, &name, &value))
512
g_print (<span class="number">"attribute name: </span><span class="symbol">%s</span><span class="number"> value: </span><span class="symbol">%s</span><span class="number">"</span>, name, value);
497
532
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
498
<td>a <a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> structure, must be initialized; see below
533
<td>a <a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> structure, must be initialized; see below</td>
536
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
537
<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
502
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
503
<td> Returned name, must not be freed. <acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
506
541
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
507
<td> Returned name, must not be freed. <acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
542
<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
510
546
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
511
<td> <code class="literal">TRUE</code> if there are more attributes
548
<code class="literal">TRUE</code> if there are more attributes</td>
518
<div class="refsect2" title="g_base_info_get_container ()">
554
<div class="refsect2">
519
555
<a name="g-base-info-get-container"></a><h3>g_base_info_get_container ()</h3>
520
<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * g_base_info_get_container (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
556
<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> * g_base_info_get_container (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
522
558
Obtain the container of the <em class="parameter"><code>info</code></em>. The container is the parent
523
559
GIBaseInfo. For instance, the parent of a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> is an
524
<a class="link" href="gi-giobjectinfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or <a class="link" href="gi-giinterfaceinfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
560
<a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
526
562
<div class="variablelist"><table border="0">
527
563
<col align="left" valign="top">
535
571
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
536
<td> the container. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
572
<td>the container. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
542
<div class="refsect2" title="g_base_info_get_typelib ()">
579
<div class="refsect2">
543
580
<a name="g-base-info-get-typelib"></a><h3>g_base_info_get_typelib ()</h3>
544
<pre class="programlisting"><a class="link" href="gi-girepository.html#GTypelib" title="GTypelib"><span class="returnvalue">GTypelib</span></a> * g_base_info_get_typelib (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
581
<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> * g_base_info_get_typelib (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
546
583
Obtain the typelib this <em class="parameter"><code>info</code></em> belongs to
557
594
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
558
<td> the typelib.. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
595
<td>the typelib. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
564
<div class="refsect2" title="g_base_info_equal ()">
602
<div class="refsect2">
565
603
<a name="g-base-info-equal"></a><h3>g_base_info_equal ()</h3>
566
604
<pre class="programlisting"><span class="returnvalue">gboolean</span> g_base_info_equal (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info1</code></em>,
567
605
<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info2</code></em>);</pre>