Tizen 2.1 base
[platform/upstream/glib2.0.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">
452   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
453     <tbody>
454       <tr>
455         <td class="listing_lines" align="right"><pre>1
456 2</pre></td>
457         <td class="listing_code"><pre class="programlisting"><span class="usertype">gint16</span><span class="normal"> value </span><span class="symbol">=</span><span class="normal"> </span><span class="number">123</span><span class="symbol">;</span>
458 <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%#"</span><span class="normal"> <a href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS">G_GINT16_MODIFIER</a> </span><span class="string">"x"</span><span class="symbol">,</span><span class="normal"> value</span><span class="symbol">);</span></pre></td>
459       </tr>
460     </tbody>
461   </table>
462 </div>
463
464 <p>
465 </p>
466 <p class="since">Since 2.4</p>
467 </div>
468 <hr>
469 <div class="refsect2">
470 <a name="G-GINT16-FORMAT:CAPS"></a><h3>G_GINT16_FORMAT</h3>
471 <pre class="programlisting">#define G_GINT16_FORMAT "hi"
472 </pre>
473 <p>
474 This is the platform dependent conversion specifier for scanning and
475 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
476 include the percent-sign, such that you can add precision and length
477 modifiers between percent-sign and conversion specifier.
478 </p>
479 <p>
480 </p>
481 <div class="informalexample">
482   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
483     <tbody>
484       <tr>
485         <td class="listing_lines" align="right"><pre>1
486 2
487 3
488 4
489 5</pre></td>
490         <td class="listing_code"><pre class="programlisting"><span class="usertype">gint16</span><span class="normal"> in</span><span class="symbol">;</span>
491 <span class="usertype">gint32</span><span class="normal"> out</span><span class="symbol">;</span>
492 <span class="function">sscanf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"42"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%"</span><span class="normal"> <a href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS">G_GINT16_FORMAT</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">in</span><span class="symbol">)</span>
493 <span class="normal">out </span><span class="symbol">=</span><span class="normal"> in </span><span class="symbol">*</span><span class="normal"> </span><span class="number">1000</span><span class="symbol">;</span>
494 <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%"</span><span class="normal"> <a href="glib-Basic-Types.html#G-GINT32-FORMAT:CAPS">G_GINT32_FORMAT</a></span><span class="symbol">,</span><span class="normal"> out</span><span class="symbol">);</span></pre></td>
495       </tr>
496     </tbody>
497   </table>
498 </div>
499
500 <p>
501 </p>
502 </div>
503 <hr>
504 <div class="refsect2">
505 <a name="guint16"></a><h3>guint16</h3>
506 <pre class="programlisting">typedef unsigned short guint16;
507 </pre>
508 <p>
509 An unsigned integer guaranteed to be 16 bits on all platforms.
510 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).
511 </p>
512 <p>
513 To print or scan values of this type, use
514 <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>.
515 </p>
516 </div>
517 <hr>
518 <div class="refsect2">
519 <a name="G-MAXUINT16:CAPS"></a><h3>G_MAXUINT16</h3>
520 <pre class="programlisting">#define G_MAXUINT16 ((guint16) 0xffff)
521 </pre>
522 <p>
523 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>.
524 </p>
525 <p class="since">Since 2.4</p>
526 </div>
527 <hr>
528 <div class="refsect2">
529 <a name="G-GUINT16-FORMAT:CAPS"></a><h3>G_GUINT16_FORMAT</h3>
530 <pre class="programlisting">#define G_GUINT16_FORMAT "hu"
531 </pre>
532 <p>
533 This is the platform dependent conversion specifier for scanning
534 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>
535 </p>
536 </div>
537 <hr>
538 <div class="refsect2">
539 <a name="gint32"></a><h3>gint32</h3>
540 <pre class="programlisting">typedef signed int gint32;
541 </pre>
542 <p>
543 A signed integer guaranteed to be 32 bits on all platforms.
544 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)
545 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).
546 </p>
547 <p>
548 To print or scan values of this type, use
549 <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>.
550 </p>
551 </div>
552 <hr>
553 <div class="refsect2">
554 <a name="G-MININT32:CAPS"></a><h3>G_MININT32</h3>
555 <pre class="programlisting">#define G_MININT32 ((gint32)  0x80000000)
556 </pre>
557 <p>
558 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>.
559 </p>
560 <p class="since">Since 2.4</p>
561 </div>
562 <hr>
563 <div class="refsect2">
564 <a name="G-MAXINT32:CAPS"></a><h3>G_MAXINT32</h3>
565 <pre class="programlisting">#define G_MAXINT32 ((gint32)  0x7fffffff)
566 </pre>
567 <p>
568 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>.
569 </p>
570 <p class="since">Since 2.4</p>
571 </div>
572 <hr>
573 <div class="refsect2">
574 <a name="G-GINT32-MODIFIER:CAPS"></a><h3>G_GINT32_MODIFIER</h3>
575 <pre class="programlisting">#define G_GINT32_MODIFIER ""
576 </pre>
577 <p>
578 The platform dependent length modifier for conversion specifiers
579 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
580 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>.
581 </p>
582 <p class="since">Since 2.4</p>
583 </div>
584 <hr>
585 <div class="refsect2">
586 <a name="G-GINT32-FORMAT:CAPS"></a><h3>G_GINT32_FORMAT</h3>
587 <pre class="programlisting">#define G_GINT32_FORMAT "i"
588 </pre>
589 <p>
590 This is the platform dependent conversion specifier for scanning
591 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>.
592 </p>
593 </div>
594 <hr>
595 <div class="refsect2">
596 <a name="guint32"></a><h3>guint32</h3>
597 <pre class="programlisting">typedef unsigned int guint32;
598 </pre>
599 <p>
600 An unsigned integer guaranteed to be 32 bits on all platforms.
601 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).
602 </p>
603 <p>
604 To print or scan values of this type, use
605 <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>.
606 </p>
607 </div>
608 <hr>
609 <div class="refsect2">
610 <a name="G-MAXUINT32:CAPS"></a><h3>G_MAXUINT32</h3>
611 <pre class="programlisting">#define G_MAXUINT32 ((guint32) 0xffffffff)
612 </pre>
613 <p>
614 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>.
615 </p>
616 <p class="since">Since 2.4</p>
617 </div>
618 <hr>
619 <div class="refsect2">
620 <a name="G-GUINT32-FORMAT:CAPS"></a><h3>G_GUINT32_FORMAT</h3>
621 <pre class="programlisting">#define G_GUINT32_FORMAT "u"
622 </pre>
623 <p>
624 This is the platform dependent conversion specifier for scanning
625 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>.
626 </p>
627 </div>
628 <hr>
629 <div class="refsect2">
630 <a name="gint64"></a><h3>gint64</h3>
631 <pre class="programlisting">typedef signed long gint64;
632 </pre>
633 <p>
634 A signed integer guaranteed to be 64 bits on all platforms.
635 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>
636 (= -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>
637 (= 9,223,372,036,854,775,807).
638 </p>
639 <p>
640 To print or scan values of this type, use
641 <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>.
642 </p>
643 </div>
644 <hr>
645 <div class="refsect2">
646 <a name="G-MININT64:CAPS"></a><h3>G_MININT64</h3>
647 <pre class="programlisting">#define G_MININT64 ((gint64) G_GINT64_CONSTANT(0x8000000000000000))
648 </pre>
649 <p>
650 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>.
651 </p>
652 </div>
653 <hr>
654 <div class="refsect2">
655 <a name="G-MAXINT64:CAPS"></a><h3>G_MAXINT64</h3>
656 <pre class="programlisting">#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
657 </pre>
658 <p>
659 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>.
660 </p>
661 </div>
662 <hr>
663 <div class="refsect2">
664 <a name="G-GINT64-MODIFIER:CAPS"></a><h3>G_GINT64_MODIFIER</h3>
665 <pre class="programlisting">#define G_GINT64_MODIFIER "l"
666 </pre>
667 <p>
668 The platform dependent length modifier for conversion specifiers
669 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>.
670 It is a string literal.
671 </p>
672 <p>
673 </p>
674 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
675 <h3 class="title">Note</h3>
676 <p>
677 Some platforms do not support printing 64 bit integers, even
678 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>
679 is not defined.
680 </p>
681 </div>
682 <p>
683 </p>
684 <p class="since">Since 2.4</p>
685 </div>
686 <hr>
687 <div class="refsect2">
688 <a name="G-GINT64-FORMAT:CAPS"></a><h3>G_GINT64_FORMAT</h3>
689 <pre class="programlisting">#define G_GINT64_FORMAT "li"
690 </pre>
691 <p>
692 This is the platform dependent conversion specifier for scanning
693 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>.
694 </p>
695 <p>
696 </p>
697 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
698 <h3 class="title">Note</h3>
699 <p>
700 Some platforms do not support scanning and printing 64 bit integers,
701 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>
702 is not defined. Note that <code class="function">scanf()</code> may not support 64 bit integers, even
703 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>
704 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>
705 instead.
706 </p>
707 </div>
708 <p>
709 </p>
710 </div>
711 <hr>
712 <div class="refsect2">
713 <a name="G-GINT64-CONSTANT:CAPS"></a><h3>G_GINT64_CONSTANT()</h3>
714 <pre class="programlisting">#define G_GINT64_CONSTANT(val) (val##L)
715 </pre>
716 <p>
717 This macro is used to insert 64-bit integer literals
718 into the source code.
719 </p>
720 <div class="variablelist"><table border="0">
721 <col align="left" valign="top">
722 <tbody><tr>
723 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
724 <td>a literal integer value, e.g. 0x1d636b02300a7aa7</td>
725 </tr></tbody>
726 </table></div>
727 </div>
728 <hr>
729 <div class="refsect2">
730 <a name="guint64"></a><h3>guint64</h3>
731 <pre class="programlisting">typedef unsigned long guint64;
732 </pre>
733 <p>
734 An unsigned integer guaranteed to be 64 bits on all platforms.
735 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>
736 (= 18,446,744,073,709,551,615).
737 </p>
738 <p>
739 To print or scan values of this type, use
740 <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>.
741 </p>
742 </div>
743 <hr>
744 <div class="refsect2">
745 <a name="G-MAXUINT64:CAPS"></a><h3>G_MAXUINT64</h3>
746 <pre class="programlisting">#define G_MAXUINT64 G_GINT64_CONSTANT(0xffffffffffffffffU)
747 </pre>
748 <p>
749 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>.
750 </p>
751 </div>
752 <hr>
753 <div class="refsect2">
754 <a name="G-GUINT64-FORMAT:CAPS"></a><h3>G_GUINT64_FORMAT</h3>
755 <pre class="programlisting">#define G_GUINT64_FORMAT "lu"
756 </pre>
757 <p>
758 This is the platform dependent conversion specifier for scanning
759 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>.
760 </p>
761 <p>
762 </p>
763 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
764 <h3 class="title">Note</h3>
765 <p>
766 Some platforms do not support scanning and printing 64 bit integers,
767 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>
768 is not defined.  Note that <code class="function">scanf()</code> may not support 64 bit integers, even
769 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>
770 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>
771 instead.
772 </p>
773 </div>
774 <p>
775 </p>
776 </div>
777 <hr>
778 <div class="refsect2">
779 <a name="G-GUINT64-CONSTANT:CAPS"></a><h3>G_GUINT64_CONSTANT()</h3>
780 <pre class="programlisting">#define G_GUINT64_CONSTANT(val) (val##UL)
781 </pre>
782 <p>
783 This macro is used to insert 64-bit unsigned integer
784 literals into the source code.
785 </p>
786 <div class="variablelist"><table border="0">
787 <col align="left" valign="top">
788 <tbody><tr>
789 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
790 <td>a literal integer value, e.g. 0x1d636b02300a7aa7U</td>
791 </tr></tbody>
792 </table></div>
793 <p class="since">Since 2.10</p>
794 </div>
795 <hr>
796 <div class="refsect2">
797 <a name="gfloat"></a><h3>gfloat</h3>
798 <pre class="programlisting">typedef float   gfloat;
799 </pre>
800 <p>
801 Corresponds to the standard C <span class="type">float</span> type.
802 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>.
803 </p>
804 </div>
805 <hr>
806 <div class="refsect2">
807 <a name="G-MINFLOAT:CAPS"></a><h3>G_MINFLOAT</h3>
808 <pre class="programlisting">#define G_MINFLOAT FLT_MIN
809 </pre>
810 <p>
811 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>.
812 </p>
813 <p>
814 If you are interested in the smallest value which can be held
815 in a <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat"><span class="type">gfloat</span></a>, use -G_MAXFLOAT.
816 </p>
817 </div>
818 <hr>
819 <div class="refsect2">
820 <a name="G-MAXFLOAT:CAPS"></a><h3>G_MAXFLOAT</h3>
821 <pre class="programlisting">#define G_MAXFLOAT FLT_MAX
822 </pre>
823 <p>
824 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>.
825 </p>
826 </div>
827 <hr>
828 <div class="refsect2">
829 <a name="gdouble"></a><h3>gdouble</h3>
830 <pre class="programlisting">typedef double  gdouble;
831 </pre>
832 <p>
833 Corresponds to the standard C <span class="type">double</span> type.
834 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>.
835 </p>
836 </div>
837 <hr>
838 <div class="refsect2">
839 <a name="G-MINDOUBLE:CAPS"></a><h3>G_MINDOUBLE</h3>
840 <pre class="programlisting">#define G_MINDOUBLE DBL_MIN
841 </pre>
842 <p>
843 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>.
844 </p>
845 <p>
846 If you are interested in the smallest value which can be held
847 in a <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a>, use -G_MAXDOUBLE.
848 </p>
849 </div>
850 <hr>
851 <div class="refsect2">
852 <a name="G-MAXDOUBLE:CAPS"></a><h3>G_MAXDOUBLE</h3>
853 <pre class="programlisting">#define G_MAXDOUBLE DBL_MAX
854 </pre>
855 <p>
856 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>.
857 </p>
858 </div>
859 <hr>
860 <div class="refsect2">
861 <a name="gsize"></a><h3>gsize</h3>
862 <pre class="programlisting">typedef unsigned long gsize;
863 </pre>
864 <p>
865 An unsigned integer type of the result of the sizeof operator,
866 corresponding to the <span class="type">size_t</span> type defined in C99.
867 This type is wide enough to hold the numeric value of a pointer,
868 so it is usually 32bit wide on a 32bit platform and 64bit wide
869 on a 64bit platform. Values of this type can range from 0 to
870 <a class="link" href="glib-Basic-Types.html#G-MAXSIZE:CAPS" title="G_MAXSIZE"><span class="type">G_MAXSIZE</span></a>.
871 </p>
872 <p>
873 To print or scan values of this type, use
874 <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>.
875 </p>
876 </div>
877 <hr>
878 <div class="refsect2">
879 <a name="G-MAXSIZE:CAPS"></a><h3>G_MAXSIZE</h3>
880 <pre class="programlisting">#define G_MAXSIZE G_MAXULONG
881 </pre>
882 <p>
883 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>.
884 </p>
885 <p class="since">Since 2.4</p>
886 </div>
887 <hr>
888 <div class="refsect2">
889 <a name="G-GSIZE-MODIFIER:CAPS"></a><h3>G_GSIZE_MODIFIER</h3>
890 <pre class="programlisting">#define G_GSIZE_MODIFIER "l"
891 </pre>
892 <p>
893 The platform dependent length modifier for conversion specifiers
894 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
895 is a string literal.
896 </p>
897 <p class="since">Since 2.6</p>
898 </div>
899 <hr>
900 <div class="refsect2">
901 <a name="G-GSIZE-FORMAT:CAPS"></a><h3>G_GSIZE_FORMAT</h3>
902 <pre class="programlisting">#define G_GSIZE_FORMAT "lu"
903 </pre>
904 <p>
905 This is the platform dependent conversion specifier for scanning
906 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>.
907 </p>
908 <p class="since">Since 2.6</p>
909 </div>
910 <hr>
911 <div class="refsect2">
912 <a name="gssize"></a><h3>gssize</h3>
913 <pre class="programlisting">typedef signed long gssize;
914 </pre>
915 <p>
916 A signed variant of <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>, corresponding to the
917 <span class="type">ssize_t</span> defined on most platforms.
918 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>
919 to <a class="link" href="glib-Basic-Types.html#G-MAXSSIZE:CAPS" title="G_MAXSSIZE"><span class="type">G_MAXSSIZE</span></a>.
920 </p>
921 <p>
922 To print or scan values of this type, use
923 <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>.
924 </p>
925 </div>
926 <hr>
927 <div class="refsect2">
928 <a name="G-MINSSIZE:CAPS"></a><h3>G_MINSSIZE</h3>
929 <pre class="programlisting">#define G_MINSSIZE G_MINLONG
930 </pre>
931 <p>
932 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>.
933 </p>
934 <p class="since">Since 2.14</p>
935 </div>
936 <hr>
937 <div class="refsect2">
938 <a name="G-MAXSSIZE:CAPS"></a><h3>G_MAXSSIZE</h3>
939 <pre class="programlisting">#define G_MAXSSIZE G_MAXLONG
940 </pre>
941 <p>
942 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>.
943 </p>
944 <p class="since">Since 2.14</p>
945 </div>
946 <hr>
947 <div class="refsect2">
948 <a name="G-GSSIZE-FORMAT:CAPS"></a><h3>G_GSSIZE_FORMAT</h3>
949 <pre class="programlisting">#define G_GSSIZE_FORMAT "li"
950 </pre>
951 <p>
952 This is the platform dependent conversion specifier for scanning
953 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>.
954 </p>
955 <p class="since">Since 2.6</p>
956 </div>
957 <hr>
958 <div class="refsect2">
959 <a name="goffset"></a><h3>goffset</h3>
960 <pre class="programlisting">typedef gint64 goffset;
961 </pre>
962 <p>
963 A signed integer type that is used for file offsets,
964 corresponding to the C99 type <span class="type">off64_t</span>.
965 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
966 <a class="link" href="glib-Basic-Types.html#G-MAXOFFSET:CAPS" title="G_MAXOFFSET"><span class="type">G_MAXOFFSET</span></a>.
967 </p>
968 <p>
969 To print or scan values of this type, use
970 <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>.
971 </p>
972 <p class="since">Since 2.14</p>
973 </div>
974 <hr>
975 <div class="refsect2">
976 <a name="G-MINOFFSET:CAPS"></a><h3>G_MINOFFSET</h3>
977 <pre class="programlisting">#define G_MINOFFSET G_MININT64
978 </pre>
979 <p>
980 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>.
981 </p>
982 </div>
983 <hr>
984 <div class="refsect2">
985 <a name="G-MAXOFFSET:CAPS"></a><h3>G_MAXOFFSET</h3>
986 <pre class="programlisting">#define G_MAXOFFSET G_MAXINT64
987 </pre>
988 <p>
989 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>.
990 </p>
991 </div>
992 <hr>
993 <div class="refsect2">
994 <a name="G-GOFFSET-MODIFIER:CAPS"></a><h3>G_GOFFSET_MODIFIER</h3>
995 <pre class="programlisting">#define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER
996 </pre>
997 <p>
998 The platform dependent length modifier for conversion specifiers
999 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
1000 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>.
1001 </p>
1002 <p class="since">Since 2.20</p>
1003 </div>
1004 <hr>
1005 <div class="refsect2">
1006 <a name="G-GOFFSET-FORMAT:CAPS"></a><h3>G_GOFFSET_FORMAT</h3>
1007 <pre class="programlisting">#define G_GOFFSET_FORMAT        G_GINT64_FORMAT
1008 </pre>
1009 <p>
1010 This is the platform dependent conversion specifier for scanning
1011 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>.
1012 </p>
1013 <p class="since">Since 2.20</p>
1014 </div>
1015 <hr>
1016 <div class="refsect2">
1017 <a name="G-GOFFSET-CONSTANT:CAPS"></a><h3>G_GOFFSET_CONSTANT()</h3>
1018 <pre class="programlisting">#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
1019 </pre>
1020 <p>
1021 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
1022 into the source code.
1023 </p>
1024 <p>
1025 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>.
1026 </p>
1027 <div class="variablelist"><table border="0">
1028 <col align="left" valign="top">
1029 <tbody><tr>
1030 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
1031 <td>a literal integer value, e.g. 0x1d636b02300a7aa7</td>
1032 </tr></tbody>
1033 </table></div>
1034 <p class="since">Since 2.20</p>
1035 </div>
1036 <hr>
1037 <div class="refsect2">
1038 <a name="gintptr"></a><h3>gintptr</h3>
1039 <pre class="programlisting">typedef signed long gintptr;
1040 </pre>
1041 <p>
1042 Corresponds to the C99 type <span class="type">intptr_t</span>,
1043 a signed integer type that can hold any pointer.
1044 </p>
1045 <p>
1046 To print or scan values of this type, use
1047 <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>.
1048 </p>
1049 <p class="since">Since 2.18</p>
1050 </div>
1051 <hr>
1052 <div class="refsect2">
1053 <a name="G-GINTPTR-MODIFIER:CAPS"></a><h3>G_GINTPTR_MODIFIER</h3>
1054 <pre class="programlisting">#define G_GINTPTR_MODIFIER      "l"
1055 </pre>
1056 <p>
1057 The platform dependent length modifier for conversion specifiers
1058 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>.
1059 It is a string literal.
1060 </p>
1061 <p class="since">Since 2.22</p>
1062 </div>
1063 <hr>
1064 <div class="refsect2">
1065 <a name="G-GINTPTR-FORMAT:CAPS"></a><h3>G_GINTPTR_FORMAT</h3>
1066 <pre class="programlisting">#define G_GINTPTR_FORMAT        "li"
1067 </pre>
1068 <p>
1069 This is the platform dependent conversion specifier for scanning
1070 and printing values of type <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a>.
1071 </p>
1072 <p class="since">Since 2.22</p>
1073 </div>
1074 <hr>
1075 <div class="refsect2">
1076 <a name="guintptr"></a><h3>guintptr</h3>
1077 <pre class="programlisting">typedef unsigned long guintptr;
1078 </pre>
1079 <p>
1080 Corresponds to the C99 type <span class="type">uintptr_t</span>,
1081 an unsigned integer type that can hold any pointer.
1082 </p>
1083 <p>
1084 To print or scan values of this type, use
1085 <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>.
1086 </p>
1087 <p class="since">Since 2.18</p>
1088 </div>
1089 <hr>
1090 <div class="refsect2">
1091 <a name="G-GUINTPTR-FORMAT:CAPS"></a><h3>G_GUINTPTR_FORMAT</h3>
1092 <pre class="programlisting">#define G_GUINTPTR_FORMAT       "lu"
1093 </pre>
1094 <p>
1095 This is the platform dependent conversion specifier
1096 for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.
1097 </p>
1098 <p class="since">Since 2.22</p>
1099 </div>
1100 </div>
1101 </div>
1102 <div class="footer">
1103 <hr>
1104           Generated by GTK-Doc V1.18</div>
1105 </body>
1106 </html>