Next: , Previous: , Up: Reference Guide   [Contents][Index]


3.3 GType Constants and Operations

The (gi types) module provides these variables and procedures.

Variable: G_TYPE_NONE
Variable: G_TYPE_CHAR
Variable: G_TYPE_UCHAR
Variable: G_TYPE_BOOLEAN
Variable: G_TYPE_INT
Variable: G_TYPE_UINT
Variable: G_TYPE_INT64
Variable: G_TYPE_UINT64
Variable: G_TYPE_FLOAT
Variable: G_TYPE_DOUBLE

These variables hold the GType integer values for the fundamental types.

Variable: G_TYPE_ENUM
Variable: G_TYPE_FLAGS
Variable: G_TYPE_STRUCT
Variable: G_TYPE_OBJECT

These variables hold the GType integer values of the enum, flags, struct, and object base classes respectively.

Procedure: get-gtype object

Given object, this procedure returns its GType as an integer. It returns #f if the object does not have a type registered in The GLib Dynamic Type System.

Procedure: gtype-get-scheme-type gtype

Given gtype, a GType integer ID, this procedure will return the associated GOOPS class that holds instances of that type, of #f if there is no GOOPS class for that gtype.

Procedure: gtype-get-name gtype

Given gtype of type <integer>, this procedure returns a string with GObject’s internal name for this type. This may differ slightly from the name that Guile-GI gives to the type.

Procedure: gtype-get-parent gtype
Procedure: gtype-get-children gtype

These procedures return the parent type and the child types of a specified gtype as GType integers.

Procedure: gtype-is-a? object type

Returns #t of object is an instance of a type.


Next: Enums and Flags, Previous: Typelib Documentation, Up: Reference Guide   [Contents][Index]