Blame docs/reference/glib/html/glib-Basic-Types.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>Basic Types: GLib Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GLib Reference Manual">
Packit ae235b
<link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
Packit ae235b
<link rel="prev" href="glib-Version-Information.html" title="Version Information">
Packit ae235b
<link rel="next" href="glib-Standard-Macros.html" title="Standard Macros">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Basic Types

Packit ae235b

Basic Types — standard GLib types, defined for ease-of-use

Packit ae235b
    and portability

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
Packit ae235b
Packit ae235b
gint ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GLIB_AVAILABLE_IN_ALL
Packit ae235b
Packit ae235b
Packit ae235b
guint ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
G_GINT64_CONSTANT()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
G_GUINT64_CONSTANT()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
G_GOFFSET_CONSTANT()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gpointer
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gconstpointer
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gchar
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guchar
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MININT
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXINT
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUINT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gshort
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINSHORT
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXSHORT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gushort
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUSHORT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
glong
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINLONG
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXLONG
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gulong
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXULONG
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gint8
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MININT8
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXINT8
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guint8
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUINT8
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gint16
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MININT16
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXINT16
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT16_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT16_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guint16
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUINT16
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GUINT16_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gint32
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MININT32
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXINT32
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT32_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT32_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guint32
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUINT32
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GUINT32_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gint64
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MININT64
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXINT64
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT64_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINT64_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guint64
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXUINT64
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GUINT64_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gfloat
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINFLOAT
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXFLOAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gdouble
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINDOUBLE
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXDOUBLE
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gsize
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXSIZE
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GSIZE_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GSIZE_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gssize
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINSSIZE
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXSSIZE
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GSSIZE_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GSSIZE_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
goffset
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MINOFFSET
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_MAXOFFSET
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GOFFSET_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GOFFSET_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
gintptr
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINTPTR_MODIFIER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GINTPTR_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
typedef
Packit ae235b
guintptr
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_GUINTPTR_FORMAT
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <glib.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

GLib defines a number of commonly used types, which can be divided

Packit ae235b
into several groups:

