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">
452 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
455 <td class="listing_lines" align="right"><pre>1
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>
466 <p class="since">Since 2.4</p>
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"
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.
481 <div class="informalexample">
482 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
485 <td class="listing_lines" align="right"><pre>1
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">&</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>
504 <div class="refsect2">
505 <a name="guint16"></a><h3>guint16</h3>
506 <pre class="programlisting">typedef unsigned short guint16;
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).
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>.
518 <div class="refsect2">
519 <a name="G-MAXUINT16:CAPS"></a><h3>G_MAXUINT16</h3>
520 <pre class="programlisting">#define G_MAXUINT16 ((guint16) 0xffff)
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>.
525 <p class="since">Since 2.4</p>
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"
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>
538 <div class="refsect2">
539 <a name="gint32"></a><h3>gint32</h3>
540 <pre class="programlisting">typedef signed int gint32;
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).
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>.
553 <div class="refsect2">
554 <a name="G-MININT32:CAPS"></a><h3>G_MININT32</h3>
555 <pre class="programlisting">#define G_MININT32 ((gint32) 0x80000000)
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>.
560 <p class="since">Since 2.4</p>
563 <div class="refsect2">
564 <a name="G-MAXINT32:CAPS"></a><h3>G_MAXINT32</h3>
565 <pre class="programlisting">#define G_MAXINT32 ((gint32) 0x7fffffff)
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>.
570 <p class="since">Since 2.4</p>
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 ""
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>.
582 <p class="since">Since 2.4</p>
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"
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>.
595 <div class="refsect2">
596 <a name="guint32"></a><h3>guint32</h3>
597 <pre class="programlisting">typedef unsigned int guint32;
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).
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>.
609 <div class="refsect2">
610 <a name="G-MAXUINT32:CAPS"></a><h3>G_MAXUINT32</h3>
611 <pre class="programlisting">#define G_MAXUINT32 ((guint32) 0xffffffff)
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>.
616 <p class="since">Since 2.4</p>
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"
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>.
629 <div class="refsect2">
630 <a name="gint64"></a><h3>gint64</h3>
631 <pre class="programlisting">typedef signed long gint64;
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).
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>.
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))
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>.
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)
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>.
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"
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.
674 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
675 <h3 class="title">Note</h3>
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>
684 <p class="since">Since 2.4</p>
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"
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>.
697 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
698 <h3 class="title">Note</h3>
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>
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)
717 This macro is used to insert 64-bit integer literals
718 into the source code.
720 <div class="variablelist"><table border="0">
721 <col align="left" valign="top">
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>
729 <div class="refsect2">
730 <a name="guint64"></a><h3>guint64</h3>
731 <pre class="programlisting">typedef unsigned long guint64;
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).
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>.
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)
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>.
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"
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>.
763 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
764 <h3 class="title">Note</h3>
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>
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)
783 This macro is used to insert 64-bit unsigned integer
784 literals into the source code.
786 <div class="variablelist"><table border="0">
787 <col align="left" valign="top">
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>
793 <p class="since">Since 2.10</p>
796 <div class="refsect2">
797 <a name="gfloat"></a><h3>gfloat</h3>
798 <pre class="programlisting">typedef float gfloat;
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>.
806 <div class="refsect2">
807 <a name="G-MINFLOAT:CAPS"></a><h3>G_MINFLOAT</h3>
808 <pre class="programlisting">#define G_MINFLOAT FLT_MIN
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>.
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.
819 <div class="refsect2">
820 <a name="G-MAXFLOAT:CAPS"></a><h3>G_MAXFLOAT</h3>
821 <pre class="programlisting">#define G_MAXFLOAT FLT_MAX
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>.
828 <div class="refsect2">
829 <a name="gdouble"></a><h3>gdouble</h3>
830 <pre class="programlisting">typedef double gdouble;
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>.
838 <div class="refsect2">
839 <a name="G-MINDOUBLE:CAPS"></a><h3>G_MINDOUBLE</h3>
840 <pre class="programlisting">#define G_MINDOUBLE DBL_MIN
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>.
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.
851 <div class="refsect2">
852 <a name="G-MAXDOUBLE:CAPS"></a><h3>G_MAXDOUBLE</h3>
853 <pre class="programlisting">#define G_MAXDOUBLE DBL_MAX
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>.
860 <div class="refsect2">
861 <a name="gsize"></a><h3>gsize</h3>
862 <pre class="programlisting">typedef unsigned long gsize;
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>.
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>.
878 <div class="refsect2">
879 <a name="G-MAXSIZE:CAPS"></a><h3>G_MAXSIZE</h3>
880 <pre class="programlisting">#define G_MAXSIZE G_MAXULONG
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>.
885 <p class="since">Since 2.4</p>
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"
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
897 <p class="since">Since 2.6</p>
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"
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>.
908 <p class="since">Since 2.6</p>
911 <div class="refsect2">
912 <a name="gssize"></a><h3>gssize</h3>
913 <pre class="programlisting">typedef signed long gssize;
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>.
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>.
927 <div class="refsect2">
928 <a name="G-MINSSIZE:CAPS"></a><h3>G_MINSSIZE</h3>
929 <pre class="programlisting">#define G_MINSSIZE G_MINLONG
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>.
934 <p class="since">Since 2.14</p>
937 <div class="refsect2">
938 <a name="G-MAXSSIZE:CAPS"></a><h3>G_MAXSSIZE</h3>
939 <pre class="programlisting">#define G_MAXSSIZE G_MAXLONG
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>.
944 <p class="since">Since 2.14</p>
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"
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>.
955 <p class="since">Since 2.6</p>
958 <div class="refsect2">
959 <a name="goffset"></a><h3>goffset</h3>
960 <pre class="programlisting">typedef gint64 goffset;
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>.
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>.
972 <p class="since">Since 2.14</p>
975 <div class="refsect2">
976 <a name="G-MINOFFSET:CAPS"></a><h3>G_MINOFFSET</h3>
977 <pre class="programlisting">#define G_MINOFFSET G_MININT64
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>.
984 <div class="refsect2">
985 <a name="G-MAXOFFSET:CAPS"></a><h3>G_MAXOFFSET</h3>
986 <pre class="programlisting">#define G_MAXOFFSET G_MAXINT64
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>.
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
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>.
1002 <p class="since">Since 2.20</p>
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
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>.
1013 <p class="since">Since 2.20</p>
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)
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.
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>.
1027 <div class="variablelist"><table border="0">
1028 <col align="left" valign="top">
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>
1034 <p class="since">Since 2.20</p>
1037 <div class="refsect2">
1038 <a name="gintptr"></a><h3>gintptr</h3>
1039 <pre class="programlisting">typedef signed long gintptr;
1042 Corresponds to the C99 type <span class="type">intptr_t</span>,
1043 a signed integer type that can hold any pointer.
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>.
1049 <p class="since">Since 2.18</p>
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"
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.
1061 <p class="since">Since 2.22</p>
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"
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>.
1072 <p class="since">Since 2.22</p>
1075 <div class="refsect2">
1076 <a name="guintptr"></a><h3>guintptr</h3>
1077 <pre class="programlisting">typedef unsigned long guintptr;
1080 Corresponds to the C99 type <span class="type">uintptr_t</span>,
1081 an unsigned integer type that can hold any pointer.
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>.
1087 <p class="since">Since 2.18</p>
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"
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>.
1098 <p class="since">Since 2.22</p>
1102 <div class="footer">
1104 Generated by GTK-Doc V1.18</div>