G-Golf Union Info low level API.
GIUnionInfo — Struct representing a C union.
GIUnionInfo
represents a union type.
A union has methods and fields. Unions can optionally have a discriminator, which is a field deciding what type of real union fields is valid for specified instance.
GIBaseInfo
+— GIRegisteredTypeInfo
+— GIUnionInfo
Note: in this section, unless otherwise specified, the info
argument is [must be] a pointer to a GIUnionInfo
.
Returns an integer.
Obtains and returns the number of fields the info union has.
Returns a pointer.
Obtains and returns a pointer to the GIFieldInfo
for info,
given its n. The GIFieldInfo
must be free’d by calling
g-base-info-unref when done.
Returns an integer.
Obtains and returns the number of methods the info union has.
Returns a pointer.
Obtains and returns a pointer to the GIFunctionInfo
for
info, given its n, which must be free’d by calling
g-base-info-unref when done.
Returns #t if info contains a discriminator field, otherwise it returns #f.
Returns an integer.
Obtains and returns the offset of the discriminator field for info.
Returns a pointer.
Obtains and returns a pointer to the GITypeInfo
for info,
which must be free’d by calling g-base-info-unref when done.
Returns a pointer.
Obtains and returns a pointer to the GIConstantInfo
assigned for
the info n-th union field - i.e. the n-th union field
is the active one if discriminator contains this constant (value) -
which must be free’d by calling g-base-info-unref when done.
Returns an integer.
Obtains and returns the total size of the union specified by info.
Returns an integer.
Obtains and returns the required alignment for info.