gobject.ValueArray.ValueArray Class Reference

List of all members.

Detailed Description

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.


Public Member Functions

GValueArraygetValueArrayStruct ()
 this (GValueArray *gValueArray)
 Sets our main struct and passes it to the parent class.
Value getNth (uint index)
 Return a pointer to the value at index_ containd in value_array.
 this (uint nPrealloced)
 Allocate and initialize a new GValueArray, optionally preserve space for n_prealloced elements.
ValueArray copy ()
 Construct an exact copy of a GValueArray by duplicating all its contents.
void free ()
 Free a GValueArray including its contents.
ValueArray append (Value value)
 Insert a copy of value as last element of value_array.
ValueArray prepend (Value value)
 Insert a copy of value as first element of value_array.
ValueArray insert (uint index, Value value)
 Insert a copy of value at specified position into value_array.
ValueArray remove (uint index)
 Remove the value at position index_ from value_array.
ValueArray sort (GCompareFunc compareFunc)
 Sort value_array using compare_func to compare the elements accoring to the semantics of GCompareFunc.
ValueArray sortWithData (GCompareDataFunc compareFunc, void *userData)
 Sort value_array using compare_func to compare the elements accoring to the semantics of GCompareDataFunc.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GValueArraygValueArray
 the main Gtk struct


Constructor & Destructor Documentation

gobject.ValueArray.ValueArray.this ( GValueArray gValueArray  ) 

Sets our main struct and passes it to the parent class.

gobject.ValueArray.ValueArray.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. n_prealloced: number of values to preallocate space for Returns: a newly allocated GValueArray with 0 values


Member Function Documentation

ValueArray gobject.ValueArray.ValueArray.append ( Value  value  ) 

Insert a copy of value as last element of value_array.

value_array: GValueArray to add an element to value: GValue to copy into GValueArray Returns: the GValueArray passed in as value_array

ValueArray gobject.ValueArray.ValueArray.copy (  ) 

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

value_array: GValueArray to copy Returns: Newly allocated copy of GValueArray

void gobject.ValueArray.ValueArray.free (  ) 

Free a GValueArray including its contents.

value_array: GValueArray to free

Value gobject.ValueArray.ValueArray.getNth ( uint  index  ) 

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

value_array: GValueArray to get a value from index_: index of the value of interest Returns: pointer to a value at index_ in value_array

void* gobject.ValueArray.ValueArray.getStruct (  )  [protected]

the main Gtk struct as a void*

GValueArray* gobject.ValueArray.ValueArray.getValueArrayStruct (  ) 

ValueArray gobject.ValueArray.ValueArray.insert ( uint  index,
Value  value 
)

Insert a copy of value at specified position into value_array.

value_array: GValueArray to add an element to index_: insertion position, must be <= value_array->n_values value: GValue to copy into GValueArray Returns: the GValueArray passed in as value_array

ValueArray gobject.ValueArray.ValueArray.prepend ( Value  value  ) 

Insert a copy of value as first element of value_array.

value_array: GValueArray to add an element to value: GValue to copy into GValueArray Returns: the GValueArray passed in as value_array

ValueArray gobject.ValueArray.ValueArray.remove ( uint  index  ) 

Remove the value at position index_ from value_array.

value_array: GValueArray to remove an element from index_: position of value to remove, must be < value_array->n_values Returns: the GValueArray passed in as value_array

ValueArray gobject.ValueArray.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. value_array: GValueArray to sort compare_func: function to compare elements Returns: the GValueArray passed in as value_array

ValueArray gobject.ValueArray.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. value_array: GValueArray to sort compare_func: function to compare elements user_data: extra data argument provided for compare_func Returns: the GValueArray passed in as value_array See Also GValue, GParamSpecValueArray, g_param_spec_value_array()


Member Data Documentation

GValueArray* gobject.ValueArray.ValueArray.gValueArray [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo