~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to docs/reference/glib/xml/version.xml

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<refentry id="glib-Version-Information">
2
2
<refmeta>
3
 
<refentrytitle role="top_of_page">Version Information</refentrytitle>
 
3
<refentrytitle role="top_of_page" id="glib-Version-Information.top_of_page">Version Information</refentrytitle>
4
4
<manvolnum>3</manvolnum>
5
5
<refmiscinfo>GLIB Library</refmiscinfo>
6
6
</refmeta>
8
8
<refnamediv>
9
9
<refname>Version Information</refname>
10
10
<refpurpose>Variables and functions to check the GLib version</refpurpose>
11
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
12
11
</refnamediv>
13
12
 
14
 
<refsynopsisdiv role="synopsis">
 
13
<refsynopsisdiv id="glib-Version-Information.synopsis" role="synopsis">
15
14
<title role="synopsis.title">Synopsis</title>
16
15
 
17
16
<synopsis>
18
17
 
19
18
#include &lt;glib.h&gt;
20
19
 
21
 
 
22
20
extern              const guint <link linkend="glib-major-version">glib_major_version</link>;
23
21
extern              const guint <link linkend="glib-minor-version">glib_minor_version</link>;
24
22
extern              const guint <link linkend="glib-micro-version">glib_micro_version</link>;
25
23
extern              const guint <link linkend="glib-binary-age">glib_binary_age</link>;
26
24
extern              const guint <link linkend="glib-interface-age">glib_interface_age</link>;
27
 
