1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>hb-map: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="core-api.html" title="Core API">
9 <link rel="prev" href="harfbuzz-hb-font.html" title="hb-font">
10 <link rel="next" href="harfbuzz-hb-set.html" title="hb-set">
11 <meta name="generator" content="GTK-Doc V1.32 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18 <a href="#harfbuzz-hb-map.description" class="shortcut">Description</a></span>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="core-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="harfbuzz-hb-font.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="harfbuzz-hb-set.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 <div class="refentry">
26 <a name="harfbuzz-hb-map"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
29 <h2><span class="refentrytitle"><a name="harfbuzz-hb-map.top_of_page"></a>hb-map</span></h2>
30 <p>hb-map — Object representing integer to integer mapping</p>
32 <td class="gallery_image" valign="top" align="right"></td>
34 <div class="refsect1">
35 <a name="harfbuzz-hb-map.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
43 <td class="function_type">
44 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
46 <td class="function_name">
47 <a class="link" href="harfbuzz-hb-map.html#hb-map-create" title="hb_map_create ()">hb_map_create</a> <span class="c_punctuation">()</span>
51 <td class="function_type">
52 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
54 <td class="function_name">
55 <a class="link" href="harfbuzz-hb-map.html#hb-map-allocation-successful" title="hb_map_allocation_successful ()">hb_map_allocation_successful</a> <span class="c_punctuation">()</span>
59 <td class="function_type">
60 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
62 <td class="function_name">
63 <a class="link" href="harfbuzz-hb-map.html#hb-map-copy" title="hb_map_copy ()">hb_map_copy</a> <span class="c_punctuation">()</span>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
70 <td class="function_name">
71 <a class="link" href="harfbuzz-hb-map.html#hb-map-clear" title="hb_map_clear ()">hb_map_clear</a> <span class="c_punctuation">()</span>
75 <td class="function_type">
76 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
78 <td class="function_name">
79 <a class="link" href="harfbuzz-hb-map.html#hb-map-get-empty" title="hb_map_get_empty ()">hb_map_get_empty</a> <span class="c_punctuation">()</span>
83 <td class="function_type">
84 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
86 <td class="function_name">
87 <a class="link" href="harfbuzz-hb-map.html#hb-map-reference" title="hb_map_reference ()">hb_map_reference</a> <span class="c_punctuation">()</span>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
94 <td class="function_name">
95 <a class="link" href="harfbuzz-hb-map.html#hb-map-destroy" title="hb_map_destroy ()">hb_map_destroy</a> <span class="c_punctuation">()</span>
99 <td class="function_type">
100 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
102 <td class="function_name">
103 <a class="link" href="harfbuzz-hb-map.html#hb-map-set-user-data" title="hb_map_set_user_data ()">hb_map_set_user_data</a> <span class="c_punctuation">()</span>
107 <td class="function_type">
108 <span class="returnvalue">void</span> *
110 <td class="function_name">
111 <a class="link" href="harfbuzz-hb-map.html#hb-map-get-user-data" title="hb_map_get_user_data ()">hb_map_get_user_data</a> <span class="c_punctuation">()</span>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
118 <td class="function_name">
119 <a class="link" href="harfbuzz-hb-map.html#hb-map-set" title="hb_map_set ()">hb_map_set</a> <span class="c_punctuation">()</span>
123 <td class="function_type">
124 <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
126 <td class="function_name">
127 <a class="link" href="harfbuzz-hb-map.html#hb-map-get" title="hb_map_get ()">hb_map_get</a> <span class="c_punctuation">()</span>
131 <td class="function_type">
132 <span class="returnvalue">void</span>
134 <td class="function_name">
135 <a class="link" href="harfbuzz-hb-map.html#hb-map-del" title="hb_map_del ()">hb_map_del</a> <span class="c_punctuation">()</span>
139 <td class="function_type">
140 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
142 <td class="function_name">
143 <a class="link" href="harfbuzz-hb-map.html#hb-map-has" title="hb_map_has ()">hb_map_has</a> <span class="c_punctuation">()</span>
147 <td class="function_type">unsigned <span class="returnvalue">int</span>
149 <td class="function_name">
150 <a class="link" href="harfbuzz-hb-map.html#hb-map-get-population" title="hb_map_get_population ()">hb_map_get_population</a> <span class="c_punctuation">()</span>
154 <td class="function_type">
155 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
157 <td class="function_name">
158 <a class="link" href="harfbuzz-hb-map.html#hb-map-is-empty" title="hb_map_is_empty ()">hb_map_is_empty</a> <span class="c_punctuation">()</span>
162 <td class="function_type">
163 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
165 <td class="function_name">
166 <a class="link" href="harfbuzz-hb-map.html#hb-map-is-equal" title="hb_map_is_equal ()">hb_map_is_equal</a> <span class="c_punctuation">()</span>
170 <td class="function_type">unsigned <span class="returnvalue">int</span>
172 <td class="function_name">
173 <a class="link" href="harfbuzz-hb-map.html#hb-map-hash" title="hb_map_hash ()">hb_map_hash</a> <span class="c_punctuation">()</span>
177 <td class="function_type">
178 <span class="returnvalue">void</span>
180 <td class="function_name">
181 <a class="link" href="harfbuzz-hb-map.html#hb-map-update" title="hb_map_update ()">hb_map_update</a> <span class="c_punctuation">()</span>
185 <td class="function_type">
186 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
188 <td class="function_name">
189 <a class="link" href="harfbuzz-hb-map.html#hb-map-next" title="hb_map_next ()">hb_map_next</a> <span class="c_punctuation">()</span>
193 <td class="function_type">
194 <span class="returnvalue">void</span>
196 <td class="function_name">
197 <a class="link" href="harfbuzz-hb-map.html#hb-map-keys" title="hb_map_keys ()">hb_map_keys</a> <span class="c_punctuation">()</span>
201 <td class="function_type">
202 <span class="returnvalue">void</span>
204 <td class="function_name">
205 <a class="link" href="harfbuzz-hb-map.html#hb-map-values" title="hb_map_values ()">hb_map_values</a> <span class="c_punctuation">()</span>
211 <div class="refsect1">
212 <a name="harfbuzz-hb-map.other"></a><h2>Types and Values</h2>
213 <div class="informaltable"><table class="informaltable" width="100%" border="0">
215 <col width="150px" class="other_proto_type">
216 <col class="other_proto_name">
220 <td class="define_keyword">#define</td>
221 <td class="function_name"><a class="link" href="harfbuzz-hb-map.html#HB-MAP-VALUE-INVALID:CAPS" title="HB_MAP_VALUE_INVALID">HB_MAP_VALUE_INVALID</a></td>
224 <td class="typedef_keyword">typedef</td>
225 <td class="function_name"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t">hb_map_t</a></td>
230 <div class="refsect1">
231 <a name="harfbuzz-hb-map.includes"></a><h2>Includes</h2>
232 <pre class="synopsis">#include <hb.h>
235 <div class="refsect1">
236 <a name="harfbuzz-hb-map.description"></a><h2>Description</h2>
237 <p>Map objects are integer-to-integer hash-maps. Currently they are
238 not used in the HarfBuzz public API, but are provided for client's
241 <div class="refsect1">
242 <a name="harfbuzz-hb-map.functions_details"></a><h2>Functions</h2>
243 <div class="refsect2">
244 <a name="hb-map-create"></a><h3>hb_map_create ()</h3>
245 <pre class="programlisting"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
246 hb_map_create (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
247 <p>Creates a new, initially empty map.</p>
248 <div class="refsect3">
249 <a name="hb-map-create.returns"></a><h4>Returns</h4>
250 <p>The new <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a>. </p>
251 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
253 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
256 <div class="refsect2">
257 <a name="hb-map-allocation-successful"></a><h3>hb_map_allocation_successful ()</h3>
258 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
259 hb_map_allocation_successful (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
260 <p>Tests whether memory allocation for a set was successful.</p>
261 <div class="refsect3">
262 <a name="hb-map-allocation-successful.parameters"></a><h4>Parameters</h4>
263 <div class="informaltable"><table class="informaltable" width="100%" border="0">
265 <col width="150px" class="parameters_name">
266 <col class="parameters_description">
267 <col width="200px" class="parameters_annotations">
270 <td class="parameter_name"><p>map</p></td>
271 <td class="parameter_description"><p>A map</p></td>
272 <td class="parameter_annotations"> </td>
276 <div class="refsect3">
277 <a name="hb-map-allocation-successful.returns"></a><h4>Returns</h4>
278 <p> <code class="literal">true</code> if allocation succeeded, <code class="literal">false</code> otherwise</p>
280 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
283 <div class="refsect2">
284 <a name="hb-map-copy"></a><h3>hb_map_copy ()</h3>
285 <pre class="programlisting"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
286 hb_map_copy (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
287 <p>Allocate a copy of <em class="parameter"><code>map</code></em>
289 <div class="refsect3">
290 <a name="hb-map-copy.parameters"></a><h4>Parameters</h4>
291 <div class="informaltable"><table class="informaltable" width="100%" border="0">
293 <col width="150px" class="parameters_name">
294 <col class="parameters_description">
295 <col width="200px" class="parameters_annotations">
298 <td class="parameter_name"><p>map</p></td>
299 <td class="parameter_description"><p>A map</p></td>
300 <td class="parameter_annotations"> </td>
304 <div class="refsect3">
305 <a name="hb-map-copy.returns"></a><h4>Returns</h4>
306 <p>Newly-allocated map. </p>
307 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
309 <p class="since">Since: <a class="link" href="api-index-4-4-0.html#api-index-4.4.0">4.4.0</a></p>
312 <div class="refsect2">
313 <a name="hb-map-clear"></a><h3>hb_map_clear ()</h3>
314 <pre class="programlisting"><span class="returnvalue">void</span>
315 hb_map_clear (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
316 <p>Clears out the contents of <em class="parameter"><code>map</code></em>
318 <div class="refsect3">
319 <a name="hb-map-clear.parameters"></a><h4>Parameters</h4>
320 <div class="informaltable"><table class="informaltable" width="100%" border="0">
322 <col width="150px" class="parameters_name">
323 <col class="parameters_description">
324 <col width="200px" class="parameters_annotations">
327 <td class="parameter_name"><p>map</p></td>
328 <td class="parameter_description"><p>A map</p></td>
329 <td class="parameter_annotations"> </td>
333 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
336 <div class="refsect2">
337 <a name="hb-map-get-empty"></a><h3>hb_map_get_empty ()</h3>
338 <pre class="programlisting"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
339 hb_map_get_empty (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
340 <p>Fetches the singleton empty <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a>.</p>
341 <div class="refsect3">
342 <a name="hb-map-get-empty.returns"></a><h4>Returns</h4>
343 <p>The empty <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a>. </p>
344 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
346 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
349 <div class="refsect2">
350 <a name="hb-map-reference"></a><h3>hb_map_reference ()</h3>
351 <pre class="programlisting"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
352 hb_map_reference (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
353 <p>Increases the reference count on a map.</p>
354 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
355 <div class="refsect3">
356 <a name="hb-map-reference.parameters"></a><h4>Parameters</h4>
357 <div class="informaltable"><table class="informaltable" width="100%" border="0">
359 <col width="150px" class="parameters_name">
360 <col class="parameters_description">
361 <col width="200px" class="parameters_annotations">
364 <td class="parameter_name"><p>map</p></td>
365 <td class="parameter_description"><p>A map</p></td>
366 <td class="parameter_annotations"> </td>
370 <div class="refsect3">
371 <a name="hb-map-reference.returns"></a><h4>Returns</h4>
373 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
375 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
378 <div class="refsect2">
379 <a name="hb-map-destroy"></a><h3>hb_map_destroy ()</h3>
380 <pre class="programlisting"><span class="returnvalue">void</span>
381 hb_map_destroy (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
382 <p>Decreases the reference count on a map. When
383 the reference count reaches zero, the map is
384 destroyed, freeing all memory.</p>
385 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
386 <div class="refsect3">
387 <a name="hb-map-destroy.parameters"></a><h4>Parameters</h4>
388 <div class="informaltable"><table class="informaltable" width="100%" border="0">
390 <col width="150px" class="parameters_name">
391 <col class="parameters_description">
392 <col width="200px" class="parameters_annotations">
395 <td class="parameter_name"><p>map</p></td>
396 <td class="parameter_description"><p>A map</p></td>
397 <td class="parameter_annotations"> </td>
401 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
404 <div class="refsect2">
405 <a name="hb-map-set-user-data"></a><h3>hb_map_set_user_data ()</h3>
406 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
407 hb_map_set_user_data (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
408 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>,
409 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
410 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-destroy-func-t" title="hb_destroy_func_t ()"><span class="type">hb_destroy_func_t</span></a> destroy</code></em>,
411 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="type">hb_bool_t</span></a> replace</code></em>);</pre>
412 <p>Attaches a user-data key/data pair to the specified map.</p>
413 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
414 <div class="refsect3">
415 <a name="hb-map-set-user-data.parameters"></a><h4>Parameters</h4>
416 <div class="informaltable"><table class="informaltable" width="100%" border="0">
418 <col width="150px" class="parameters_name">
419 <col class="parameters_description">
420 <col width="200px" class="parameters_annotations">
424 <td class="parameter_name"><p>map</p></td>
425 <td class="parameter_description"><p>A map</p></td>
426 <td class="parameter_annotations"> </td>
429 <td class="parameter_name"><p>key</p></td>
430 <td class="parameter_description"><p>The user-data key to set</p></td>
431 <td class="parameter_annotations"> </td>
434 <td class="parameter_name"><p>data</p></td>
435 <td class="parameter_description"><p>A pointer to the user data to set</p></td>
436 <td class="parameter_annotations"> </td>
439 <td class="parameter_name"><p>destroy</p></td>
440 <td class="parameter_description"><p>A callback to call when <em class="parameter"><code>data</code></em>
441 is not needed anymore. </p></td>
442 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
445 <td class="parameter_name"><p>replace</p></td>
446 <td class="parameter_description"><p>Whether to replace an existing data with the same key</p></td>
447 <td class="parameter_annotations"> </td>
452 <div class="refsect3">
453 <a name="hb-map-set-user-data.returns"></a><h4>Returns</h4>
454 <p> <code class="literal">true</code> if success, <code class="literal">false</code> otherwise</p>
456 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
459 <div class="refsect2">
460 <a name="hb-map-get-user-data"></a><h3>hb_map_get_user_data ()</h3>
461 <pre class="programlisting"><span class="returnvalue">void</span> *
462 hb_map_get_user_data (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
463 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>);</pre>
464 <p>Fetches the user data associated with the specified key,
465 attached to the specified map.</p>
466 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
467 <div class="refsect3">
468 <a name="hb-map-get-user-data.parameters"></a><h4>Parameters</h4>
469 <div class="informaltable"><table class="informaltable" width="100%" border="0">
471 <col width="150px" class="parameters_name">
472 <col class="parameters_description">
473 <col width="200px" class="parameters_annotations">
477 <td class="parameter_name"><p>map</p></td>
478 <td class="parameter_description"><p>A map</p></td>
479 <td class="parameter_annotations"> </td>
482 <td class="parameter_name"><p>key</p></td>
483 <td class="parameter_description"><p>The user-data key to query</p></td>
484 <td class="parameter_annotations"> </td>
489 <div class="refsect3">
490 <a name="hb-map-get-user-data.returns"></a><h4>Returns</h4>
491 <p>A pointer to the user data. </p>
492 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
494 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
497 <div class="refsect2">
498 <a name="hb-map-set"></a><h3>hb_map_set ()</h3>
499 <pre class="programlisting"><span class="returnvalue">void</span>
500 hb_map_set (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
501 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> key</code></em>,
502 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> value</code></em>);</pre>
503 <p>Stores <em class="parameter"><code>key</code></em>
504 :<em class="parameter"><code>value</code></em>
506 <div class="refsect3">
507 <a name="hb-map-set.parameters"></a><h4>Parameters</h4>
508 <div class="informaltable"><table class="informaltable" width="100%" border="0">
510 <col width="150px" class="parameters_name">
511 <col class="parameters_description">
512 <col width="200px" class="parameters_annotations">
516 <td class="parameter_name"><p>map</p></td>
517 <td class="parameter_description"><p>A map</p></td>
518 <td class="parameter_annotations"> </td>
521 <td class="parameter_name"><p>key</p></td>
522 <td class="parameter_description"><p>The key to store in the map</p></td>
523 <td class="parameter_annotations"> </td>
526 <td class="parameter_name"><p>value</p></td>
527 <td class="parameter_description"><p>The value to store for <em class="parameter"><code>key</code></em>
529 <td class="parameter_annotations"> </td>
534 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
537 <div class="refsect2">
538 <a name="hb-map-get"></a><h3>hb_map_get ()</h3>
539 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
540 hb_map_get (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
541 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> key</code></em>);</pre>
542 <p>Fetches the value stored for <em class="parameter"><code>key</code></em>
543 in <em class="parameter"><code>map</code></em>
545 <div class="refsect3">
546 <a name="hb-map-get.parameters"></a><h4>Parameters</h4>
547 <div class="informaltable"><table class="informaltable" width="100%" border="0">
549 <col width="150px" class="parameters_name">
550 <col class="parameters_description">
551 <col width="200px" class="parameters_annotations">
555 <td class="parameter_name"><p>map</p></td>
556 <td class="parameter_description"><p>A map</p></td>
557 <td class="parameter_annotations"> </td>
560 <td class="parameter_name"><p>key</p></td>
561 <td class="parameter_description"><p>The key to query</p></td>
562 <td class="parameter_annotations"> </td>
567 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
570 <div class="refsect2">
571 <a name="hb-map-del"></a><h3>hb_map_del ()</h3>
572 <pre class="programlisting"><span class="returnvalue">void</span>
573 hb_map_del (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
574 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> key</code></em>);</pre>
575 <p>Removes <em class="parameter"><code>key</code></em>
576 and its stored value from <em class="parameter"><code>map</code></em>
578 <div class="refsect3">
579 <a name="hb-map-del.parameters"></a><h4>Parameters</h4>
580 <div class="informaltable"><table class="informaltable" width="100%" border="0">
582 <col width="150px" class="parameters_name">
583 <col class="parameters_description">
584 <col width="200px" class="parameters_annotations">
588 <td class="parameter_name"><p>map</p></td>
589 <td class="parameter_description"><p>A map</p></td>
590 <td class="parameter_annotations"> </td>
593 <td class="parameter_name"><p>key</p></td>
594 <td class="parameter_description"><p>The key to delete</p></td>
595 <td class="parameter_annotations"> </td>
600 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
603 <div class="refsect2">
604 <a name="hb-map-has"></a><h3>hb_map_has ()</h3>
605 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
606 hb_map_has (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
607 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> key</code></em>);</pre>
608 <p>Tests whether <em class="parameter"><code>key</code></em>
609 is an element of <em class="parameter"><code>map</code></em>
611 <div class="refsect3">
612 <a name="hb-map-has.parameters"></a><h4>Parameters</h4>
613 <div class="informaltable"><table class="informaltable" width="100%" border="0">
615 <col width="150px" class="parameters_name">
616 <col class="parameters_description">
617 <col width="200px" class="parameters_annotations">
621 <td class="parameter_name"><p>map</p></td>
622 <td class="parameter_description"><p>A map</p></td>
623 <td class="parameter_annotations"> </td>
626 <td class="parameter_name"><p>key</p></td>
627 <td class="parameter_description"><p>The key to query</p></td>
628 <td class="parameter_annotations"> </td>
633 <div class="refsect3">
634 <a name="hb-map-has.returns"></a><h4>Returns</h4>
635 <p> <code class="literal">true</code> if <em class="parameter"><code>key</code></em>
636 is found in <em class="parameter"><code>map</code></em>
637 , <code class="literal">false</code> otherwise</p>
639 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
642 <div class="refsect2">
643 <a name="hb-map-get-population"></a><h3>hb_map_get_population ()</h3>
644 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
645 hb_map_get_population (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
646 <p>Returns the number of key-value pairs in the map.</p>
647 <div class="refsect3">
648 <a name="hb-map-get-population.parameters"></a><h4>Parameters</h4>
649 <div class="informaltable"><table class="informaltable" width="100%" border="0">
651 <col width="150px" class="parameters_name">
652 <col class="parameters_description">
653 <col width="200px" class="parameters_annotations">
656 <td class="parameter_name"><p>map</p></td>
657 <td class="parameter_description"><p>A map</p></td>
658 <td class="parameter_annotations"> </td>
662 <div class="refsect3">
663 <a name="hb-map-get-population.returns"></a><h4>Returns</h4>
664 <p> The population of <em class="parameter"><code>map</code></em>
667 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
670 <div class="refsect2">
671 <a name="hb-map-is-empty"></a><h3>hb_map_is_empty ()</h3>
672 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
673 hb_map_is_empty (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
674 <p>Tests whether <em class="parameter"><code>map</code></em>
675 is empty (contains no elements).</p>
676 <div class="refsect3">
677 <a name="hb-map-is-empty.parameters"></a><h4>Parameters</h4>
678 <div class="informaltable"><table class="informaltable" width="100%" border="0">
680 <col width="150px" class="parameters_name">
681 <col class="parameters_description">
682 <col width="200px" class="parameters_annotations">
685 <td class="parameter_name"><p>map</p></td>
686 <td class="parameter_description"><p>A map</p></td>
687 <td class="parameter_annotations"> </td>
691 <div class="refsect3">
692 <a name="hb-map-is-empty.returns"></a><h4>Returns</h4>
693 <p> <code class="literal">true</code> if <em class="parameter"><code>map</code></em>
696 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
699 <div class="refsect2">
700 <a name="hb-map-is-equal"></a><h3>hb_map_is_equal ()</h3>
701 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
702 hb_map_is_equal (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
703 <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *other</code></em>);</pre>
704 <p>Tests whether <em class="parameter"><code>map</code></em>
705 and <em class="parameter"><code>other</code></em>
706 are equal (contain the same
708 <div class="refsect3">
709 <a name="hb-map-is-equal.parameters"></a><h4>Parameters</h4>
710 <div class="informaltable"><table class="informaltable" width="100%" border="0">
712 <col width="150px" class="parameters_name">
713 <col class="parameters_description">
714 <col width="200px" class="parameters_annotations">
718 <td class="parameter_name"><p>map</p></td>
719 <td class="parameter_description"><p>A map</p></td>
720 <td class="parameter_annotations"> </td>
723 <td class="parameter_name"><p>other</p></td>
724 <td class="parameter_description"><p>Another map</p></td>
725 <td class="parameter_annotations"> </td>
730 <div class="refsect3">
731 <a name="hb-map-is-equal.returns"></a><h4>Returns</h4>
732 <p> <code class="literal">true</code> if the two maps are equal, <code class="literal">false</code> otherwise.</p>
734 <p class="since">Since: <a class="link" href="api-index-4-3-0.html#api-index-4.3.0">4.3.0</a></p>
737 <div class="refsect2">
738 <a name="hb-map-hash"></a><h3>hb_map_hash ()</h3>
739 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
740 hb_map_hash (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>);</pre>
741 <p>Creates a hash representing <em class="parameter"><code>map</code></em>
743 <div class="refsect3">
744 <a name="hb-map-hash.parameters"></a><h4>Parameters</h4>
745 <div class="informaltable"><table class="informaltable" width="100%" border="0">
747 <col width="150px" class="parameters_name">
748 <col class="parameters_description">
749 <col width="200px" class="parameters_annotations">
752 <td class="parameter_name"><p>map</p></td>
753 <td class="parameter_description"><p>A map</p></td>
754 <td class="parameter_annotations"> </td>
758 <div class="refsect3">
759 <a name="hb-map-hash.returns"></a><h4>Returns</h4>
760 <p>A hash of <em class="parameter"><code>map</code></em>
763 <p class="since">Since: <a class="link" href="api-index-4-4-0.html#api-index-4.4.0">4.4.0</a></p>
766 <div class="refsect2">
767 <a name="hb-map-update"></a><h3>hb_map_update ()</h3>
768 <pre class="programlisting"><span class="returnvalue">void</span>
769 hb_map_update (<em class="parameter"><code><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
770 <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *other</code></em>);</pre>
771 <p>Add the contents of <em class="parameter"><code>other</code></em>
772 to <em class="parameter"><code>map</code></em>
774 <div class="refsect3">
775 <a name="hb-map-update.parameters"></a><h4>Parameters</h4>
776 <div class="informaltable"><table class="informaltable" width="100%" border="0">
778 <col width="150px" class="parameters_name">
779 <col class="parameters_description">
780 <col width="200px" class="parameters_annotations">
784 <td class="parameter_name"><p>map</p></td>
785 <td class="parameter_description"><p>A map</p></td>
786 <td class="parameter_annotations"> </td>
789 <td class="parameter_name"><p>other</p></td>
790 <td class="parameter_description"><p>Another map</p></td>
791 <td class="parameter_annotations"> </td>
796 <p class="since">Since: <a class="link" href="api-index-7-0-0.html#api-index-7.0.0">7.0.0</a></p>
799 <div class="refsect2">
800 <a name="hb-map-next"></a><h3>hb_map_next ()</h3>
801 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
802 hb_map_next (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
803 <em class="parameter"><code><span class="type">int</span> *idx</code></em>,
804 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> *key</code></em>,
805 <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> *value</code></em>);</pre>
806 <p>Fetches the next key/value pair in <em class="parameter"><code>map</code></em>
808 <p>Set <em class="parameter"><code>idx</code></em>
809 to -1 to get started.</p>
810 <p>If the map is modified during iteration, the behavior is undefined.</p>
811 <p>The order in which the key/values are returned is undefined.</p>
812 <div class="refsect3">
813 <a name="hb-map-next.parameters"></a><h4>Parameters</h4>
814 <div class="informaltable"><table class="informaltable" width="100%" border="0">
816 <col width="150px" class="parameters_name">
817 <col class="parameters_description">
818 <col width="200px" class="parameters_annotations">
822 <td class="parameter_name"><p>map</p></td>
823 <td class="parameter_description"><p>A map</p></td>
824 <td class="parameter_annotations"> </td>
827 <td class="parameter_name"><p>idx</p></td>
828 <td class="parameter_description"><p>Iterator internal state. </p></td>
829 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
832 <td class="parameter_name"><p>key</p></td>
833 <td class="parameter_description"><p>Key retrieved. </p></td>
834 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
837 <td class="parameter_name"><p>value</p></td>
838 <td class="parameter_description"><p>Value retrieved. </p></td>
839 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
844 <div class="refsect3">
845 <a name="hb-map-next.returns"></a><h4>Returns</h4>
846 <p> <code class="literal">true</code> if there was a next value, <code class="literal">false</code> otherwise</p>
848 <p class="since">Since: <a class="link" href="api-index-7-0-0.html#api-index-7.0.0">7.0.0</a></p>
851 <div class="refsect2">
852 <a name="hb-map-keys"></a><h3>hb_map_keys ()</h3>
853 <pre class="programlisting"><span class="returnvalue">void</span>
854 hb_map_keys (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
855 <em class="parameter"><code><a class="link" href="harfbuzz-hb-set.html#hb-set-t" title="hb_set_t"><span class="type">hb_set_t</span></a> *keys</code></em>);</pre>
856 <p>Add the keys of <em class="parameter"><code>map</code></em>
857 to <em class="parameter"><code>keys</code></em>
859 <div class="refsect3">
860 <a name="hb-map-keys.parameters"></a><h4>Parameters</h4>
861 <div class="informaltable"><table class="informaltable" width="100%" border="0">
863 <col width="150px" class="parameters_name">
864 <col class="parameters_description">
865 <col width="200px" class="parameters_annotations">
869 <td class="parameter_name"><p>map</p></td>
870 <td class="parameter_description"><p>A map</p></td>
871 <td class="parameter_annotations"> </td>
874 <td class="parameter_name"><p>keys</p></td>
875 <td class="parameter_description"><p>A set</p></td>
876 <td class="parameter_annotations"> </td>
881 <p class="since">Since: <a class="link" href="api-index-7-0-0.html#api-index-7.0.0">7.0.0</a></p>
884 <div class="refsect2">
885 <a name="hb-map-values"></a><h3>hb_map_values ()</h3>
886 <pre class="programlisting"><span class="returnvalue">void</span>
887 hb_map_values (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> *map</code></em>,
888 <em class="parameter"><code><a class="link" href="harfbuzz-hb-set.html#hb-set-t" title="hb_set_t"><span class="type">hb_set_t</span></a> *values</code></em>);</pre>
889 <p>Add the values of <em class="parameter"><code>map</code></em>
890 to <em class="parameter"><code>values</code></em>
892 <div class="refsect3">
893 <a name="hb-map-values.parameters"></a><h4>Parameters</h4>
894 <div class="informaltable"><table class="informaltable" width="100%" border="0">
896 <col width="150px" class="parameters_name">
897 <col class="parameters_description">
898 <col width="200px" class="parameters_annotations">
902 <td class="parameter_name"><p>map</p></td>
903 <td class="parameter_description"><p>A map</p></td>
904 <td class="parameter_annotations"> </td>
907 <td class="parameter_name"><p>values</p></td>
908 <td class="parameter_description"><p>A set</p></td>
909 <td class="parameter_annotations"> </td>
914 <p class="since">Since: <a class="link" href="api-index-7-0-0.html#api-index-7.0.0">7.0.0</a></p>
917 <div class="refsect1">
918 <a name="harfbuzz-hb-map.other_details"></a><h2>Types and Values</h2>
919 <div class="refsect2">
920 <a name="HB-MAP-VALUE-INVALID:CAPS"></a><h3>HB_MAP_VALUE_INVALID</h3>
921 <pre class="programlisting">#define HB_MAP_VALUE_INVALID HB_CODEPOINT_INVALID
923 <p>Unset <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="type">hb_map_t</span></a> value.</p>
924 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
927 <div class="refsect2">
928 <a name="hb-map-t"></a><h3>hb_map_t</h3>
929 <pre class="programlisting">typedef struct hb_map_t hb_map_t;
931 <p>Data type for holding integer-to-integer hash maps.</p>
936 <hr>Generated by GTK-Doc V1.32</div>