Debian Codegraph @

docs/reference/html/garcon-Version-Information.html

raw
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>Version Information: garcon Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="garcon Reference Manual">
8 <link rel="up" href="garcon-miscellaneous.html" title="Part V. Miscellaneous">
9 <link rel="prev" href="garcon-Desktop-Environment-Configuration.html" title="Desktop Environment Configuration">
10 <link rel="next" href="garcon-garcon-marshal.html" title="garcon-marshal">
11 <meta name="generator" content="GTK-Doc V1.34.0 (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="#garcon-Version-Information.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="garcon-miscellaneous.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="garcon-Desktop-Environment-Configuration.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="garcon-garcon-marshal.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="garcon-Version-Information"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="garcon-Version-Information.top_of_page"></a>Version Information</span></h2>
30 <p>Version Information — Information about the garcon version in use.</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="garcon-Version-Information.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="define_keyword">#define</td>
44 <td class="function_name">
45 <a class="link" href="garcon-Version-Information.html#GARCON-CHECK-VERSION:CAPS" title="GARCON_CHECK_VERSION()">GARCON_CHECK_VERSION</a><span class="c_punctuation">()</span>
46 </td>
47 </tr>
48 <tr>
49 <td class="function_type">const <span class="returnvalue">gchar</span> *
50 </td>
51 <td class="function_name">
52 <a class="link" href="garcon-Version-Information.html#garcon-check-version" title="garcon_check_version ()">garcon_check_version</a> <span class="c_punctuation">()</span>
53 </td>
54 </tr>
55 <tr>
56 <td class="function_type">
57 <span class="returnvalue">gchar</span> *
58 </td>
59 <td class="function_name">
60 <a class="link" href="garcon-Version-Information.html#garcon-config-lookup" title="garcon_config_lookup ()">garcon_config_lookup</a> <span class="c_punctuation">()</span>
61 </td>
62 </tr>
63 <tr>
64 <td class="function_type">
65 <span class="returnvalue">gchar</span> **
66 </td>
67 <td class="function_name">
68 <a class="link" href="garcon-Version-Information.html#garcon-config-build-paths" title="garcon_config_build_paths ()">garcon_config_build_paths</a> <span class="c_punctuation">()</span>
69 </td>
70 </tr>
71 </tbody>
72 </table></div>
73 </div>
74 <div class="refsect1">
75 <a name="garcon-Version-Information.other"></a><h2>Types and Values</h2>
76 <div class="informaltable"><table class="informaltable" width="100%" border="0">
77 <colgroup>
78 <col width="150px" class="other_proto_type">
79 <col class="other_proto_name">
80 </colgroup>
81 <tbody>
82 <tr>
83 <td class="define_keyword">#define</td>
84 <td class="function_name"><a class="link" href="garcon-Version-Information.html#GARCON-MAJOR-VERSION:CAPS" title="GARCON_MAJOR_VERSION">GARCON_MAJOR_VERSION</a></td>
85 </tr>
86 <tr>
87 <td class="define_keyword">#define</td>
88 <td class="function_name"><a class="link" href="garcon-Version-Information.html#GARCON-MINOR-VERSION:CAPS" title="GARCON_MINOR_VERSION">GARCON_MINOR_VERSION</a></td>
89 </tr>
90 <tr>
91 <td class="define_keyword">#define</td>
92 <td class="function_name"><a class="link" href="garcon-Version-Information.html#GARCON-MICRO-VERSION:CAPS" title="GARCON_MICRO_VERSION">GARCON_MICRO_VERSION</a></td>
93 </tr>
94 <tr>
95 <td class="variable_type">extern const guint </td>
96 <td class="function_name"><a class="link" href="garcon-Version-Information.html#garcon-major-version" title="garcon_major_version">garcon_major_version</a></td>
97 </tr>
98 <tr>
99 <td class="variable_type">extern const guint </td>
100 <td class="function_name"><a class="link" href="garcon-Version-Information.html#garcon-minor-version" title="garcon_minor_version">garcon_minor_version</a></td>
101 </tr>
102 <tr>
103 <td class="variable_type">extern const guint </td>
104 <td class="function_name"><a class="link" href="garcon-Version-Information.html#garcon-micro-version" title="garcon_micro_version">garcon_micro_version</a></td>
105 </tr>
106 </tbody>
107 </table></div>
108 </div>
109 <div class="refsect1">
110 <a name="garcon-Version-Information.includes"></a><h2>Includes</h2>
111 <pre class="synopsis">#include &lt;garcon/garcon.h&gt;
112 </pre>
113 </div>
114 <div class="refsect1">
115 <a name="garcon-Version-Information.description"></a><h2>Description</h2>
116 <p>The garcon library provides version information, which could be used
117 by developers to handle new API.</p>
118 </div>
119 <div class="refsect1">
120 <a name="garcon-Version-Information.functions_details"></a><h2>Functions</h2>
121 <div class="refsect2">
122 <a name="GARCON-CHECK-VERSION:CAPS"></a><h3>GARCON_CHECK_VERSION()</h3>
123 <pre class="programlisting">#define GARCON_CHECK_VERSION(major, minor, micro)</pre>
124 <p>Checks the version of the garcon library.</p>
125 <div class="refsect3">
126 <a name="GARCON-CHECK-VERSION.parameters"></a><h4>Parameters</h4>
127 <div class="informaltable"><table class="informaltable" width="100%" border="0">
128 <colgroup>
129 <col width="150px" class="parameters_name">
130 <col class="parameters_description">
131 <col width="200px" class="parameters_annotations">
132 </colgroup>
133 <tbody>
134 <tr>
135 <td class="parameter_name"><p>major</p></td>
136 <td class="parameter_description"><p>the major version number.</p></td>
137 <td class="parameter_annotations"> </td>
138 </tr>
139 <tr>
140 <td class="parameter_name"><p>minor</p></td>
141 <td class="parameter_description"><p>the minor version number.</p></td>
142 <td class="parameter_annotations"> </td>
143 </tr>
144 <tr>
145 <td class="parameter_name"><p>micro</p></td>
146 <td class="parameter_description"><p>the micro version number.</p></td>
147 <td class="parameter_annotations"> </td>
148 </tr>
149 </tbody>
150 </table></div>
151 </div>
152 <div class="refsect3">
153 <a name="GARCON-CHECK-VERSION.returns"></a><h4>Returns</h4>
154 <p> <code class="literal">TRUE</code> if the version of the garcon header files is
155 the same as or newer than the passed-in version.</p>
156 </div>
157 </div>
158 <hr>
159 <div class="refsect2">
160 <a name="garcon-check-version"></a><h3>garcon_check_version ()</h3>
161 <pre class="programlisting">const <span class="returnvalue">gchar</span> *
162 garcon_check_version (<em class="parameter"><code><span class="type">guint</span> required_major</code></em>,
163 <em class="parameter"><code><span class="type">guint</span> required_minor</code></em>,
164 <em class="parameter"><code><span class="type">guint</span> required_micro</code></em>);</pre>
165 <p>Checks that the <code class="systemitem">garcon</code>
166 library in use is compatible with the given version. Generally you
167 would pass in the constants <a class="link" href="garcon-Version-Information.html#GARCON-MAJOR-VERSION:CAPS" title="GARCON_MAJOR_VERSION"><span class="type">GARCON_MAJOR_VERSION</span></a>,
168 <a class="link" href="garcon-Version-Information.html#GARCON-MINOR-VERSION:CAPS" title="GARCON_MINOR_VERSION"><span class="type">GARCON_MINOR_VERSION</span></a> and <a class="link" href="garcon-Version-Information.html#GARCON-MICRO-VERSION:CAPS" title="GARCON_MICRO_VERSION"><span class="type">GARCON_MICRO_VERSION</span></a> as the three
169 arguments to this function; that produces a check that the library
170 in use is compatible with the version of</p>
171 <code class="systemitem">garcon</code> the application was
172 <p>compiled against.</p>
173 <div class="example">
174 <a name="id-1.6.3.7.3.7"></a><p class="title"><b>Example 1. Checking the runtime version of the garcon library</b></p>
175 <div class="example-contents">
176 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
177 <tbody>
178 <tr>
179 <td class="listing_lines" align="right"><pre>1
180 2
181 3
182 4
183 5
184 6</pre></td>
185 <td class="listing_code"><pre class="programlisting"><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">mismatch</span><span class="p">;</span>
186 <span class="n">mismatch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">garcon_check_version</span><span class="w"> </span><span class="p">(</span><span class="n">GARCON_VERSION_MAJOR</span><span class="p">,</span>
187 <span class="w"> </span><span class="n">GARCON_VERSION_MINOR</span><span class="p">,</span>
188 <span class="w"> </span><span class="n">GARCON_VERSION_MICRO</span><span class="p">);</span>
189 <span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">G_UNLIKELY</span><span class="w"> </span><span class="p">(</span><span class="n">mismatch</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">))</span>
190 <span class="w"> </span><span class="n">g_error</span><span class="w"> </span><span class="p">(</span><span class="s">&quot;Version mismatch: %s&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">mismatch</span><span class="p">);</span></pre></td>
191 </tr>
192 </tbody>
193 </table>
194 </div>
195
196 </div>
197 <br class="example-break"><div class="refsect3">
198 <a name="garcon-check-version.parameters"></a><h4>Parameters</h4>
199 <div class="informaltable"><table class="informaltable" width="100%" border="0">
200 <colgroup>
201 <col width="150px" class="parameters_name">
202 <col class="parameters_description">
203 <col width="200px" class="parameters_annotations">
204 </colgroup>
205 <tbody>
206 <tr>
207 <td class="parameter_name"><p>required_major</p></td>
208 <td class="parameter_description"><p>the required major version.</p></td>
209 <td class="parameter_annotations"> </td>
210 </tr>
211 <tr>
212 <td class="parameter_name"><p>required_minor</p></td>
213 <td class="parameter_description"><p>the required minor version.</p></td>
214 <td class="parameter_annotations"> </td>
215 </tr>
216 <tr>
217 <td class="parameter_name"><p>required_micro</p></td>
218 <td class="parameter_description"><p>the required micro version.</p></td>
219 <td class="parameter_annotations"> </td>
220 </tr>
221 </tbody>
222 </table></div>
223 </div>
224 <div class="refsect3">
225 <a name="garcon-check-version.returns"></a><h4>Returns</h4>
226 <p> <code class="literal">NULL</code> if the library is compatible with the given version,
227 or a string describing the version mismatch. The returned
228 string is owned by the library and must not be freed or
229 modified by the caller.</p>
230 </div>
231 </div>
232 <hr>
233 <div class="refsect2">
234 <a name="garcon-config-lookup"></a><h3>garcon_config_lookup ()</h3>
235 <pre class="programlisting"><span class="returnvalue">gchar</span> *
236 garcon_config_lookup (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
237 <p>Looks for the filename in the users' config directory and then
238 the system config directories.</p>
239 <div class="refsect3">
240 <a name="garcon-config-lookup.parameters"></a><h4>Parameters</h4>
241 <div class="informaltable"><table class="informaltable" width="100%" border="0">
242 <colgroup>
243 <col width="150px" class="parameters_name">
244 <col class="parameters_description">
245 <col width="200px" class="parameters_annotations">
246 </colgroup>
247 <tbody><tr>
248 <td class="parameter_name"><p>filename</p></td>
249 <td class="parameter_description"><p>relative filename of the config resource.</p></td>
250 <td class="parameter_annotations"> </td>
251 </tr></tbody>
252 </table></div>
253 </div>
254 <div class="refsect3">
255 <a name="garcon-config-lookup.returns"></a><h4>Returns</h4>
256 <p> the absolute path to the first file in the search path,
257 that matches <em class="parameter"><code>filename</code></em>
258 or <code class="literal">NULL</code> if no such
259 file or directory could be found.</p>
260 </div>
261 </div>
262 <hr>
263 <div class="refsect2">
264 <a name="garcon-config-build-paths"></a><h3>garcon_config_build_paths ()</h3>
265 <pre class="programlisting"><span class="returnvalue">gchar</span> **
266 garcon_config_build_paths (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
267 <div class="refsect3">
268 <a name="garcon-config-build-paths.parameters"></a><h4>Parameters</h4>
269 <div class="informaltable"><table class="informaltable" width="100%" border="0">
270 <colgroup>
271 <col width="150px" class="parameters_name">
272 <col class="parameters_description">
273 <col width="200px" class="parameters_annotations">
274 </colgroup>
275 <tbody><tr>
276 <td class="parameter_name"><p>filename</p></td>
277 <td class="parameter_description"><p>name of .desktop file</p></td>
278 <td class="parameter_annotations"> </td>
279 </tr></tbody>
280 </table></div>
281 </div>
282 <div class="refsect3">
283 <a name="garcon-config-build-paths.returns"></a><h4>Returns</h4>
284 <p>. </p>
285 <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
286 </div>
287 </div>
288 </div>
289 <div class="refsect1">
290 <a name="garcon-Version-Information.other_details"></a><h2>Types and Values</h2>
291 <div class="refsect2">
292 <a name="GARCON-MAJOR-VERSION:CAPS"></a><h3>GARCON_MAJOR_VERSION</h3>
293 <pre class="programlisting">#define GARCON_MAJOR_VERSION 4
294 </pre>
295 <p>The major version number of the garcon library.
296 Like garcon_major_version, but from the headers used at
297 application compile time, rather than from the library
298 linked against at application run time.</p>
299 </div>
300 <hr>
301 <div class="refsect2">
302 <a name="GARCON-MINOR-VERSION:CAPS"></a><h3>GARCON_MINOR_VERSION</h3>
303 <pre class="programlisting">#define GARCON_MINOR_VERSION 20
304 </pre>
305 <p>The minor version number of the garcon library.
306 Like garcon_minor_version, but from the headers used at
307 application compile time, rather than from the library
308 linked against at application run time.</p>
309 </div>
310 <hr>
311 <div class="refsect2">
312 <a name="GARCON-MICRO-VERSION:CAPS"></a><h3>GARCON_MICRO_VERSION</h3>
313 <pre class="programlisting">#define GARCON_MICRO_VERSION 0
314 </pre>
315 <p>The micro version number of the garcon library.
316 Like garcon_micro_version, but from the headers used at
317 application compile time, rather than from the library
318 linked against at application run time.</p>
319 </div>
320 <hr>
321 <div class="refsect2">
322 <a name="garcon-major-version"></a><h3>garcon_major_version</h3>
323 <pre class="programlisting">extern const guint garcon_major_version;
324 </pre>
325 <p>The major version number of the garcon library (e.g. in
326 version 4.8.0 this is 4).</p>
327 <p>This variable is in the library, so represents the
328 garcon library you have linked against. Contrast with the
329 <a class="link" href="garcon-Version-Information.html#GARCON-MAJOR-VERSION:CAPS" title="GARCON_MAJOR_VERSION"><span class="type">GARCON_MAJOR_VERSION</span></a> macro, which represents the major
330 version of the garcon headers you have included.</p>
331 </div>
332 <hr>
333 <div class="refsect2">
334 <a name="garcon-minor-version"></a><h3>garcon_minor_version</h3>
335 <pre class="programlisting">extern const guint garcon_minor_version;
336 </pre>
337 <p>The minor version number of the garcon library (e.g. in
338 version 4.8.0 this is 8).</p>
339 <p>This variable is in the library, so represents the
340 garcon library you have linked against. Contrast with the
341 <a class="link" href="garcon-Version-Information.html#GARCON-MINOR-VERSION:CAPS" title="GARCON_MINOR_VERSION"><span class="type">GARCON_MINOR_VERSION</span></a> macro, which represents the minor
342 version of the garcon headers you have included.</p>
343 </div>
344 <hr>
345 <div class="refsect2">
346 <a name="garcon-micro-version"></a><h3>garcon_micro_version</h3>
347 <pre class="programlisting">extern const guint garcon_micro_version;
348 </pre>
349 <p>The micro version number of the garcon library (e.g. in
350 version 4.8.0 this is 0).</p>
351 <p>This variable is in the library, so represents the
352 garcon library you have linked against. Contrast with the
353 <a class="link" href="garcon-Version-Information.html#GARCON-MICRO-VERSION:CAPS" title="GARCON_MICRO_VERSION"><span class="type">GARCON_MICRO_VERSION</span></a> macro, which represents the micro
354 version of the garcon headers you have included.</p>
355 </div>
356 </div>
357 </div>
358 <div class="footer">
359 <hr>Generated by GTK-Doc V1.34.0</div>
360 </body>
361 </html>