haskell-gi-base-0.21.5: Foundation for libraries generated by haskell-gi

Safe Haskell None Haskell98

Data.GI.Base.GType

Description

Basic GTypes.

Synopsis

# Documentation

newtype GType Source #

A newtype for use on the haskell side.

Constructors

 GType FieldsgtypeToCGType :: CGType
Instances
 Source # Instance detailsDefined in Data.GI.Base.GValue Methods

type CGType = Word64 Source #

A type identifier in the GLib type system. This is the low-level type associated with the representation in memory, when using this on the Haskell side use GType below.

Get the name assigned to the given GType.

Note: compile-time vs run-time GTypes

Notice that there are two types of GType's: the fundamental ones, which are created with G_TYPE_MAKE_FUNDAMENTAL(n) and always have the same runtime representation, and the ones that are registered in the GObject type system at runtime, and whose CGType may change for each program run (and generally does).

For the first type it is safe to use hsc to read the numerical values of the CGType at compile type, but for the second type it is essential to call the corresponding _get_type() function at runtime, and not use the value of the corresponding "constant" at compile time via hsc.

GType of strings.

GType of pointers.

GType for signed integers (gint or gint32).

GType for unsigned integers (guint or guint32).

GType for glong.

GType for gulong.

GType for signed 64 bit integers.

GType for unsigned 64 bit integers.

GType for floating point values.

GType for gdouble.

GType corresponding to gboolean.

GType corresponding to a GType itself.

GType for a NULL terminated array of strings.

GType corresponding to a BoxedObject.

GType corresponding to a GObject.

The GType corresponding to a GVariant.

GType for a boxed type holding a GByteArray.

An invalid GType used as error return value in some functions which return a GType.