Bitset


Object Hierarchy:

Object hierarchy for Bitset

Description:

[ CCode ( ref_function = "gtk_bitset_ref" , type_id = "gtk_bitset_get_type ()" , unref_function = "gtk_bitset_unref" ) ]
[ Compact ]
public class Bitset

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].


Namespace: Gtk
Package: gtk4

Content:

Creation methods:

Methods: