1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GIStructInfo: GObject Introspection Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="GObject Introspection Reference Manual">
8 <link rel="up" href="ch01.html" title="GIRepository">
9 <link rel="prev" href="gi-GIEnumInfo.html" title="GIEnumInfo">
10 <link rel="next" href="gi-GIUnionInfo.html" title="GIUnionInfo">
11 <meta name="generator" content="GTK-Doc V1.21.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18 <a href="#gi-GIStructInfo.description" class="shortcut">Description</a></span>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="gi-GIEnumInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="gi-GIUnionInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 <div class="refentry">
26 <a name="gi-GIStructInfo"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
29 <h2><span class="refentrytitle"><a name="gi-GIStructInfo.top_of_page"></a>GIStructInfo</span></h2>
30 <p>GIStructInfo — Struct representing a C structure</p>
32 <td class="gallery_image" valign="top" align="right"></td>
34 <div class="refsect1">
35 <a name="gi-GIStructInfo.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table width="100%" border="0">
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
43 <td class="define_keyword">#define</td>
44 <td class="function_name">
45 <a class="link" href="gi-GIStructInfo.html#GI-IS-STRUCT-INFO:CAPS" title="GI_IS_STRUCT_INFO()">GI_IS_STRUCT_INFO</a><span class="c_punctuation">()</span>
49 <td class="function_type">
50 <span class="returnvalue">gsize</span>
52 <td class="function_name">
53 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-alignment" title="g_struct_info_get_alignment ()">g_struct_info_get_alignment</a> <span class="c_punctuation">()</span>
57 <td class="function_type">
58 <span class="returnvalue">gsize</span>
60 <td class="function_name">
61 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-size" title="g_struct_info_get_size ()">g_struct_info_get_size</a> <span class="c_punctuation">()</span>
65 <td class="function_type">
66 <span class="returnvalue">gboolean</span>
68 <td class="function_name">
69 <a class="link" href="gi-GIStructInfo.html#g-struct-info-is-gtype-struct" title="g_struct_info_is_gtype_struct ()">g_struct_info_is_gtype_struct</a> <span class="c_punctuation">()</span>
73 <td class="function_type">
74 <span class="returnvalue">gboolean</span>
76 <td class="function_name">
77 <a class="link" href="gi-GIStructInfo.html#g-struct-info-is-foreign" title="g_struct_info_is_foreign ()">g_struct_info_is_foreign</a> <span class="c_punctuation">()</span>
81 <td class="function_type">
82 <span class="returnvalue">gint</span>
84 <td class="function_name">
85 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-n-fields" title="g_struct_info_get_n_fields ()">g_struct_info_get_n_fields</a> <span class="c_punctuation">()</span>
89 <td class="function_type">
90 <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *
92 <td class="function_name">
93 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-field" title="g_struct_info_get_field ()">g_struct_info_get_field</a> <span class="c_punctuation">()</span>
97 <td class="function_type">
98 <span class="returnvalue">gint</span>
100 <td class="function_name">
101 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-n-methods" title="g_struct_info_get_n_methods ()">g_struct_info_get_n_methods</a> <span class="c_punctuation">()</span>
105 <td class="function_type">
106 <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
108 <td class="function_name">
109 <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-method" title="g_struct_info_get_method ()">g_struct_info_get_method</a> <span class="c_punctuation">()</span>
113 <td class="function_type">
114 <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
116 <td class="function_name">
117 <a class="link" href="gi-GIStructInfo.html#g-struct-info-find-method" title="g_struct_info_find_method ()">g_struct_info_find_method</a> <span class="c_punctuation">()</span>
123 <div class="refsect1">
124 <a name="gi-GIStructInfo.other"></a><h2>Types and Values</h2>
125 <div class="informaltable"><table width="100%" border="0">
127 <col width="150px" class="name">
128 <col class="description">
131 <td class="typedef_keyword">typedef</td>
132 <td class="function_name"><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo">GIStructInfo</a></td>
136 <div class="refsect1">
137 <a name="gi-GIStructInfo.description"></a><h2>Description</h2>
138 <p>GIStructInfo represents a generic C structure type.</p>
139 <p>A structure has methods and fields.</p>
140 <div class="refsect1">
141 <a name="gi-giobjectinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
142 <pre class="synopsis">
143 <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
144 +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
149 <div class="refsect1">
150 <a name="gi-GIStructInfo.functions_details"></a><h2>Functions</h2>
151 <div class="refsect2">
152 <a name="GI-IS-STRUCT-INFO:CAPS"></a><h3>GI_IS_STRUCT_INFO()</h3>
153 <pre class="programlisting">#define GI_IS_STRUCT_INFO(info)</pre>
154 <p>Checks if <em class="parameter"><code>info</code></em>
155 is a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>.</p>
156 <div class="refsect3">
157 <a name="id-1.4.2.13.6.2.5"></a><h4>Parameters</h4>
158 <div class="informaltable"><table width="100%" border="0">
160 <col width="150px" class="parameters_name">
161 <col class="parameters_description">
162 <col width="200px" class="parameters_annotations">
165 <td class="parameter_name"><p>info</p></td>
166 <td class="parameter_description"><p>an info structure</p></td>
167 <td class="parameter_annotations"> </td>
173 <div class="refsect2">
174 <a name="g-struct-info-get-alignment"></a><h3>g_struct_info_get_alignment ()</h3>
175 <pre class="programlisting"><span class="returnvalue">gsize</span>
176 g_struct_info_get_alignment (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
177 <p>Obtain the required alignment of the structure.</p>
178 <div class="refsect3">
179 <a name="id-1.4.2.13.6.3.5"></a><h4>Parameters</h4>
180 <div class="informaltable"><table width="100%" border="0">
182 <col width="150px" class="parameters_name">
183 <col class="parameters_description">
184 <col width="200px" class="parameters_annotations">
187 <td class="parameter_name"><p>info</p></td>
188 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
189 <td class="parameter_annotations"> </td>
193 <div class="refsect3">
194 <a name="id-1.4.2.13.6.3.6"></a><h4>Returns</h4>
195 <p> required alignment in bytes</p>
200 <div class="refsect2">
201 <a name="g-struct-info-get-size"></a><h3>g_struct_info_get_size ()</h3>
202 <pre class="programlisting"><span class="returnvalue">gsize</span>
203 g_struct_info_get_size (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
204 <p>Obtain the total size of the structure.</p>
205 <div class="refsect3">
206 <a name="id-1.4.2.13.6.4.5"></a><h4>Parameters</h4>
207 <div class="informaltable"><table width="100%" border="0">
209 <col width="150px" class="parameters_name">
210 <col class="parameters_description">
211 <col width="200px" class="parameters_annotations">
214 <td class="parameter_name"><p>info</p></td>
215 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
216 <td class="parameter_annotations"> </td>
220 <div class="refsect3">
221 <a name="id-1.4.2.13.6.4.6"></a><h4>Returns</h4>
222 <p> size of the structure in bytes</p>
227 <div class="refsect2">
228 <a name="g-struct-info-is-gtype-struct"></a><h3>g_struct_info_is_gtype_struct ()</h3>
229 <pre class="programlisting"><span class="returnvalue">gboolean</span>
230 g_struct_info_is_gtype_struct (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
231 <p>Return true if this structure represents the "class structure" for some
232 <span class="type">GObject</span> or <a href="/home/rico/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html"><span class="type">GInterface</span></a>. This function is mainly useful to hide this kind of structure
233 from generated public APIs.</p>
234 <div class="refsect3">
235 <a name="id-1.4.2.13.6.5.5"></a><h4>Parameters</h4>
236 <div class="informaltable"><table width="100%" border="0">
238 <col width="150px" class="parameters_name">
239 <col class="parameters_description">
240 <col width="200px" class="parameters_annotations">
243 <td class="parameter_name"><p>info</p></td>
244 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
245 <td class="parameter_annotations"> </td>
249 <div class="refsect3">
250 <a name="id-1.4.2.13.6.5.6"></a><h4>Returns</h4>
251 <p> <code class="literal">TRUE</code> if this is a class struct, <code class="literal">FALSE</code> otherwise</p>
256 <div class="refsect2">
257 <a name="g-struct-info-is-foreign"></a><h3>g_struct_info_is_foreign ()</h3>
258 <pre class="programlisting"><span class="returnvalue">gboolean</span>
259 g_struct_info_is_foreign (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
261 <div class="refsect3">
262 <a name="id-1.4.2.13.6.6.5"></a><h4>Parameters</h4>
263 <div class="informaltable"><table width="100%" border="0">
265 <col width="150px" class="parameters_name">
266 <col class="parameters_description">
267 <col width="200px" class="parameters_annotations">
270 <td class="parameter_name"><p>info</p></td>
271 <td class="parameter_description"><p>TODO</p></td>
272 <td class="parameter_annotations"> </td>
276 <div class="refsect3">
277 <a name="id-1.4.2.13.6.6.6"></a><h4>Returns</h4>
283 <div class="refsect2">
284 <a name="g-struct-info-get-n-fields"></a><h3>g_struct_info_get_n_fields ()</h3>
285 <pre class="programlisting"><span class="returnvalue">gint</span>
286 g_struct_info_get_n_fields (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
287 <p>Obtain the number of fields this structure has.</p>
288 <div class="refsect3">
289 <a name="id-1.4.2.13.6.7.5"></a><h4>Parameters</h4>
290 <div class="informaltable"><table width="100%" border="0">
292 <col width="150px" class="parameters_name">
293 <col class="parameters_description">
294 <col width="200px" class="parameters_annotations">
297 <td class="parameter_name"><p>info</p></td>
298 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
299 <td class="parameter_annotations"> </td>
303 <div class="refsect3">
304 <a name="id-1.4.2.13.6.7.6"></a><h4>Returns</h4>
305 <p> number of fields</p>
310 <div class="refsect2">
311 <a name="g-struct-info-get-field"></a><h3>g_struct_info_get_field ()</h3>
312 <pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *
313 g_struct_info_get_field (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
314 <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
315 <p>Obtain the type information for field with specified index.</p>
316 <div class="refsect3">
317 <a name="id-1.4.2.13.6.8.5"></a><h4>Parameters</h4>
318 <div class="informaltable"><table width="100%" border="0">
320 <col width="150px" class="parameters_name">
321 <col class="parameters_description">
322 <col width="200px" class="parameters_annotations">
326 <td class="parameter_name"><p>info</p></td>
327 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
328 <td class="parameter_annotations"> </td>
331 <td class="parameter_name"><p>n</p></td>
332 <td class="parameter_description"><p>a field index</p></td>
333 <td class="parameter_annotations"> </td>
338 <div class="refsect3">
339 <a name="id-1.4.2.13.6.8.6"></a><h4>Returns</h4>
340 <p> the <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
342 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
346 <div class="refsect2">
347 <a name="g-struct-info-get-n-methods"></a><h3>g_struct_info_get_n_methods ()</h3>
348 <pre class="programlisting"><span class="returnvalue">gint</span>
349 g_struct_info_get_n_methods (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
350 <p>Obtain the number of methods this structure has.</p>
351 <div class="refsect3">
352 <a name="id-1.4.2.13.6.9.5"></a><h4>Parameters</h4>
353 <div class="informaltable"><table width="100%" border="0">
355 <col width="150px" class="parameters_name">
356 <col class="parameters_description">
357 <col width="200px" class="parameters_annotations">
360 <td class="parameter_name"><p>info</p></td>
361 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
362 <td class="parameter_annotations"> </td>
366 <div class="refsect3">
367 <a name="id-1.4.2.13.6.9.6"></a><h4>Returns</h4>
368 <p> number of methods</p>
373 <div class="refsect2">
374 <a name="g-struct-info-get-method"></a><h3>g_struct_info_get_method ()</h3>
375 <pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
376 g_struct_info_get_method (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
377 <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
378 <p>Obtain the type information for method with specified index.</p>
379 <div class="refsect3">
380 <a name="id-1.4.2.13.6.10.5"></a><h4>Parameters</h4>
381 <div class="informaltable"><table width="100%" border="0">
383 <col width="150px" class="parameters_name">
384 <col class="parameters_description">
385 <col width="200px" class="parameters_annotations">
389 <td class="parameter_name"><p>info</p></td>
390 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
391 <td class="parameter_annotations"> </td>
394 <td class="parameter_name"><p>n</p></td>
395 <td class="parameter_description"><p>a method index</p></td>
396 <td class="parameter_annotations"> </td>
401 <div class="refsect3">
402 <a name="id-1.4.2.13.6.10.6"></a><h4>Returns</h4>
403 <p> the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
405 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
409 <div class="refsect2">
410 <a name="g-struct-info-find-method"></a><h3>g_struct_info_find_method ()</h3>
411 <pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
412 g_struct_info_find_method (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
413 <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
414 <p>Obtain the type information for method named <em class="parameter"><code>name</code></em>
416 <div class="refsect3">
417 <a name="id-1.4.2.13.6.11.5"></a><h4>Parameters</h4>
418 <div class="informaltable"><table width="100%" border="0">
420 <col width="150px" class="parameters_name">
421 <col class="parameters_description">
422 <col width="200px" class="parameters_annotations">
426 <td class="parameter_name"><p>info</p></td>
427 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
428 <td class="parameter_annotations"> </td>
431 <td class="parameter_name"><p>name</p></td>
432 <td class="parameter_description"><p>a method name</p></td>
433 <td class="parameter_annotations"> </td>
438 <div class="refsect3">
439 <a name="id-1.4.2.13.6.11.6"></a><h4>Returns</h4>
440 <p> the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
442 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
446 <div class="refsect1">
447 <a name="gi-GIStructInfo.other_details"></a><h2>Types and Values</h2>
448 <div class="refsect2">
449 <a name="GIStructInfo"></a><h3>GIStructInfo</h3>
450 <pre class="programlisting">typedef GIBaseInfo GIStructInfo;
452 <p>Represents a struct.</p>
458 Generated by GTK-Doc V1.21.1</div>