ValueArray

Description The prime purpose of a GValueArray is for it to be used as an object property that holds an array of values. A GValueArray wraps an array of GValue elements in order for it to be used as a boxed type through G_TYPE_VALUE_ARRAY.

Constructors

this
this(GValueArray* gValueArray)

Sets our main struct and passes it to the parent class

this
this(uint nPrealloced)

Allocate and initialize a new GValueArray, optionally preserve space for n_prealloced elements. New arrays always contain 0 elements, regardless of the value of n_prealloced.

Members

Functions

append
ValueArray append(Value value)

Insert a copy of value as last element of value_array. If value is NULL, an uninitialized value is appended.

copy
ValueArray copy()

Construct an exact copy of a GValueArray by duplicating all its contents.

free
void free()

Free a GValueArray including its contents.

getNth
Value getNth(uint index)

Return a pointer to the value at index_ containd in value_array.

getStruct
void* getStruct()

the main Gtk struct as a void*

getValueArrayStruct
GValueArray* getValueArrayStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
insert
ValueArray insert(uint index, Value value)

Insert a copy of value at specified position into value_array. If value is NULL, an uninitialized value is inserted.

prepend
ValueArray prepend(Value value)

Insert a copy of value as first element of value_array. If value is NULL, an uninitialized value is prepended.

remove
ValueArray remove(uint index)

Remove the value at position index_ from value_array.

sort
ValueArray sort(GCompareFunc compareFunc)

Sort value_array using compare_func to compare the elements accoring to the semantics of GCompareFunc. The current implementation uses Quick-Sort as sorting algorithm.

sortWithData
ValueArray sortWithData(GCompareDataFunc compareFunc, void* userData)

Sort value_array using compare_func to compare the elements accoring to the semantics of GCompareDataFunc. The current implementation uses Quick-Sort as sorting algorithm. Rename to: g_value_array_sort

Variables

gValueArray
GValueArray* gValueArray;

the main Gtk struct

Meta