
Gnome::Gtk4::N-BitsetIter
Description
An opaque, stack-allocated struct for iterating over the elements of a Gnome::Gtk4::N-Bitset.
Before a Gnome::Gtk4::N-BitsetIter can be used, it needs to be initialized with .BitsetIter.init-first(), .BitsetIter.init-last() or .BitsetIter.init-at().
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
Methods
get-value
Gets the current value that $iter points to.
If $iter is not valid and .is-valid() returns False, this function returns 0.
method get-value (--> UInt )
Return value; The current value pointer to by $iter. 
is-valid
Checks if $iter points to a valid value.
method is-valid (--> Bool )
Return value; True if $iter points to a valid value. 
next
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.
method next ( Array[Int] $value --> Bool )
- $value; (transfer ownership: full) Set to the next value. 
Return value; True if a next value existed. 
previous
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.
method previous ( Array[Int] $value --> Bool )
- $value; (transfer ownership: full) Set to the previous value. 
Return value; True if a previous value existed. 
Functions
init-at
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.
method init-at ( N-Object $iter, N-Object $set, UInt() $target, Array[Int] $value --> Bool )
- $iter; a pointer to an uninitialized Gnome::Gtk4::N-BitsetIter 
- $set; a Gnome::Gtk4::N-Bitset 
- $target; target value to start iterating at. 
- $value; (transfer ownership: full) Set to the found value in - $set.
Return value; True if a value was found.. 
init-first
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.
method init-first ( N-Object $iter, N-Object $set, Array[Int] $value --> Bool )
- $iter; a pointer to an uninitialized Gnome::Gtk4::N-BitsetIter 
- $set; a Gnome::Gtk4::N-Bitset 
- $value; (transfer ownership: full) Set to the first value in - $set.
Return value; True if $set isn't empty.. 
init-last
Initializes an iterator for $set and points it to the last value in $set.
If $set is empty, False is returned.
method init-last ( N-Object $iter, N-Object $set, Array[Int] $value --> Bool )
- $iter; a pointer to an uninitialized Gnome::Gtk4::N-BitsetIter 
- $set; a Gnome::Gtk4::N-Bitset 
- $value; (transfer ownership: full) Set to the last value in - $set.
Return value; True if $set isn't empty.. 
 About all my projects
    About all my projects