1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>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">
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">
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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#glib-Basic-Types.synopsis" class="shortcut">Top</a>
26 <a href="#glib-Basic-Types.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="glib-Basic-Types"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
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
37 <td valign="top" align="right"></td>
39 <div class="refsynopsisdiv">
40 <a name="glib-Basic-Types.synopsis"></a><h2>Synopsis</h2>
41 <pre class="synopsis">
42 #include <glib.h>
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>;
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>
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)
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>
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)
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>
127 <div class="refsect1">
128 <a name="glib-Basic-Types.description"></a><h2>Description</h2>
130 GLib defines a number of commonly used types, which can be divided
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>
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.
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;
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>.
167 <div class="refsect2">
168 <a name="gpointer"></a><h3>gpointer</h3>
169 <pre class="programlisting">typedef void* gpointer;
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>.
178 <div class="refsect2">
179 <a name="gconstpointer"></a><h3>gconstpointer</h3>
180 <pre class="programlisting">typedef const void *gconstpointer;
183 An untyped pointer to constant data.
184 The data pointed to should not be changed.
187 This is typically used in function prototypes to indicate
188 that the data pointed to will not be altered by the function.
192 <div class="refsect2">
193 <a name="gchar"></a><h3>gchar</h3>
194 <pre class="programlisting">typedef char gchar;
197 Corresponds to the standard C <span class="type">char</span> type.
201 <div class="refsect2">
202 <a name="guchar"></a><h3>guchar</h3>
203 <pre class="programlisting">typedef unsigned char guchar;
206 Corresponds to the standard C <span class="type">unsigned char</span> type.
210 <div class="refsect2">
211 <a name="gint"></a><h3>gint</h3>
212 <pre class="programlisting">typedef int gint;
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>.
220 <div class="refsect2">
221 <a name="G-MININT:CAPS"></a><h3>G_MININT</h3>
222 <pre class="programlisting">#define G_MININT INT_MIN
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>.
229 <div class="refsect2">
230 <a name="G-MAXINT:CAPS"></a><h3>G_MAXINT</h3>
231 <pre class="programlisting">#define G_MAXINT INT_MAX
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>.
238 <div class="refsect2">
239 <a name="guint"></a><h3>guint</h3>
240 <pre class="programlisting">typedef unsigned int guint;
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>.
248 <div class="refsect2">
249 <a name="G-MAXUINT:CAPS"></a><h3>G_MAXUINT</h3>
250 <pre class="programlisting">#define G_MAXUINT UINT_MAX
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>.
257 <div class="refsect2">
258 <a name="gshort"></a><h3>gshort</h3>
259 <pre class="programlisting">typedef short gshort;
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>.
267 <div class="refsect2">
268 <a name="G-MINSHORT:CAPS"></a><h3>G_MINSHORT</h3>
269 <pre class="programlisting">#define G_MINSHORT SHRT_MIN
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>.
276 <div class="refsect2">
277 <a name="G-MAXSHORT:CAPS"></a><h3>G_MAXSHORT</h3>
278 <pre class="programlisting">#define G_MAXSHORT SHRT_MAX
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>.
285 <div class="refsect2">
286 <a name="gushort"></a><h3>gushort</h3>
287 <pre class="programlisting">typedef unsigned short gushort;
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>.
295 <div class="refsect2">
296 <a name="G-MAXUSHORT:CAPS"></a><h3>G_MAXUSHORT</h3>
297 <pre class="programlisting">#define G_MAXUSHORT USHRT_MAX
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>.
304 <div class="refsect2">
305 <a name="glong"></a><h3>glong</h3>
306 <pre class="programlisting">typedef long glong;
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>.
314 <div class="refsect2">
315 <a name="G-MINLONG:CAPS"></a><h3>G_MINLONG</h3>
316 <pre class="programlisting">#define G_MINLONG LONG_MIN
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>.
323 <div class="refsect2">
324 <a name="G-MAXLONG:CAPS"></a><h3>G_MAXLONG</h3>
325 <pre class="programlisting">#define G_MAXLONG LONG_MAX
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>.
332 <div class="refsect2">
333 <a name="gulong"></a><h3>gulong</h3>
334 <pre class="programlisting">typedef unsigned long gulong;
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>.
342 <div class="refsect2">
343 <a name="G-MAXULONG:CAPS"></a><h3>G_MAXULONG</h3>
344 <pre class="programlisting">#define G_MAXULONG ULONG_MAX
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>.
351 <div class="refsect2">
352 <a name="gint8"></a><h3>gint8</h3>
353 <pre class="programlisting">typedef signed char gint8;
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).
362 <div class="refsect2">
363 <a name="G-MININT8:CAPS"></a><h3>G_MININT8</h3>
364 <pre class="programlisting">#define G_MININT8 ((gint8) 0x80)
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>.
369 <p class="since">Since 2.4</p>
372 <div class="refsect2">
373 <a name="G-MAXINT8:CAPS"></a><h3>G_MAXINT8</h3>
374 <pre class="programlisting">#define G_MAXINT8 ((gint8) 0x7f)
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>.
379 <p class="since">Since 2.4</p>
382 <div class="refsect2">
383 <a name="guint8"></a><h3>guint8</h3>
384 <pre class="programlisting">typedef unsigned char guint8;
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).
392 <div class="refsect2">
393 <a name="G-MAXUINT8:CAPS"></a><h3>G_MAXUINT8</h3>
394 <pre class="programlisting">#define G_MAXUINT8 ((guint8) 0xff)
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>.
399 <p class="since">Since 2.4</p>
402 <div class="refsect2">
403 <a name="gint16"></a><h3>gint16</h3>
404 <pre class="programlisting">typedef signed short gint16;
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).
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>.
417 <div class="refsect2">
418 <a name="G-MININT16:CAPS"></a><h3>G_MININT16</h3>
419 <pre class="programlisting">#define G_MININT16 ((gint16) 0x8000)
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>.
424 <p class="since">Since 2.4</p>
427 <div class="refsect2">
428 <a name="G-MAXINT16:CAPS"></a><h3>G_MAXINT16</h3>
429 <pre class="programlisting">#define G_MAXINT16 ((gint16) 0x7fff)
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>.
434 <p class="since">Since 2.4</p>
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"
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.
449 The following example prints "0x7b";
451 <div class="informalexample"><pre class="programlisting">
453 g_print ("%#" G_GINT16_MODIFIER "x", value);
457 <p class="since">Since 2.4</p>
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"
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.
472 <div class="informalexample"><pre class="programlisting">
475 sscanf ("42", "%" G_GINT16_FORMAT, &in)
477 g_print ("%" G_GINT32_FORMAT, out);
483 <div class="refsect2">
484 <a name="guint16"></a><h3>guint16</h3>
485 <pre class="programlisting">typedef unsigned short guint16;
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).
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>.
497 <div class="refsect2">
498 <a name="G-MAXUINT16:CAPS"></a><h3>G_MAXUINT16</h3>
499 <pre class="programlisting">#define G_MAXUINT16 ((guint16) 0xffff)
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>.
504 <p class="since">Since 2.4</p>
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"
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>
517 <div class="refsect2">
518 <a name="gint32"></a><h3>gint32</h3>
519 <pre class="programlisting">typedef signed int gint32;
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).
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>.
532 <div class="refsect2">
533 <a name="G-MININT32:CAPS"></a><h3>G_MININT32</h3>
534 <pre class="programlisting">#define G_MININT32 ((gint32) 0x80000000)
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>.
539 <p class="since">Since 2.4</p>
542 <div class="refsect2">
543 <a name="G-MAXINT32:CAPS"></a><h3>G_MAXINT32</h3>
544 <pre class="programlisting">#define G_MAXINT32 ((gint32) 0x7fffffff)
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>.
549 <p class="since">Since 2.4</p>
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 ""
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>.
561 <p class="since">Since 2.4</p>
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"
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>.
574 <div class="refsect2">
575 <a name="guint32"></a><h3>guint32</h3>
576 <pre class="programlisting">typedef unsigned int guint32;
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).
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>.
588 <div class="refsect2">
589 <a name="G-MAXUINT32:CAPS"></a><h3>G_MAXUINT32</h3>
590 <pre class="programlisting">#define G_MAXUINT32 ((guint32) 0xffffffff)
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>.
595 <p class="since">Since 2.4</p>
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"
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>.
608 <div class="refsect2">
609 <a name="gint64"></a><h3>gint64</h3>
610 <pre class="programlisting">typedef signed long gint64;
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).
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>.
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))
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>.
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)
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>.
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"
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.
653 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
654 <h3 class="title">Note</h3>
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>
663 <p class="since">Since 2.4</p>
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"
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>.
676 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
677 <h3 class="title">Note</h3>
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>
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)
696 This macro is used to insert 64-bit integer literals
697 into the source code.
699 <div class="variablelist"><table border="0">
700 <col align="left" valign="top">
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>
708 <div class="refsect2">
709 <a name="guint64"></a><h3>guint64</h3>
710 <pre class="programlisting">typedef unsigned long guint64;
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).
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>.
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)
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>.
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"
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>.
742 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
743 <h3 class="title">Note</h3>
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>
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)
762 This macro is used to insert 64-bit unsigned integer
763 literals into the source code.
765 <div class="variablelist"><table border="0">
766 <col align="left" valign="top">
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>
772 <p class="since">Since 2.10</p>
775 <div class="refsect2">
776 <a name="gfloat"></a><h3>gfloat</h3>
777 <pre class="programlisting">typedef float gfloat;
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>.
785 <div class="refsect2">
786 <a name="G-MINFLOAT:CAPS"></a><h3>G_MINFLOAT</h3>
787 <pre class="programlisting">#define G_MINFLOAT FLT_MIN
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>.
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.
798 <div class="refsect2">
799 <a name="G-MAXFLOAT:CAPS"></a><h3>G_MAXFLOAT</h3>
800 <pre class="programlisting">#define G_MAXFLOAT FLT_MAX
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>.
807 <div class="refsect2">
808 <a name="gdouble"></a><h3>gdouble</h3>
809 <pre class="programlisting">typedef double gdouble;
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>.
817 <div class="refsect2">
818 <a name="G-MINDOUBLE:CAPS"></a><h3>G_MINDOUBLE</h3>
819 <pre class="programlisting">#define G_MINDOUBLE DBL_MIN
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>.
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.
830 <div class="refsect2">
831 <a name="G-MAXDOUBLE:CAPS"></a><h3>G_MAXDOUBLE</h3>
832 <pre class="programlisting">#define G_MAXDOUBLE DBL_MAX
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>.
839 <div class="refsect2">
840 <a name="gsize"></a><h3>gsize</h3>
841 <pre class="programlisting">typedef unsigned long gsize;
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>.
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>.
857 <div class="refsect2">
858 <a name="G-MAXSIZE:CAPS"></a><h3>G_MAXSIZE</h3>
859 <pre class="programlisting">#define G_MAXSIZE G_MAXULONG
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>.
864 <p class="since">Since 2.4</p>
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"
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
876 <p class="since">Since 2.6</p>
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"
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>.
887 <p class="since">Since 2.6</p>
890 <div class="refsect2">
891 <a name="gssize"></a><h3>gssize</h3>
892 <pre class="programlisting">typedef signed long gssize;
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>.
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>.
906 <div class="refsect2">
907 <a name="G-MINSSIZE:CAPS"></a><h3>G_MINSSIZE</h3>
908 <pre class="programlisting">#define G_MINSSIZE G_MINLONG
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>.
913 <p class="since">Since 2.14</p>
916 <div class="refsect2">
917 <a name="G-MAXSSIZE:CAPS"></a><h3>G_MAXSSIZE</h3>
918 <pre class="programlisting">#define G_MAXSSIZE G_MAXLONG
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>.
923 <p class="since">Since 2.14</p>
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"
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>.
934 <p class="since">Since 2.6</p>
937 <div class="refsect2">
938 <a name="goffset"></a><h3>goffset</h3>
939 <pre class="programlisting">typedef gint64 goffset;
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>.
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>.
951 <p class="since">Since 2.14</p>
954 <div class="refsect2">
955 <a name="G-MINOFFSET:CAPS"></a><h3>G_MINOFFSET</h3>
956 <pre class="programlisting">#define G_MINOFFSET G_MININT64
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>.
963 <div class="refsect2">
964 <a name="G-MAXOFFSET:CAPS"></a><h3>G_MAXOFFSET</h3>
965 <pre class="programlisting">#define G_MAXOFFSET G_MAXINT64
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>.
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
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>.
981 <p class="since">Since 2.20</p>
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
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>.
992 <p class="since">Since 2.20</p>
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)
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.
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>.
1006 <div class="variablelist"><table border="0">
1007 <col align="left" valign="top">
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>
1013 <p class="since">Since 2.20</p>
1016 <div class="refsect2">
1017 <a name="gintptr"></a><h3>gintptr</h3>
1018 <pre class="programlisting">typedef signed long gintptr;
1021 Corresponds to the C99 type <span class="type">intptr_t</span>,
1022 a signed integer type that can hold any pointer.
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>.
1028 <p class="since">Since 2.18</p>
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"
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.
1040 <p class="since">Since 2.22</p>
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"
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>.
1051 <p class="since">Since 2.22</p>
1054 <div class="refsect2">
1055 <a name="guintptr"></a><h3>guintptr</h3>
1056 <pre class="programlisting">typedef unsigned long guintptr;
1059 Corresponds to the C99 type <span class="type">uintptr_t</span>,
1060 an unsigned integer type that can hold any pointer.
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>.
1066 <p class="since">Since 2.18</p>
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"
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>.
1077 <p class="since">Since 2.22</p>
1081 <div class="footer">
1083 Generated by GTK-Doc V1.18</div>