Top |
void | hb_set_add () |
void | hb_set_add_range () |
void | hb_set_add_sorted_array () |
hb_bool_t | hb_set_allocation_successful () |
hb_set_t * | hb_set_copy () |
void | hb_set_clear () |
hb_set_t * | hb_set_create () |
void | hb_set_del () |
void | hb_set_del_range () |
void | hb_set_destroy () |
hb_set_t * | hb_set_get_empty () |
hb_codepoint_t | hb_set_get_max () |
hb_codepoint_t | hb_set_get_min () |
unsigned int | hb_set_get_population () |
void * | hb_set_get_user_data () |
hb_bool_t | hb_set_has () |
void | hb_set_intersect () |
void | hb_set_invert () |
hb_bool_t | hb_set_is_empty () |
hb_bool_t | hb_set_is_equal () |
hb_bool_t | hb_set_is_subset () |
hb_bool_t | hb_set_next () |
hb_bool_t | hb_set_next_range () |
unsigned int | hb_set_next_many () |
hb_bool_t | hb_set_previous () |
hb_bool_t | hb_set_previous_range () |
hb_set_t * | hb_set_reference () |
void | hb_set_set () |
hb_bool_t | hb_set_set_user_data () |
void | hb_set_subtract () |
void | hb_set_symmetric_difference () |
void | hb_set_union () |
Set objects represent a mathematical set of integer values. They are used in non-shaping APIs to query certain sets of characters or glyphs, or other integer values.
void hb_set_add (hb_set_t *set
,hb_codepoint_t codepoint
);
Adds codepoint
to set
.
Since: 0.9.2
void hb_set_add_range (hb_set_t *set
,hb_codepoint_t first
,hb_codepoint_t last
);
Adds all of the elements from first
to last
(inclusive) to set
.
Since: 0.9.7
void hb_set_add_sorted_array (hb_set_t *set
,const hb_codepoint_t *sorted_codepoints
,unsigned int num_codepoints
);
Adds num_codepoints
codepoints to a set at once.
The codepoints array must be in increasing order,
with size at least num_codepoints
.
set |
A set |
|
sorted_codepoints |
Array of codepoints to add. |
[array length=num_codepoints] |
num_codepoints |
Length of |
Since: 4.1.0
hb_bool_t
hb_set_allocation_successful (const hb_set_t *set
);
Tests whether memory allocation for a set was successful.
Since: 0.9.2
hb_set_t *
hb_set_create (void
);
Creates a new, initially empty set.
[Xconstructor]
Since: 0.9.2
void hb_set_del (hb_set_t *set
,hb_codepoint_t codepoint
);
Removes codepoint
from set
.
Since: 0.9.2
void hb_set_del_range (hb_set_t *set
,hb_codepoint_t first
,hb_codepoint_t last
);
Removes all of the elements from first
to last
(inclusive) from set
.
If last
is HB_SET_VALUE_INVALID, then all values
greater than or equal to first
are removed.
set |
A set |
|
first |
The first element to remove from |
|
last |
The final element to remove from |
Since: 0.9.7
void
hb_set_destroy (hb_set_t *set
);
Decreases the reference count on a set. When the reference count reaches zero, the set is destroyed, freeing all memory.
[skip]
Since: 0.9.2
hb_set_t *
hb_set_get_empty (void
);
Fetches the singleton empty hb_set_t.
Since: 0.9.2
hb_codepoint_t
hb_set_get_max (const hb_set_t *set
);
Finds the largest element in the set.
Since: 0.9.7
hb_codepoint_t
hb_set_get_min (const hb_set_t *set
);
Finds the smallest element in the set.
Since: 0.9.7
unsigned int
hb_set_get_population (const hb_set_t *set
);
Returns the number of elements in the set.
Since: 0.9.7
void * hb_set_get_user_data (hb_set_t *set
,hb_user_data_key_t *key
);
Fetches the user data associated with the specified key, attached to the specified set.
[skip]
Since: 0.9.2
hb_bool_t hb_set_has (const hb_set_t *set
,hb_codepoint_t codepoint
);
Tests whether codepoint
belongs to set
.
Since: 0.9.2
void hb_set_intersect (hb_set_t *set
,const hb_set_t *other
);
Makes set
the intersection of set
and other
.
Since: 0.9.2
hb_bool_t
hb_set_is_empty (const hb_set_t *set
);
Tests whether a set is empty (contains no elements).
Since: 0.9.7
hb_bool_t hb_set_is_equal (const hb_set_t *set
,const hb_set_t *other
);
Tests whether set
and other
are equal (contain the same
elements).
Since: 0.9.7
hb_bool_t hb_set_is_subset (const hb_set_t *set
,const hb_set_t *larger_set
);
Tests whether set
is a subset of larger_set
.
Since: 1.8.1
hb_bool_t hb_set_next (const hb_set_t *set
,hb_codepoint_t *codepoint
);
Fetches the next element in set
that is greater than current value of codepoint
.
Set codepoint
to HB_SET_VALUE_INVALID to get started.
Since: 0.9.2
hb_bool_t hb_set_next_range (const hb_set_t *set
,hb_codepoint_t *first
,hb_codepoint_t *last
);
Fetches the next consecutive range of elements in set
that
are greater than current value of last
.
Set last
to HB_SET_VALUE_INVALID to get started.
set |
A set |
|
first |
The first code point in the range. |
[out] |
last |
Input = The current last code point in the range Output = The last code point in the range. |
[inout] |
Since: 0.9.7
unsigned int hb_set_next_many (const hb_set_t *set
,hb_codepoint_t codepoint
,hb_codepoint_t *out
,unsigned int size
);
Finds the next element in set
that is greater than codepoint
. Writes out
codepoints to out
, until either the set runs out of elements, or size
codepoints are written, whichever comes first.
set |
A set |
|
codepoint |
Outputting codepoints starting after this one. Use HB_SET_VALUE_INVALID to get started. |
|
out |
An array of codepoints to write to. |
[array length=size] |
size |
The maximum number of codepoints to write out. |
Since: 4.2.0
hb_bool_t hb_set_previous (const hb_set_t *set
,hb_codepoint_t *codepoint
);
Fetches the previous element in set
that is lower than current value of codepoint
.
Set codepoint
to HB_SET_VALUE_INVALID to get started.
Since: 1.8.0
hb_bool_t hb_set_previous_range (const hb_set_t *set
,hb_codepoint_t *first
,hb_codepoint_t *last
);
Fetches the previous consecutive range of elements in set
that
are greater than current value of last
.
Set first
to HB_SET_VALUE_INVALID to get started.
set |
A set |
|
first |
Input = The current first code point in the range Output = The first code point in the range. |
[inout] |
last |
The last code point in the range. |
[out] |
Since: 1.8.0
hb_set_t *
hb_set_reference (hb_set_t *set
);
Increases the reference count on a set.
[skip]
Since: 0.9.2
void hb_set_set (hb_set_t *set
,const hb_set_t *other
);
Makes the contents of set
equal to the contents of other
.
Since: 0.9.2
hb_bool_t hb_set_set_user_data (hb_set_t *set
,hb_user_data_key_t *key
,void *data
,hb_destroy_func_t destroy
,hb_bool_t replace
);
Attaches a user-data key/data pair to the specified set.
[skip]
set |
A set |
|
key |
The user-data key to set |
|
data |
A pointer to the user data to set |
|
destroy |
A callback to call when |
[nullable] |
replace |
Whether to replace an existing data with the same key |
Since: 0.9.2
void hb_set_subtract (hb_set_t *set
,const hb_set_t *other
);
Subtracts the contents of other
from set
.
Since: 0.9.2
void hb_set_symmetric_difference (hb_set_t *set
,const hb_set_t *other
);
Makes set
the symmetric difference of set
and other
.
Since: 0.9.2
#define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1)
Unset hb_set_t value.
Since: 0.9.21
typedef struct hb_set_t hb_set_t;
Data type for holding a set of integers. hb_set_t's are used to gather and contain glyph IDs, Unicode code points, and various other collections of discrete values.