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>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">
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">
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>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#pango-Version-Checking.synopsis" class="shortcut">Top</a>
46 <a href="#pango-Version-Checking.description" class="shortcut">Description</a>
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>
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>
56 <td valign="top" align="right"></td>
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,
75 <div class="refsect1" lang="en">
76 <a name="pango-Version-Checking.description"></a><h2>Description</h2>
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
81 The functions can be used to check the version of the linked Pango library
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>
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.
95 <div class="variablelist"><table border="0">
96 <col align="left" valign="top">
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
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
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
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>
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>.
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
131 The major component of the version of Pango available at compile-time.
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
140 The minor component of the version of Pango available at compile-time.
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
149 The micro component of the version of Pango available at compile-time.
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"
158 A string literal containing the version of Pango available at compile-time.
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>
166 Checks that the version of Pango available at compile-time is not older than
167 the provided version number.
169 <div class="variablelist"><table border="0">
170 <col align="left" valign="top">
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
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
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
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>
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.
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>
204 <div class="variablelist"><table border="0">
205 <col align="left" valign="top">
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.
214 <p class="since">Since 1.16</p>
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>
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>
226 <div class="variablelist"><table border="0">
227 <col align="left" valign="top">
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
238 <p class="since">Since 1.16</p>
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,
245 int required_micro);</pre>
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.
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.)
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>
266 <div class="variablelist"><table border="0">
267 <col align="left" valign="top">
270 <td><p><span class="term"><em class="parameter"><code>required_major</code></em> :</span></p></td>
271 <td> the required major version.
275 <td><p><span class="term"><em class="parameter"><code>required_minor</code></em> :</span></p></td>
276 <td> the required minor version.
280 <td><p><span class="term"><em class="parameter"><code>required_micro</code></em> :</span></p></td>
281 <td> the required major version.
285 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
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
297 <p class="since">Since 1.16</p>
303 Generated by GTK-Doc V1.11</div>