📄 glib-basic-types.html
字号:
</div><hr><div class="refsect2" lang="en"><a name="id2824711"></a><h3><a name="gulong"></a>gulong</h3><a class="indexterm" name="id2824723"></a><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"><span class="type">G_MAXULONG</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2824752"></a><h3><a name="gint8"></a>gint8</h3><a class="indexterm" name="id2824765"></a><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 -128 to 127.</p></div><hr><div class="refsect2" lang="en"><a name="id2824782"></a><h3><a name="guint8"></a>guint8</h3><a class="indexterm" name="id2824794"></a><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 255.</p></div><hr><div class="refsect2" lang="en"><a name="id2824811"></a><h3><a name="gint16"></a>gint16</h3><a class="indexterm" name="id2824823"></a><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 -32,768 to 32,767.</p></div><hr><div class="refsect2" lang="en"><a name="id2824840"></a><h3><a name="guint16"></a>guint16</h3><a class="indexterm" name="id2824852"></a><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 65,535.</p></div><hr><div class="refsect2" lang="en"><a name="id2824870"></a><h3><a name="gint32"></a>gint32</h3><a class="indexterm" name="id2824882"></a><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 -2,147,483,648 to 2,147,483,647.</p></div><hr><div class="refsect2" lang="en"><a name="id2824900"></a><h3><a name="guint32"></a>guint32</h3><a class="indexterm" name="id2824912"></a><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 4,294,967,295.</p></div><hr><div class="refsect2" lang="en"><a name="id2824929"></a><h3><a name="G-HAVE-GINT64:CAPS"></a>G_HAVE_GINT64</h3><a class="indexterm" name="id2824944"></a><pre class="programlisting">#define G_HAVE_GINT64 1 /* deprecated, always true */</pre><div class="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"><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 availableon the platform. </p></div><hr><div class="refsect2" lang="en"><a name="id2824989"></a><h3><a name="gint64"></a>gint64</h3><a class="indexterm" name="id2825001"></a><pre class="programlisting">G_GNUC_EXTENSION typedef signed long long gint64;</pre><p>A signed integer guaranteed to be 64 bits on all platforms.Values of this type can range from -9,223,372,036,854,775,808 to9,223,372,036,854,775,807.</p></div><hr><div class="refsect2" lang="en"><a name="id2825019"></a><h3><a name="guint64"></a>guint64 ()</h3><a class="indexterm" name="id2825031"></a><pre class="programlisting">GLIB_VAR guint64 ();</pre><p>An unsigned integer guaranteed to be 64 bits on all platforms.Values of this type can range from 0 to 18,446,744,073,709,551,615.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2825070"></a><h3><a name="G-GINT64-CONSTANT:CAPS"></a>G_GINT64_CONSTANT()</h3><a class="indexterm" name="id2825083"></a><pre class="programlisting">#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))</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. 0x1d636b02300a7aa7U.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2825119"></a><h3><a name="G-GUINT64-CONSTANT:CAPS"></a>G_GUINT64_CONSTANT()</h3><a class="indexterm" name="id2825134"></a><pre class="programlisting">#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))</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" lang="en"><a name="id2825177"></a><h3><a name="gfloat"></a>gfloat</h3><a class="indexterm" name="id2825189"></a><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"><span class="type">G_MAXFLOAT</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXFLOAT:CAPS"><span class="type">G_MAXFLOAT</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2825227"></a><h3><a name="gdouble"></a>gdouble</h3><a class="indexterm" name="id2825239"></a><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"><span class="type">G_MAXDOUBLE</span></a> to <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXDOUBLE:CAPS"><span class="type">G_MAXDOUBLE</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2825277"></a><h3><a name="gsize"></a>gsize</h3><a class="indexterm" name="id2825289"></a><pre class="programlisting">typedef unsigned int gsize;</pre><p>An unsigned integer type of the result of the sizeof operator, correspondingto the size_t type defined in C99. This type is wide enough to hold the numericvalue of a pointer, so it is usually 32bit wide on a 32bit platform and64bit wide on a 64bit platform.</p></div><hr><div class="refsect2" lang="en"><a name="id2825308"></a><h3><a name="gssize"></a>gssize</h3><a class="indexterm" name="id2825320"></a><pre class="programlisting">typedef signed int gssize;</pre><p>A signed variant of gsize, corresponding to the ssize_t defined on most platforms.</p></div><hr><div class="refsect2" lang="en"><a name="id2825337"></a><h3><a name="goffset"></a>goffset</h3><a class="indexterm" name="id2825349"></a><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.</p></div></div><div class="refsect1" lang="en"><a name="id2825367"></a><div class="refsect2" lang="en"><a name="id2825368"></a></div><hr><div class="refsect2" lang="en"><a name="id2825369"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -