Sets our main struct and passes it to the parent class.
Creates a new empty bitset.
Creates a bitset with the given range set.
Adds @value to @self if it wasn't part of it before.
Adds all values from @start (inclusive) to @start + @n_items (exclusive) in @self.
Adds the closed range [@first, @last], so @first, @last and all values in between. @first must be smaller than @last.
Interprets the values as a 2-dimensional boolean grid with the given @stride and inside that grid, adds a rectangle with the given @width and @height.
Checks if the given @value has been added to @self
Creates a copy of @self.
Sets @self to be the symmetric difference of @self and @other.
Returns %TRUE if @self and @other contain the same values.
Get the main Gtk struct
Returns the largest value in @self.
Returns the smallest value in @self.
Returns the value of the @nth item in self.
Gets the number of values that were added to the set.
Gets the number of values that are part of the set from @first to @last (inclusive).
the main Gtk struct as a void*
Sets @self to be the intersection of @self and @other.
Check if no value is contained in bitset.
Acquires a reference on the given GtkBitset.
Removes @value from @self if it was part of it before.
Removes all values from the bitset so that it is empty again.
Removes all values from @start (inclusive) to @start + @n_items (exclusive) in @self.
Removes the closed range [@first, @last], so @first, @last and all values in between. @first must be smaller than @last.
Interprets the values as a 2-dimensional boolean grid with the given @stride and inside that grid, removes a rectangle with the given @width and @height.
Shifts all values in @self to the left by @amount.
Shifts all values in @self to the right by @amount.
This is a support function for GListModel handling, by mirroring the GlistModel::items-changed signal.
Sets @self to be the subtraction of @other from @self.
Sets @self to be the union of @self and @other.
Releases a reference on the given GtkBitset.
A GtkBitset represents a set of unsigned integers.
Another name for this data structure is "bitmap".
The current implementation is based on roaring bitmaps.
A bitset allows adding a set of integers and provides support for set operations like unions, intersections and checks for equality or if a value is contained in the set. GtkBitset also contains various functions to query metadata about the bitset, such as the minimum or maximum values or its size.
The fastest way to iterate values in a bitset is [struct@Gtk.BitsetIter].
The main use case for GtkBitset is implementing complex selections for [iface@Gtk.SelectionModel].