Package: gtk

GBoxed gtk:bitset

Declaration

(glib:define-gboxed-opaque bitset "GtkBitset"
  :export t
  :type-initializer "gtk_bitset_get_type"
  :alloc (%bitset-new-empty))  

Details

The gtk:bitset structure is a data structure for representing 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 bitset. The gtk:bitset implementation 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 a gtk:bitset-iter iterator.

The main use case for the gtk:bitset structure is implementing complex selections for the gtk:selection-model class.
 

Returned by

See also

2024-10-18