G_TYPE_IS_VALUE: : A GType value.
Checks whether the passed in type ID can be used for g_value_init(). That is, this macro checks whether this type provides an implementation of the GTypeValueTable functions required for a type to create a GValue of.
Returns: Whether is suitable as a GValue type.
typedef void(* | GValueTransform |
GValueTransform: : Source value. : Target value.
The type of value transformation functions which can be registered with g_value_register_transform_func().
g_value_init: : A zero-filled (uninitialized) GValue structure. : Type the GValue should hold values of.
Initializes with the default value of .
Returns: the GValue structure that has been passed in
g_value_copy: : An initialized GValue structure. : An initialized GValue structure of the same type as .
Copies the value of into .
g_value_reset: : An initialized GValue structure.
Clears the current value in and resets it to the default value (as if the value had just been initialized).
Returns: the GValue structure that has been passed in
IMPORT_C void | g_value_unset | ( | GValue * | value | ) |
g_value_unset: : An initialized GValue structure.
Clears the current value in and "unsets" the type, this releases all resources associated with this GValue. An unset value is the same as an uninitialized (zero-filled) GValue structure.
g_value_set_instance: : An initialized GValue structure. : the instance
Sets from an instantiatable type via the value_table's collect_value() function.
g_value_fits_pointer: : An initialized GValue structure.
Determines if will fit inside the size of a pointer value. This is an internal function introduced mainly for C marshallers.
Returns: TRUE if will fit inside a pointer value.
g_value_peek_pointer: : An initialized GValue structure.
Return the value contents as pointer. This function asserts that g_value_fits_pointer() returned TRUE for the passed in value. This is an internal function introduced mainly for C marshallers.
Returns: TRUE if will fit inside a pointer value.
g_value_type_compatible: : source type to be copied. : destination type for copying.
Returns whether a GValue of type can be copied into a GValue of type .
Returns: TRUE if g_value_copy() is possible with and .
g_value_type_transformable: : Source type. : Target type.
Check whether g_value_transform() is able to transform values of type into values of type .
Returns: TRUE if the transformation is possible, FALSE otherwise.
g_value_transform: : Source value. : Target value.
Tries to cast the contents of into a type appropriate to store in , 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).
Returns: Whether a transformation rule was found and could be applied. Upon failing transformations, is left untouched.
IMPORT_C void | g_value_register_transform_func | ( | GType | src_type, |
GType | dest_type, | |||
GValueTransform | transform_func | |||
) |
g_value_register_transform_func: : Source type. : Target type. : a function which transforms values of type into value of type
Registers a value transformation function for use in g_value_transform(). A previously registered transformation function for and will be replaced.