Enum Info

G-Golf Enum Info low level API.
GIEnumInfo — Structs representing an enumeration and its values.

Procedures

gi-enum-import
gi-enum-value-values
g-enum-info-get-n-values
g-enum-info-get-value
g-enum-info-get-n-methods
g-enum-info-get-method
g-value-info-get-value

Struct Hierarchy

GIBaseInfo
  +— GIRegisteredTypeInfo
            +— GIEnumInfo

Description

GIEnumInfo represents an argument. An argument is always part of a GICallableInfo.

Procedures

Note: in this section, unless otherwise specified, the info argument is [must be] a pointer to a GIEumInfo.

Procedure: gi-enum-import info

Returns a <gi-enum> instance.

Obtains the values this enumeration contains, then makes and returns a <gi-enum> instance.

Procedure: gi-enum-value-values info

Returns an alist.

Obtains and returns the list pairs (symbol . id) the enum GI definition pointed by info contains. If you think the name is strange, compare it with, for example gi-struct-field-types: just like a GIStructInfo holds a list of pointers to GIFieldInfo from which we get the (field) type, aGIEnumInfo holds a list of pointers to GIValueInfo from which we get the (enum) value - which in the GI world is a name (a string) that we transform, in the scheme world, to a symbol.

Procedure: g-enum-info-get-n-values info

Returns the number of values.

Obtains the number of values this enumeration contains.

Procedure: g-enum-info-get-value info index

Returns a pointer to a GIValueInfo or #f if type tag is wrong.

Obtains a value for this enumeration. The GIValueInfo must be free’d using g-base-info-unref when done.

index is a 0-based offset into info for a value.

Procedure: g-enum-info-get-n-methods info

Returns the number of methods.

Obtains the number of methods this enumeration has.

Procedure: g-enum-info-get-method info index

Returns a pointer to a GIFunctionInfo or #f if type tag is wrong.

Obtains a method for this enumeration. The GIFunctionInfo must be free’d using g-base-info-unref when done.

index is a 0-based offset into info for a method.

Procedure: g-value-info-get-value info

Returns the enumeration value.

Obtains a value of the GIValueInfo.

info is [must be] a pointer to a GIValueInfo.