Struct Info

G-Golf Struct Info low level API.
GIStructInfo — Structs representing a C structure.

Procedures

gi-struct-import
gi-struct-field-desc
gi-struct-field-types
g-struct-info-get-alignment
g-struct-info-get-size
g-struct-info-is-gtype-struct
g-struct-info-is-foreign
g-struct-info-get-n-fields
g-struct-info-get-field
g-struct-info-get-n-methods
g-struct-info-get-method

Struct Hierarchy

GIBaseInfo
  +— GIRegisteredTypeInfo
            +— GIStructInfo

Description

GIStructInfo represents a generic C strucuture type.

A structure has methods and fields.

Procedures

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

Procedure: gi-struct-import info

Returns a <gi-struct> instance.

Obtains the list of (field) types the C struct GI definition pointed by info contains, then makes and returns a <gi-struct> instance.

Procedure: gi-struct-field-desc info

Returns a list.

Obtains and returns the list of (field) descriptions for info. A field description is a list: (name type-tag offset flags).

Procedure: gi-struct-field-types info

Returns a list.

Obtains and returns the list of (field) types the C struct GI definition pointed by info contains.

Procedure: g-struct-info-get-alignment info

Returns an integer.

Obtains and returns the required alignment for info.

Procedure: g-struct-info-get-size info

Returns an integer.

Obtains and returns the total size of the structure specified info.

Procedure: g-struct-info-is-gtype-struct info

Returns #t or #f.

Return true if the structure specified by info represents the "class structure" for some GObject or GInterface.

Procedure: g-struct-info-is-foreign info

Returns #t or #f.

FIXME. No upstream documentation, though the procedure works.

Procedure: g-struct-info-get-n-fields info

Returns an integer.

Obtains the number of fields for info.

Procedure: g-struct-info-get-field info n

Returns a pointer.

Obtains and returns the info type information (a pointer to a GIFieldInfo) for the field at the specified n index.

The GIFieldInfo must be freed by calling g-base-info-unref when done.

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

Returns an integer.

Obtains the number of methods for info.

Procedure: g-struct-info-get-method info n

Returns a pointer.

Obtains and returns the info type information (a pointer to a GIFunctionInfo) for the method at the specified n index.

The GIFunctionInfo must be freed by calling g-base-info-unref when done.