Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GSequenceIter

[13:7] extends: object

The #GSequenceIter struct is an opaque data type representing an iterator pointing into a #GSequence.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GSequenceIter (Handle = null)

    Creates a new SequenceIter by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • compare (object b)

    Returns a negative number if @a comes before @b, 0 if they are equal, and a positive number if @a comes after @b. The @a and @b iterators must point into the same sequence.

    • @p b is a #GSequenceIter.
    • @r a negative number if @a comes before @b, 0 if they are equal, and a positive number if @a comes after @b.
  • get_position ()

    Returns the position of @iter

    • @r the position of @iter.
  • get_sequence ()

    Returns the #GSequence that @iter points into.

    • @r the #GSequence that @iter points into.
  • is_begin ()

    Returns whether @iter is the begin iterator

    • @r whether @iter is the begin iterator.
  • is_end ()

    Returns whether @iter is the end iterator

    • @r Whether @iter is the end iterator.
  • move (int delta)

    Returns the #GSequenceIter which is @delta positions away from @iter. If

    • @iter is closer than -@delta positions to the beginning of the sequence, the begin iterator is returned. If @iter is closer than @delta positions to the end of the sequence, the end iterator is returned.
    • @p delta is A positive or negative number indicating how many positions away from @iter the returned #GSequenceIter will be.
    • @r a #GSequenceIter which is @delta positions away from @iter.
  • next ()

    Returns an iterator pointing to the next position after @iter. If @iter is the end iterator, the end iterator is returned.

    • @r a #GSequenceIter pointing to the next position after @iter.
  • prev ()

    Returns an iterator pointing to the previous position before @iter. If

    • @iter is the begin iterator, the begin iterator is returned.
    • @r a #GSequenceIter pointing to the previous position before @iter.