const <link linkend="gchar">gchar</link>*        <link linkend="glib-check-version">glib_check_version</link>                  (<link linkend="guint">guint</link> required_major,
 
25
const <link linkend="gchar">gchar</link> *       <link linkend="glib-check-version">glib_check_version</link>                  (<link linkend="guint">guint</link> required_major,
28
26
                                                         <link linkend="guint">guint</link> required_minor,
29
27
                                                         <link linkend="guint">guint</link> required_micro);
30
28
 
31
 
#define             <link linkend="GLIB-MAJOR-VERSION:CAPS">GLIB_MAJOR_VERSION</link>
32
 
#define             <link linkend="GLIB-MINOR-VERSION:CAPS">GLIB_MINOR_VERSION</link>
33
 
#define             <link linkend="GLIB-MICRO-VERSION:CAPS">GLIB_MICRO_VERSION</link>
34
 
#define             <link linkend="GLIB-CHECK-VERSION:CAPS">GLIB_CHECK_VERSION</link>                  (major,minor,micro)
 
29
#define             <link linkend="GLIB-MAJOR-VERSION--CAPS">GLIB_MAJOR_VERSION</link>
 
30
#define             <link linkend="GLIB-MINOR-VERSION--CAPS">GLIB_MINOR_VERSION</link>
 
31
#define             <link linkend="GLIB-MICRO-VERSION--CAPS">GLIB_MICRO_VERSION</link>
 
32
#define             <link linkend="GLIB-CHECK-VERSION--CAPS">GLIB_CHECK_VERSION</link>                  (major,minor,micro)
35
33
</synopsis>
36
34
</refsynopsisdiv>
37
35
 
43
41
 
44
42
 
45
43
 
46
 
<refsect1 role="desc">
 
44
<refsect1 id="glib-Version-Information.description" role="desc">
47
45
<title role="desc.title">Description</title>
48
46
<para>
49
47
GLib provides version information, primarily useful in configure checks
52
50
</para>
53
51
</refsect1>
54
52
 
55
 
<refsect1 role="details">
 
53
<refsect1 id="glib-Version-Information.details" role="details">
56
54
<title role="details.title">Details</title>
57
 
<refsect2>
58
 
<title><anchor id="glib-major-version" role="variable"/>glib_major_version</title>
59
 
<indexterm><primary>glib_major_version</primary></indexterm><programlisting>extern const guint glib_major_version;
 
55
<refsect2 id="glib-major-version" role="variable">
 
56
<title>glib_major_version</title>
 
57
<indexterm zone="glib-major-version"><primary sortas="glib_major_version">glib_major_version</primary></indexterm><programlisting>extern const guint glib_major_version;
60
58
</programlisting>
61
59
<para>
62
 
The major version number of the GLib library. 
 
60
The major version number of the GLib library.
63
61
(e.g. in GLib version 1.2.5 this is 1.)
64
62
</para>
65
 
 
66
63
<para>
67
64
This variable is in the library, so represents the
68
65
GLib library you have linked against. Contrast with the
69
 
<link linkend="GLIB-MAJOR-VERSION:CAPS"><type>GLIB_MAJOR_VERSION</type></link> macro, which represents the major version of the
 
66
<link linkend="GLIB-MAJOR-VERSION--CAPS"><type>GLIB_MAJOR_VERSION</type></link> macro, which represents the major version of the
70
67
GLib headers you have included.
71
68
</para></refsect2>
72
 
<refsect2>
73
 
<title><anchor id="glib-minor-version" role="variable"/>glib_minor_version</title>
74
 
<indexterm><primary>glib_minor_version</primary></indexterm><programlisting>extern const guint glib_minor_version;
 
69
<refsect2 id="glib-minor-version" role="variable">
 
70
<title>glib_minor_version</title>
 
71
<indexterm zone="glib-minor-version"><primary sortas="glib_minor_version">glib_minor_version</primary></indexterm><programlisting>extern const guint glib_minor_version;
75
72
</programlisting>
76
73
<para>
77
74
The minor version number of the GLib library.
78
75
(e.g. in GLib version 1.2.5 this is 2.)
79
76
</para>
80
 
 
81
77
<para>
82
78
This variable is in the library, so represents the
83
79
GLib library you have linked against. Contrast with the
84
 
<link linkend="GLIB-MINOR-VERSION:CAPS"><type>GLIB_MINOR_VERSION</type></link> macro, which represents the minor version of the
 
80
<link linkend="GLIB-MINOR-VERSION--CAPS"><type>GLIB_MINOR_VERSION</type></link> macro, which represents the minor version of the
85
81
GLib headers you have included.
86
82
</para></refsect2>
87
 
<refsect2>
88
 
<title><anchor id="glib-micro-version" role="variable"/>glib_micro_version</title>
89
 
<indexterm><primary>glib_micro_version</primary></indexterm><programlisting>extern const guint glib_micro_version;
 
83
<refsect2 id="glib-micro-version" role="variable">
 
84
<title>glib_micro_version</title>
 
85
<indexterm zone="glib-micro-version"><primary sortas="glib_micro_version">glib_micro_version</primary></indexterm><programlisting>extern const guint glib_micro_version;
90
86
</programlisting>
91
87
<para>
92
88
The micro version number of the GLib library.
93
89
(e.g. in GLib version 1.2.5 this is 5.)
94
90
</para>
95
 
 
96
91
<para>
97
92
This variable is in the library, so represents the GLib library you
98
 
have linked against. Contrast with the <link linkend="GLIB-MICRO-VERSION:CAPS"><type>GLIB_MICRO_VERSION</type></link> macro, which
 
93
have linked against. Contrast with the <link linkend="GLIB-MICRO-VERSION--CAPS"><type>GLIB_MICRO_VERSION</type></link> macro, which
99
94
represents the micro version of the GLib headers you have included.
100
95
</para></refsect2>
101
 
<refsect2>
102
 
<title><anchor id="glib-binary-age" role="variable"/>glib_binary_age</title>
103
 
<indexterm><primary>glib_binary_age</primary></indexterm><programlisting>extern const guint glib_binary_age;
104
 
</programlisting>
105
 
<para>
106
 
This is the binary age passed to <application>libtool</application>. If 
107
 
<application>libtool</application> means nothing to you, don't worry 
108
 
about it. ;-)
109
 
</para></refsect2>
110
 
<refsect2>
111
 
<title><anchor id="glib-interface-age" role="variable"/>glib_interface_age</title>
112
 
<indexterm><primary>glib_interface_age</primary></indexterm><programlisting>extern const guint glib_interface_age;
113
 
</programlisting>
114
 
<para>
115
 
This is the interface age passed to <application>libtool</application>. If 
116
 
<application>libtool</application> means nothing to you, don't worry 
117
 
about it. ;-)
118
 
</para></refsect2>
119
 
<refsect2>
120
 
<title><anchor id="glib-check-version" role="function" condition="since:2.6"/>glib_check_version ()</title>
121
 
<indexterm role="2.6"><primary>glib_check_version</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        glib_check_version                  (<link linkend="guint">guint</link> required_major,
 
96
<refsect2 id="glib-binary-age" role="variable">
 
97
<title>glib_binary_age</title>
 
98
<indexterm zone="glib-binary-age"><primary sortas="glib_binary_age">glib_binary_age</primary></indexterm><programlisting>extern const guint glib_binary_age;
 
99
</programlisting>
 
100
<para>
 
101
This is the binary age passed to <application>libtool</application>. If
 
102
<application>libtool</application> means nothing to you, don't worry
 
103
about it. ;-)
 
