gi-gtk-4.0.8: 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.

Constructors

BitsetIter (ManagedPtr BitsetIter) 

Instances

Instances details
Eq BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

GBoxed BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

ManagedPtrNewtype BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

Methods

toManagedPtr :: BitsetIter -> ManagedPtr BitsetIter

TypedObject BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

Methods

glibType :: IO GType

HasParentTypes BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

tag ~ 'AttrSet => Constructible BitsetIter tag Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

Methods

new :: MonadIO m => (ManagedPtr BitsetIter -> BitsetIter) -> [AttrOp BitsetIter tag] -> m BitsetIter

IsGValue (Maybe BitsetIter) Source #

Convert BitsetIter to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Structs.BitsetIter

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe BitsetIter -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe BitsetIter)

type ParentTypes BitsetIter Source # 
Instance details

Defined in GI.Gtk.Structs.BitsetIter

type ParentTypes BitsetIter = '[] :: [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.