ValueArrayProtocol

public protocol ValueArrayProtocol

The ValueArrayProtocol protocol exposes the methods and properties of an underlying GValueArray instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see ValueArray. Alternatively, use ValueArrayRef as a lighweight, unowned reference if you already have an instance you just want to use.

A GValueArray contains an array of GValue elements.

  • ptr

    Untyped pointer to the underlying GValueArray instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • value_array_ptr Default implementation

    Typed pointer to the underlying GValueArray instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GValueArray instance.

    Declaration

    Swift

    var value_array_ptr: UnsafeMutablePointer<GValueArray>! { get }

ValueArray Record: ValueArrayProtocol extension (methods and fields)

  • append(value:) Extension method

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

    append is deprecated: Use #GArray and g_array_append_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func append(value: ValueRef? = nil) -> ValueArrayRef!
  • append(value:) Extension method

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

    append is deprecated: Use #GArray and g_array_append_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func append<ValueT>(value: ValueT?) -> ValueArrayRef! where ValueT : ValueProtocol
  • copy() Extension method

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

    copy is deprecated: Use #GArray and g_array_ref() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func copy() -> ValueArrayRef!
  • free() Extension method

    Free a GValueArray including its contents.

    free is deprecated: Use #GArray and g_array_unref() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func free()
  • getNth(index_:) Extension method

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

    get_nth is deprecated: Use g_array_index() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getNth(index_: Int) -> ValueRef!
  • insert(index_:value:) Extension method

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

    insert is deprecated: Use #GArray and g_array_insert_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func insert(index_: Int, value: ValueRef? = nil) -> ValueArrayRef!
  • insert(index_:value:) Extension method

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

    insert is deprecated: Use #GArray and g_array_insert_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func insert<ValueT>(index_: Int, value: ValueT?) -> ValueArrayRef! where ValueT : ValueProtocol
  • prepend(value:) Extension method

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

    prepend is deprecated: Use #GArray and g_array_prepend_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func prepend(value: ValueRef? = nil) -> ValueArrayRef!
  • prepend(value:) Extension method

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

    prepend is deprecated: Use #GArray and g_array_prepend_val() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func prepend<ValueT>(value: ValueT?) -> ValueArrayRef! where ValueT : ValueProtocol
  • remove(index_:) Extension method

    Remove the value at position index_ from value_array.

    remove is deprecated: Use #GArray and g_array_remove_index() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func remove(index_: Int) -> ValueArrayRef!
  • sort(compareFunc:) Extension method

    Sort value_array using compare_func to compare the elements according to the semantics of GCompareFunc.

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

    sort is deprecated: Use #GArray and g_array_sort().

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func sort(compareFunc: GCompareFunc?) -> ValueArrayRef!
  • Sort value_array using compare_func to compare the elements according to the semantics of GCompareDataFunc.

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

    sort_with_data is deprecated: Use #GArray and g_array_sort_with_data().

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func sortWithData(compareFunc: GCompareDataFunc?, userData: gpointer! = nil) -> ValueArrayRef!
  • nValues Extension method

    number of values contained in the array

    Declaration

    Swift

    @inlinable
    var nValues: guint { get set }
  • values Extension method

    array of values

    Declaration

    Swift

    @inlinable
    var values: ValueRef! { get set }