6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
8
8
<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
9
<link rel="prev" href="gi-gisignalinfo.html" title="gisignalinfo">
10
<link rel="next" href="gi-giregisteredtypeinfo.html" title="giregisteredtypeinfo">
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
9
<link rel="prev" href="gi-GISignalInfo.html" title="GISignalInfo">
10
<link rel="next" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">
11
<meta name="generator" content="GTK-Doc V1.16.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
16
<tr valign="middle">
17
<td><a accesskey="p" href="gi-gisignalinfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
<td><a accesskey="p" href="gi-GISignalInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
18
<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
20
<th width="100%" align="center">GObject Introspection Reference Manual</th>
21
<td><a accesskey="n" href="gi-giregisteredtypeinfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21
<td><a accesskey="n" href="gi-GIRegisteredTypeInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
23
<tr><td colspan="5" class="shortcuts">
24
24
<a href="#gi-GIEnumInfo.synopsis" class="shortcut">Top</a>
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-GIEnumInfo.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">typedef <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo">GIEnumInfo</a>;
40
<pre class="synopsis">#define <a class="link" href="gi-GIEnumInfo.html#GI-IS-ENUM-INFO:CAPS" title="GI_IS_ENUM_INFO()">GI_IS_ENUM_INFO</a> (info)
41
#define <a class="link" href="gi-GIEnumInfo.html#GI-IS-VALUE-INFO:CAPS" title="GI_IS_VALUE_INFO()">GI_IS_VALUE_INFO</a> (info)
42
typedef <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo">GIEnumInfo</a>;
41
43
typedef <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo">GIValueInfo</a>;
42
44
<span class="returnvalue">gint</span> <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-n-values" title="g_enum_info_get_n_values ()">g_enum_info_get_n_values</a> (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);
43
45
<a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="returnvalue">GIValueInfo</span></a> * <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-value" title="g_enum_info_get_value ()">g_enum_info_get_value</a> (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
44
46
<em class="parameter"><code><span class="type">gint</span> n</code></em>);
45
47
<a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a> <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-storage-type" title="g_enum_info_get_storage_type ()">g_enum_info_get_storage_type</a> (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);
46
<span class="returnvalue">glong</span> <a class="link" href="gi-GIEnumInfo.html#g-value-info-get-value" title="g_value_info_get_value ()">g_value_info_get_value</a> (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);
48
<span class="returnvalue">gint64</span> <a class="link" href="gi-GIEnumInfo.html#g-value-info-get-value" title="g_value_info_get_value ()">g_value_info_get_value</a> (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);
49
<div class="refsect1" title="Description">
51
<div class="refsect1">
50
52
<a name="gi-GIEnumInfo.description"></a><h2>Description</h2>
52
54
A GIEnumInfo represents an enumeration and a GIValueInfo struct represents a value
53
55
of an enumeration. The GIEnumInfo contains a set of values and a type
54
56
The GIValueInfo is fetched by calling <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-value" title="g_enum_info_get_value ()"><code class="function">g_enum_info_get_value()</code></a> on a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>.
57
<div class="refsect1" title="Details">
60
<div class="refsect1">
61
<a name="gi-gienuminfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
62
<pre class="synopsis">
63
<a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
64
+----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
71
<div class="refsect1">
58
72
<a name="gi-GIEnumInfo.details"></a><h2>Details</h2>
59
<div class="refsect2" title="GIEnumInfo">
73
<div class="refsect2">
74
<a name="GI-IS-ENUM-INFO:CAPS"></a><h3>GI_IS_ENUM_INFO()</h3>
75
<pre class="programlisting">#define GI_IS_ENUM_INFO(info)</pre>
80
<div class="refsect2">
81
<a name="GI-IS-VALUE-INFO:CAPS"></a><h3>GI_IS_VALUE_INFO()</h3>
82
<pre class="programlisting">#define GI_IS_VALUE_INFO(info)</pre>
87
<div class="refsect2">
60
88
<a name="GIEnumInfo"></a><h3>GIEnumInfo</h3>
61
89
<pre class="programlisting">typedef GIBaseInfo GIEnumInfo;
92
120
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
93
<td> the number of enumeration values
121
<td>the number of enumeration values</td>
100
<div class="refsect2" title="g_enum_info_get_value ()">
127
<div class="refsect2">
101
128
<a name="g-enum-info-get-value"></a><h3>g_enum_info_get_value ()</h3>
102
129
<pre class="programlisting"><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="returnvalue">GIValueInfo</span></a> * g_enum_info_get_value (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
103
130
<em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
116
143
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
117
<td>index of value to fetch
144
<td>index of value to fetch</td>
121
147
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
122
<td> the enumeration value or <code class="literal">NULL</code> if type tag is wrong,
123
free the struct 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> when done.. <acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>. </td>
148
<td>the enumeration value or <code class="literal">NULL</code> if type tag is wrong,
149
free the struct 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> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
129
<div class="refsect2" title="g_enum_info_get_storage_type ()">
156
<div class="refsect2">
130
157
<a name="g-enum-info-get-storage-type"></a><h3>g_enum_info_get_storage_type ()</h3>
131
158
<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a> g_enum_info_get_storage_type (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);</pre>
150
177
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
151
<td> the storage type for the enumeration
178
<td>the storage type for the enumeration</td>
158
<div class="refsect2" title="g_value_info_get_value ()">
184
<div class="refsect2">
159
185
<a name="g-value-info-get-value"></a><h3>g_value_info_get_value ()</h3>
160
<pre class="programlisting"><span class="returnvalue">glong</span> g_value_info_get_value (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);</pre>
186
<pre class="programlisting"><span class="returnvalue">gint64</span> g_value_info_get_value (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);</pre>
162
188
Obtain the enumeration value of the <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a>.
173
199
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
174
<td> the enumeration value
200
<td>the enumeration value. This will always be representable
201
as a 32-bit signed or unsigned value. The use of gint64 as the
202
return type is to allow both.</td>