Value
An opaque structure used to hold different types of values.
The data within the structure has protected scope: it is accessible only to functions within a #GTypeValueTable structure, or implementations of the g_value_*() API. That is, code portions which implement new fundamental types.
#GValue users cannot make any assumptions about how data is stored within the 2 element @data union, and the @g_type member should only be accessed through the G_VALUE_TYPE() macro.
Skipped during bindings generation
method
get_boxed
: Return type gpointer is unsupportedmethod
get_pointer
: Return type gpointer is unsupportedmethod
get_schar
: Return type gint8 is unsupportedmethod
get_uchar
: Return type guint8 is unsupportedmethod
peek_pointer
: Return type gpointer is unsupportedparameter
v_boxed
: gpointerparameter
v_boxed
: gpointerparameter
instance
: gpointerparameter
v_pointer
: gpointerparameter
v_char
: gint8parameter
v_boxed
: gpointermethod
set_string_take_ownership
: C function g_value_set_string_take_ownership is ignoredparameter
v_uchar
: guint8parameter
v_boxed
: gpointermethod
take_string
: C function g_value_take_string is ignoredfield
g_type
: Record field g_type is privatefield
data
: Fields with arrays are not supported
Constructors
Functions
Get the contents of a variant #GValue, increasing its refcount. The returned #GVariant is never floating.
Determines if @value will fit inside the size of a pointer value. This is an internal function introduced mainly for C marshallers.
Get the contents of a %G_TYPE_BOOLEAN #GValue.
Get the contents of a variant #GValue.
Initializes and sets @value from an instantiatable type via the value_table's collect_value() function.
Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
Set the contents of a %G_TYPE_STRING #GValue to @v_string. The string is assumed to be static and interned (canonical, for example from g_intern_string()), and is thus not duplicated when setting the #GValue.
Set the contents of a %G_TYPE_STRING #GValue to @v_string. The string is assumed to be static, and is thus not duplicated when setting the #GValue.
Set the contents of a variant #GValue to @variant. If the variant is floating, it is consumed.
Set the contents of a variant #GValue to @variant, and takes over the ownership of the caller's reference to @variant; the caller doesn't have to unref it any more (i.e. the reference count of the variant is not increased).
Tries to cast the contents of @src_value into a type appropriate to store in @dest_value, e.g. to transform a %G_TYPE_INT value into a %G_TYPE_FLOAT value. Performing transformations between value types might incur precision lossage. Especially transformations into strings might reveal seemingly arbitrary results and shouldn't be relied upon for production code (such as rcfile value or object property serialization).