Packit ae235b
    Packit ae235b
  • New types which are not part of standard C (but are defined in

  • Packit ae235b
    various C standard library header files) — gboolean, gssize.

    Packit ae235b
  • Integer types which are guaranteed to be the same size across

  • Packit ae235b
    all platforms — gint8, guint8, gint16, guint16, gint32,
    Packit ae235b
    guint32, gint64, guint64.

    Packit ae235b
  • Types which are easier to use than their standard C counterparts -

  • Packit ae235b
    gpointer, gconstpointer, guchar, guint, gushort, gulong.

    Packit ae235b
  • Types which correspond exactly to standard C types, but are

  • Packit ae235b
    included for completeness — gchar, gint, gshort, glong,
    Packit ae235b
    gfloat, gdouble.

    Packit ae235b
  • Types which correspond exactly to standard C99 types, but are available

  • Packit ae235b
    to use even if your compiler does not support C99 — gsize, goffset,
    Packit ae235b
    gintptr, guintptr.

    Packit ae235b
    Packit ae235b

    GLib also defines macros for the limits of some of the standard

    Packit ae235b
    integer and floating point types, as well as macros for suitable
    Packit ae235b
    printf() formats for these types.

    Packit ae235b
    Packit ae235b
    Packit ae235b

    Functions

    Packit ae235b
    Packit ae235b

    gint ()

    Packit ae235b
    GLIB_AVAILABLE_IN_ALL
    Packit ae235b
    gint ();
    Packit ae235b

    Corresponds to the standard C int type.

    Packit ae235b
    Values of this type can range from G_MININT to G_MAXINT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guint ()

    Packit ae235b
    GLIB_AVAILABLE_IN_ALL
    Packit ae235b
    guint ();
    Packit ae235b

    Corresponds to the standard C unsigned int type.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUINT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT64_CONSTANT()

    Packit ae235b
    #define G_GINT64_CONSTANT(val) (val##L)
    Packit ae235b
    Packit ae235b

    This macro is used to insert 64-bit integer literals

    Packit ae235b
    into the source code.

    Packit ae235b
    Packit ae235b

    Parameters

    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    val

    Packit ae235b

    a literal integer value, e.g. 0x1d636b02300a7aa7

    Packit ae235b
     
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GUINT64_CONSTANT()

    Packit ae235b
    #define G_GUINT64_CONSTANT(val) (val##UL)
    Packit ae235b
    Packit ae235b

    This macro is used to insert 64-bit unsigned integer

    Packit ae235b
    literals into the source code.

    Packit ae235b
    Packit ae235b

    Parameters

    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    val

    Packit ae235b

    a literal integer value, e.g. 0x1d636b02300a7aa7U

    Packit ae235b
     
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Since: 2.10

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GOFFSET_CONSTANT()

    Packit ae235b
    #define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
    Packit ae235b
    Packit ae235b

    This macro is used to insert goffset 64-bit integer literals

    Packit ae235b
    into the source code.

    Packit ae235b

    See also G_GINT64_CONSTANT.

    Packit ae235b
    Packit ae235b

    Parameters

    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    val

    Packit ae235b

    a literal integer value, e.g. 0x1d636b02300a7aa7

    Packit ae235b
     
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Since: 2.20

    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Types and Values

    Packit ae235b
    Packit ae235b

    gboolean

    Packit ae235b
    typedef gint   gboolean;
    Packit ae235b
    Packit ae235b

    A standard boolean type.

    Packit ae235b
    Variables of this type should only contain the value
    Packit ae235b
    TRUE or FALSE.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gpointer

    Packit ae235b
    typedef void* gpointer;
    Packit ae235b
    Packit ae235b

    An untyped pointer.

    Packit ae235b
    gpointer looks better and is easier to use than void*.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gconstpointer

    Packit ae235b
    typedef const void *gconstpointer;
    Packit ae235b
    Packit ae235b

    An untyped pointer to constant data.

    Packit ae235b
    The data pointed to should not be changed.

    Packit ae235b

    This is typically used in function prototypes to indicate

    Packit ae235b
    that the data pointed to will not be altered by the function.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gchar

    Packit ae235b
    typedef char   gchar;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C char type.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guchar

    Packit ae235b
    typedef unsigned char   guchar;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C unsigned char type.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MININT

    Packit ae235b
    #define G_MININT INT_MIN
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gint.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXINT

    Packit ae235b
    #define G_MAXINT INT_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gint.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUINT

    Packit ae235b
    #define G_MAXUINT UINT_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a guint.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gshort

    Packit ae235b
    typedef short  gshort;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C short type.

    Packit ae235b
    Values of this type can range from G_MINSHORT to G_MAXSHORT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINSHORT

    Packit ae235b
    #define G_MINSHORT SHRT_MIN
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gshort.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXSHORT

    Packit ae235b
    #define G_MAXSHORT SHRT_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gshort.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gushort

    Packit ae235b
    typedef unsigned short  gushort;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C unsigned short type.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUSHORT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUSHORT

    Packit ae235b
    #define G_MAXUSHORT USHRT_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gushort.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    glong

    Packit ae235b
    typedef long   glong;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C long type.

    Packit ae235b
    Values of this type can range from G_MINLONG to G_MAXLONG.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINLONG

    Packit ae235b
    #define G_MINLONG LONG_MIN
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a glong.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXLONG

    Packit ae235b
    #define G_MAXLONG LONG_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a glong.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gulong

    Packit ae235b
    typedef unsigned long   gulong;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C unsigned long type.

    Packit ae235b
    Values of this type can range from 0 to G_MAXULONG.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXULONG

    Packit ae235b
    #define G_MAXULONG ULONG_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gulong.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gint8

    Packit ae235b
    typedef signed char gint8;
    Packit ae235b
    Packit ae235b

    A signed integer guaranteed to be 8 bits on all platforms.

    Packit ae235b
    Values of this type can range from G_MININT8 (= -128) to
    Packit ae235b
    G_MAXINT8 (= 127).

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MININT8

    Packit ae235b
    #define G_MININT8 ((gint8) -0x80)
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gint8.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXINT8

    Packit ae235b
    #define G_MAXINT8 ((gint8)  0x7f)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gint8.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guint8

    Packit ae235b
    typedef unsigned char guint8;
    Packit ae235b
    Packit ae235b

    An unsigned integer guaranteed to be 8 bits on all platforms.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUINT8 (= 255).

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUINT8

    Packit ae235b
    #define G_MAXUINT8 ((guint8) 0xff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a guint8.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gint16

    Packit ae235b
    typedef signed short gint16;
    Packit ae235b
    Packit ae235b

    A signed integer guaranteed to be 16 bits on all platforms.

    Packit ae235b
    Values of this type can range from G_MININT16 (= -32,768) to
    Packit ae235b
    G_MAXINT16 (= 32,767).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT16_MODIFIER and/or G_GINT16_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MININT16

    Packit ae235b
    #define G_MININT16 ((gint16) -0x8000)
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gint16.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXINT16

    Packit ae235b
    #define G_MAXINT16 ((gint16)  0x7fff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gint16.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT16_MODIFIER

    Packit ae235b
    #define G_GINT16_MODIFIER "h"
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gint16 or guint16. It
    Packit ae235b
    is a string literal, but doesn't include the percent-sign, such
    Packit ae235b
    that you can add precision and length modifiers between percent-sign
    Packit ae235b
    and conversion specifier and append a conversion specifier.

    Packit ae235b

    The following example prints "0x7b";

    Packit ae235b
    Packit ae235b
      
    Packit ae235b
        
    Packit ae235b
          
    Packit ae235b
            
    1
    Packit ae235b
    2
    Packit ae235b
            
    gint16 value = 123;
    Packit ae235b
    g_print ("%#" G_GINT16_MODIFIER "x", value);
    Packit ae235b
          
    Packit ae235b
        
    Packit ae235b
      
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT16_FORMAT

    Packit ae235b
    #define G_GINT16_FORMAT "hi"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning and

    Packit ae235b
    printing values of type gint16. It is a string literal, but doesn't
    Packit ae235b
    include the percent-sign, such that you can add precision and length
    Packit ae235b
    modifiers between percent-sign and conversion specifier.

    Packit ae235b
    Packit ae235b
      
    Packit ae235b
        
    Packit ae235b
          
    Packit ae235b
            
    1
    Packit ae235b
    2
    Packit ae235b
    3
    Packit ae235b
    4
    Packit ae235b
    5
    Packit ae235b
            
    gint16 in;
    Packit ae235b
    gint32 out;
    Packit ae235b
    sscanf ("42", "%" G_GINT16_FORMAT, &in)
    Packit ae235b
    out = in * 1000;
    Packit ae235b
    g_print ("%" G_GINT32_FORMAT, out);
    Packit ae235b
          
    Packit ae235b
        
    Packit ae235b
      
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guint16

    Packit ae235b
    typedef unsigned short guint16;
    Packit ae235b
    Packit ae235b

    An unsigned integer guaranteed to be 16 bits on all platforms.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUINT16 (= 65,535).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT16_MODIFIER and/or G_GUINT16_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUINT16

    Packit ae235b
    #define G_MAXUINT16 ((guint16) 0xffff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a guint16.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GUINT16_FORMAT

    Packit ae235b
    #define G_GUINT16_FORMAT "hu"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type guint16. See also G_GINT16_FORMAT

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gint32

    Packit ae235b
    typedef signed int gint32;
    Packit ae235b
    Packit ae235b

    A signed integer guaranteed to be 32 bits on all platforms.

    Packit ae235b
    Values of this type can range from G_MININT32 (= -2,147,483,648)
    Packit ae235b
    to G_MAXINT32 (= 2,147,483,647).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT32_MODIFIER and/or G_GINT32_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MININT32

    Packit ae235b
    #define G_MININT32 ((gint32) -0x80000000)
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gint32.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXINT32

    Packit ae235b
    #define G_MAXINT32 ((gint32)  0x7fffffff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gint32.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT32_MODIFIER

    Packit ae235b
    #define G_GINT32_MODIFIER ""
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gint32 or guint32. It
    Packit ae235b
    is a string literal. See also G_GINT16_MODIFIER.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT32_FORMAT

    Packit ae235b
    #define G_GINT32_FORMAT "i"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type gint32. See also G_GINT16_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guint32

    Packit ae235b
    typedef unsigned int guint32;
    Packit ae235b
    Packit ae235b

    An unsigned integer guaranteed to be 32 bits on all platforms.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUINT32 (= 4,294,967,295).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT32_MODIFIER and/or G_GUINT32_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUINT32

    Packit ae235b
    #define G_MAXUINT32 ((guint32) 0xffffffff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a guint32.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GUINT32_FORMAT

    Packit ae235b
    #define G_GUINT32_FORMAT "u"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type guint32. See also G_GINT16_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gint64

    Packit ae235b
    typedef signed long gint64;
    Packit ae235b
    Packit ae235b

    A signed integer guaranteed to be 64 bits on all platforms.

    Packit ae235b
    Values of this type can range from G_MININT64
    Packit ae235b
    (= -9,223,372,036,854,775,808) to G_MAXINT64
    Packit ae235b
    (= 9,223,372,036,854,775,807).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT64_MODIFIER and/or G_GINT64_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MININT64

    Packit ae235b
    #define G_MININT64 ((gint64) G_GINT64_CONSTANT(-0x8000000000000000))
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gint64.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXINT64

    Packit ae235b
    #define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gint64.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT64_MODIFIER

    Packit ae235b
    #define G_GINT64_MODIFIER "l"
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gint64 or guint64.
    Packit ae235b
    It is a string literal.

    Packit ae235b

    Some platforms do not support printing 64-bit integers, even

    Packit ae235b
    though the types are supported. On such platforms G_GINT64_MODIFIER
    Packit ae235b
    is not defined.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINT64_FORMAT

    Packit ae235b
    #define G_GINT64_FORMAT "li"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type gint64. See also G_GINT16_FORMAT.

    Packit ae235b

    Some platforms do not support scanning and printing 64-bit integers,

    Packit ae235b
    even though the types are supported. On such platforms G_GINT64_FORMAT
    Packit ae235b
    is not defined. Note that scanf() may not support 64-bit integers, even
    Packit ae235b
    if G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
    Packit ae235b
    is not recommended for parsing anyway; consider using g_ascii_strtoull()
    Packit ae235b
    instead.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guint64

    Packit ae235b
    typedef unsigned long guint64;
    Packit ae235b
    Packit ae235b

    An unsigned integer guaranteed to be 64-bits on all platforms.

    Packit ae235b
    Values of this type can range from 0 to G_MAXUINT64
    Packit ae235b
    (= 18,446,744,073,709,551,615).

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINT64_MODIFIER and/or G_GUINT64_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXUINT64

    Packit ae235b
    #define G_MAXUINT64 G_GUINT64_CONSTANT(0xffffffffffffffff)
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a guint64.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GUINT64_FORMAT

    Packit ae235b
    #define G_GUINT64_FORMAT "lu"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type guint64. See also G_GINT16_FORMAT.

    Packit ae235b

    Some platforms do not support scanning and printing 64-bit integers,

    Packit ae235b
    even though the types are supported. On such platforms G_GUINT64_FORMAT
    Packit ae235b
    is not defined.  Note that scanf() may not support 64-bit integers, even
    Packit ae235b
    if G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
    Packit ae235b
    is not recommended for parsing anyway; consider using g_ascii_strtoull()
    Packit ae235b
    instead.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gfloat

    Packit ae235b
    typedef float   gfloat;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C float type.

    Packit ae235b
    Values of this type can range from -G_MAXFLOAT to G_MAXFLOAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINFLOAT

    Packit ae235b
    #define G_MINFLOAT FLT_MIN
    Packit ae235b
    Packit ae235b

    The minimum positive value which can be held in a gfloat.

    Packit ae235b

    If you are interested in the smallest value which can be held

    Packit ae235b
    in a gfloat, use -G_MAXFLOAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXFLOAT

    Packit ae235b
    #define G_MAXFLOAT FLT_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gfloat.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gdouble

    Packit ae235b
    typedef double  gdouble;
    Packit ae235b
    Packit ae235b

    Corresponds to the standard C double type.

    Packit ae235b
    Values of this type can range from -G_MAXDOUBLE to G_MAXDOUBLE.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINDOUBLE

    Packit ae235b
    #define G_MINDOUBLE DBL_MIN
    Packit ae235b
    Packit ae235b

    The minimum positive value which can be held in a gdouble.

    Packit ae235b

    If you are interested in the smallest value which can be held

    Packit ae235b
    in a gdouble, use -G_MAXDOUBLE.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXDOUBLE

    Packit ae235b
    #define G_MAXDOUBLE DBL_MAX
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gdouble.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gsize

    Packit ae235b
    typedef unsigned long gsize;
    Packit ae235b
    Packit ae235b

    An unsigned integer type of the result of the sizeof operator,

    Packit ae235b
    corresponding to the size_t type defined in C99.
    Packit ae235b
    This type is wide enough to hold the numeric value of a pointer,
    Packit ae235b
    so it is usually 32 bit wide on a 32-bit platform and 64 bit wide
    Packit ae235b
    on a 64-bit platform. Values of this type can range from 0 to
    Packit ae235b
    G_MAXSIZE.

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GSIZE_MODIFIER and/or G_GSIZE_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXSIZE

    Packit ae235b
    #define G_MAXSIZE G_MAXULONG
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gsize.

    Packit ae235b

    Since: 2.4

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GSIZE_MODIFIER

    Packit ae235b
    #define G_GSIZE_MODIFIER "l"
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gsize. It
    Packit ae235b
    is a string literal.

    Packit ae235b

    Since: 2.6

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GSIZE_FORMAT

    Packit ae235b
    #define G_GSIZE_FORMAT "lu"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type gsize. See also G_GINT16_FORMAT.

    Packit ae235b

    Since: 2.6

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gssize

    Packit ae235b
    typedef signed long gssize;
    Packit ae235b
    Packit ae235b

    A signed variant of gsize, corresponding to the

    Packit ae235b
    ssize_t defined on most platforms.
    Packit ae235b
    Values of this type can range from G_MINSSIZE
    Packit ae235b
    to G_MAXSSIZE.

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GSSIZE_MODIFIER and/or G_GSSIZE_FORMAT.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINSSIZE

    Packit ae235b
    #define G_MINSSIZE G_MINLONG
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a gssize.

    Packit ae235b

    Since: 2.14

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXSSIZE

    Packit ae235b
    #define G_MAXSSIZE G_MAXLONG
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a gssize.

    Packit ae235b

    Since: 2.14

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GSSIZE_MODIFIER

    Packit ae235b
    #define G_GSSIZE_MODIFIER "l"
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gssize. It
    Packit ae235b
    is a string literal.

    Packit ae235b

    Since: 2.6

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GSSIZE_FORMAT

    Packit ae235b
    #define G_GSSIZE_FORMAT "li"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type gssize. See also G_GINT16_FORMAT.

    Packit ae235b

    Since: 2.6

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    goffset

    Packit ae235b
    typedef gint64 goffset;
    Packit ae235b
    Packit ae235b

    A signed integer type that is used for file offsets,

    Packit ae235b
    corresponding to the POSIX type off_t as if compiling with
    Packit ae235b
    _FILE_OFFSET_BITS set to 64. goffset is always 64 bits wide, even on
    Packit ae235b
    32-bit architectures.
    Packit ae235b
    Values of this type can range from G_MINOFFSET to
    Packit ae235b
    G_MAXOFFSET.

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GOFFSET_MODIFIER and/or G_GOFFSET_FORMAT.

    Packit ae235b

    Since: 2.14

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MINOFFSET

    Packit ae235b
    #define G_MINOFFSET G_MININT64
    Packit ae235b
    Packit ae235b

    The minimum value which can be held in a goffset.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_MAXOFFSET

    Packit ae235b
    #define G_MAXOFFSET G_MAXINT64
    Packit ae235b
    Packit ae235b

    The maximum value which can be held in a goffset.

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GOFFSET_MODIFIER

    Packit ae235b
    #define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type goffset. It is a string
    Packit ae235b
    literal. See also G_GINT64_MODIFIER.

    Packit ae235b

    Since: 2.20

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GOFFSET_FORMAT

    Packit ae235b
    #define G_GOFFSET_FORMAT        G_GINT64_FORMAT
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type goffset. See also G_GINT64_FORMAT.

    Packit ae235b

    Since: 2.20

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    gintptr

    Packit ae235b
    typedef signed long gintptr;
    Packit ae235b
    Packit ae235b

    Corresponds to the C99 type intptr_t,

    Packit ae235b
    a signed integer type that can hold any pointer.

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINTPTR_MODIFIER and/or G_GINTPTR_FORMAT.

    Packit ae235b

    Since: 2.18

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINTPTR_MODIFIER

    Packit ae235b
    #define G_GINTPTR_MODIFIER      "l"
    Packit ae235b
    Packit ae235b

    The platform dependent length modifier for conversion specifiers

    Packit ae235b
    for scanning and printing values of type gintptr or guintptr.
    Packit ae235b
    It is a string literal.

    Packit ae235b

    Since: 2.22

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GINTPTR_FORMAT

    Packit ae235b
    #define G_GINTPTR_FORMAT        "li"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier for scanning

    Packit ae235b
    and printing values of type gintptr.

    Packit ae235b

    Since: 2.22

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    guintptr

    Packit ae235b
    typedef unsigned long guintptr;
    Packit ae235b
    Packit ae235b

    Corresponds to the C99 type uintptr_t,

    Packit ae235b
    an unsigned integer type that can hold any pointer.

    Packit ae235b

    To print or scan values of this type, use

    Packit ae235b
    G_GINTPTR_MODIFIER and/or G_GUINTPTR_FORMAT.

    Packit ae235b

    Since: 2.18

    Packit ae235b
    Packit ae235b

    Packit ae235b
    Packit ae235b

    G_GUINTPTR_FORMAT

    Packit ae235b
    #define G_GUINTPTR_FORMAT       "lu"
    Packit ae235b
    Packit ae235b

    This is the platform dependent conversion specifier

    Packit ae235b
    for scanning and printing values of type guintptr.

    Packit ae235b

    Since: 2.22

    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b
    Packit ae235b

    Generated by GTK-Doc V1.27
    Packit ae235b
    </body>
    Packit ae235b
    </html>