gi-glib-2.0.30: GLib bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.GLib.Structs.SequenceIter

Contents

- Exported types
- Methods
  - compare
  - getPosition
  - getSequence
  - isBegin
  - isEnd
  - move
  - next
  - prev

Description

The `SequenceIter` struct is an opaque data type representing an iterator pointing into a `Sequence`.

Synopsis

- newtype SequenceIter = SequenceIter (ManagedPtr SequenceIter)
- sequenceIterCompare :: (HasCallStack, MonadIO m) => SequenceIter -> SequenceIter -> m Int32
- sequenceIterGetPosition :: (HasCallStack, MonadIO m) => SequenceIter -> m Int32
- sequenceIterGetSequence :: (HasCallStack, MonadIO m) => SequenceIter -> m Sequence
- sequenceIterIsBegin :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool
- sequenceIterIsEnd :: (HasCallStack, MonadIO m) => SequenceIter -> m Bool
- sequenceIterMove :: (HasCallStack, MonadIO m) => SequenceIter -> Int32 -> m SequenceIter
- sequenceIterNext :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter
- sequenceIterPrev :: (HasCallStack, MonadIO m) => SequenceIter -> m SequenceIter

# Exported types

newtype SequenceIter Source #

Memory-managed wrapper type.

Constructors

SequenceIter (ManagedPtr SequenceIter) |

#### Instances

Instances details

Eq SequenceIter Source # |
Instance details Defined in GI.GLib.Structs.SequenceIter Methods (==) :: SequenceIter -> SequenceIter -> Bool Source # (/=) :: SequenceIter -> SequenceIter -> Bool Source #
BoxedPtr SequenceIter Source # |
Instance details Defined in GI.GLib.Structs.SequenceIter Methods boxedPtrCopy :: SequenceIter -> IO SequenceIter Source # boxedPtrFree :: SequenceIter -> IO () Source #
ManagedPtrNewtype SequenceIter Source # |
Instance details Defined in GI.GLib.Structs.SequenceIter Methods toManagedPtr :: SequenceIter -> ManagedPtr SequenceIter Source #

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

compare, isBegin, isEnd, move, next, prev.

#### Getters

getPosition, getSequence.

#### Setters

None.

## compare

sequenceIterCompare Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `a`: a `SequenceIter`
-> SequenceIter | `b`: a `SequenceIter`
-> m Int32 | Returns: a negative number if `a` comes before `b`, 0 if they are equal, and a positive number if `a` comes after `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.

Since: 2.14

## getPosition

sequenceIterGetPosition Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m Int32 | Returns: the position of `iter`

Returns the position of `iter`

Since: 2.14

## getSequence

sequenceIterGetSequence Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m Sequence | Returns: the `Sequence` that `iter` points into

Returns the `Sequence` that `iter` points into.

Since: 2.14

## isBegin

sequenceIterIsBegin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m Bool | Returns: whether `iter` is the begin iterator

Returns whether `iter` is the begin iterator

Since: 2.14

## isEnd

sequenceIterIsEnd Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m Bool | Returns: Whether `iter` is the end iterator

Returns whether `iter` is the end iterator

Since: 2.14

## move

sequenceIterMove Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> Int32 | `delta`: A positive or negative number indicating how many positions away from `iter` the returned `SequenceIter` will be
-> m SequenceIter | Returns: a `SequenceIter` which is `delta` positions away from `iter`

Returns the `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.

Since: 2.14

## next

sequenceIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m SequenceIter | Returns: a `SequenceIter` pointing to the next position after `iter`

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

Since: 2.14

## prev

sequenceIterPrev Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SequenceIter | `iter`: a `SequenceIter`
-> m SequenceIter | Returns: a `SequenceIter` pointing to the previous position before `iter`

Returns an iterator pointing to the previous position before `iter`. If `iter` is the begin iterator, the begin iterator is returned.

Since: 2.14