as described above.
gobject.value_array
Module for ValueArray class
Types 1
A gobject.value_array.ValueArray is a container structure to hold an array of generic values.
The prime purpose of a gobject.value_array.ValueArray is for it to be used as an object property that holds an array of values. A gobject.value_array.ValueArray wraps an array of gobject.value.Value elements in order for it to be used as a boxed type through G_TYPE_VALUE_ARRAY.
gobject.value_array.ValueArray is deprecated in favour of glib.array.Array since GLib 2.32. It is possible to create a glib.array.Array that behaves like a gobject.value_array.ValueArray by using the size of gobject.value.Value as the element size, and by setting gobject.value.Value.unset as the clear function using glib.array.Array.setClearFunc, for instance, the following code:
GValueArray *array = g_value_array_new (10);can be replaced by:
GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);Deprecated
ValueArray self()Returns `this`, for use in `with` statements.void nValues(uint propval) @propertySet `nValues` field. Params: propval = number of values contained in the arrayvoid values(gobject.value.Value propval) @propertySet `values` field. Params: propval = array of valuesgobject.value_array.ValueArray append(gobject.value.Value value = null)Insert a copy of value as last element of value_array. If value is null, an uninitialized value is appended.gobject.value_array.ValueArray copy()Construct an exact copy of a #GValueArray by duplicating all its contents. Returns: Newly allocated copy of #GValueArraygobject.value.Value getNth(uint index)Return a pointer to the value at index_ containd in value_array.gobject.value_array.ValueArray insert(uint index, gobject.value.Value value = null)Insert a copy of value at specified position into value_array. If value is null, an uninitialized value is inserted.gobject.value_array.ValueArray prepend(gobject.value.Value value = null)Insert a copy of value as first element of value_array. If value is null, an uninitialized value is prepended.gobject.value_array.ValueArray remove(uint index)Remove the value at position index_ from value_array.gobject.value_array.ValueArray sort(glib.types.CompareDataFunc compareFunc)Sort value_array using compare_func to compare the elements according to the semantics of #GCompareDataFunc.