Gjsify LogoGjsify Logo

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

record

Hierarchy

  • Sequence

Index

Constructors

Properties

name: string

Methods

  • free(): void
  • 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.

    Returns void

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

    Parameters

    • pos: number

      a position in seq, or -1 for the end

    Returns SequenceIter

  • get_length(): number
  • 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.

    Returns number

  • is_empty(): boolean
  • Returns %TRUE if the sequence contains zero items.

    This function is functionally identical to checking the result of g_sequence_get_length() being equal to zero. However this function is implemented in O(1) running time.

    Returns boolean

  • Moves the item pointed to by src to the position indicated by dest. After calling this function dest will point to the position immediately after src. It is allowed for src and dest to point into different sequences.

    Parameters

    • src: SequenceIter

      a #GSequenceIter pointing to the item to move

    • dest: SequenceIter

      a #GSequenceIter pointing to the position to which the item is moved

    Returns void

  • Inserts the (begin, end) range at the destination pointed to by dest. The begin and end iters must point into the same sequence. It is allowed for dest to point to a different sequence than the one pointed into by begin and end.

    If dest is %NULL, the range indicated by begin and end is removed from the sequence. If dest points to a place within the (begin, end) range, the range does not move.

    Parameters

    Returns void

  • Finds an iterator somewhere in the range (begin, end). This iterator will be close to the middle of the range, but is not guaranteed to be exactly in the middle.

    The begin and end iterators must both point to the same sequence and begin must come before or be equal to end in the sequence.

    Parameters

    Returns SequenceIter

  • Removes the item pointed to by iter. It is an error to pass the end iterator to this function.

    If the sequence has a data destroy function associated with it, this function is called on the data for the removed item.

    Parameters

    Returns void

  • Removes all items in the (begin, end) range.

    If the sequence has a data destroy function associated with it, this function is called on the data for the removed items.

    Parameters

    Returns void

  • Changes the data for the item pointed to by iter to be data. If the sequence has a data destroy function associated with it, that function is called on the existing data that iter pointed to.

    Parameters

    • iter: SequenceIter

      a #GSequenceIter

    • data: object

      new data for the item

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method