BitsetIter#

class BitsetIter(*args, **kwargs)#

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 init_first, init_last or init_at.

Methods#

class BitsetIter
get_value() int#

Gets the current value that iter points to.

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

classmethod init_at(target: int) Tuple[bool, BitsetIter, int]#

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.

Parameters:

target – target value to start iterating at

classmethod init_first() Tuple[bool, BitsetIter, int]#

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.

classmethod init_last() Tuple[bool, BitsetIter, int]#

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

If set is empty, False is returned.

is_valid() bool#

Checks if iter points to a valid value.

next() Tuple[bool, int]#

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() Tuple[bool, int]#

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.

Fields#

class BitsetIter
private_data#