Top |
Functions
hb_set_t * | hb_set_create () |
hb_bool_t | hb_set_allocation_successful () |
hb_set_t * | hb_set_copy () |
hb_set_t * | hb_set_get_empty () |
hb_set_t * | hb_set_reference () |
void | hb_set_destroy () |
hb_bool_t | hb_set_set_user_data () |
void * | hb_set_get_user_data () |
void | hb_set_clear () |
void | hb_set_set () |
hb_bool_t | hb_set_has () |
void | hb_set_add () |
void | hb_set_add_range () |
void | hb_set_add_sorted_array () |
void | hb_set_del () |
void | hb_set_del_range () |
hb_codepoint_t | hb_set_get_max () |
hb_codepoint_t | hb_set_get_min () |
unsigned int | hb_set_get_population () |
hb_bool_t | hb_set_is_empty () |
unsigned int | hb_set_hash () |
void | hb_set_subtract () |
void | hb_set_intersect () |
void | hb_set_union () |
void | hb_set_symmetric_difference () |
void | hb_set_invert () |
hb_bool_t | hb_set_is_inverted () |
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 () |
Description
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.
Functions
hb_set_allocation_successful ()
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_get_empty ()
hb_set_t *
hb_set_get_empty (void
);
Fetches the singleton empty hb_set_t.
Since: 0.9.2
hb_set_reference ()
hb_set_t *
hb_set_reference (hb_set_t *set
);
Increases the reference count on a set.
[skip]
Since: 0.9.2
hb_set_destroy ()
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_set_user_data ()
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]
Parameters
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
hb_set_get_user_data ()
void * hb_set_get_user_data (const 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_set_set ()
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_set_has ()
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
hb_set_add ()
void hb_set_add (hb_set_t *set
,hb_codepoint_t codepoint
);
Adds codepoint
to set
.
Since: 0.9.2
hb_set_add_range ()
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
hb_set_add_sorted_array ()
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
.
Parameters
set |
A set |
|
sorted_codepoints |
Array of codepoints to add. |
[array length=num_codepoints] |
num_codepoints |
Length of |
Since: 4.1.0
hb_set_del ()
void hb_set_del (hb_set_t *set
,hb_codepoint_t codepoint
);
Removes codepoint
from set
.
Since: 0.9.2
hb_set_del_range ()
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.
Parameters
set |
A set |
|
first |
The first element to remove from |
|
last |
The final element to remove from |
Since: 0.9.7
hb_set_get_max ()
hb_codepoint_t
hb_set_get_max (const hb_set_t *set
);
Finds the largest element in the set.
Since: 0.9.7
hb_set_get_min ()
hb_codepoint_t
hb_set_get_min (const hb_set_t *set
);
Finds the smallest element in the set.
Since: 0.9.7
hb_set_get_population ()
unsigned int
hb_set_get_population (const hb_set_t *set
);
Returns the number of elements in the set.
Since: 0.9.7
hb_set_is_empty ()
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_set_hash ()
unsigned int
hb_set_hash (const hb_set_t *set
);
Creates a hash representing set
.
Since: 4.4.0
hb_set_subtract ()
void hb_set_subtract (hb_set_t *set
,const hb_set_t *other
);
Subtracts the contents of other
from set
.
Since: 0.9.2
hb_set_intersect ()
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_set_union ()
void hb_set_union (hb_set_t *set
,const hb_set_t *other
);
Makes set
the union of set
and other
.
Since: 0.9.2
hb_set_symmetric_difference ()
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
hb_set_is_inverted ()
hb_bool_t
hb_set_is_inverted (const hb_set_t *set
);
Returns whether the set is inverted.
Since: 7.0.0
hb_set_is_equal ()
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_set_is_subset ()
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_set_next ()
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_set_next_range ()
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.
Parameters
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
hb_set_next_many ()
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.
Parameters
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_set_previous ()
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_set_previous_range ()
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.
Parameters
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
Types and Values
HB_SET_VALUE_INVALID
#define HB_SET_VALUE_INVALID HB_CODEPOINT_INVALID
Unset hb_set_t value.
Since: 0.9.21
hb_set_t
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.