104
</para></refsect2>
 
105
<refsect2 id="glib-interface-age" role="variable">
 
106
<title>glib_interface_age</title>
 
107
<indexterm zone="glib-interface-age"><primary sortas="glib_interface_age">glib_interface_age</primary></indexterm><programlisting>extern const guint glib_interface_age;
 
108
</programlisting>
 
109
<para>
 
110
This is the interface age passed to <application>libtool</application>. If
 
111
<application>libtool</application> means nothing to you, don't worry
 
112
about it. ;-)
 
113
</para></refsect2>
 
114
<refsect2 id="glib-check-version" role="function" condition="since:2.6">
 
115
<title>glib_check_version ()</title>
 
116
<indexterm zone="glib-check-version" role="2.6"><primary sortas="glib_check_version">glib_check_version</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       glib_check_version                  (<link linkend="guint">guint</link> required_major,
122
117
                                                         <link linkend="guint">guint</link> required_minor,
123
118
                                                         <link linkend="guint">guint</link> required_micro);</programlisting>
124
119
<para>
125
120
Checks that the GLib library in use is compatible with the
126
121
given version. Generally you would pass in the constants
127
 
<link linkend="GLIB-MAJOR-VERSION:CAPS"><type>GLIB_MAJOR_VERSION</type></link>, <link linkend="GLIB-MINOR-VERSION:CAPS"><type>GLIB_MINOR_VERSION</type></link>, <link linkend="GLIB-MICRO-VERSION:CAPS"><type>GLIB_MICRO_VERSION</type></link>
 
122
<link linkend="GLIB-MAJOR-VERSION--CAPS"><type>GLIB_MAJOR_VERSION</type></link>, <link linkend="GLIB-MINOR-VERSION--CAPS"><type>GLIB_MINOR_VERSION</type></link>, <link linkend="GLIB-MICRO-VERSION--CAPS"><type>GLIB_MICRO_VERSION</type></link>
128
123
as the three arguments to this function; that produces
129
124
a check that the library in use is compatible with
130
125
the version of GLib the application or module was compiled
138
133
version <parameter>required_major.required_minor</parameter>.<parameter>required_micro</parameter>
139
134
(same major version.)</para>
140
135
<para>
141
 
 
142
136
</para><variablelist role="params">
143
 
<varlistentry><term><parameter>required_major</parameter>&nbsp;:</term>
 
137
<varlistentry><term><parameter>required_major</parameter>&#160;:</term>
144
138
<listitem><simpara> the required major version.
145
139
</simpara></listitem></varlistentry>
146
 
<varlistentry><term><parameter>required_minor</parameter>&nbsp;:</term>
 
140
<varlistentry><term><parameter>required_minor</parameter>&#160;:</term>
147
141
<listitem><simpara> the required minor version.
148
142
</simpara></listitem></varlistentry>
149
 
<varlistentry><term><parameter>required_micro</parameter>&nbsp;:</term>
 
143
<varlistentry><term><parameter>required_micro</parameter>&#160;:</term>
150
144
<listitem><simpara> the required micro version.
151
145
</simpara></listitem></varlistentry>
152
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the GLib library is compatible with the
 
146
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the GLib library is compatible with the
153
147
  given version, or a string describing the version mismatch.
154
148
  The returned string is owned by GLib and must not be modified
155
149
  or freed.
156
150
 
157
151
</simpara></listitem></varlistentry>
158
 
</variablelist><para role="since">Since  2.6
159
 
</para></refsect2>
160
 
<refsect2>
161
 
<title><anchor id="GLIB-MAJOR-VERSION:CAPS" role="macro"/>GLIB_MAJOR_VERSION</title>
162
 
<indexterm><primary>GLIB_MAJOR_VERSION</primary></indexterm><programlisting>#define GLIB_MAJOR_VERSION 2
 
152
</variablelist><para role="since">Since 2.6</para></refsect2>
 
153
<refsect2 id="GLIB-MAJOR-VERSION--CAPS" role="macro">
 
154
<title>GLIB_MAJOR_VERSION</title>
 
