Initial commit
[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.75.2">
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-Limits-of-Basic-Types.html" title="Limits of Basic Types">
11 <meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="glib.html" title="GLib Overview">
14 <link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
15 <link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
16 <link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
17 <link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
18 <link rel="chapter" href="tools.html" title="GLib Tools">
19 <link rel="index" href="api-index-full.html" title="Index">
20 <link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
21 <link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
22 <link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
23 <link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
24 <link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
25 <link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
26 <link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
27 <link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
28 <link rel="index" href="api-index-2-16.html" title="Index of new symbols in 2.16">
29 <link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
30 <link rel="index" href="api-index-2-20.html" title="Index of new symbols in 2.20">
31 <link rel="index" href="api-index-2-22.html" title="Index of new symbols in 2.22">
32 <link rel="index" href="api-index-2-24.html" title="Index of new symbols in 2.24">
33 </head>
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36 <tr valign="middle">
37 <td><a accesskey="p" href="glib-Version-Information.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">GLib Reference Manual</th>
41 <td><a accesskey="n" href="glib-Limits-of-Basic-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
42 </tr>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#glib-Basic-Types.synopsis" class="shortcut">Top</a>
45                    | 
46                   <a href="#glib-Basic-Types.description" class="shortcut">Description</a>
47 </td></tr>
48 </table>
49 <div class="refentry" title="Basic Types">
50 <a name="glib-Basic-Types"></a><div class="titlepage"></div>
51 <div class="refnamediv"><table width="100%"><tr>
52 <td valign="top">
53 <h2><span class="refentrytitle"><a name="glib-Basic-Types.top_of_page"></a>Basic Types</span></h2>
54 <p>Basic Types — standard GLib types, defined for ease-of-use and portability</p>
55 </td>
56 <td valign="top" align="right"></td>
57 </tr></table></div>
58 <div class="refsynopsisdiv" title="Synopsis">
59 <a name="glib-Basic-Types.synopsis"></a><h2>Synopsis</h2>
60 <pre class="synopsis">
61 #include &lt;glib.h&gt;
62
63 typedef             <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>;
64 typedef             <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>;
65 typedef             <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a>;
66 typedef             <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a>;
67 typedef             <a class="link" href="glib-Basic-Types.html#guchar" title="guchar">guchar</a>;
68
69 typedef             <a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>;
70 typedef             <a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>;
71 typedef             <a class="link" href="glib-Basic-Types.html#gshort" title="gshort">gshort</a>;
72 typedef             <a class="link" href="glib-Basic-Types.html#gushort" title="gushort">gushort</a>;
73 typedef             <a class="link" href="glib-Basic-Types.html#glong" title="glong">glong</a>;
74 typedef             <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a>;
75
76 typedef             <a class="link" href="glib-Basic-Types.html#gint8" title="gint8">gint8</a>;
77 typedef             <a class="link" href="glib-Basic-Types.html#guint8" title="guint8">guint8</a>;
78 typedef             <a class="link" href="glib-Basic-Types.html#gint16" title="gint16">gint16</a>;
79 typedef             <a class="link" href="glib-Basic-Types.html#guint16" title="guint16">guint16</a>;
80 typedef             <a class="link" href="glib-Basic-Types.html#gint32" title="gint32">gint32</a>;
81 typedef             <a class="link" href="glib-Basic-Types.html#guint32" title="guint32">guint32</a>;
82
83 #define             <a class="link" href="glib-Basic-Types.html#G-HAVE-GINT64:CAPS" title="G_HAVE_GINT64">G_HAVE_GINT64</a>
84 typedef             <a class="link" href="glib-Basic-Types.html#gint64" title="gint64">gint64</a>;
85 typedef             <a class="link" href="glib-Basic-Types.html#guint64" title="guint64">guint64</a>;
86 #define             <a class="link" href="glib-Basic-Types.html#G-GINT64-CONSTANT:CAPS" title="G_GINT64_CONSTANT()">G_GINT64_CONSTANT</a>                   (val)
87 #define             <a class="link" href="glib-Basic-Types.html#G-GUINT64-CONSTANT:CAPS" title="G_GUINT64_CONSTANT()">G_GUINT64_CONSTANT</a>                  (val)
88
89 typedef             <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat">gfloat</a>;
90 typedef             <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble">gdouble</a>;
91
92 typedef             <a class="link" href="glib-Basic-Types.html#gsize" title="gsize">gsize</a>;
93 typedef             <a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a>;
94 typedef             <a class="link" href="glib-Basic-Types.html#goffset" title="goffset">goffset</a>;
95 #define             <a class="link" href="glib-Basic-Types.html#G-GOFFSET-CONSTANT:CAPS" title="G_GOFFSET_CONSTANT()">G_GOFFSET_CONSTANT</a>                  (val)
96
97 typedef             <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr">gintptr</a>;
98 typedef             <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr">guintptr</a>;
99 </pre>
100 </div>
101 <div class="refsect1" title="Description">
102 <a name="glib-Basic-Types.description"></a><h2>Description</h2>
103 <p>
104 GLib defines a number of commonly used types, which can be divided into
105 4 groups:
106 </p>
107 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
108 <li class="listitem"><p>
109 New types which are not part of standard C (but are defined
110 in various C standard library header files) -
111 <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>, <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>.
112 </p></li>
113 <li class="listitem"><p>
114 Integer types which are guaranteed to be the same size across all platforms -
115 <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>, <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>.
116 </p></li>
117 <li class="listitem"><p>
118 Types which are easier to use than their standard C counterparts -
119 <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>.
120 </p></li>
121 <li class="listitem"><p>
122 Types which correspond exactly to standard C types, but are included
123 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>, <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>.
124 </p></li>
125 </ul></div>
126 <p>
127 </p>
128 </div>
129 <div class="refsect1" title="Details">
130 <a name="glib-Basic-Types.details"></a><h2>Details</h2>
131 <div class="refsect2" title="gboolean">
132 <a name="gboolean"></a><h3>gboolean</h3>
133 <pre class="programlisting">typedef gint   gboolean;
134 </pre>
135 <p>
136 A standard <span class="type">boolean</span> type.
137 Variables of this type should only contain the value <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>.
138 </p>
139 </div>
140 <hr>
141 <div class="refsect2" title="gpointer">
142 <a name="gpointer"></a><h3>gpointer</h3>
143 <pre class="programlisting">typedef void* gpointer;
144 </pre>
145 <p>
146 An untyped pointer.
147 <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> looks better and is easier to use than <span class="type">void*</span>.
148 </p>
149 </div>
150 <hr>
151 <div class="refsect2" title="gconstpointer">
152 <a name="gconstpointer"></a><h3>gconstpointer</h3>
153 <pre class="programlisting">typedef const void *gconstpointer;
154 </pre>
155 <p>
156 An untyped pointer to constant data.
157 The data pointed to should not be changed.
158 </p>
159 <p>
160 This is typically used in function prototypes to indicate that the
161 data pointed to will not be altered by the function.
162 </p>
163 </div>
164 <hr>
165 <div class="refsect2" title="gchar">
166 <a name="gchar"></a><h3>gchar</h3>
167 <pre class="programlisting">typedef char   gchar;
168 </pre>
169 <p>
170 Corresponds to the standard C <span class="type">char</span> type.
171 </p>
172 </div>
173 <hr>
174 <div class="refsect2" title="guchar">
175 <a name="guchar"></a><h3>guchar</h3>
176 <pre class="programlisting">typedef unsigned char   guchar;
177 </pre>
178 <p>
179 Corresponds to the standard C <span class="type">unsigned char</span> type.
180 </p>
181 </div>
182 <hr>
183 <div class="refsect2" title="gint">
184 <a name="gint"></a><h3>gint</h3>
185 <pre class="programlisting">typedef int    gint;
186 </pre>
187 <p>
188 Corresponds to the standard C <span class="type">int</span> type.
189 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT:CAPS" title="G_MININT"><span class="type">G_MININT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS" title="G_MAXINT"><span class="type">G_MAXINT</span></a>.
190 </p>
191 </div>
192 <hr>
193 <div class="refsect2" title="guint">
194 <a name="guint"></a><h3>guint</h3>
195 <pre class="programlisting">typedef unsigned int    guint;
196 </pre>
197 <p>
198 Corresponds to the standard C <span class="type">unsigned int</span> type.
199 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT:CAPS" title="G_MAXUINT"><span class="type">G_MAXUINT</span></a>.
200 </p>
201 </div>
202 <hr>
203 <div class="refsect2" title="gshort">
204 <a name="gshort"></a><h3>gshort</h3>
205 <pre class="programlisting">typedef short  gshort;
206 </pre>
207 <p>
208 Corresponds to the standard C <span class="type">short</span> type.
209 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINSHORT:CAPS" title="G_MINSHORT"><span class="type">G_MINSHORT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSHORT:CAPS" title="G_MAXSHORT"><span class="type">G_MAXSHORT</span></a>.
210 </p>
211 </div>
212 <hr>
213 <div class="refsect2" title="gushort">
214 <a name="gushort"></a><h3>gushort</h3>
215 <pre class="programlisting">typedef unsigned short  gushort;
216 </pre>
217 <p>
218 Corresponds to the standard C <span class="type">unsigned short</span> type.
219 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUSHORT:CAPS" title="G_MAXUSHORT"><span class="type">G_MAXUSHORT</span></a>.
220 </p>
221 </div>
222 <hr>
223 <div class="refsect2" title="glong">
224 <a name="glong"></a><h3>glong</h3>
225 <pre class="programlisting">typedef long   glong;
226 </pre>
227 <p>
228 Corresponds to the standard C <span class="type">long</span> type.
229 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINLONG:CAPS" title="G_MINLONG"><span class="type">G_MINLONG</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXLONG:CAPS" title="G_MAXLONG"><span class="type">G_MAXLONG</span></a>.
230 </p>
231 </div>
232 <hr>
233 <div class="refsect2" title="gulong">
234 <a name="gulong"></a><h3>gulong</h3>
235 <pre class="programlisting">typedef unsigned long   gulong;
236 </pre>
237 <p>
238 Corresponds to the standard C <span class="type">unsigned long</span> type.
239 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXULONG:CAPS" title="G_MAXULONG"><span class="type">G_MAXULONG</span></a>.
240 </p>
241 </div>
242 <hr>
243 <div class="refsect2" title="gint8">
244 <a name="gint8"></a><h3>gint8</h3>
245 <pre class="programlisting">typedef signed char gint8;
246 </pre>
247 <p>
248 A signed integer guaranteed to be 8 bits on all platforms.
249 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT8:CAPS" title="G_MININT8"><span class="type">G_MININT8</span></a> (= -128) to
250 <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT8:CAPS" title="G_MAXINT8"><span class="type">G_MAXINT8</span></a> (= 127).
251 </p>
252 </div>
253 <hr>
254 <div class="refsect2" title="guint8">
255 <a name="guint8"></a><h3>guint8</h3>
256 <pre class="programlisting">typedef unsigned char guint8;
257 </pre>
258 <p>
259 An unsigned integer guaranteed to be 8 bits on all platforms.
260 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT8:CAPS" title="G_MAXUINT8"><span class="type">G_MAXUINT8</span></a> (= 255).
261 </p>
262 </div>
263 <hr>
264 <div class="refsect2" title="gint16">
265 <a name="gint16"></a><h3>gint16</h3>
266 <pre class="programlisting">typedef signed short gint16;
267 </pre>
268 <p>
269 A signed integer guaranteed to be 16 bits on all platforms.
270 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT16:CAPS" title="G_MININT16"><span class="type">G_MININT16</span></a> (= -32,768) to
271 <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT16:CAPS" title="G_MAXINT16"><span class="type">G_MAXINT16</span></a> (= 32,767).
272 </p>
273 <p>
274 To print or scan values of this type, use
275 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><code class="literal">G_GINT16_FORMAT</code></a>.
276 </p>
277 </div>
278 <hr>
279 <div class="refsect2" title="guint16">
280 <a name="guint16"></a><h3>guint16</h3>
281 <pre class="programlisting">typedef unsigned short guint16;
282 </pre>
283 <p>
284 An unsigned integer guaranteed to be 16 bits on all platforms.
285 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT16:CAPS" title="G_MAXUINT16"><span class="type">G_MAXUINT16</span></a> (= 65,535).
286 </p>
287 <p>
288 To print or scan values of this type, use
289 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT16-FORMAT:CAPS" title="G_GUINT16_FORMAT"><code class="literal">G_GUINT16_FORMAT</code></a>.
290 </p>
291 </div>
292 <hr>
293 <div class="refsect2" title="gint32">
294 <a name="gint32"></a><h3>gint32</h3>
295 <pre class="programlisting">typedef signed int gint32;
296 </pre>
297 <p>
298 A signed integer guaranteed to be 32 bits on all platforms.
299 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT32:CAPS" title="G_MININT32"><span class="type">G_MININT32</span></a> (= -2,147,483,648) to
300 <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT32:CAPS" title="G_MAXINT32"><span class="type">G_MAXINT32</span></a> (= 2,147,483,647).
301 </p>
302 <p>
303 To print or scan values of this type, use
304 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-FORMAT:CAPS" title="G_GINT32_FORMAT"><code class="literal">G_GINT32_FORMAT</code></a>.
305 </p>
306 </div>
307 <hr>
308 <div class="refsect2" title="guint32">
309 <a name="guint32"></a><h3>guint32</h3>
310 <pre class="programlisting">typedef unsigned int guint32;
311 </pre>
312 <p>
313 An unsigned integer guaranteed to be 32 bits on all platforms.
314 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT32:CAPS" title="G_MAXUINT32"><span class="type">G_MAXUINT32</span></a> (= 4,294,967,295).
315 </p>
316 <p>
317 To print or scan values of this type, use
318 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT32-FORMAT:CAPS" title="G_GUINT32_FORMAT"><code class="literal">G_GUINT32_FORMAT</code></a>.
319 </p>
320 </div>
321 <hr>
322 <div class="refsect2" title="G_HAVE_GINT64">
323 <a name="G-HAVE-GINT64:CAPS"></a><h3>G_HAVE_GINT64</h3>
324 <pre class="programlisting">#define G_HAVE_GINT64 1          /* deprecated, always true */
325 </pre>
326 <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
327 <h3 class="title">Warning</h3>
328 <p><code class="literal">G_HAVE_GINT64</code> is deprecated and should not be used in newly-written code. GLib requires 64-bit integer support since version 2.0, therefore
329 <a class="link" href="glib-Basic-Types.html#G-HAVE-GINT64:CAPS" title="G_HAVE_GINT64"><code class="literal">G_HAVE_GINT64</code></a> is <span class="emphasis"><em>always</em></span> defined.</p>
330 </div>
331 <p>
332 This macro is defined if 64-bit signed and unsigned integers are available
333 on the platform.
334 </p>
335 </div>
336 <hr>
337 <div class="refsect2" title="gint64">
338 <a name="gint64"></a><h3>gint64</h3>
339 <pre class="programlisting">typedef signed long gint64;
340 </pre>
341 <p>
342 A signed integer guaranteed to be 64 bits on all platforms.
343 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT64:CAPS" title="G_MININT64"><span class="type">G_MININT64</span></a> (= -9,223,372,036,854,775,808) to
344 <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT64:CAPS" title="G_MAXINT64"><span class="type">G_MAXINT64</span></a> (= 9,223,372,036,854,775,807).
345 </p>
346 <p>
347 To print or scan values of this type, use
348 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><code class="literal">G_GINT64_FORMAT</code></a>.
349 </p>
350 </div>
351 <hr>
352 <div class="refsect2" title="guint64">
353 <a name="guint64"></a><h3>guint64</h3>
354 <pre class="programlisting">typedef unsigned long guint64;
355 </pre>
356 <p>
357 An unsigned integer guaranteed to be 64 bits on all platforms.
358 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT64:CAPS" title="G_MAXUINT64"><span class="type">G_MAXUINT64</span></a> (= 18,446,744,073,709,551,615).
359 </p>
360 <p>
361 To print or scan values of this type, use
362 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT64-FORMAT:CAPS" title="G_GUINT64_FORMAT"><code class="literal">G_GUINT64_FORMAT</code></a>.
363 </p>
364 </div>
365 <hr>
366 <div class="refsect2" title="G_GINT64_CONSTANT()">
367 <a name="G-GINT64-CONSTANT:CAPS"></a><h3>G_GINT64_CONSTANT()</h3>
368 <pre class="programlisting">#define G_GINT64_CONSTANT(val) (val##L)
369 </pre>
370 <p>
371 This macro is used to insert 64-bit integer literals into the source code.
372 </p>
373 <div class="variablelist"><table border="0">
374 <col align="left" valign="top">
375 <tbody><tr>
376 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
377 <td>a literal integer value, e.g. 0x1d636b02300a7aa7.
378 </td>
379 </tr></tbody>
380 </table></div>
381 </div>
382 <hr>
383 <div class="refsect2" title="G_GUINT64_CONSTANT()">
384 <a name="G-GUINT64-CONSTANT:CAPS"></a><h3>G_GUINT64_CONSTANT()</h3>
385 <pre class="programlisting">#define G_GUINT64_CONSTANT(val) (val##UL)
386 </pre>
387 <p>
388 This macro is used to insert 64-bit unsigned integer literals into the
389 source code.
390 </p>
391 <div class="variablelist"><table border="0">
392 <col align="left" valign="top">
393 <tbody><tr>
394 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
395 <td>a literal integer value, e.g. 0x1d636b02300a7aa7U.
396 </td>
397 </tr></tbody>
398 </table></div>
399 <p class="since">Since 2.10</p>
400 </div>
401 <hr>
402 <div class="refsect2" title="gfloat">
403 <a name="gfloat"></a><h3>gfloat</h3>
404 <pre class="programlisting">typedef float   gfloat;
405 </pre>
406 <p>
407 Corresponds to the standard C <span class="type">float</span> type.
408 Values of this type can range from -<a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a>.
409 </p>
410 </div>
411 <hr>
412 <div class="refsect2" title="gdouble">
413 <a name="gdouble"></a><h3>gdouble</h3>
414 <pre class="programlisting">typedef double  gdouble;
415 </pre>
416 <p>
417 Corresponds to the standard C <span class="type">double</span> type.
418 Values of this type can range from -<a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a>.
419 </p>
420 </div>
421 <hr>
422 <div class="refsect2" title="gsize">
423 <a name="gsize"></a><h3>gsize</h3>
424 <pre class="programlisting">typedef unsigned long gsize;
425 </pre>
426 <p>
427 An unsigned integer type of the result of the sizeof operator, corresponding
428 to the size_t type defined in C99. This type is wide enough to hold the numeric
429 value of a pointer, so it is usually 32bit wide on a 32bit platform and
430 64bit wide on a 64bit platform.
431 Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSIZE:CAPS" title="G_MAXSIZE"><span class="type">G_MAXSIZE</span></a>.
432 </p>
433 <p>
434 To print or scan values of this type, use
435 <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-FORMAT:CAPS" title="G_GSIZE_FORMAT"><code class="literal">G_GSIZE_FORMAT</code></a>.
436 </p>
437 </div>
438 <hr>
439 <div class="refsect2" title="gssize">
440 <a name="gssize"></a><h3>gssize</h3>
441 <pre class="programlisting">typedef signed long gssize;
442 </pre>
443 <p>
444 A signed variant of gsize, corresponding to the ssize_t defined on most platforms.
445 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINSSIZE:CAPS" title="G_MINSSIZE"><span class="type">G_MINSSIZE</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSSIZE:CAPS" title="G_MAXSSIZE"><span class="type">G_MAXSSIZE</span></a>.
446 </p>
447 <p>
448 To print or scan values of this type, use
449 <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GSSIZE-FORMAT:CAPS" title="G_GSSIZE_FORMAT"><code class="literal">G_GSSIZE_FORMAT</code></a>.
450 </p>
451 </div>
452 <hr>
453 <div class="refsect2" title="goffset">
454 <a name="goffset"></a><h3>goffset</h3>
455 <pre class="programlisting">typedef gint64 goffset;
456 </pre>
457 <p>
458 A signed integer type that is used for file offsets, corresponding to the
459 C99 type off64_t.
460 Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINOFFSET:CAPS" title="G_MINOFFSET"><span class="type">G_MINOFFSET</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXOFFSET:CAPS" title="G_MAXOFFSET"><span class="type">G_MAXOFFSET</span></a>.
461 </p>
462 <p>
463 To print or scan values of this type, use
464 <a class="link" href="glib-Miscellaneous-Macros.html#G-GOFFSET-MODIFIER:CAPS" title="G_GOFFSET_MODIFIER"><code class="literal">G_GOFFSET_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GOFFSET-FORMAT:CAPS" title="G_GOFFSET_FORMAT"><code class="literal">G_GOFFSET_FORMAT</code></a>.
465 </p>
466 Since: 2.14</div>
467 <hr>
468 <div class="refsect2" title="G_GOFFSET_CONSTANT()">
469 <a name="G-GOFFSET-CONSTANT:CAPS"></a><h3>G_GOFFSET_CONSTANT()</h3>
470 <pre class="programlisting">#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
471 </pre>
472 <p>
473 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 into the source code.
474 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>.
475 </p>
476 <div class="variablelist"><table border="0">
477 <col align="left" valign="top">
478 <tbody><tr>
479 <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
480 <td>a literal integer value, e.g. 0x1d636b02300a7aa7.
481 Since: 2.20
482 </td>
483 </tr></tbody>
484 </table></div>
485 </div>
486 <hr>
487 <div class="refsect2" title="gintptr">
488 <a name="gintptr"></a><h3>gintptr</h3>
489 <pre class="programlisting">typedef signed long gintptr;
490 </pre>
491 <p>
492 Corresponds to the C99 type <span class="type">intptr_t</span>, a signed integer type that
493 can hold any pointer.
494 </p>
495 <p>
496 To print or scan values of this type, use
497 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-FORMAT:CAPS" title="G_GINTPTR_FORMAT"><code class="literal">G_GINTPTR_FORMAT</code></a>.
498 </p>
499 Since: 2.18</div>
500 <hr>
501 <div class="refsect2" title="guintptr">
502 <a name="guintptr"></a><h3>guintptr</h3>
503 <pre class="programlisting">typedef unsigned long guintptr;
504 </pre>
505 <p>
506 Corresponds to the C99 type <span class="type">uintptr_t</span>, an unsigned integer type that
507 can hold any pointer.
508 </p>
509 <p>
510 To print or scan values of this type, use
511 <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINTPTR-FORMAT:CAPS" title="G_GUINTPTR_FORMAT"><code class="literal">G_GUINTPTR_FORMAT</code></a>.
512 </p>
513 Since: 2.18</div>
514 </div>
515 </div>
516 <div class="footer">
517 <hr>
518           Generated by GTK-Doc V1.13</div>
519 </body>
520 </html>