Update to version 2.33.1
[profile/ivi/glib2.git] / docs / reference / glib / html / glib-Basic-Types.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>Basic Types</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GLib Reference Manual">
8 <link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
9 <link rel="prev" href="glib-Version-Information.html" title="Version Information">
10 <link rel="next" href="glib-Standard-Macros.html" title="Standard Macros">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="glib-Version-Information.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GLib Reference Manual</th>
21 <td><a accesskey="n" href="glib-Standard-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#glib-Basic-Types.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#glib-Basic-Types.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="glib-Basic-Types"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="glib-Basic-Types.top_of_page"></a>Basic Types</span></h2>
34 <p>Basic Types — standard GLib types, defined for ease-of-use
35     and portability</p>
36 </td>
37 <td valign="top" align="right"></td>
38 </tr></table></div>
39 <div class="refsynopsisdiv">
40 <a name="glib-Basic-Types.synopsis"></a><h2>Synopsis</h2>
41 <pre class="synopsis">
42 #include &lt;glib.h&gt;
43
44 typedef             <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>;
45 typedef             <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>;
46 typedef             <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a>;
47 typedef             <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a>;
48 typedef             <a class="link" href="glib-Basic-Types.html#guchar" title="guchar">guchar</a>;
49
50 typedef             <a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>;
51 #define             <a class="link" href="glib-Basic-Types.html#G-MININT:CAPS" title="G_MININT">G_MININT</a>
52 #define             <a class="link" href="glib-Basic-Types.html#G-MAXINT:CAPS" title="G_MAXINT">G_MAXINT</a>
53 typedef             <a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>;
54 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUINT:CAPS" title="G_MAXUINT">G_MAXUINT</a>
55 typedef             <a class="link" href="glib-Basic-Types.html#gshort" title="gshort">gshort</a>;
56 #define             <a class="link" href="glib-Basic-Types.html#G-MINSHORT:CAPS" title="G_MINSHORT">G_MINSHORT</a>
57 #define             <a class="link" href="glib-Basic-Types.html#G-MAXSHORT:CAPS" title="G_MAXSHORT">G_MAXSHORT</a>
58 typedef             <a class="link" href="glib-Basic-Types.html#gushort" title="gushort">gushort</a>;
59 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUSHORT:CAPS" title="G_MAXUSHORT">G_MAXUSHORT</a>
60 typedef             <a class="link" href="glib-Basic-Types.html#glong" title="glong">glong</a>;
61 #define             <a class="link" href="glib-Basic-Types.html#G-MINLONG:CAPS" title="G_MINLONG">G_MINLONG</a>
62 #define             <a class="link" href="glib-Basic-Types.html#G-MAXLONG:CAPS" title="G_MAXLONG">G_MAXLONG</a>
63 typedef             <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a>;
64 #define             <a class="link" href="glib-Basic-Types.html#G-MAXULONG:CAPS" title="G_MAXULONG">G_MAXULONG</a>
65
66 typedef             <a class="link" href="glib-Basic-Types.html#gint8" title="gint8">gint8</a>;
67 #define             <a class="link" href="glib-Basic-Types.html#G-MININT8:CAPS" title="G_MININT8">G_MININT8</a>
68 #define             <a class="link" href="glib-Basic-Types.html#G-MAXINT8:CAPS" title="G_MAXINT8">G_MAXINT8</a>
69 typedef             <a class="link" href="glib-Basic-Types.html#guint8" title="guint8">guint8</a>;
70 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUINT8:CAPS" title="G_MAXUINT8">G_MAXUINT8</a>
71 typedef             <a class="link" href="glib-Basic-Types.html#gint16" title="gint16">gint16</a>;
72 #define             <a class="link" href="glib-Basic-Types.html#G-MININT16:CAPS" title="G_MININT16">G_MININT16</a>
73 #define             <a class="link" href="glib-Basic-Types.html#G-MAXINT16:CAPS" title="G_MAXINT16">G_MAXINT16</a>
74 #define             <a class="link" href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER">G_GINT16_MODIFIER</a>
75 #define             <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT">G_GINT16_FORMAT</a>
76 typedef             <a class="link" href="glib-Basic-Types.html#guint16" title="guint16">guint16</a>;
77 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUINT16:CAPS" title="G_MAXUINT16">G_MAXUINT16</a>
78 #define             <a class="link" href="glib-Basic-Types.html#G-GUINT16-FORMAT:CAPS" title="G_GUINT16_FORMAT">G_GUINT16_FORMAT</a>
79 typedef             <a class="link" href="glib-Basic-Types.html#gint32" title="gint32">gint32</a>;
80 #define             <a class="link" href="glib-Basic-Types.html#G-MININT32:CAPS" title="G_MININT32">G_MININT32</a>
81 #define             <a class="link" href="glib-Basic-Types.html#G-MAXINT32:CAPS" title="G_MAXINT32">G_MAXINT32</a>
82 #define             <a class="link" href="glib-Basic-Types.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER">G_GINT32_MODIFIER</a>
83 #define             <a class="link" href="glib-Basic-Types.html#G-GINT32-FORMAT:CAPS" title="G_GINT32_FORMAT">G_GINT32_FORMAT</a>
84 typedef             <a class="link" href="glib-Basic-Types.html#guint32" title="guint32">guint32</a>;
85 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUINT32:CAPS" title="G_MAXUINT32">G_MAXUINT32</a>
86 #define             <a class="link" href="glib-Basic-Types.html#G-GUINT32-FORMAT:CAPS" title="G_GUINT32_FORMAT">G_GUINT32_FORMAT</a>
87 typedef             <a class="link" href="glib-Basic-Types.html#gint64" title="gint64">gint64</a>;
88 #define             <a class="link" href="glib-Basic-Types.html#G-MININT64:CAPS" title="G_MININT64">G_MININT64</a>
89 #define             <a class="link" href="glib-Basic-Types.html#G-MAXINT64:CAPS" title="G_MAXINT64">G_MAXINT64</a>
90 #define             <a class="link" href="glib-Basic-Types.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER">G_GINT64_MODIFIER</a>
91 #define             <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT">G_GINT64_FORMAT</a>
92 #define             <a class="link" href="glib-Basic-Types.html#G-GINT64-CONSTANT:CAPS" title="G_GINT64_CONSTANT()">G_GINT64_CONSTANT</a>                   (val)
93 typedef             <a class="link" href="glib-Basic-Types.html#guint64" title="guint64">guint64</a>;
94 #define             <a class="link" href="glib-Basic-Types.html#G-MAXUINT64:CAPS" title="G_MAXUINT64">G_MAXUINT64</a>
95 #define             <a class="link" href="glib-Basic-Types.html#G-GUINT64-FORMAT:CAPS" title="G_GUINT64_FORMAT">G_GUINT64_FORMAT</a>
96 #define             <a class="link" href="glib-Basic-Types.html#G-GUINT64-CONSTANT:CAPS" title="G_GUINT64_CONSTANT()">G_GUINT64_CONSTANT</a>                  (val)
97
98 typedef             <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat">gfloat</a>;
99 #define             <a class="link" href="glib-Basic-Types.html#G-MINFLOAT:CAPS" title="G_MINFLOAT">G_MINFLOAT</a>
100 #define             <a class="link" href="glib-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT">G_MAXFLOAT</a>
101 typedef             <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble">gdouble</a>;
102 #define             <a class="link" href="glib-Basic-Types.html#G-MINDOUBLE:CAPS" title="G_MINDOUBLE">G_MINDOUBLE</a>
103 #define             <a class="link" href="glib-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE">G_MAXDOUBLE</a>
104
105 typedef             <a class="link" href="glib-Basic-Types.html#gsize" title="gsize">gsize</a>;
106 #define             <a class="link" href="glib-Basic-Types.html#G-MAXSIZE:CAPS" title="G_MAXSIZE">G_MAXSIZE</a>
107 #define             <a class="link" href="glib-Basic-Types.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER">G_GSIZE_MODIFIER</a>
108 #define             <a class="link" href="glib-Basic-Types.html#G-GSIZE-FORMAT:CAPS" title="G_GSIZE_FORMAT">G_GSIZE_FORMAT</a>
109 typedef             <a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a>;
110 #define             <a class="link" href="glib-Basic-Types.html#G-MINSSIZE:CAPS" title="G_MINSSIZE">G_MINSSIZE</a>
111 #define             <a class="link" href="glib-Basic-Types.html#G-MAXSSIZE:CAPS" title="G_MAXSSIZE">G_MAXSSIZE</a>
112 #define             <a class="link" href="glib-Basic-Types.html#G-GSSIZE-FORMAT:CAPS" title="G_GSSIZE_FORMAT">G_GSSIZE_FORMAT</a>
113 typedef             <a class="link" href="glib-Basic-Types.html#goffset" title="goffset">goffset</a>;
114 #define             <a class="link" href="glib-Basic-Types.html#G-MINOFFSET:CAPS" title="G_MINOFFSET">G_MINOFFSET</a>
115 #define             <a class="link" href="glib-Basic-Types.html#G-MAXOFFSET:CAPS" title="G_MAXOFFSET">G_MAXOFFSET</a>
116 #define             <a class="link" href="glib-Basic-Types.html#G-GOFFSET-MODIFIER:CAPS" title="G_GOFFSET_MODIFIER">G_GOFFSET_MODIFIER</a>
117 #define             <a class="link" href="glib-Basic-Types.html#G-GOFFSET-FORMAT:CAPS" title="G_GOFFSET_FORMAT">G_GOFFSET_FORMAT</a>
118 #define             <a class="link" href="glib-Basic-Types.html#G-GOFFSET-CONSTANT:CAPS" title="G_GOFFSET_CONSTANT()">G_GOFFSET_CONSTANT</a>                  (val)
119
120 typedef             <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr">gintptr</a>;
121 #define             <a class="link" href="glib-Basic-Types.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER">G_GINTPTR_MODIFIER</a>
122 #define             <a class="link" href="glib-Basic-Types.html#G-GINTPTR-FORMAT:CAPS" title="G_GINTPTR_FORMAT">G_GINTPTR_FORMAT</a>
123 typedef             <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr">guintptr</a>;
124 #define             <a class="link" href="glib-Basic-Types.html#G-GUINTPTR-FORMAT:CAPS" title="G_GUINTPTR_FORMAT">G_GUINTPTR_FORMAT</a>
125 </pre>
126 </div>
127 <div class="refsect1">
128 <a name="glib-Basic-Types.description"></a><h2>Description</h2>
129 <p>
130 GLib defines a number of commonly used types, which can be divided
131 into 4 groups:
132 </p>
133 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
134 <li class="listitem"><p>New types which are not part of standard C (but are defined in
135   various C standard library header files) - <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a>, <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>,
136   <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>, <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a>, <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a>, <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.</p></li>
137 <li class="listitem"><p>Integer types which are guaranteed to be the same size across
138   all platforms - <a class="link" href="glib-Basic-Types.html#gint8" title="gint8"><span class="type">gint8</span></a>, <a class="link" href="glib-Basic-Types.html#guint8" title="guint8"><span class="type">guint8</span></a>, <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a>, <a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a>, <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a>,
139   <a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a>, <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a>, <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>.</p></li>
140 <li class="listitem"><p>Types which are easier to use than their standard C counterparts -
141   <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a>, <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a>, <a class="link" href="glib-Basic-Types.html#guchar" title="guchar"><span class="type">guchar</span></a>, <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a>, <a class="link" href="glib-Basic-Types.html#gushort" title="gushort"><span class="type">gushort</span></a>, <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a>.</p></li>
142 <li class="listitem"><p>Types which correspond exactly to standard C types, but are
143   included for completeness - <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a>, <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a>, <a class="link" href="glib-Basic-Types.html#gshort" title="gshort"><span class="type">gshort</span></a>, <a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a>,
144   <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat"><span class="type">gfloat</span></a>, <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a>.</p></li>
145 </ul></div>
146 <p>
147 </p>
148 <p>
149 GLib also defines macros for the limits of some of the standard
150 integer and floating point types, as well as macros for suitable
151 <code class="function">printf()</code> formats for these types.
152 </p>
153 </div>
154 <div class="refsect1">
155 <a name="glib-Basic-Types.details"></a><h2>Details</h2>
156 <div class="refsect2">
157 <a name="gboolean"></a><h3>gboolean</h3>
158 <pre class="programlisting">typedef gint   gboolean;
159 </pre>
160 <p>
161 A standard boolean type.
162 Variables of this type should only contain the value
163 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>.
164 </p>
165 </div>
166 <hr>
167 <div class="refsect2">
168 <a name="gpointer"></a><h3>gpointer</h3>
169 <pre class="programlisting">typedef void* gpointer;
170 </pre>
171 <p>
172 An untyped pointer.
173 <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> looks better and is easier to use
174 than <span class="type">void*</span>.
175 </p>
176 </div>
177 <hr>
178 <div class="refsect2">
179 <a name="gconstpointer"></a><h3>gconstpointer</h3>
180 <pre class="programlisting">typedef const void *gconstpointer;
181 </pre>
182 <p>
183 An untyped pointer to constant data.
184 The data pointed to should not be changed.
185 </p>
186 <p>
187 This is typically used in function prototypes to indicate
188 that the data pointed to will not be altered by the function.
189 </p>
190 </div>
191 <hr>
192 <div class="refsect2">
193 <a name="gchar"></a><h3>gchar</h3>
194 <pre class="programlisting">typedef char   gchar;
195 </pre>
196 <p>
197 Corresponds to the standard C <span class="type">char</span> type.
198 </p>
199 </div>
200 <hr>
201 <div class="refsect2">
202 <a name="guchar"></a><h3>guchar</h3>
203 <pre class="programlisting">typedef unsigned char   guchar;
204 </pre>
205 <p>
206 Corresponds to the standard C <span class="type">unsigned char</span> type.
207 </p>
208 </div>
209 <hr>
210 <div class="refsect2">
211 <a name="gint"></a><h3>gint</h3>
212 <pre class="programlisting">typedef int    gint;
213 </pre>
214 <p>
215 Corresponds to the standard C <span class="type">int</span> type.
216 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT:CAPS" title="G_MININT"><span class="type">G_MININT</span></a> to <a class="link" href="glib-Basic-Types.html#G-MAXINT:CAPS" title="G_MAXINT"><span class="type">G_MAXINT</span></a>.
217 </p>
218 </div>
219 <hr>
220 <div class="refsect2">
221 <a name="G-MININT:CAPS"></a><h3>G_MININT</h3>
222 <pre class="programlisting">#define G_MININT INT_MIN
223 </pre>
224 <p>
225 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a>.
226 </p>
227 </div>
228 <hr>
229 <div class="refsect2">
230 <a name="G-MAXINT:CAPS"></a><h3>G_MAXINT</h3>
231 <pre class="programlisting">#define G_MAXINT INT_MAX
232 </pre>
233 <p>
234 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a>.
235 </p>
236 </div>
237 <hr>
238 <div class="refsect2">
239 <a name="guint"></a><h3>guint</h3>
240 <pre class="programlisting">typedef unsigned int    guint;
241 </pre>
242 <p>
243 Corresponds to the standard C <span class="type">unsigned int</span> type.
244 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT:CAPS" title="G_MAXUINT"><span class="type">G_MAXUINT</span></a>.
245 </p>
246 </div>
247 <hr>
248 <div class="refsect2">
249 <a name="G-MAXUINT:CAPS"></a><h3>G_MAXUINT</h3>
250 <pre class="programlisting">#define G_MAXUINT UINT_MAX
251 </pre>
252 <p>
253 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a>.
254 </p>
255 </div>
256 <hr>
257 <div class="refsect2">
258 <a name="gshort"></a><h3>gshort</h3>
259 <pre class="programlisting">typedef short  gshort;
260 </pre>
261 <p>
262 Corresponds to the standard C <span class="type">short</span> type.
263 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MINSHORT:CAPS" title="G_MINSHORT"><span class="type">G_MINSHORT</span></a> to <a class="link" href="glib-Basic-Types.html#G-MAXSHORT:CAPS" title="G_MAXSHORT"><span class="type">G_MAXSHORT</span></a>.
264 </p>
265 </div>
266 <hr>
267 <div class="refsect2">
268 <a name="G-MINSHORT:CAPS"></a><h3>G_MINSHORT</h3>
269 <pre class="programlisting">#define G_MINSHORT SHRT_MIN
270 </pre>
271 <p>
272 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gshort" title="gshort"><span class="type">gshort</span></a>.
273 </p>
274 </div>
275 <hr>
276 <div class="refsect2">
277 <a name="G-MAXSHORT:CAPS"></a><h3>G_MAXSHORT</h3>
278 <pre class="programlisting">#define G_MAXSHORT SHRT_MAX
279 </pre>
280 <p>
281 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gshort" title="gshort"><span class="type">gshort</span></a>.
282 </p>
283 </div>
284 <hr>
285 <div class="refsect2">
286 <a name="gushort"></a><h3>gushort</h3>
287 <pre class="programlisting">typedef unsigned short  gushort;
288 </pre>
289 <p>
290 Corresponds to the standard C <span class="type">unsigned short</span> type.
291 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUSHORT:CAPS" title="G_MAXUSHORT"><span class="type">G_MAXUSHORT</span></a>.
292 </p>
293 </div>
294 <hr>
295 <div class="refsect2">
296 <a name="G-MAXUSHORT:CAPS"></a><h3>G_MAXUSHORT</h3>
297 <pre class="programlisting">#define G_MAXUSHORT USHRT_MAX
298 </pre>
299 <p>
300 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gushort" title="gushort"><span class="type">gushort</span></a>.
301 </p>
302 </div>
303 <hr>
304 <div class="refsect2">
305 <a name="glong"></a><h3>glong</h3>
306 <pre class="programlisting">typedef long   glong;
307 </pre>
308 <p>
309 Corresponds to the standard C <span class="type">long</span> type.
310 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MINLONG:CAPS" title="G_MINLONG"><span class="type">G_MINLONG</span></a> to <a class="link" href="glib-Basic-Types.html#G-MAXLONG:CAPS" title="G_MAXLONG"><span class="type">G_MAXLONG</span></a>.
311 </p>
312 </div>
313 <hr>
314 <div class="refsect2">
315 <a name="G-MINLONG:CAPS"></a><h3>G_MINLONG</h3>
316 <pre class="programlisting">#define G_MINLONG LONG_MIN
317 </pre>
318 <p>
319 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a>.
320 </p>
321 </div>
322 <hr>
323 <div class="refsect2">
324 <a name="G-MAXLONG:CAPS"></a><h3>G_MAXLONG</h3>
325 <pre class="programlisting">#define G_MAXLONG LONG_MAX
326 </pre>
327 <p>
328 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a>.
329 </p>
330 </div>
331 <hr>
332 <div class="refsect2">
333 <a name="gulong"></a><h3>gulong</h3>
334 <pre class="programlisting">typedef unsigned long   gulong;
335 </pre>
336 <p>
337 Corresponds to the standard C <span class="type">unsigned long</span> type.
338 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXULONG:CAPS" title="G_MAXULONG"><span class="type">G_MAXULONG</span></a>.
339 </p>
340 </div>
341 <hr>
342 <div class="refsect2">
343 <a name="G-MAXULONG:CAPS"></a><h3>G_MAXULONG</h3>
344 <pre class="programlisting">#define G_MAXULONG ULONG_MAX
345 </pre>
346 <p>
347 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a>.
348 </p>
349 </div>
350 <hr>
351 <div class="refsect2">
352 <a name="gint8"></a><h3>gint8</h3>
353 <pre class="programlisting">typedef signed char gint8;
354 </pre>
355 <p>
356 A signed integer guaranteed to be 8 bits on all platforms.
357 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT8:CAPS" title="G_MININT8"><span class="type">G_MININT8</span></a> (= -128) to
358 <a class="link" href="glib-Basic-Types.html#G-MAXINT8:CAPS" title="G_MAXINT8"><span class="type">G_MAXINT8</span></a> (= 127).
359 </p>
360 </div>
361 <hr>
362 <div class="refsect2">
363 <a name="G-MININT8:CAPS"></a><h3>G_MININT8</h3>
364 <pre class="programlisting">#define G_MININT8 ((gint8)  0x80)
365 </pre>
366 <p>
367 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint8" title="gint8"><span class="type">gint8</span></a>.
368 </p>
369 <p class="since">Since 2.4</p>
370 </div>
371 <hr>
372 <div class="refsect2">
373 <a name="G-MAXINT8:CAPS"></a><h3>G_MAXINT8</h3>
374 <pre class="programlisting">#define G_MAXINT8 ((gint8)  0x7f)
375 </pre>
376 <p>
377 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint8" title="gint8"><span class="type">gint8</span></a>.
378 </p>
379 <p class="since">Since 2.4</p>
380 </div>
381 <hr>
382 <div class="refsect2">
383 <a name="guint8"></a><h3>guint8</h3>
384 <pre class="programlisting">typedef unsigned char guint8;
385 </pre>
386 <p>
387 An unsigned integer guaranteed to be 8 bits on all platforms.
388 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT8:CAPS" title="G_MAXUINT8"><span class="type">G_MAXUINT8</span></a> (= 255).
389 </p>
390 </div>
391 <hr>
392 <div class="refsect2">
393 <a name="G-MAXUINT8:CAPS"></a><h3>G_MAXUINT8</h3>
394 <pre class="programlisting">#define G_MAXUINT8 ((guint8) 0xff)
395 </pre>
396 <p>
397 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#guint8" title="guint8"><span class="type">guint8</span></a>.
398 </p>
399 <p class="since">Since 2.4</p>
400 </div>
401 <hr>
402 <div class="refsect2">
403 <a name="gint16"></a><h3>gint16</h3>
404 <pre class="programlisting">typedef signed short gint16;
405 </pre>
406 <p>
407 A signed integer guaranteed to be 16 bits on all platforms.
408 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT16:CAPS" title="G_MININT16"><span class="type">G_MININT16</span></a> (= -32,768) to
409 <a class="link" href="glib-Basic-Types.html#G-MAXINT16:CAPS" title="G_MAXINT16"><span class="type">G_MAXINT16</span></a> (= 32,767).
410 </p>
411 <p>
412 To print or scan values of this type, use
413 <a class="link" href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><code class="literal">G_GINT16_FORMAT</code></a>.
414 </p>
415 </div>
416 <hr>
417 <div class="refsect2">
418 <a name="G-MININT16:CAPS"></a><h3>G_MININT16</h3>
419 <pre class="programlisting">#define G_MININT16 ((gint16)  0x8000)
420 </pre>
421 <p>
422 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a>.
423 </p>
424 <p class="since">Since 2.4</p>
425 </div>
426 <hr>
427 <div class="refsect2">
428 <a name="G-MAXINT16:CAPS"></a><h3>G_MAXINT16</h3>
429 <pre class="programlisting">#define G_MAXINT16 ((gint16)  0x7fff)
430 </pre>
431 <p>
432 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a>.
433 </p>
434 <p class="since">Since 2.4</p>
435 </div>
436 <hr>
437 <div class="refsect2">
438 <a name="G-GINT16-MODIFIER:CAPS"></a><h3>G_GINT16_MODIFIER</h3>
439 <pre class="programlisting">#define G_GINT16_MODIFIER "h"
440 </pre>
441 <p>
442 The platform dependent length modifier for conversion specifiers
443 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a> or <a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a>. It
444 is a string literal, but doesn't include the percent-sign, such
445 that you can add precision and length modifiers between percent-sign
446 and conversion specifier and append a conversion specifier.
447 </p>
448 <p>
449 The following example prints "0x7b";
450 </p>
451 <div class="informalexample"><pre class="programlisting">
452 gint16 value = 123;
453 g_print ("%#" G_GINT16_MODIFIER "x", value);
454 </pre></div>
455 <p>
456 </p>
457 <p class="since">Since 2.4</p>
458 </div>
459 <hr>
460 <div class="refsect2">
461 <a name="G-GINT16-FORMAT:CAPS"></a><h3>G_GINT16_FORMAT</h3>
462 <pre class="programlisting">#define G_GINT16_FORMAT "hi"
463 </pre>
464 <p>
465 This is the platform dependent conversion specifier for scanning and
466 printing values of type <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a>. It is a string literal, but doesn't
467 include the percent-sign, such that you can add precision and length
468 modifiers between percent-sign and conversion specifier.
469 </p>
470 <p>
471 </p>
472 <div class="informalexample"><pre class="programlisting">
473 gint16 in;
474 gint32 out;
475 sscanf ("42", "%" G_GINT16_FORMAT, &amp;in)
476 out = in * 1000;
477 g_print ("%" G_GINT32_FORMAT, out);
478 </pre></div>
479 <p>
480 </p>
481 </div>
482 <hr>
483 <div class="refsect2">
484 <a name="guint16"></a><h3>guint16</h3>
485 <pre class="programlisting">typedef unsigned short guint16;
486 </pre>
487 <p>
488 An unsigned integer guaranteed to be 16 bits on all platforms.
489 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT16:CAPS" title="G_MAXUINT16"><span class="type">G_MAXUINT16</span></a> (= 65,535).
490 </p>
491 <p>
492 To print or scan values of this type, use
493 <a class="link" href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINT16-FORMAT:CAPS" title="G_GUINT16_FORMAT"><code class="literal">G_GUINT16_FORMAT</code></a>.
494 </p>
495 </div>
496 <hr>
497 <div class="refsect2">
498 <a name="G-MAXUINT16:CAPS"></a><h3>G_MAXUINT16</h3>
499 <pre class="programlisting">#define G_MAXUINT16 ((guint16) 0xffff)
500 </pre>
501 <p>
502 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a>.
503 </p>
504 <p class="since">Since 2.4</p>
505 </div>
506 <hr>
507 <div class="refsect2">
508 <a name="G-GUINT16-FORMAT:CAPS"></a><h3>G_GUINT16_FORMAT</h3>
509 <pre class="programlisting">#define G_GUINT16_FORMAT "hu"
510 </pre>
511 <p>
512 This is the platform dependent conversion specifier for scanning
513 and printing values of type <a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>
514 </p>
515 </div>
516 <hr>
517 <div class="refsect2">
518 <a name="gint32"></a><h3>gint32</h3>
519 <pre class="programlisting">typedef signed int gint32;
520 </pre>
521 <p>
522 A signed integer guaranteed to be 32 bits on all platforms.
523 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT32:CAPS" title="G_MININT32"><span class="type">G_MININT32</span></a> (= -2,147,483,648)
524 to <a class="link" href="glib-Basic-Types.html#G-MAXINT32:CAPS" title="G_MAXINT32"><span class="type">G_MAXINT32</span></a> (= 2,147,483,647).
525 </p>
526 <p>
527 To print or scan values of this type, use
528 <a class="link" href="glib-Basic-Types.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GINT32-FORMAT:CAPS" title="G_GINT32_FORMAT"><code class="literal">G_GINT32_FORMAT</code></a>.
529 </p>
530 </div>
531 <hr>
532 <div class="refsect2">
533 <a name="G-MININT32:CAPS"></a><h3>G_MININT32</h3>
534 <pre class="programlisting">#define G_MININT32 ((gint32)  0x80000000)
535 </pre>
536 <p>
537 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a>.
538 </p>
539 <p class="since">Since 2.4</p>
540 </div>
541 <hr>
542 <div class="refsect2">
543 <a name="G-MAXINT32:CAPS"></a><h3>G_MAXINT32</h3>
544 <pre class="programlisting">#define G_MAXINT32 ((gint32)  0x7fffffff)
545 </pre>
546 <p>
547 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a>.
548 </p>
549 <p class="since">Since 2.4</p>
550 </div>
551 <hr>
552 <div class="refsect2">
553 <a name="G-GINT32-MODIFIER:CAPS"></a><h3>G_GINT32_MODIFIER</h3>
554 <pre class="programlisting">#define G_GINT32_MODIFIER ""
555 </pre>
556 <p>
557 The platform dependent length modifier for conversion specifiers
558 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a> or <a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a>. It
559 is a string literal. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><span class="type">G_GINT16_MODIFIER</span></a>.
560 </p>
561 <p class="since">Since 2.4</p>
562 </div>
563 <hr>
564 <div class="refsect2">
565 <a name="G-GINT32-FORMAT:CAPS"></a><h3>G_GINT32_FORMAT</h3>
566 <pre class="programlisting">#define G_GINT32_FORMAT "i"
567 </pre>
568 <p>
569 This is the platform dependent conversion specifier for scanning
570 and printing values of type <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
571 </p>
572 </div>
573 <hr>
574 <div class="refsect2">
575 <a name="guint32"></a><h3>guint32</h3>
576 <pre class="programlisting">typedef unsigned int guint32;
577 </pre>
578 <p>
579 An unsigned integer guaranteed to be 32 bits on all platforms.
580 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT32:CAPS" title="G_MAXUINT32"><span class="type">G_MAXUINT32</span></a> (= 4,294,967,295).
581 </p>
582 <p>
583 To print or scan values of this type, use
584 <a class="link" href="glib-Basic-Types.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINT32-FORMAT:CAPS" title="G_GUINT32_FORMAT"><code class="literal">G_GUINT32_FORMAT</code></a>.
585 </p>
586 </div>
587 <hr>
588 <div class="refsect2">
589 <a name="G-MAXUINT32:CAPS"></a><h3>G_MAXUINT32</h3>
590 <pre class="programlisting">#define G_MAXUINT32 ((guint32) 0xffffffff)
591 </pre>
592 <p>
593 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a>.
594 </p>
595 <p class="since">Since 2.4</p>
596 </div>
597 <hr>
598 <div class="refsect2">
599 <a name="G-GUINT32-FORMAT:CAPS"></a><h3>G_GUINT32_FORMAT</h3>
600 <pre class="programlisting">#define G_GUINT32_FORMAT "u"
601 </pre>
602 <p>
603 This is the platform dependent conversion specifier for scanning
604 and printing values of type <a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
605 </p>
606 </div>
607 <hr>
608 <div class="refsect2">
609 <a name="gint64"></a><h3>gint64</h3>
610 <pre class="programlisting">typedef signed long gint64;
611 </pre>
612 <p>
613 A signed integer guaranteed to be 64 bits on all platforms.
614 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT64:CAPS" title="G_MININT64"><span class="type">G_MININT64</span></a>
615 (= -9,223,372,036,854,775,808) to <a class="link" href="glib-Basic-Types.html#G-MAXINT64:CAPS" title="G_MAXINT64"><span class="type">G_MAXINT64</span></a>
616 (= 9,223,372,036,854,775,807).
617 </p>
618 <p>
619 To print or scan values of this type, use
620 <a class="link" href="glib-Basic-Types.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><code class="literal">G_GINT64_FORMAT</code></a>.
621 </p>
622 </div>
623 <hr>
624 <div class="refsect2">
625 <a name="G-MININT64:CAPS"></a><h3>G_MININT64</h3>
626 <pre class="programlisting">#define G_MININT64 ((gint64) G_GINT64_CONSTANT(0x8000000000000000))
627 </pre>
628 <p>
629 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a>.
630 </p>
631 </div>
632 <hr>
633 <div class="refsect2">
634 <a name="G-MAXINT64:CAPS"></a><h3>G_MAXINT64</h3>
635 <pre class="programlisting">#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
636 </pre>
637 <p>
638 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a>.
639 </p>
640 </div>
641 <hr>
642 <div class="refsect2">
643 <a name="G-GINT64-MODIFIER:CAPS"></a><h3>G_GINT64_MODIFIER</h3>
644 <pre class="programlisting">#define G_GINT64_MODIFIER "l"
645 </pre>
646 <p>
647 The platform dependent length modifier for conversion specifiers
648 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> or <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>.
649 It is a string literal.
650 </p>
651 <p>
652 </p>
653 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
654 <h3 class="title">Note</h3>
655 <p>
656 Some platforms do not support printing 64 bit integers, even
657 though the types are supported. On such platforms <a class="link" href="glib-Basic-Types.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><span class="type">G_GINT64_MODIFIER</span></a>
658 is not defined.
659 </p>
660 </div>
661 <p>
662 </p>
663 <p class="since">Since 2.4</p>
664 </div>
665 <hr>
666 <div class="refsect2">
667 <a name="G-GINT64-FORMAT:CAPS"></a><h3>G_GINT64_FORMAT</h3>
668 <pre class="programlisting">#define G_GINT64_FORMAT "li"
669 </pre>
670 <p>
671 This is the platform dependent conversion specifier for scanning
672 and printing values of type <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
673 </p>
674 <p>
675 </p>
676 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
677 <h3 class="title">Note</h3>
678 <p>
679 Some platforms do not support scanning and printing 64 bit integers,
680 even though the types are supported. On such platforms <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><span class="type">G_GINT64_FORMAT</span></a>
681 is not defined. Note that <code class="function">scanf()</code> may not support 64 bit integers, even
682 if <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><span class="type">G_GINT64_FORMAT</span></a> is defined. Due to its weak error handling, <code class="function">scanf()</code>
683 is not recommended for parsing anyway; consider using <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtoull" title="g_ascii_strtoull ()"><code class="function">g_ascii_strtoull()</code></a>
684 instead.
685 </p>
686 </div>
687 <p>
688 </p>
689 </div>
690 <hr>
691 <div class="refsect2">
692 <a name="G-GINT64-CONSTANT:CAPS"></a><h3>G_GINT64_CONSTANT()</h3>
693 <pre class="programlisting">#define G_GINT64_CONSTANT(val) (val##L)
694 </pre>
695 <p>
696 This macro is used to insert 64-bit integer literals
697 into the source code.
698 </p>
699 <div class="variablelist"><table border="0">
700 <col align="left" valign="top">
701 <tbody><tr>
702 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
703 <td>a literal integer value, e.g. 0x1d636b02300a7aa7</td>
704 </tr></tbody>
705 </table></div>
706 </div>
707 <hr>
708 <div class="refsect2">
709 <a name="guint64"></a><h3>guint64</h3>
710 <pre class="programlisting">typedef unsigned long guint64;
711 </pre>
712 <p>
713 An unsigned integer guaranteed to be 64 bits on all platforms.
714 Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT64:CAPS" title="G_MAXUINT64"><span class="type">G_MAXUINT64</span></a>
715 (= 18,446,744,073,709,551,615).
716 </p>
717 <p>
718 To print or scan values of this type, use
719 <a class="link" href="glib-Basic-Types.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINT64-FORMAT:CAPS" title="G_GUINT64_FORMAT"><code class="literal">G_GUINT64_FORMAT</code></a>.
720 </p>
721 </div>
722 <hr>
723 <div class="refsect2">
724 <a name="G-MAXUINT64:CAPS"></a><h3>G_MAXUINT64</h3>
725 <pre class="programlisting">#define G_MAXUINT64 G_GINT64_CONSTANT(0xffffffffffffffffU)
726 </pre>
727 <p>
728 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>.
729 </p>
730 </div>
731 <hr>
732 <div class="refsect2">
733 <a name="G-GUINT64-FORMAT:CAPS"></a><h3>G_GUINT64_FORMAT</h3>
734 <pre class="programlisting">#define G_GUINT64_FORMAT "lu"
735 </pre>
736 <p>
737 This is the platform dependent conversion specifier for scanning
738 and printing values of type <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
739 </p>
740 <p>
741 </p>
742 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
743 <h3 class="title">Note</h3>
744 <p>
745 Some platforms do not support scanning and printing 64 bit integers,
746 even though the types are supported. On such platforms <a class="link" href="glib-Basic-Types.html#G-GUINT64-FORMAT:CAPS" title="G_GUINT64_FORMAT"><span class="type">G_GUINT64_FORMAT</span></a>
747 is not defined.  Note that <code class="function">scanf()</code> may not support 64 bit integers, even
748 if <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><span class="type">G_GINT64_FORMAT</span></a> is defined. Due to its weak error handling, <code class="function">scanf()</code>
749 is not recommended for parsing anyway; consider using <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtoull" title="g_ascii_strtoull ()"><code class="function">g_ascii_strtoull()</code></a>
750 instead.
751 </p>
752 </div>
753 <p>
754 </p>
755 </div>
756 <hr>
757 <div class="refsect2">
758 <a name="G-GUINT64-CONSTANT:CAPS"></a><h3>G_GUINT64_CONSTANT()</h3>
759 <pre class="programlisting">#define G_GUINT64_CONSTANT(val) (val##UL)
760 </pre>
761 <p>
762 This macro is used to insert 64-bit unsigned integer
763 literals into the source code.
764 </p>
765 <div class="variablelist"><table border="0">
766 <col align="left" valign="top">
767 <tbody><tr>
768 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
769 <td>a literal integer value, e.g. 0x1d636b02300a7aa7U</td>
770 </tr></tbody>
771 </table></div>
772 <p class="since">Since 2.10</p>
773 </div>
774 <hr>
775 <div class="refsect2">
776 <a name="gfloat"></a><h3>gfloat</h3>
777 <pre class="programlisting">typedef float   gfloat;
778 </pre>
779 <p>
780 Corresponds to the standard C <span class="type">float</span> type.
781 Values of this type can range from -<a class="link" href="glib-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a> to <a class="link" href="glib-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a>.
782 </p>
783 </div>
784 <hr>
785 <div class="refsect2">
786 <a name="G-MINFLOAT:CAPS"></a><h3>G_MINFLOAT</h3>
787 <pre class="programlisting">#define G_MINFLOAT FLT_MIN
788 </pre>
789 <p>
790 The minimum positive value which can be held in a <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat"><span class="type">gfloat</span></a>.
791 </p>
792 <p>
793 If you are interested in the smallest value which can be held
794 in a <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat"><span class="type">gfloat</span></a>, use -G_MAXFLOAT.
795 </p>
796 </div>
797 <hr>
798 <div class="refsect2">
799 <a name="G-MAXFLOAT:CAPS"></a><h3>G_MAXFLOAT</h3>
800 <pre class="programlisting">#define G_MAXFLOAT FLT_MAX
801 </pre>
802 <p>
803 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat"><span class="type">gfloat</span></a>.
804 </p>
805 </div>
806 <hr>
807 <div class="refsect2">
808 <a name="gdouble"></a><h3>gdouble</h3>
809 <pre class="programlisting">typedef double  gdouble;
810 </pre>
811 <p>
812 Corresponds to the standard C <span class="type">double</span> type.
813 Values of this type can range from -<a class="link" href="glib-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a> to <a class="link" href="glib-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a>.
814 </p>
815 </div>
816 <hr>
817 <div class="refsect2">
818 <a name="G-MINDOUBLE:CAPS"></a><h3>G_MINDOUBLE</h3>
819 <pre class="programlisting">#define G_MINDOUBLE DBL_MIN
820 </pre>
821 <p>
822 The minimum positive value which can be held in a <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a>.
823 </p>
824 <p>
825 If you are interested in the smallest value which can be held
826 in a <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a>, use -G_MAXDOUBLE.
827 </p>
828 </div>
829 <hr>
830 <div class="refsect2">
831 <a name="G-MAXDOUBLE:CAPS"></a><h3>G_MAXDOUBLE</h3>
832 <pre class="programlisting">#define G_MAXDOUBLE DBL_MAX
833 </pre>
834 <p>
835 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a>.
836 </p>
837 </div>
838 <hr>
839 <div class="refsect2">
840 <a name="gsize"></a><h3>gsize</h3>
841 <pre class="programlisting">typedef unsigned long gsize;
842 </pre>
843 <p>
844 An unsigned integer type of the result of the sizeof operator,
845 corresponding to the <span class="type">size_t</span> type defined in C99.
846 This type is wide enough to hold the numeric value of a pointer,
847 so it is usually 32bit wide on a 32bit platform and 64bit wide
848 on a 64bit platform. Values of this type can range from 0 to
849 <a class="link" href="glib-Basic-Types.html#G-MAXSIZE:CAPS" title="G_MAXSIZE"><span class="type">G_MAXSIZE</span></a>.
850 </p>
851 <p>
852 To print or scan values of this type, use
853 <a class="link" href="glib-Basic-Types.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GSIZE-FORMAT:CAPS" title="G_GSIZE_FORMAT"><code class="literal">G_GSIZE_FORMAT</code></a>.
854 </p>
855 </div>
856 <hr>
857 <div class="refsect2">
858 <a name="G-MAXSIZE:CAPS"></a><h3>G_MAXSIZE</h3>
859 <pre class="programlisting">#define G_MAXSIZE G_MAXULONG
860 </pre>
861 <p>
862 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>.
863 </p>
864 <p class="since">Since 2.4</p>
865 </div>
866 <hr>
867 <div class="refsect2">
868 <a name="G-GSIZE-MODIFIER:CAPS"></a><h3>G_GSIZE_MODIFIER</h3>
869 <pre class="programlisting">#define G_GSIZE_MODIFIER "l"
870 </pre>
871 <p>
872 The platform dependent length modifier for conversion specifiers
873 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> or <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>. It
874 is a string literal.
875 </p>
876 <p class="since">Since 2.6</p>
877 </div>
878 <hr>
879 <div class="refsect2">
880 <a name="G-GSIZE-FORMAT:CAPS"></a><h3>G_GSIZE_FORMAT</h3>
881 <pre class="programlisting">#define G_GSIZE_FORMAT "lu"
882 </pre>
883 <p>
884 This is the platform dependent conversion specifier for scanning
885 and printing values of type <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
886 </p>
887 <p class="since">Since 2.6</p>
888 </div>
889 <hr>
890 <div class="refsect2">
891 <a name="gssize"></a><h3>gssize</h3>
892 <pre class="programlisting">typedef signed long gssize;
893 </pre>
894 <p>
895 A signed variant of <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>, corresponding to the
896 <span class="type">ssize_t</span> defined on most platforms.
897 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MINSSIZE:CAPS" title="G_MINSSIZE"><span class="type">G_MINSSIZE</span></a>
898 to <a class="link" href="glib-Basic-Types.html#G-MAXSSIZE:CAPS" title="G_MAXSSIZE"><span class="type">G_MAXSSIZE</span></a>.
899 </p>
900 <p>
901 To print or scan values of this type, use
902 <a class="link" href="glib-Basic-Types.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GSSIZE-FORMAT:CAPS" title="G_GSSIZE_FORMAT"><code class="literal">G_GSSIZE_FORMAT</code></a>.
903 </p>
904 </div>
905 <hr>
906 <div class="refsect2">
907 <a name="G-MINSSIZE:CAPS"></a><h3>G_MINSSIZE</h3>
908 <pre class="programlisting">#define G_MINSSIZE G_MINLONG
909 </pre>
910 <p>
911 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>.
912 </p>
913 <p class="since">Since 2.14</p>
914 </div>
915 <hr>
916 <div class="refsect2">
917 <a name="G-MAXSSIZE:CAPS"></a><h3>G_MAXSSIZE</h3>
918 <pre class="programlisting">#define G_MAXSSIZE G_MAXLONG
919 </pre>
920 <p>
921 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>.
922 </p>
923 <p class="since">Since 2.14</p>
924 </div>
925 <hr>
926 <div class="refsect2">
927 <a name="G-GSSIZE-FORMAT:CAPS"></a><h3>G_GSSIZE_FORMAT</h3>
928 <pre class="programlisting">#define G_GSSIZE_FORMAT "li"
929 </pre>
930 <p>
931 This is the platform dependent conversion specifier for scanning
932 and printing values of type <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.
933 </p>
934 <p class="since">Since 2.6</p>
935 </div>
936 <hr>
937 <div class="refsect2">
938 <a name="goffset"></a><h3>goffset</h3>
939 <pre class="programlisting">typedef gint64 goffset;
940 </pre>
941 <p>
942 A signed integer type that is used for file offsets,
943 corresponding to the C99 type <span class="type">off64_t</span>.
944 Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MINOFFSET:CAPS" title="G_MINOFFSET"><span class="type">G_MINOFFSET</span></a> to
945 <a class="link" href="glib-Basic-Types.html#G-MAXOFFSET:CAPS" title="G_MAXOFFSET"><span class="type">G_MAXOFFSET</span></a>.
946 </p>
947 <p>
948 To print or scan values of this type, use
949 <a class="link" href="glib-Basic-Types.html#G-GOFFSET-MODIFIER:CAPS" title="G_GOFFSET_MODIFIER"><code class="literal">G_GOFFSET_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GOFFSET-FORMAT:CAPS" title="G_GOFFSET_FORMAT"><code class="literal">G_GOFFSET_FORMAT</code></a>.
950 </p>
951 <p class="since">Since 2.14</p>
952 </div>
953 <hr>
954 <div class="refsect2">
955 <a name="G-MINOFFSET:CAPS"></a><h3>G_MINOFFSET</h3>
956 <pre class="programlisting">#define G_MINOFFSET G_MININT64
957 </pre>
958 <p>
959 The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a>.
960 </p>
961 </div>
962 <hr>
963 <div class="refsect2">
964 <a name="G-MAXOFFSET:CAPS"></a><h3>G_MAXOFFSET</h3>
965 <pre class="programlisting">#define G_MAXOFFSET G_MAXINT64
966 </pre>
967 <p>
968 The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a>.
969 </p>
970 </div>
971 <hr>
972 <div class="refsect2">
973 <a name="G-GOFFSET-MODIFIER:CAPS"></a><h3>G_GOFFSET_MODIFIER</h3>
974 <pre class="programlisting">#define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER
975 </pre>
976 <p>
977 The platform dependent length modifier for conversion specifiers
978 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a>. It is a string
979 literal. See also <a class="link" href="glib-Basic-Types.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><span class="type">G_GINT64_MODIFIER</span></a>.
980 </p>
981 <p class="since">Since 2.20</p>
982 </div>
983 <hr>
984 <div class="refsect2">
985 <a name="G-GOFFSET-FORMAT:CAPS"></a><h3>G_GOFFSET_FORMAT</h3>
986 <pre class="programlisting">#define G_GOFFSET_FORMAT        G_GINT64_FORMAT
987 </pre>
988 <p>
989 This is the platform dependent conversion specifier for scanning
990 and printing values of type <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><span class="type">G_GINT64_FORMAT</span></a>.
991 </p>
992 <p class="since">Since 2.20</p>
993 </div>
994 <hr>
995 <div class="refsect2">
996 <a name="G-GOFFSET-CONSTANT:CAPS"></a><h3>G_GOFFSET_CONSTANT()</h3>
997 <pre class="programlisting">#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
998 </pre>
999 <p>
1000 This macro is used to insert <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a> 64-bit integer literals
1001 into the source code.
1002 </p>
1003 <p>
1004 See also <a class="link" href="glib-Basic-Types.html#G-GINT64-CONSTANT:CAPS" title="G_GINT64_CONSTANT()"><span class="type">G_GINT64_CONSTANT</span></a>.
1005 </p>
1006 <div class="variablelist"><table border="0">
1007 <col align="left" valign="top">
1008 <tbody><tr>
1009 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
1010 <td>a literal integer value, e.g. 0x1d636b02300a7aa7</td>
1011 </tr></tbody>
1012 </table></div>
1013 <p class="since">Since 2.20</p>
1014 </div>
1015 <hr>
1016 <div class="refsect2">
1017 <a name="gintptr"></a><h3>gintptr</h3>
1018 <pre class="programlisting">typedef signed long gintptr;
1019 </pre>
1020 <p>
1021 Corresponds to the C99 type <span class="type">intptr_t</span>,
1022 a signed integer type that can hold any pointer.
1023 </p>
1024 <p>
1025 To print or scan values of this type, use
1026 <a class="link" href="glib-Basic-Types.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GINTPTR-FORMAT:CAPS" title="G_GINTPTR_FORMAT"><code class="literal">G_GINTPTR_FORMAT</code></a>.
1027 </p>
1028 <p class="since">Since 2.18</p>
1029 </div>
1030 <hr>
1031 <div class="refsect2">
1032 <a name="G-GINTPTR-MODIFIER:CAPS"></a><h3>G_GINTPTR_MODIFIER</h3>
1033 <pre class="programlisting">#define G_GINTPTR_MODIFIER      "l"
1034 </pre>
1035 <p>
1036 The platform dependent length modifier for conversion specifiers
1037 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a> or <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.
1038 It is a string literal.
1039 </p>
1040 <p class="since">Since 2.22</p>
1041 </div>
1042 <hr>
1043 <div class="refsect2">
1044 <a name="G-GINTPTR-FORMAT:CAPS"></a><h3>G_GINTPTR_FORMAT</h3>
1045 <pre class="programlisting">#define G_GINTPTR_FORMAT        "li"
1046 </pre>
1047 <p>
1048 This is the platform dependent conversion specifier for scanning
1049 and printing values of type <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a>.
1050 </p>
1051 <p class="since">Since 2.22</p>
1052 </div>
1053 <hr>
1054 <div class="refsect2">
1055 <a name="guintptr"></a><h3>guintptr</h3>
1056 <pre class="programlisting">typedef unsigned long guintptr;
1057 </pre>
1058 <p>
1059 Corresponds to the C99 type <span class="type">uintptr_t</span>,
1060 an unsigned integer type that can hold any pointer.
1061 </p>
1062 <p>
1063 To print or scan values of this type, use
1064 <a class="link" href="glib-Basic-Types.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINTPTR-FORMAT:CAPS" title="G_GUINTPTR_FORMAT"><code class="literal">G_GUINTPTR_FORMAT</code></a>.
1065 </p>
1066 <p class="since">Since 2.18</p>
1067 </div>
1068 <hr>
1069 <div class="refsect2">
1070 <a name="G-GUINTPTR-FORMAT:CAPS"></a><h3>G_GUINTPTR_FORMAT</h3>
1071 <pre class="programlisting">#define G_GUINTPTR_FORMAT       "lu"
1072 </pre>
1073 <p>
1074 This is the platform dependent conversion specifier
1075 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.
1076 </p>
1077 <p class="since">Since 2.22</p>
1078 </div>
1079 </div>
1080 </div>
1081 <div class="footer">
1082 <hr>
1083           Generated by GTK-Doc V1.18</div>
1084 </body>
1085 </html>