Top |
Functions
hb_map_t * | hb_map_create () |
hb_bool_t | hb_map_allocation_successful () |
hb_map_t * | hb_map_copy () |
void | hb_map_clear () |
hb_map_t * | hb_map_get_empty () |
hb_map_t * | hb_map_reference () |
void | hb_map_destroy () |
hb_bool_t | hb_map_set_user_data () |
void * | hb_map_get_user_data () |
void | hb_map_set () |
hb_codepoint_t | hb_map_get () |
void | hb_map_del () |
hb_bool_t | hb_map_has () |
unsigned int | hb_map_get_population () |
hb_bool_t | hb_map_is_empty () |
hb_bool_t | hb_map_is_equal () |
unsigned int | hb_map_hash () |
void | hb_map_update () |
hb_bool_t | hb_map_next () |
void | hb_map_keys () |
void | hb_map_values () |
Description
Map objects are integer-to-integer hash-maps. Currently they are not used in the HarfBuzz public API, but are provided for client's use if desired.
Functions
hb_map_allocation_successful ()
hb_bool_t
hb_map_allocation_successful (const hb_map_t *map
);
Tests whether memory allocation for a set was successful.
Since: 1.7.7
hb_map_get_empty ()
hb_map_t *
hb_map_get_empty (void
);
Fetches the singleton empty hb_map_t.
Since: 1.7.7
hb_map_reference ()
hb_map_t *
hb_map_reference (hb_map_t *map
);
Increases the reference count on a map.
[skip]
Since: 1.7.7
hb_map_destroy ()
void
hb_map_destroy (hb_map_t *map
);
Decreases the reference count on a map. When the reference count reaches zero, the map is destroyed, freeing all memory.
[skip]
Since: 1.7.7
hb_map_set_user_data ()
hb_bool_t hb_map_set_user_data (hb_map_t *map
,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 map.
[skip]
Parameters
map |
A map |
|
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: 1.7.7
hb_map_get_user_data ()
void * hb_map_get_user_data (const hb_map_t *map
,hb_user_data_key_t *key
);
Fetches the user data associated with the specified key, attached to the specified map.
[skip]
Since: 1.7.7
hb_map_set ()
void hb_map_set (hb_map_t *map
,hb_codepoint_t key
,hb_codepoint_t value
);
Stores key
:value
in the map.
Since: 1.7.7
hb_map_get ()
hb_codepoint_t hb_map_get (const hb_map_t *map
,hb_codepoint_t key
);
Fetches the value stored for key
in map
.
Since: 1.7.7
hb_map_del ()
void hb_map_del (hb_map_t *map
,hb_codepoint_t key
);
Removes key
and its stored value from map
.
Since: 1.7.7
hb_map_has ()
hb_bool_t hb_map_has (const hb_map_t *map
,hb_codepoint_t key
);
Tests whether key
is an element of map
.
Since: 1.7.7
hb_map_get_population ()
unsigned int
hb_map_get_population (const hb_map_t *map
);
Returns the number of key-value pairs in the map.
Since: 1.7.7
hb_map_is_empty ()
hb_bool_t
hb_map_is_empty (const hb_map_t *map
);
Tests whether map
is empty (contains no elements).
Since: 1.7.7
hb_map_is_equal ()
hb_bool_t hb_map_is_equal (const hb_map_t *map
,const hb_map_t *other
);
Tests whether map
and other
are equal (contain the same
elements).
Since: 4.3.0
hb_map_hash ()
unsigned int
hb_map_hash (const hb_map_t *map
);
Creates a hash representing map
.
Since: 4.4.0
hb_map_update ()
void hb_map_update (hb_map_t *map
,const hb_map_t *other
);
Add the contents of other
to map
.
Since: 7.0.0
hb_map_next ()
hb_bool_t hb_map_next (const hb_map_t *map
,int *idx
,hb_codepoint_t *key
,hb_codepoint_t *value
);
Fetches the next key/value pair in map
.
Set idx
to -1 to get started.
If the map is modified during iteration, the behavior is undefined.
The order in which the key/values are returned is undefined.
Parameters
map |
A map |
|
idx |
Iterator internal state. |
[inout] |
key |
Key retrieved. |
[out] |
value |
Value retrieved. |
[out] |
Since: 7.0.0
hb_map_keys ()
void hb_map_keys (const hb_map_t *map
,hb_set_t *keys
);
Add the keys of map
to keys
.
Since: 7.0.0