Imported Upstream version 1.49.1
[platform/upstream/gobject-introspection.git] / docs / reference / html / gi-GIConstantInfo.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GIConstantInfo: 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-GIArgInfo.html" title="GIArgInfo">
10 <link rel="next" href="gi-GIFieldInfo.html" title="GIFieldInfo">
11 <meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
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-GIConstantInfo.description" class="shortcut">Description</a></span>
19 </td>
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-GIArgInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="gi-GIFieldInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="gi-GIConstantInfo"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="gi-GIConstantInfo.top_of_page"></a>GIConstantInfo</span></h2>
30 <p>GIConstantInfo — Struct representing a constant</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="gi-GIConstantInfo.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="define_keyword">#define</td>
44 <td class="function_name">
45 <a class="link" href="gi-GIConstantInfo.html#GI-IS-CONSTANT-INFO:CAPS" title="GI_IS_CONSTANT_INFO()">GI_IS_CONSTANT_INFO</a><span class="c_punctuation">()</span>
46 </td>
47 </tr>
48 <tr>
49 <td class="function_type">
50 <span class="returnvalue">void</span>
51 </td>
52 <td class="function_name">
53 <a class="link" href="gi-GIConstantInfo.html#g-constant-info-free-value" title="g_constant_info_free_value ()">g_constant_info_free_value</a> <span class="c_punctuation">()</span>
54 </td>
55 </tr>
56 <tr>
57 <td class="function_type">
58 <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *
59 </td>
60 <td class="function_name">
61 <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-type" title="g_constant_info_get_type ()">g_constant_info_get_type</a> <span class="c_punctuation">()</span>
62 </td>
63 </tr>
64 <tr>
65 <td class="function_type">
66 <span class="returnvalue">gint</span>
67 </td>
68 <td class="function_name">
69 <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-value" title="g_constant_info_get_value ()">g_constant_info_get_value</a> <span class="c_punctuation">()</span>
70 </td>
71 </tr>
72 </tbody>
73 </table></div>
74 </div>
75 <div class="refsect1">
76 <a name="gi-GIConstantInfo.other"></a><h2>Types and Values</h2>
77 <div class="informaltable"><table class="informaltable" width="100%" border="0">
78 <colgroup>
79 <col width="150px" class="name">
80 <col class="description">
81 </colgroup>
82 <tbody><tr>
83 <td class="typedef_keyword">typedef</td>
84 <td class="function_name"><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo">GIConstantInfo</a></td>
85 </tr></tbody>
86 </table></div>
87 </div>
88 <div class="refsect1">
89 <a name="gi-GIConstantInfo.description"></a><h2>Description</h2>
90 <p>GIConstantInfo represents a constant. A constant has a type associated
91 which can be obtained by calling <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-type" title="g_constant_info_get_type ()"><code class="function">g_constant_info_get_type()</code></a> and a value,
92 which can be obtained by calling <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-value" title="g_constant_info_get_value ()"><code class="function">g_constant_info_get_value()</code></a>.</p>
93 <div class="refsect1">
94 <a name="gi-giconstantinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
95 <pre class="synopsis">
96   <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
97    +----GIConstantInfo
98 </pre>
99 </div>
100 </div>
101 <div class="refsect1">
102 <a name="gi-GIConstantInfo.functions_details"></a><h2>Functions</h2>
103 <div class="refsect2">
104 <a name="GI-IS-CONSTANT-INFO:CAPS"></a><h3>GI_IS_CONSTANT_INFO()</h3>
105 <pre class="programlisting">#define             GI_IS_CONSTANT_INFO(info)</pre>
106 <p>Checks if <em class="parameter"><code>info</code></em>
107  is a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>.</p>
108 <div class="refsect3">
109 <a name="GI-IS-CONSTANT-INFO.parameters"></a><h4>Parameters</h4>
110 <div class="informaltable"><table class="informaltable" width="100%" border="0">
111 <colgroup>
112 <col width="150px" class="parameters_name">
113 <col class="parameters_description">
114 <col width="200px" class="parameters_annotations">
115 </colgroup>
116 <tbody><tr>
117 <td class="parameter_name"><p>info</p></td>
118 <td class="parameter_description"><p>an info structure</p></td>
119 <td class="parameter_annotations"> </td>
120 </tr></tbody>
121 </table></div>
122 </div>
123 </div>
124 <hr>
125 <div class="refsect2">
126 <a name="g-constant-info-free-value"></a><h3>g_constant_info_free_value ()</h3>
127 <pre class="programlisting"><span class="returnvalue">void</span>
128 g_constant_info_free_value (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>,
129                             <em class="parameter"><code><a class="link" href="gi-common-types.html#GIArgument" title="GIArgument"><span class="type">GIArgument</span></a> *value</code></em>);</pre>
130 <p>Free the value returned from <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-value" title="g_constant_info_get_value ()"><code class="function">g_constant_info_get_value()</code></a>.</p>
131 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
132 <div class="refsect3">
133 <a name="g-constant-info-free-value.parameters"></a><h4>Parameters</h4>
134 <div class="informaltable"><table class="informaltable" width="100%" border="0">
135 <colgroup>
136 <col width="150px" class="parameters_name">
137 <col class="parameters_description">
138 <col width="200px" class="parameters_annotations">
139 </colgroup>
140 <tbody>
141 <tr>
142 <td class="parameter_name"><p>info</p></td>
143 <td class="parameter_description"><p>a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a></p></td>
144 <td class="parameter_annotations"> </td>
145 </tr>
146 <tr>
147 <td class="parameter_name"><p>value</p></td>
148 <td class="parameter_description"><p>the argument</p></td>
149 <td class="parameter_annotations"> </td>
150 </tr>
151 </tbody>
152 </table></div>
153 </div>
154 <p class="since">Since: <a class="link" href="api-index-1-30-1.html#api-index-1.30.1">1.30.1</a></p>
155 </div>
156 <hr>
157 <div class="refsect2">
158 <a name="g-constant-info-get-type"></a><h3>g_constant_info_get_type ()</h3>
159 <pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *
160 g_constant_info_get_type (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>);</pre>
161 <p>Obtain the type of the constant as a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.</p>
162 <div class="refsect3">
163 <a name="g-constant-info-get-type.parameters"></a><h4>Parameters</h4>
164 <div class="informaltable"><table class="informaltable" width="100%" border="0">
165 <colgroup>
166 <col width="150px" class="parameters_name">
167 <col class="parameters_description">
168 <col width="200px" class="parameters_annotations">
169 </colgroup>
170 <tbody><tr>
171 <td class="parameter_name"><p>info</p></td>
172 <td class="parameter_description"><p>a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a></p></td>
173 <td class="parameter_annotations"> </td>
174 </tr></tbody>
175 </table></div>
176 </div>
177 <div class="refsect3">
178 <a name="g-constant-info-get-type.returns"></a><h4>Returns</h4>
179 <p> the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>. Free the struct by calling
180 <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. </p>
181 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
182 </div>
183 </div>
184 <hr>
185 <div class="refsect2">
186 <a name="g-constant-info-get-value"></a><h3>g_constant_info_get_value ()</h3>
187 <pre class="programlisting"><span class="returnvalue">gint</span>
188 g_constant_info_get_value (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>,
189                            <em class="parameter"><code><a class="link" href="gi-common-types.html#GIArgument" title="GIArgument"><span class="type">GIArgument</span></a> *value</code></em>);</pre>
190 <p>Obtain the value associated with the <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> and store it in the
191 <em class="parameter"><code>value</code></em>
192  parameter. <em class="parameter"><code>argument</code></em>
193  needs to be allocated before passing it in.
194 The size of the constant value stored in <em class="parameter"><code>argument</code></em>
195  will be returned.
196 Free the value with <a class="link" href="gi-GIConstantInfo.html#g-constant-info-free-value" title="g_constant_info_free_value ()"><code class="function">g_constant_info_free_value()</code></a>.</p>
197 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
198 <div class="refsect3">
199 <a name="g-constant-info-get-value.parameters"></a><h4>Parameters</h4>
200 <div class="informaltable"><table class="informaltable" width="100%" border="0">
201 <colgroup>
202 <col width="150px" class="parameters_name">
203 <col class="parameters_description">
204 <col width="200px" class="parameters_annotations">
205 </colgroup>
206 <tbody>
207 <tr>
208 <td class="parameter_name"><p>info</p></td>
209 <td class="parameter_description"><p>a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a></p></td>
210 <td class="parameter_annotations"> </td>
211 </tr>
212 <tr>
213 <td class="parameter_name"><p>value</p></td>
214 <td class="parameter_description"><p> an argument. </p></td>
215 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
216 </tr>
217 </tbody>
218 </table></div>
219 </div>
220 <div class="refsect3">
221 <a name="g-constant-info-get-value.returns"></a><h4>Returns</h4>
222 <p> size of the constant</p>
223 </div>
224 </div>
225 </div>
226 <div class="refsect1">
227 <a name="gi-GIConstantInfo.other_details"></a><h2>Types and Values</h2>
228 <div class="refsect2">
229 <a name="GIConstantInfo"></a><h3>GIConstantInfo</h3>
230 <pre class="programlisting">typedef GIBaseInfo GIConstantInfo;
231 </pre>
232 <p>Represents a constant.</p>
233 </div>
234 </div>
235 </div>
236 <div class="footer">
237 <hr>Generated by GTK-Doc V1.25.1</div>
238 </body>
239 </html>