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.79.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.25.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 class="informaltable" 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 class="informaltable" 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="GI-IS-STRUCT-INFO.parameters"></a><h4>Parameters</h4>
158 <div class="informaltable"><table class="informaltable" 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="g-struct-info-get-alignment.parameters"></a><h4>Parameters</h4>
180 <div class="informaltable"><table class="informaltable" 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="g-struct-info-get-alignment.returns"></a><h4>Returns</h4>
195 <p> required alignment in bytes</p>
199 <div class="refsect2">
200 <a name="g-struct-info-get-size"></a><h3>g_struct_info_get_size ()</h3>
201 <pre class="programlisting"><span class="returnvalue">gsize</span>
202 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>
203 <p>Obtain the total size of the structure.</p>
204 <div class="refsect3">
205 <a name="g-struct-info-get-size.parameters"></a><h4>Parameters</h4>
206 <div class="informaltable"><table class="informaltable" width="100%" border="0">
208 <col width="150px" class="parameters_name">
209 <col class="parameters_description">
210 <col width="200px" class="parameters_annotations">
213 <td class="parameter_name"><p>info</p></td>
214 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
215 <td class="parameter_annotations"> </td>
219 <div class="refsect3">
220 <a name="g-struct-info-get-size.returns"></a><h4>Returns</h4>
221 <p> size of the structure in bytes</p>
225 <div class="refsect2">
226 <a name="g-struct-info-is-gtype-struct"></a><h3>g_struct_info_is_gtype_struct ()</h3>
227 <pre class="programlisting"><span class="returnvalue">gboolean</span>
228 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>
229 <p>Return true if this structure represents the "class structure" for some
230 <span class="type">GObject</span> or <a href="/home/fmuellner/opt/gnome/share/gtk-doc/html/gobject/GTypeModule.html"><span class="type">GInterface</span></a>. This function is mainly useful to hide this kind of structure
231 from generated public APIs.</p>
232 <div class="refsect3">
233 <a name="g-struct-info-is-gtype-struct.parameters"></a><h4>Parameters</h4>
234 <div class="informaltable"><table class="informaltable" width="100%" border="0">
236 <col width="150px" class="parameters_name">
237 <col class="parameters_description">
238 <col width="200px" class="parameters_annotations">
241 <td class="parameter_name"><p>info</p></td>
242 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
243 <td class="parameter_annotations"> </td>
247 <div class="refsect3">
248 <a name="g-struct-info-is-gtype-struct.returns"></a><h4>Returns</h4>
249 <p> <code class="literal">TRUE</code> if this is a class struct, <code class="literal">FALSE</code> otherwise</p>
253 <div class="refsect2">
254 <a name="g-struct-info-is-foreign"></a><h3>g_struct_info_is_foreign ()</h3>
255 <pre class="programlisting"><span class="returnvalue">gboolean</span>
256 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>
258 <div class="refsect3">
259 <a name="g-struct-info-is-foreign.parameters"></a><h4>Parameters</h4>
260 <div class="informaltable"><table class="informaltable" width="100%" border="0">
262 <col width="150px" class="parameters_name">
263 <col class="parameters_description">
264 <col width="200px" class="parameters_annotations">
267 <td class="parameter_name"><p>info</p></td>
268 <td class="parameter_description"><p>TODO</p></td>
269 <td class="parameter_annotations"> </td>
273 <div class="refsect3">
274 <a name="g-struct-info-is-foreign.returns"></a><h4>Returns</h4>
279 <div class="refsect2">
280 <a name="g-struct-info-get-n-fields"></a><h3>g_struct_info_get_n_fields ()</h3>
281 <pre class="programlisting"><span class="returnvalue">gint</span>
282 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>
283 <p>Obtain the number of fields this structure has.</p>
284 <div class="refsect3">
285 <a name="g-struct-info-get-n-fields.parameters"></a><h4>Parameters</h4>
286 <div class="informaltable"><table class="informaltable" width="100%" border="0">
288 <col width="150px" class="parameters_name">
289 <col class="parameters_description">
290 <col width="200px" class="parameters_annotations">
293 <td class="parameter_name"><p>info</p></td>
294 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
295 <td class="parameter_annotations"> </td>
299 <div class="refsect3">
300 <a name="g-struct-info-get-n-fields.returns"></a><h4>Returns</h4>
301 <p> number of fields</p>
305 <div class="refsect2">
306 <a name="g-struct-info-get-field"></a><h3>g_struct_info_get_field ()</h3>
307 <pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *
308 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>,
309 <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
310 <p>Obtain the type information for field with specified index.</p>
311 <div class="refsect3">
312 <a name="g-struct-info-get-field.parameters"></a><h4>Parameters</h4>
313 <div class="informaltable"><table class="informaltable" width="100%" border="0">
315 <col width="150px" class="parameters_name">
316 <col class="parameters_description">
317 <col width="200px" class="parameters_annotations">
321 <td class="parameter_name"><p>info</p></td>
322 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
323 <td class="parameter_annotations"> </td>
326 <td class="parameter_name"><p>n</p></td>
327 <td class="parameter_description"><p>a field index</p></td>
328 <td class="parameter_annotations"> </td>
333 <div class="refsect3">
334 <a name="g-struct-info-get-field.returns"></a><h4>Returns</h4>
335 <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>
337 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
341 <div class="refsect2">
342 <a name="g-struct-info-get-n-methods"></a><h3>g_struct_info_get_n_methods ()</h3>
343 <pre class="programlisting"><span class="returnvalue">gint</span>
344 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>
345 <p>Obtain the number of methods this structure has.</p>
346 <div class="refsect3">
347 <a name="g-struct-info-get-n-methods.parameters"></a><h4>Parameters</h4>
348 <div class="informaltable"><table class="informaltable" width="100%" border="0">
350 <col width="150px" class="parameters_name">
351 <col class="parameters_description">
352 <col width="200px" class="parameters_annotations">
355 <td class="parameter_name"><p>info</p></td>
356 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
357 <td class="parameter_annotations"> </td>
361 <div class="refsect3">
362 <a name="g-struct-info-get-n-methods.returns"></a><h4>Returns</h4>
363 <p> number of methods</p>
367 <div class="refsect2">
368 <a name="g-struct-info-get-method"></a><h3>g_struct_info_get_method ()</h3>
369 <pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
370 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>,
371 <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
372 <p>Obtain the type information for method with specified index.</p>
373 <div class="refsect3">
374 <a name="g-struct-info-get-method.parameters"></a><h4>Parameters</h4>
375 <div class="informaltable"><table class="informaltable" width="100%" border="0">
377 <col width="150px" class="parameters_name">
378 <col class="parameters_description">
379 <col width="200px" class="parameters_annotations">
383 <td class="parameter_name"><p>info</p></td>
384 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
385 <td class="parameter_annotations"> </td>
388 <td class="parameter_name"><p>n</p></td>
389 <td class="parameter_description"><p>a method index</p></td>
390 <td class="parameter_annotations"> </td>
395 <div class="refsect3">
396 <a name="g-struct-info-get-method.returns"></a><h4>Returns</h4>
397 <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>
399 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
403 <div class="refsect2">
404 <a name="g-struct-info-find-method"></a><h3>g_struct_info_find_method ()</h3>
405 <pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *
406 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>,
407 <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
408 <p>Obtain the type information for method named <em class="parameter"><code>name</code></em>
410 <div class="refsect3">
411 <a name="g-struct-info-find-method.parameters"></a><h4>Parameters</h4>
412 <div class="informaltable"><table class="informaltable" width="100%" border="0">
414 <col width="150px" class="parameters_name">
415 <col class="parameters_description">
416 <col width="200px" class="parameters_annotations">
420 <td class="parameter_name"><p>info</p></td>
421 <td class="parameter_description"><p>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a></p></td>
422 <td class="parameter_annotations"> </td>
425 <td class="parameter_name"><p>name</p></td>
426 <td class="parameter_description"><p>a method name</p></td>
427 <td class="parameter_annotations"> </td>
432 <div class="refsect3">
433 <a name="g-struct-info-find-method.returns"></a><h4>Returns</h4>
434 <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>
436 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
440 <div class="refsect1">
441 <a name="gi-GIStructInfo.other_details"></a><h2>Types and Values</h2>
442 <div class="refsect2">
443 <a name="GIStructInfo"></a><h3>GIStructInfo</h3>
444 <pre class="programlisting">typedef GIBaseInfo GIStructInfo;
446 <p>Represents a struct.</p>
451 <hr>Generated by GTK-Doc V1.25.1</div>