Sequence

class Sequence(val glibSequencePointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance(source)

The #GSequence struct is an opaque data type representing a glib-Sequences data type.

Skipped during bindings generation

  • parameter data_destroy: DestroyNotify

Constructors

Link copied to clipboard
constructor(glibSequencePointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val glibSequencePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>

Functions

Link copied to clipboard
open override fun addCleaner(cleaner: <Error class: unknown class>): Boolean

Registers a cleaner to be executed when this proxy object is garbage collected.

Link copied to clipboard
fun append(data: <Error class: unknown class>? = null): SequenceIter

Adds a new item to the end of @seq.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
fun foreach(func: Func)

Calls @func for each item in the sequence passing @user_data to the function. @func must not modify the sequence itself.

Link copied to clipboard
fun free()

Frees the memory allocated for @seq. If @seq has a data destroy function associated with it, that function is called on all items in @seq.

Link copied to clipboard

Returns the begin iterator for @seq.

Link copied to clipboard

Returns the end iterator for @seg

Link copied to clipboard
fun getIterAtPos(pos: <Error class: unknown class>): SequenceIter

Returns the iterator at position @pos. If @pos is negative or larger than the number of items in @seq, the end iterator is returned.

Link copied to clipboard
fun getLength(): <Error class: unknown class>

Returns the positive length (>= 0) of @seq. Note that this method is O(h) where `h' is the height of the tree. It is thus more efficient to use g_sequence_is_empty() when comparing the length to zero.

Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun insertSorted(data: <Error class: unknown class>? = null, cmpFunc: CompareDataFunc): SequenceIter

Inserts @data into @seq using @cmp_func to determine the new position. The sequence must already be sorted according to @cmp_func; otherwise the new position of @data is undefined.

Link copied to clipboard
fun insertSortedIter(data: <Error class: unknown class>? = null, iterCmp: SequenceIterCompareFunc): SequenceIter

Like g_sequence_insert_sorted(), but uses a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as the compare function.

Link copied to clipboard

Returns true if the sequence contains zero items.

Link copied to clipboard
fun lookup(data: <Error class: unknown class>? = null, cmpFunc: CompareDataFunc): SequenceIter?

Returns an iterator pointing to the position of the first item found equal to @data according to @cmp_func and @cmp_data. If more than one item is equal, it is not guaranteed that it is the first which is returned. In that case, you can use g_sequence_iter_next() and g_sequence_iter_prev() to get others.

Link copied to clipboard
fun lookupIter(data: <Error class: unknown class>? = null, iterCmp: SequenceIterCompareFunc): SequenceIter?

Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as the compare function.

Link copied to clipboard
fun prepend(data: <Error class: unknown class>? = null): SequenceIter

Adds a new item to the front of @seq

Link copied to clipboard
open override fun removeCleaner(cleaner: <Error class: unknown class>): Boolean

Removes a previously registered cleaner from this proxy object.

Link copied to clipboard
fun search(data: <Error class: unknown class>? = null, cmpFunc: CompareDataFunc): SequenceIter

Returns an iterator pointing to the position where @data would be inserted according to @cmp_func and @cmp_data.

Link copied to clipboard
fun searchIter(data: <Error class: unknown class>? = null, iterCmp: SequenceIterCompareFunc): SequenceIter

Like g_sequence_search(), but uses a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as the compare function.

Link copied to clipboard
fun sort(cmpFunc: CompareDataFunc)

Sorts @seq using @cmp_func.

Link copied to clipboard

Like g_sequence_sort(), but uses a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as the compare function