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)
    func append(value: ValueProtocol) -> UnsafeMutablePointer<GValueArray>!
  • 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)
    func copy() -> UnsafeMutablePointer<GValueArray>!
  • free() Extension method

    Free a GValueArray including its contents.

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

    Declaration

    Swift

    @available(*, deprecated)
    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)
    func getNth(index_: CUnsignedInt) -> UnsafeMutablePointer<GValue>!
  • 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)
    func insert(index_: CUnsignedInt, value: ValueProtocol) -> UnsafeMutablePointer<GValueArray>!
  • 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)
    func prepend(value: ValueProtocol) -> UnsafeMutablePointer<GValueArray>!
  • 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)
    func remove(index_: CUnsignedInt) -> UnsafeMutablePointer<GValueArray>!
  • 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)
    func sort(compareFunc compare_func: @escaping GCompareFunc) -> UnsafeMutablePointer<GValueArray>!
  • 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)
    func sortWithData(compareFunc compare_func: @escaping GCompareDataFunc, userData user_data: UnsafeMutableRawPointer) -> UnsafeMutablePointer<GValueArray>!
  • nValues Extension method

    number of values contained in the array

    Declaration

    Swift

    var nValues: Int { get set }
  • values Extension method

    array of values

    Declaration

    Swift

    var values: UnsafeMutablePointer<GValue> { get set }