gi-gobject-2.0.15: GObject bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GObject.Structs.ValueArray

Contents

Description

A ValueArray contains an array of Value elements.

Synopsis

Exported types

newZeroValueArray :: MonadIO m => m ValueArray Source #

Construct a ValueArray struct initialized to zero.

Methods

append

valueArrayAppend Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to add an element to

-> Maybe GValue

value: Value to copy into ValueArray, or Nothing

-> m ValueArray

Returns: the ValueArray passed in as valueArray

Deprecated: (Since version 2.32)Use Array and g_array_append_val() instead.

Insert a copy of value as last element of valueArray. If value is Nothing, an uninitialized value is appended.

copy

valueArrayCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to copy

-> m ValueArray

Returns: Newly allocated copy of ValueArray

Deprecated: (Since version 2.32)Use Array and g_array_ref() instead.

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

free

valueArrayFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to free

-> m () 

Deprecated: (Since version 2.32)Use Array and g_array_unref() instead.

Free a ValueArray including its contents.

getNth

valueArrayGetNth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to get a value from

-> Word32

index_: index of the value of interest

-> m GValue

Returns: pointer to a value at index_ in valueArray

Deprecated: (Since version 2.32)Use g_array_index() instead.

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

insert

valueArrayInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to add an element to

-> Word32

index_: insertion position, must be <= value_array->;n_values

-> Maybe GValue

value: Value to copy into ValueArray, or Nothing

-> m ValueArray

Returns: the ValueArray passed in as valueArray

Deprecated: (Since version 2.32)Use Array and g_array_insert_val() instead.

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

new

valueArrayNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

nPrealloced: number of values to preallocate space for

-> m ValueArray

Returns: a newly allocated ValueArray with 0 values

Deprecated: (Since version 2.32)Use Array and g_array_sized_new() instead.

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

prepend

valueArrayPrepend Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to add an element to

-> Maybe GValue

value: Value to copy into ValueArray, or Nothing

-> m ValueArray

Returns: the ValueArray passed in as valueArray

Deprecated: (Since version 2.32)Use Array and g_array_prepend_val() instead.

Insert a copy of value as first element of valueArray. If value is Nothing, an uninitialized value is prepended.

remove

valueArrayRemove Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to remove an element from

-> Word32

index_: position of value to remove, which must be less than valueArray->n_values

-> m ValueArray

Returns: the ValueArray passed in as valueArray

Deprecated: (Since version 2.32)Use Array and g_array_remove_index() instead.

Remove the value at position index_ from valueArray.

sort

valueArraySort Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ValueArray

valueArray: ValueArray to sort

-> CompareDataFunc

compareFunc: function to compare elements

-> m ValueArray

Returns: the ValueArray passed in as valueArray

Deprecated: (Since version 2.32)Use Array and g_array_sort_with_data().

Sort valueArray using compareFunc to compare the elements according to the semantics of CompareDataFunc.

The current implementation uses the same sorting algorithm as standard C qsort() function.

Properties

nValues

values