gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Structs.BitsetIter

Description

An opaque, stack-allocated struct for iterating over the elements of a GtkBitset.

Before a GtkBitsetIter can be used, it needs to be initialized with [funcgtk.BitsetIter.init_first], [funcgtk.BitsetIter.init_last] or [funcgtk.BitsetIter.init_at].

Synopsis

Exported types

newtype BitsetIter Source #

Memory-managed wrapper type.

newZeroBitsetIter :: MonadIO m => m BitsetIter Source #

Construct a BitsetIter struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

isValid, next, previous.

Getters

getValue.

Setters

None.

getValue

bitsetIterGetValue Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitsetIter

iter: a GtkBitsetIter

-> m Word32

Returns: The current value pointer to by iter

Gets the current value that iter points to.

If iter is not valid and bitsetIterIsValid returns False, this function returns 0.

initAt

bitsetIterInitAt Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bitset

set: a GtkBitset

-> Word32

target: target value to start iterating at

-> m (Bool, BitsetIter, Word32)

Returns: True if a value was found.

Initializes iter to point to target.

If target is not found, finds the next value after it. If no value >= target exists in set, this function returns False.

initFirst

bitsetIterInitFirst Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bitset

set: a GtkBitset

-> m (Bool, BitsetIter, Word32)

Returns: True if set isn't empty.

Initializes an iterator for set and points it to the first value in set.

If set is empty, False is returned and value is set to G_MAXUINT.

initLast

bitsetIterInitLast Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bitset

set: a GtkBitset

-> m (Bool, BitsetIter, Word32)

Returns: True if set isn't empty.

Initializes an iterator for set and points it to the last value in set.

If set is empty, False is returned.

isValid

bitsetIterIsValid Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitsetIter

iter: a GtkBitsetIter

-> m Bool

Returns: True if iter points to a valid value

Checks if iter points to a valid value.

next

bitsetIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitsetIter

iter: a pointer to a valid GtkBitsetIter

-> m (Bool, Word32)

Returns: True if a next value existed

Moves iter to the next value in the set.

If it was already pointing to the last value in the set, False is returned and iter is invalidated.

previous

bitsetIterPrevious Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BitsetIter

iter: a pointer to a valid GtkBitsetIter

-> m (Bool, Word32)

Returns: True if a previous value existed

Moves iter to the previous value in the set.

If it was already pointing to the first value in the set, False is returned and iter is invalidated.