Git init
[external/pango1.0.git] / docs / html / pango-Version-Checking.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>Version Checking</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="lowlevel.html" title="Low Level Functionality">
9 <link rel="prev" href="pango-Miscellaneous-Utilities.html" title="Miscellaneous Utilities">
10 <link rel="next" href="tools.html" title="Pango Tools">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14 <link rel="chapter" href="rendering.html" title="Rendering with Pango">
15 <link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16 <link rel="chapter" href="tools.html" title="Pango Tools">
17 <link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18 <link rel="index" href="index-all.html" title="Index">
19 <link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20 <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21 <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22 <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23 <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24 <link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25 <link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26 <link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27 <link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28 <link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29 <link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30 <link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31 <link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32 <link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
33 </head>
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36 <tr valign="middle">
37 <td><a accesskey="p" href="pango-Miscellaneous-Utilities.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="tools.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
42 </tr>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#pango-Version-Checking.synopsis" class="shortcut">Top</a>
45                  | 
46                 <a href="#pango-Version-Checking.description" class="shortcut">Description</a>
47 </td></tr>
48 </table>
49 <div class="refentry" lang="en">
50 <a name="pango-Version-Checking"></a><div class="titlepage"></div>
51 <div class="refnamediv"><table width="100%"><tr>
52 <td valign="top">
53 <h2><span class="refentrytitle"><a name="pango-Version-Checking.top_of_page"></a>Version Checking</span></h2>
54 <p>Version Checking — Tools for checking Pango version at compile- and run-time.</p>
55 </td>
56 <td valign="top" align="right"></td>
57 </tr></table></div>
58 <div class="refsynopsisdiv">
59 <a name="pango-Version-Checking.synopsis"></a><h2>Synopsis</h2>
60 <pre class="synopsis">
61 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-ENCODE--CAPS" title="PANGO_VERSION_ENCODE()">PANGO_VERSION_ENCODE</a>                (major, minor, micro)
62 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION--CAPS" title="PANGO_VERSION">PANGO_VERSION</a>
63 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MAJOR--CAPS" title="PANGO_VERSION_MAJOR">PANGO_VERSION_MAJOR</a>
64 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MINOR--CAPS" title="PANGO_VERSION_MINOR">PANGO_VERSION_MINOR</a>
65 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MICRO--CAPS" title="PANGO_VERSION_MICRO">PANGO_VERSION_MICRO</a>
66 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-STRING--CAPS" title="PANGO_VERSION_STRING">PANGO_VERSION_STRING</a>
67 #define             <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-CHECK--CAPS" title="PANGO_VERSION_CHECK()">PANGO_VERSION_CHECK</a>                 (major,minor,micro)
68 int                 <a class="link" href="pango-Version-Checking.html#pango-version" title="pango_version ()">pango_version</a>                       (void);
69 const char *        <a class="link" href="pango-Version-Checking.html#pango-version-string" title="pango_version_string ()">pango_version_string</a>                (void);
70 const char *        <a class="link" href="pango-Version-Checking.html#pango-version-check" title="pango_version_check ()">pango_version_check</a>                 (int required_major,
71                                                          int required_minor,
72                                                          int required_micro);
73 </pre>
74 </div>
75 <div class="refsect1" lang="en">
76 <a name="pango-Version-Checking.description"></a><h2>Description</h2>
77 <p>
78 The capital-letter macros defined here can be used to check the version of
79 Pango at compile-time, and to <em class="firstterm">encode</em> Pango versions into
80 integers.
81 The functions can be used to check the version of the linked Pango library
82 at run-time.
83 </p>
84 </div>
85 <div class="refsect1" lang="en">
86 <a name="pango-Version-Checking.details"></a><h2>Details</h2>
87 <div class="refsect2" lang="en">
88 <a name="PANGO-VERSION-ENCODE--CAPS"></a><h3>PANGO_VERSION_ENCODE()</h3>
89 <pre class="programlisting">#define             PANGO_VERSION_ENCODE(major, minor, micro)</pre>
90 <p>
91 This macro encodes the given Pango version into an integer.  The numbers
92 returned by <a class="link" href="pango-Version-Checking.html#PANGO-VERSION--CAPS" title="PANGO_VERSION"><code class="literal">PANGO_VERSION</code></a> and <a class="link" href="pango-Version-Checking.html#pango-version" title="pango_version ()"><code class="function">pango_version()</code></a> are encoded using this macro.
93 Two encoded version numbers can be compared as integers.
94 </p>
95 <div class="variablelist"><table border="0">
96 <col align="left" valign="top">
97 <tbody>
98 <tr>
99 <td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
100 <td>the major component of the version number
101 </td>
102 </tr>
103 <tr>
104 <td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
105 <td>the minor component of the version number
106 </td>
107 </tr>
108 <tr>
109 <td><p><span class="term"><em class="parameter"><code>micro</code></em> :</span></p></td>
110 <td>the micro component of the version number
111 </td>
112 </tr>
113 </tbody>
114 </table></div>
115 </div>
116 <hr>
117 <div class="refsect2" lang="en">
118 <a name="PANGO-VERSION--CAPS"></a><h3>PANGO_VERSION</h3>
119 <pre class="programlisting">#define             PANGO_VERSION</pre>
120 <p>
121 The version of Pango available at compile-time, encoded using
122 <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-ENCODE--CAPS" title="PANGO_VERSION_ENCODE()"><code class="function">PANGO_VERSION_ENCODE()</code></a>.
123 </p>
124 </div>
125 <hr>
126 <div class="refsect2" lang="en">
127 <a name="PANGO-VERSION-MAJOR--CAPS"></a><h3>PANGO_VERSION_MAJOR</h3>
128 <pre class="programlisting">#define PANGO_VERSION_MAJOR 1
129 </pre>
130 <p>
131 The major component of the version of Pango available at compile-time.
132 </p>
133 </div>
134 <hr>
135 <div class="refsect2" lang="en">
136 <a name="PANGO-VERSION-MINOR--CAPS"></a><h3>PANGO_VERSION_MINOR</h3>
137 <pre class="programlisting">#define PANGO_VERSION_MINOR 26
138 </pre>
139 <p>
140 The minor component of the version of Pango available at compile-time.
141 </p>
142 </div>
143 <hr>
144 <div class="refsect2" lang="en">
145 <a name="PANGO-VERSION-MICRO--CAPS"></a><h3>PANGO_VERSION_MICRO</h3>
146 <pre class="programlisting">#define PANGO_VERSION_MICRO 1
147 </pre>
148 <p>
149 The micro component of the version of Pango available at compile-time.
150 </p>
151 </div>
152 <hr>
153 <div class="refsect2" lang="en">
154 <a name="PANGO-VERSION-STRING--CAPS"></a><h3>PANGO_VERSION_STRING</h3>
155 <pre class="programlisting">#define PANGO_VERSION_STRING "1.26.1"
156 </pre>
157 <p>
158 A string literal containing the version of Pango available at compile-time.
159 </p>
160 </div>
161 <hr>
162 <div class="refsect2" lang="en">
163 <a name="PANGO-VERSION-CHECK--CAPS"></a><h3>PANGO_VERSION_CHECK()</h3>
164 <pre class="programlisting">#define             PANGO_VERSION_CHECK(major,minor,micro)</pre>
165 <p>
166 Checks that the version of Pango available at compile-time is not older than
167 the provided version number.
168 </p>
169 <div class="variablelist"><table border="0">
170 <col align="left" valign="top">
171 <tbody>
172 <tr>
173 <td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
174 <td>the major component of the version number
175 </td>
176 </tr>
177 <tr>
178 <td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
179 <td>the minor component of the version number
180 </td>
181 </tr>
182 <tr>
183 <td><p><span class="term"><em class="parameter"><code>micro</code></em> :</span></p></td>
184 <td>the micro component of the version number
185 </td>
186 </tr>
187 </tbody>
188 </table></div>
189 </div>
190 <hr>
191 <div class="refsect2" lang="en">
192 <a name="pango-version"></a><h3>pango_version ()</h3>
193 <pre class="programlisting">int                 pango_version                       (void);</pre>
194 <p>
195 This is similar to the macro <a class="link" href="pango-Version-Checking.html#PANGO-VERSION--CAPS" title="PANGO_VERSION"><code class="literal">PANGO_VERSION</code></a> except that
196 it returns the encoded version of Pango available at run-time,
197 as opposed to the version available at compile-time.
198 </p>
199 <p>
200 A version number can be encoded into an integer using
201 <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-ENCODE--CAPS" title="PANGO_VERSION_ENCODE()"><code class="function">PANGO_VERSION_ENCODE()</code></a>.</p>
202 <p>
203 </p>
204 <div class="variablelist"><table border="0">
205 <col align="left" valign="top">
206 <tbody><tr>
207 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
208 <td> The encoded version of Pango library
209   available at run time.
210
211 </td>
212 </tr></tbody>
213 </table></div>
214 <p class="since">Since 1.16</p>
215 </div>
216 <hr>
217 <div class="refsect2" lang="en">
218 <a name="pango-version-string"></a><h3>pango_version_string ()</h3>
219 <pre class="programlisting">const char *        pango_version_string                (void);</pre>
220 <p>
221 This is similar to the macro <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-STRING--CAPS" title="PANGO_VERSION_STRING"><code class="literal">PANGO_VERSION_STRING</code></a> except that
222 it returns the version of Pango available at run-time, as opposed to
223 the version available at compile-time.</p>
224 <p>
225 </p>
226 <div class="variablelist"><table border="0">
227 <col align="left" valign="top">
228 <tbody><tr>
229 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
230 <td> A string containing the version of Pango library
231   available at run time.
232   The returned string is owned by Pango and should not be modified
233   or freed.
234
235 </td>
236 </tr></tbody>
237 </table></div>
238 <p class="since">Since 1.16</p>
239 </div>
240 <hr>
241 <div class="refsect2" lang="en">
242 <a name="pango-version-check"></a><h3>pango_version_check ()</h3>
243 <pre class="programlisting">const char *        pango_version_check                 (int required_major,
244                                                          int required_minor,
245                                                          int required_micro);</pre>
246 <p>
247 Checks that the Pango library in use is compatible with the
248 given version. Generally you would pass in the constants
249 <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MAJOR--CAPS" title="PANGO_VERSION_MAJOR"><code class="literal">PANGO_VERSION_MAJOR</code></a>, <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MINOR--CAPS" title="PANGO_VERSION_MINOR"><code class="literal">PANGO_VERSION_MINOR</code></a>, <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-MICRO--CAPS" title="PANGO_VERSION_MICRO"><code class="literal">PANGO_VERSION_MICRO</code></a>
250 as the three arguments to this function; that produces
251 a check that the library in use at run-time is compatible with
252 the version of Pango the application or module was compiled against.
253 </p>
254 <p>
255 Compatibility is defined by two things: first the version
256 of the running library is newer than the version
257 <em class="parameter"><code>required_major.required_minor</code></em>.<em class="parameter"><code>required_micro</code></em>. Second
258 the running library must be binary compatible with the
259 version <em class="parameter"><code>required_major.required_minor</code></em>.<em class="parameter"><code>required_micro</code></em>
260 (same major version.)
261 </p>
262 <p>
263 For compile-time version checking use <a class="link" href="pango-Version-Checking.html#PANGO-VERSION-CHECK--CAPS" title="PANGO_VERSION_CHECK()"><code class="function">PANGO_VERSION_CHECK()</code></a>.</p>
264 <p>
265 </p>
266 <div class="variablelist"><table border="0">
267 <col align="left" valign="top">
268 <tbody>
269 <tr>
270 <td><p><span class="term"><em class="parameter"><code>required_major</code></em> :</span></p></td>
271 <td> the required major version.
272 </td>
273 </tr>
274 <tr>
275 <td><p><span class="term"><em class="parameter"><code>required_minor</code></em> :</span></p></td>
276 <td> the required minor version.
277 </td>
278 </tr>
279 <tr>
280 <td><p><span class="term"><em class="parameter"><code>required_micro</code></em> :</span></p></td>
281 <td> the required major version.
282 </td>
283 </tr>
284 <tr>
285 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
286 <td> <a
287 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
288 ><code class="literal">NULL</code></a> if the Pango library is compatible with the
289   given version, or a string describing the version mismatch.
290   The returned string is owned by Pango and should not be modified
291   or freed.
292
293 </td>
294 </tr>
295 </tbody>
296 </table></div>
297 <p class="since">Since 1.16</p>
298 </div>
299 </div>
300 </div>
301 <div class="footer">
302 <hr>
303           Generated by GTK-Doc V1.11</div>
304 </body>
305 </html>