:right-sidebar: True SequenceIter =================================================================== .. currentmodule:: gi.repository.GLib .. class:: SequenceIter(*args, **kwargs) :no-contents-entry: The :obj:`~gi.repository.GLib.SequenceIter` struct is an opaque data type representing an iterator pointing into a :obj:`~gi.repository.GLib.Sequence`\. Methods ------- .. rst-class:: interim-class .. class:: SequenceIter :no-index: .. method:: compare(b: ~gi.repository.GLib.SequenceIter) -> int 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. .. versionadded:: 2.14 :param b: a :obj:`~gi.repository.GLib.SequenceIter` .. method:: get_position() -> int Returns the position of ``iter`` .. versionadded:: 2.14 .. method:: get_sequence() -> ~gi.repository.GLib.Sequence Returns the :obj:`~gi.repository.GLib.Sequence` that ``iter`` points into. .. versionadded:: 2.14 .. method:: is_begin() -> bool Returns whether ``iter`` is the begin iterator .. versionadded:: 2.14 .. method:: is_end() -> bool Returns whether ``iter`` is the end iterator .. versionadded:: 2.14 .. method:: move(delta: int) -> ~gi.repository.GLib.SequenceIter Returns the :obj:`~gi.repository.GLib.SequenceIter` 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. .. versionadded:: 2.14 :param delta: A positive or negative number indicating how many positions away from ``iter`` the returned :obj:`~gi.repository.GLib.SequenceIter` will be .. method:: next() -> ~gi.repository.GLib.SequenceIter Returns an iterator pointing to the next position after ``iter``\. If ``iter`` is the end iterator, the end iterator is returned. .. versionadded:: 2.14 .. method:: prev() -> ~gi.repository.GLib.SequenceIter Returns an iterator pointing to the previous position before ``iter``\. If ``iter`` is the begin iterator, the begin iterator is returned. .. versionadded:: 2.14