155
<indexterm zone="GLIB-MAJOR-VERSION--CAPS"><primary sortas="GLIB_MAJOR_VERSION">GLIB_MAJOR_VERSION</primary></indexterm><programlisting>#define GLIB_MAJOR_VERSION 2
163
156
</programlisting>
164
157
<para>
165
158
The major version number of the GLib library.
167
160
application compile time, rather than from the library linked against
168
161
at application run time.
169
162
</para></refsect2>
170
 
<refsect2>
171
 
<title><anchor id="GLIB-MINOR-VERSION:CAPS" role="macro"/>GLIB_MINOR_VERSION</title>
172
 
<indexterm><primary>GLIB_MINOR_VERSION</primary></indexterm><programlisting>#define GLIB_MINOR_VERSION 16
 
163
<refsect2 id="GLIB-MINOR-VERSION--CAPS" role="macro">
 
164
<title>GLIB_MINOR_VERSION</title>
 
165
<indexterm zone="GLIB-MINOR-VERSION--CAPS"><primary sortas="GLIB_MINOR_VERSION">GLIB_MINOR_VERSION</primary></indexterm><programlisting>#define GLIB_MINOR_VERSION 18
173
166
</programlisting>
174
167
<para>
175
168
The minor version number of the GLib library.
177
170
application compile time, rather than from the library linked against
178
171
at application run time.
179
172
</para></refsect2>
180
 
<refsect2>
181
 
<title><anchor id="GLIB-MICRO-VERSION:CAPS" role="macro"/>GLIB_MICRO_VERSION</title>
182
 
<indexterm><primary>GLIB_MICRO_VERSION</primary></indexterm><programlisting>#define GLIB_MICRO_VERSION 3
 
173
<refsect2 id="GLIB-MICRO-VERSION--CAPS" role="macro">
 
174
<title>GLIB_MICRO_VERSION</title>
 
175
<indexterm zone="GLIB-MICRO-VERSION--CAPS"><primary sortas="GLIB_MICRO_VERSION">GLIB_MICRO_VERSION</primary></indexterm><programlisting>#define GLIB_MICRO_VERSION 4
183
176
</programlisting>
184
177
<para>
185
178
The micro version number of the GLib library.
187
180
application compile time, rather than from the library linked against
188
181
at application run time.
189
182
</para></refsect2>
190
 
<refsect2>
191
 
<title><anchor id="GLIB-CHECK-VERSION:CAPS" role="macro"/>GLIB_CHECK_VERSION()</title>
192
 
<indexterm><primary>GLIB_CHECK_VERSION</primary></indexterm><programlisting>#define             GLIB_CHECK_VERSION(major,minor,micro)</programlisting>
 
183
<refsect2 id="GLIB-CHECK-VERSION--CAPS" role="macro">
 
184
<title>GLIB_CHECK_VERSION()</title>
 
185
<indexterm zone="GLIB-CHECK-VERSION--CAPS"><primary sortas="GLIB_CHECK_VERSION">GLIB_CHECK_VERSION</primary></indexterm><programlisting>#define             GLIB_CHECK_VERSION(major,minor,micro)</programlisting>
193
186
<para>
194
187
Checks the version of the GLib library.
195
 
Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the version of the GLib header files is the same 
 
188
Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the version of the GLib header files is the same
196
189
as or newer than the passed-in version.
197
 
 
198
190
<example>
199
191
<title>Checking the version of the GLib library</title>
200
192
<programlisting>
203
195
</programlisting>
204
196
</example>
205
197
</para><variablelist role="params">
206
 
<varlistentry><term><parameter>major</parameter>&nbsp;:</term>
 
198
<varlistentry><term><parameter>major</parameter>&#160;:</term>
207
199
<listitem><simpara>the major version number.
208
200
</simpara></listitem></varlistentry>
209
 
<varlistentry><term><parameter>minor</parameter>&nbsp;:</term>
 
201
<varlistentry><term><parameter>minor</parameter>&#160;:</term>
210
202
<listitem><simpara>the minor version number.
211
203
</simpara></listitem></varlistentry>
212
 
<varlistentry><term><parameter>micro</parameter>&nbsp;:</term>
 
204
<varlistentry><term><parameter>micro</parameter>&#160;:</term>
213
205
<listitem><simpara>the micro version number.
214
 
 
215
 
 
216
206
</simpara></listitem></varlistentry>
217
207
</variablelist></refsect2>
218
208
 
221
211
 
222
212
 
223
213
 
224
 
 
225
 
<refsect1><refsect2 /><refsect2 /></refsect1>
226
214
</refentry>