Generic Values

G-Golf GObject Generic Values low level API.
Generic values — A polymorphic type that can hold values of any other type.

Procedures

g-value-size
g-value-new
g-value-init
g-value-unset

Object Hierarchy

GBoxed
  +— GValue

Description

The GValue structure is basically a variable container that consists of a type identifier and a specific value of that type. The type identifier within a GValue structure always determines the type of the associated value. To create a undefined GValue structure, simply call g-value-new, which create a zero-filled GValue structure. To create and initialize a GValue, use the g-value-init procedure. A GValue cannot be used until it is initialized. The basic type operations (such as freeing and copying) are determined by the GTypeValueTable associated with the type ID stored in the GValue.

Please read the Generic Values section from the GObject reference manual for a complete description.

Procedures

Procedure: g-value-size

Returns an integer.

Obtains and returns the size of a GValue.

Procedure: g-value-new

Returns a pointer to a GValue.

Creates and returns (a pointer to) an empty (uninitialized) GValue.

Procedure: g-value-init g-type

Returns a pointer to a GValue.

Creates and initializes a GValue with the default value for g-type, which can either be an integer - a GType static or dynamic value, or a symbol - a member of the %g-type-fundamental-types.

Procedure: g-value-unset g-value

Returns nothing.

Clears the current value in g-value (if any) and ‘unsets’ the type. This releases all resources associated with g-value. An unset GValue is the same as an uninitialized (zero-filled) GValue structure.