| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Basic Types</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="index.html" title="GLib Reference Manual"> |
| <link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals"> |
| <link rel="prev" href="glib-Version-Information.html" title="Version Information"> |
| <link rel="next" href="glib-Limits-of-Basic-Types.html" title="Limits of Basic Types"> |
| <meta name="generator" content="GTK-Doc V1.14 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="glib-Version-Information.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GLib Reference Manual</th> |
| <td><a accesskey="n" href="glib-Limits-of-Basic-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#glib-Basic-Types.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#glib-Basic-Types.description" class="shortcut">Description</a> |
| </td></tr> |
| </table> |
| <div class="refentry" title="Basic Types"> |
| <a name="glib-Basic-Types"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="glib-Basic-Types.top_of_page"></a>Basic Types</span></h2> |
| <p>Basic Types — standard GLib types, defined for ease-of-use and portability</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv" title="Synopsis"> |
| <a name="glib-Basic-Types.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> |
| #include <glib.h> |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer">gconstpointer</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guchar" title="guchar">guchar</a>; |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gshort" title="gshort">gshort</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gushort" title="gushort">gushort</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#glong" title="glong">glong</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a>; |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gint8" title="gint8">gint8</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guint8" title="guint8">guint8</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gint16" title="gint16">gint16</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guint16" title="guint16">guint16</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gint32" title="gint32">gint32</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guint32" title="guint32">guint32</a>; |
| |
| #define <a class="link" href="glib-Basic-Types.html#G-HAVE-GINT64:CAPS" title="G_HAVE_GINT64">G_HAVE_GINT64</a> |
| typedef <a class="link" href="glib-Basic-Types.html#gint64" title="gint64">gint64</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guint64" title="guint64">guint64</a>; |
| #define <a class="link" href="glib-Basic-Types.html#G-GINT64-CONSTANT:CAPS" title="G_GINT64_CONSTANT()">G_GINT64_CONSTANT</a> (val) |
| #define <a class="link" href="glib-Basic-Types.html#G-GUINT64-CONSTANT:CAPS" title="G_GUINT64_CONSTANT()">G_GUINT64_CONSTANT</a> (val) |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gfloat" title="gfloat">gfloat</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble">gdouble</a>; |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gsize" title="gsize">gsize</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#goffset" title="goffset">goffset</a>; |
| #define <a class="link" href="glib-Basic-Types.html#G-GOFFSET-CONSTANT:CAPS" title="G_GOFFSET_CONSTANT()">G_GOFFSET_CONSTANT</a> (val) |
| |
| typedef <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr">gintptr</a>; |
| typedef <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr">guintptr</a>; |
| </pre> |
| </div> |
| <div class="refsect1" title="Description"> |
| <a name="glib-Basic-Types.description"></a><h2>Description</h2> |
| <p> |
| GLib defines a number of commonly used types, which can be divided into |
| 4 groups: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" type="disc"> |
| <li class="listitem"><p> |
| New types which are not part of standard C (but are defined |
| in 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>, <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> |
| <li class="listitem"><p> |
| Integer types which are guaranteed to be the same size across 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>, <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> |
| <li class="listitem"><p> |
| Types which are easier to use than their standard C counterparts - |
| <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> |
| <li class="listitem"><p> |
| Types which correspond exactly to standard C types, but are 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>, <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> |
| </ul></div> |
| <p> |
| </p> |
| </div> |
| <div class="refsect1" title="Details"> |
| <a name="glib-Basic-Types.details"></a><h2>Details</h2> |
| <div class="refsect2" title="gboolean"> |
| <a name="gboolean"></a><h3>gboolean</h3> |
| <pre class="programlisting">typedef gint gboolean; |
| </pre> |
| <p> |
| A standard <span class="type">boolean</span> type. |
| Variables of this type should only contain the value <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gpointer"> |
| <a name="gpointer"></a><h3>gpointer</h3> |
| <pre class="programlisting">typedef void* gpointer; |
| </pre> |
| <p> |
| An untyped pointer. |
| <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> looks better and is easier to use than <span class="type">void*</span>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gconstpointer"> |
| <a name="gconstpointer"></a><h3>gconstpointer</h3> |
| <pre class="programlisting">typedef const void *gconstpointer; |
| </pre> |
| <p> |
| An untyped pointer to constant data. |
| The data pointed to should not be changed. |
| </p> |
| <p> |
| This is typically used in function prototypes to indicate that the |
| data pointed to will not be altered by the function. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gchar"> |
| <a name="gchar"></a><h3>gchar</h3> |
| <pre class="programlisting">typedef char gchar; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">char</span> type. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guchar"> |
| <a name="guchar"></a><h3>guchar</h3> |
| <pre class="programlisting">typedef unsigned char guchar; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">unsigned char</span> type. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gint"> |
| <a name="gint"></a><h3>gint</h3> |
| <pre class="programlisting">typedef int gint; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">int</span> type. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT:CAPS" title="G_MININT"><span class="type">G_MININT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT:CAPS" title="G_MAXINT"><span class="type">G_MAXINT</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guint"> |
| <a name="guint"></a><h3>guint</h3> |
| <pre class="programlisting">typedef unsigned int guint; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">unsigned int</span> type. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT:CAPS" title="G_MAXUINT"><span class="type">G_MAXUINT</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gshort"> |
| <a name="gshort"></a><h3>gshort</h3> |
| <pre class="programlisting">typedef short gshort; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">short</span> type. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINSHORT:CAPS" title="G_MINSHORT"><span class="type">G_MINSHORT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSHORT:CAPS" title="G_MAXSHORT"><span class="type">G_MAXSHORT</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gushort"> |
| <a name="gushort"></a><h3>gushort</h3> |
| <pre class="programlisting">typedef unsigned short gushort; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">unsigned short</span> type. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUSHORT:CAPS" title="G_MAXUSHORT"><span class="type">G_MAXUSHORT</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="glong"> |
| <a name="glong"></a><h3>glong</h3> |
| <pre class="programlisting">typedef long glong; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">long</span> type. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINLONG:CAPS" title="G_MINLONG"><span class="type">G_MINLONG</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXLONG:CAPS" title="G_MAXLONG"><span class="type">G_MAXLONG</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gulong"> |
| <a name="gulong"></a><h3>gulong</h3> |
| <pre class="programlisting">typedef unsigned long gulong; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">unsigned long</span> type. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXULONG:CAPS" title="G_MAXULONG"><span class="type">G_MAXULONG</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gint8"> |
| <a name="gint8"></a><h3>gint8</h3> |
| <pre class="programlisting">typedef signed char gint8; |
| </pre> |
| <p> |
| A signed integer guaranteed to be 8 bits on all platforms. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT8:CAPS" title="G_MININT8"><span class="type">G_MININT8</span></a> (= -128) to |
| <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT8:CAPS" title="G_MAXINT8"><span class="type">G_MAXINT8</span></a> (= 127). |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guint8"> |
| <a name="guint8"></a><h3>guint8</h3> |
| <pre class="programlisting">typedef unsigned char guint8; |
| </pre> |
| <p> |
| An unsigned integer guaranteed to be 8 bits on all platforms. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT8:CAPS" title="G_MAXUINT8"><span class="type">G_MAXUINT8</span></a> (= 255). |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gint16"> |
| <a name="gint16"></a><h3>gint16</h3> |
| <pre class="programlisting">typedef signed short gint16; |
| </pre> |
| <p> |
| A signed integer guaranteed to be 16 bits on all platforms. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT16:CAPS" title="G_MININT16"><span class="type">G_MININT16</span></a> (= -32,768) to |
| <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT16:CAPS" title="G_MAXINT16"><span class="type">G_MAXINT16</span></a> (= 32,767). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><code class="literal">G_GINT16_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guint16"> |
| <a name="guint16"></a><h3>guint16</h3> |
| <pre class="programlisting">typedef unsigned short guint16; |
| </pre> |
| <p> |
| An unsigned integer guaranteed to be 16 bits on all platforms. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT16:CAPS" title="G_MAXUINT16"><span class="type">G_MAXUINT16</span></a> (= 65,535). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT16-FORMAT:CAPS" title="G_GUINT16_FORMAT"><code class="literal">G_GUINT16_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gint32"> |
| <a name="gint32"></a><h3>gint32</h3> |
| <pre class="programlisting">typedef signed int gint32; |
| </pre> |
| <p> |
| A signed integer guaranteed to be 32 bits on all platforms. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT32:CAPS" title="G_MININT32"><span class="type">G_MININT32</span></a> (= -2,147,483,648) to |
| <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT32:CAPS" title="G_MAXINT32"><span class="type">G_MAXINT32</span></a> (= 2,147,483,647). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-FORMAT:CAPS" title="G_GINT32_FORMAT"><code class="literal">G_GINT32_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guint32"> |
| <a name="guint32"></a><h3>guint32</h3> |
| <pre class="programlisting">typedef unsigned int guint32; |
| </pre> |
| <p> |
| An unsigned integer guaranteed to be 32 bits on all platforms. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT32:CAPS" title="G_MAXUINT32"><span class="type">G_MAXUINT32</span></a> (= 4,294,967,295). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT32-FORMAT:CAPS" title="G_GUINT32_FORMAT"><code class="literal">G_GUINT32_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="G_HAVE_GINT64"> |
| <a name="G-HAVE-GINT64:CAPS"></a><h3>G_HAVE_GINT64</h3> |
| <pre class="programlisting">#define G_HAVE_GINT64 1 /* deprecated, always true */ |
| </pre> |
| <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> |
| <h3 class="title">Warning</h3> |
| <p><code class="literal">G_HAVE_GINT64</code> is deprecated and should not be used in newly-written code. GLib requires 64-bit integer support since version 2.0, therefore |
| <a class="link" href="glib-Basic-Types.html#G-HAVE-GINT64:CAPS" title="G_HAVE_GINT64"><code class="literal">G_HAVE_GINT64</code></a> is <span class="emphasis"><em>always</em></span> defined.</p> |
| </div> |
| <p> |
| This macro is defined if 64-bit signed and unsigned integers are available |
| on the platform. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gint64"> |
| <a name="gint64"></a><h3>gint64</h3> |
| <pre class="programlisting">typedef signed long gint64; |
| </pre> |
| <p> |
| A signed integer guaranteed to be 64 bits on all platforms. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT64:CAPS" title="G_MININT64"><span class="type">G_MININT64</span></a> (= -9,223,372,036,854,775,808) to |
| <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT64:CAPS" title="G_MAXINT64"><span class="type">G_MAXINT64</span></a> (= 9,223,372,036,854,775,807). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-FORMAT:CAPS" title="G_GINT64_FORMAT"><code class="literal">G_GINT64_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="guint64"> |
| <a name="guint64"></a><h3>guint64</h3> |
| <pre class="programlisting">typedef unsigned long guint64; |
| </pre> |
| <p> |
| An unsigned integer guaranteed to be 64 bits on all platforms. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT64:CAPS" title="G_MAXUINT64"><span class="type">G_MAXUINT64</span></a> (= 18,446,744,073,709,551,615). |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINT64-MODIFIER:CAPS" title="G_GINT64_MODIFIER"><code class="literal">G_GINT64_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINT64-FORMAT:CAPS" title="G_GUINT64_FORMAT"><code class="literal">G_GUINT64_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="G_GINT64_CONSTANT()"> |
| <a name="G-GINT64-CONSTANT:CAPS"></a><h3>G_GINT64_CONSTANT()</h3> |
| <pre class="programlisting">#define G_GINT64_CONSTANT(val) (val##L) |
| </pre> |
| <p> |
| This macro is used to insert 64-bit integer literals into the source code. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td> |
| <td>a literal integer value, e.g. 0x1d636b02300a7aa7. |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="G_GUINT64_CONSTANT()"> |
| <a name="G-GUINT64-CONSTANT:CAPS"></a><h3>G_GUINT64_CONSTANT()</h3> |
| <pre class="programlisting">#define G_GUINT64_CONSTANT(val) (val##UL) |
| </pre> |
| <p> |
| This macro is used to insert 64-bit unsigned integer literals into the |
| source code. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td> |
| <td>a literal integer value, e.g. 0x1d636b02300a7aa7U. |
| </td> |
| </tr></tbody> |
| </table></div> |
| <p class="since">Since 2.10</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gfloat"> |
| <a name="gfloat"></a><h3>gfloat</h3> |
| <pre class="programlisting">typedef float gfloat; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">float</span> type. |
| Values of this type can range from -<a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXFLOAT:CAPS" title="G_MAXFLOAT"><span class="type">G_MAXFLOAT</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gdouble"> |
| <a name="gdouble"></a><h3>gdouble</h3> |
| <pre class="programlisting">typedef double gdouble; |
| </pre> |
| <p> |
| Corresponds to the standard C <span class="type">double</span> type. |
| Values of this type can range from -<a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE:CAPS" title="G_MAXDOUBLE"><span class="type">G_MAXDOUBLE</span></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gsize"> |
| <a name="gsize"></a><h3>gsize</h3> |
| <pre class="programlisting">typedef unsigned long gsize; |
| </pre> |
| <p> |
| An unsigned integer type of the result of the sizeof operator, corresponding |
| to the size_t type defined in C99. This type is wide enough to hold the numeric |
| value of a pointer, so it is usually 32bit wide on a 32bit platform and |
| 64bit wide on a 64bit platform. |
| Values of this type can range from 0 to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSIZE:CAPS" title="G_MAXSIZE"><span class="type">G_MAXSIZE</span></a>. |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-FORMAT:CAPS" title="G_GSIZE_FORMAT"><code class="literal">G_GSIZE_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="gssize"> |
| <a name="gssize"></a><h3>gssize</h3> |
| <pre class="programlisting">typedef signed long gssize; |
| </pre> |
| <p> |
| A signed variant of gsize, corresponding to the ssize_t defined on most platforms. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINSSIZE:CAPS" title="G_MINSSIZE"><span class="type">G_MINSSIZE</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXSSIZE:CAPS" title="G_MAXSSIZE"><span class="type">G_MAXSSIZE</span></a>. |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GSIZE-MODIFIER:CAPS" title="G_GSIZE_MODIFIER"><code class="literal">G_GSIZE_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GSSIZE-FORMAT:CAPS" title="G_GSSIZE_FORMAT"><code class="literal">G_GSSIZE_FORMAT</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="goffset"> |
| <a name="goffset"></a><h3>goffset</h3> |
| <pre class="programlisting">typedef gint64 goffset; |
| </pre> |
| <p> |
| A signed integer type that is used for file offsets, corresponding to the |
| C99 type off64_t. |
| Values of this type can range from <a class="link" href="glib-Limits-of-Basic-Types.html#G-MINOFFSET:CAPS" title="G_MINOFFSET"><span class="type">G_MINOFFSET</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXOFFSET:CAPS" title="G_MAXOFFSET"><span class="type">G_MAXOFFSET</span></a>. |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GOFFSET-MODIFIER:CAPS" title="G_GOFFSET_MODIFIER"><code class="literal">G_GOFFSET_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GOFFSET-FORMAT:CAPS" title="G_GOFFSET_FORMAT"><code class="literal">G_GOFFSET_FORMAT</code></a>. |
| </p> |
| Since: 2.14</div> |
| <hr> |
| <div class="refsect2" title="G_GOFFSET_CONSTANT()"> |
| <a name="G-GOFFSET-CONSTANT:CAPS"></a><h3>G_GOFFSET_CONSTANT()</h3> |
| <pre class="programlisting">#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) |
| </pre> |
| <p> |
| This macro is used to insert <a class="link" href="glib-Basic-Types.html#goffset" title="goffset"><span class="type">goffset</span></a> 64-bit integer literals into the source code. |
| 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>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td> |
| <td>a literal integer value, e.g. 0x1d636b02300a7aa7. |
| Since: 2.20 |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="gintptr"> |
| <a name="gintptr"></a><h3>gintptr</h3> |
| <pre class="programlisting">typedef signed long gintptr; |
| </pre> |
| <p> |
| Corresponds to the C99 type <span class="type">intptr_t</span>, a signed integer type that |
| can hold any pointer. |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-FORMAT:CAPS" title="G_GINTPTR_FORMAT"><code class="literal">G_GINTPTR_FORMAT</code></a>. |
| </p> |
| Since: 2.18</div> |
| <hr> |
| <div class="refsect2" title="guintptr"> |
| <a name="guintptr"></a><h3>guintptr</h3> |
| <pre class="programlisting">typedef unsigned long guintptr; |
| </pre> |
| <p> |
| Corresponds to the C99 type <span class="type">uintptr_t</span>, an unsigned integer type that |
| can hold any pointer. |
| </p> |
| <p> |
| To print or scan values of this type, use |
| <a class="link" href="glib-Miscellaneous-Macros.html#G-GINTPTR-MODIFIER:CAPS" title="G_GINTPTR_MODIFIER"><code class="literal">G_GINTPTR_MODIFIER</code></a> and/or <a class="link" href="glib-Miscellaneous-Macros.html#G-GUINTPTR-FORMAT:CAPS" title="G_GUINTPTR_FORMAT"><code class="literal">G_GUINTPTR_FORMAT</code></a>. |
| </p> |
| Since: 2.18</div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.14</div> |
| </body> |
| </html> |