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-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
46 <td class="function_name">
47 <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>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
54 <td class="function_name">
55 <a class="link" href="harfbuzz-hb-map.html#hb-map-clear" title="hb_map_clear ()">hb_map_clear</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-create" title="hb_map_create ()">hb_map_create</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-del" title="hb_map_del ()">hb_map_del</a> <span class="c_punctuation">()</span>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
78 <td class="function_name">
79 <a class="link" href="harfbuzz-hb-map.html#hb-map-destroy" title="hb_map_destroy ()">hb_map_destroy</a> <span class="c_punctuation">()</span>
83 <td class="function_type">
84 <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
86 <td class="function_name">
87 <a class="link" href="harfbuzz-hb-map.html#hb-map-get" title="hb_map_get ()">hb_map_get</a> <span class="c_punctuation">()</span>
91 <td class="function_type">
92 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
94 <td class="function_name">
95 <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>
99 <td class="function_type">unsigned <span class="returnvalue">int</span>
101 <td class="function_name">
102 <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>
106 <td class="function_type">
107 <span class="returnvalue">void</span> *
109 <td class="function_name">
110 <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>
114 <td class="function_type">
115 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
117 <td class="function_name">
118 <a class="link" href="harfbuzz-hb-map.html#hb-map-has" title="hb_map_has ()">hb_map_has</a> <span class="c_punctuation">()</span>
122 <td class="function_type">
123 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
125 <td class="function_name">
126 <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>
130 <td class="function_type">
131 <a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t"><span class="returnvalue">hb_map_t</span></a> *
133 <td class="function_name">
134 <a class="link" href="harfbuzz-hb-map.html#hb-map-reference" title="hb_map_reference ()">hb_map_reference</a> <span class="c_punctuation">()</span>
138 <td class="function_type">
139 <span class="returnvalue">void</span>
141 <td class="function_name">
142 <a class="link" href="harfbuzz-hb-map.html#hb-map-set" title="hb_map_set ()">hb_map_set</a> <span class="c_punctuation">()</span>
146 <td class="function_type">
147 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
149 <td class="function_name">
150 <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>
156 <div class="refsect1">
157 <a name="harfbuzz-hb-map.other"></a><h2>Types and Values</h2>
158 <div class="informaltable"><table class="informaltable" width="100%" border="0">
160 <col width="150px" class="other_proto_type">
161 <col class="other_proto_name">
165 <td class="define_keyword">#define</td>
166 <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>
169 <td class="typedef_keyword">typedef</td>
170 <td class="function_name"><a class="link" href="harfbuzz-hb-map.html#hb-map-t" title="hb_map_t">hb_map_t</a></td>
175 <div class="refsect1">
176 <a name="harfbuzz-hb-map.includes"></a><h2>Includes</h2>
177 <pre class="synopsis">#include <hb.h>
180 <div class="refsect1">
181 <a name="harfbuzz-hb-map.description"></a><h2>Description</h2>
182 <p>Map objects are integer-to-integer hash-maps. Currently they are
183 not used in the HarfBuzz public API, but are provided for client's
186 <div class="refsect1">
187 <a name="harfbuzz-hb-map.functions_details"></a><h2>Functions</h2>
188 <div class="refsect2">
189 <a name="hb-map-allocation-successful"></a><h3>hb_map_allocation_successful ()</h3>
190 <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>
191 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>
192 <p>Tests whether memory allocation for a set was successful.</p>
193 <div class="refsect3">
194 <a name="hb-map-allocation-successful.parameters"></a><h4>Parameters</h4>
195 <div class="informaltable"><table class="informaltable" width="100%" border="0">
197 <col width="150px" class="parameters_name">
198 <col class="parameters_description">
199 <col width="200px" class="parameters_annotations">
202 <td class="parameter_name"><p>map</p></td>
203 <td class="parameter_description"><p>A map</p></td>
204 <td class="parameter_annotations"> </td>
208 <div class="refsect3">
209 <a name="hb-map-allocation-successful.returns"></a><h4>Returns</h4>
210 <p> <code class="literal">true</code> if allocation succeeded, <code class="literal">false</code> otherwise</p>
212 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
215 <div class="refsect2">
216 <a name="hb-map-clear"></a><h3>hb_map_clear ()</h3>
217 <pre class="programlisting"><span class="returnvalue">void</span>
218 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>
219 <p>Clears out the contents of <em class="parameter"><code>map</code></em>
221 <div class="refsect3">
222 <a name="hb-map-clear.parameters"></a><h4>Parameters</h4>
223 <div class="informaltable"><table class="informaltable" width="100%" border="0">
225 <col width="150px" class="parameters_name">
226 <col class="parameters_description">
227 <col width="200px" class="parameters_annotations">
230 <td class="parameter_name"><p>map</p></td>
231 <td class="parameter_description"><p>A map</p></td>
232 <td class="parameter_annotations"> </td>
236 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
239 <div class="refsect2">
240 <a name="hb-map-create"></a><h3>hb_map_create ()</h3>
241 <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> *
242 hb_map_create (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
243 <p>Creates a new, initially empty map.</p>
244 <p><span class="annotation">[Xconstructor]</span></p>
245 <div class="refsect3">
246 <a name="hb-map-create.returns"></a><h4>Returns</h4>
247 <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>
248 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
250 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
253 <div class="refsect2">
254 <a name="hb-map-del"></a><h3>hb_map_del ()</h3>
255 <pre class="programlisting"><span class="returnvalue">void</span>
256 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>,
257 <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>
258 <p>Removes <em class="parameter"><code>key</code></em>
259 and its stored value from <em class="parameter"><code>map</code></em>
261 <div class="refsect3">
262 <a name="hb-map-del.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">
271 <td class="parameter_name"><p>map</p></td>
272 <td class="parameter_description"><p>A map</p></td>
273 <td class="parameter_annotations"> </td>
276 <td class="parameter_name"><p>key</p></td>
277 <td class="parameter_description"><p>The key to delete</p></td>
278 <td class="parameter_annotations"> </td>
283 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
286 <div class="refsect2">
287 <a name="hb-map-destroy"></a><h3>hb_map_destroy ()</h3>
288 <pre class="programlisting"><span class="returnvalue">void</span>
289 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>
290 <p>Decreases the reference count on a map. When
291 the reference count reaches zero, the map is
292 destroyed, freeing all memory.</p>
293 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
294 <div class="refsect3">
295 <a name="hb-map-destroy.parameters"></a><h4>Parameters</h4>
296 <div class="informaltable"><table class="informaltable" width="100%" border="0">
298 <col width="150px" class="parameters_name">
299 <col class="parameters_description">
300 <col width="200px" class="parameters_annotations">
303 <td class="parameter_name"><p>map</p></td>
304 <td class="parameter_description"><p>A map</p></td>
305 <td class="parameter_annotations"> </td>
309 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
312 <div class="refsect2">
313 <a name="hb-map-get"></a><h3>hb_map_get ()</h3>
314 <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>
315 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>,
316 <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>
317 <p>Fetches the value stored for <em class="parameter"><code>key</code></em>
318 in <em class="parameter"><code>map</code></em>
320 <div class="refsect3">
321 <a name="hb-map-get.parameters"></a><h4>Parameters</h4>
322 <div class="informaltable"><table class="informaltable" width="100%" border="0">
324 <col width="150px" class="parameters_name">
325 <col class="parameters_description">
326 <col width="200px" class="parameters_annotations">
330 <td class="parameter_name"><p>map</p></td>
331 <td class="parameter_description"><p>A map</p></td>
332 <td class="parameter_annotations"> </td>
335 <td class="parameter_name"><p>key</p></td>
336 <td class="parameter_description"><p>The key to query</p></td>
337 <td class="parameter_annotations"> </td>
342 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
345 <div class="refsect2">
346 <a name="hb-map-get-empty"></a><h3>hb_map_get_empty ()</h3>
347 <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> *
348 hb_map_get_empty (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
349 <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>
350 <div class="refsect3">
351 <a name="hb-map-get-empty.returns"></a><h4>Returns</h4>
352 <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>
353 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
355 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
358 <div class="refsect2">
359 <a name="hb-map-get-population"></a><h3>hb_map_get_population ()</h3>
360 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
361 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>
362 <p>Returns the number of key-value pairs in the map.</p>
363 <div class="refsect3">
364 <a name="hb-map-get-population.parameters"></a><h4>Parameters</h4>
365 <div class="informaltable"><table class="informaltable" width="100%" border="0">
367 <col width="150px" class="parameters_name">
368 <col class="parameters_description">
369 <col width="200px" class="parameters_annotations">
372 <td class="parameter_name"><p>map</p></td>
373 <td class="parameter_description"><p>A map</p></td>
374 <td class="parameter_annotations"> </td>
378 <div class="refsect3">
379 <a name="hb-map-get-population.returns"></a><h4>Returns</h4>
380 <p> The population of <em class="parameter"><code>map</code></em>
383 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
386 <div class="refsect2">
387 <a name="hb-map-get-user-data"></a><h3>hb_map_get_user_data ()</h3>
388 <pre class="programlisting"><span class="returnvalue">void</span> *
389 hb_map_get_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>,
390 <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>
391 <p>Fetches the user data associated with the specified key,
392 attached to the specified map.</p>
393 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
394 <div class="refsect3">
395 <a name="hb-map-get-user-data.parameters"></a><h4>Parameters</h4>
396 <div class="informaltable"><table class="informaltable" width="100%" border="0">
398 <col width="150px" class="parameters_name">
399 <col class="parameters_description">
400 <col width="200px" class="parameters_annotations">
404 <td class="parameter_name"><p>map</p></td>
405 <td class="parameter_description"><p>A map</p></td>
406 <td class="parameter_annotations"> </td>
409 <td class="parameter_name"><p>key</p></td>
410 <td class="parameter_description"><p>The user-data key to query</p></td>
411 <td class="parameter_annotations"> </td>
416 <div class="refsect3">
417 <a name="hb-map-get-user-data.returns"></a><h4>Returns</h4>
418 <p>A pointer to the user data. </p>
419 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
421 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
424 <div class="refsect2">
425 <a name="hb-map-has"></a><h3>hb_map_has ()</h3>
426 <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>
427 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>,
428 <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>
429 <p>Tests whether <em class="parameter"><code>key</code></em>
430 is an element of <em class="parameter"><code>map</code></em>
432 <div class="refsect3">
433 <a name="hb-map-has.parameters"></a><h4>Parameters</h4>
434 <div class="informaltable"><table class="informaltable" width="100%" border="0">
436 <col width="150px" class="parameters_name">
437 <col class="parameters_description">
438 <col width="200px" class="parameters_annotations">
442 <td class="parameter_name"><p>map</p></td>
443 <td class="parameter_description"><p>A map</p></td>
444 <td class="parameter_annotations"> </td>
447 <td class="parameter_name"><p>key</p></td>
448 <td class="parameter_description"><p>The key to query</p></td>
449 <td class="parameter_annotations"> </td>
454 <div class="refsect3">
455 <a name="hb-map-has.returns"></a><h4>Returns</h4>
456 <p> <code class="literal">true</code> if <em class="parameter"><code>key</code></em>
457 is found in <em class="parameter"><code>map</code></em>
458 , <code class="literal">false</code> otherwise</p>
460 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
463 <div class="refsect2">
464 <a name="hb-map-is-empty"></a><h3>hb_map_is_empty ()</h3>
465 <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>
466 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>
467 <p>Tests whether <em class="parameter"><code>map</code></em>
468 is empty (contains no elements).</p>
469 <div class="refsect3">
470 <a name="hb-map-is-empty.parameters"></a><h4>Parameters</h4>
471 <div class="informaltable"><table class="informaltable" width="100%" border="0">
473 <col width="150px" class="parameters_name">
474 <col class="parameters_description">
475 <col width="200px" class="parameters_annotations">
478 <td class="parameter_name"><p>map</p></td>
479 <td class="parameter_description"><p>A map</p></td>
480 <td class="parameter_annotations"> </td>
484 <div class="refsect3">
485 <a name="hb-map-is-empty.returns"></a><h4>Returns</h4>
486 <p> <code class="literal">true</code> if <em class="parameter"><code>map</code></em>
489 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
492 <div class="refsect2">
493 <a name="hb-map-reference"></a><h3>hb_map_reference ()</h3>
494 <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> *
495 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>
496 <p>Increases the reference count on a map.</p>
497 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
498 <div class="refsect3">
499 <a name="hb-map-reference.parameters"></a><h4>Parameters</h4>
500 <div class="informaltable"><table class="informaltable" width="100%" border="0">
502 <col width="150px" class="parameters_name">
503 <col class="parameters_description">
504 <col width="200px" class="parameters_annotations">
507 <td class="parameter_name"><p>map</p></td>
508 <td class="parameter_description"><p>A map</p></td>
509 <td class="parameter_annotations"> </td>
513 <div class="refsect3">
514 <a name="hb-map-reference.returns"></a><h4>Returns</h4>
516 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
518 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
521 <div class="refsect2">
522 <a name="hb-map-set"></a><h3>hb_map_set ()</h3>
523 <pre class="programlisting"><span class="returnvalue">void</span>
524 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>,
525 <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>,
526 <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>
527 <p>Stores <em class="parameter"><code>key</code></em>
528 :<em class="parameter"><code>value</code></em>
530 <div class="refsect3">
531 <a name="hb-map-set.parameters"></a><h4>Parameters</h4>
532 <div class="informaltable"><table class="informaltable" width="100%" border="0">
534 <col width="150px" class="parameters_name">
535 <col class="parameters_description">
536 <col width="200px" class="parameters_annotations">
540 <td class="parameter_name"><p>map</p></td>
541 <td class="parameter_description"><p>A map</p></td>
542 <td class="parameter_annotations"> </td>
545 <td class="parameter_name"><p>key</p></td>
546 <td class="parameter_description"><p>The key to store in the map</p></td>
547 <td class="parameter_annotations"> </td>
550 <td class="parameter_name"><p>value</p></td>
551 <td class="parameter_description"><p>The value to store for <em class="parameter"><code>key</code></em>
553 <td class="parameter_annotations"> </td>
558 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
561 <div class="refsect2">
562 <a name="hb-map-set-user-data"></a><h3>hb_map_set_user_data ()</h3>
563 <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>
564 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>,
565 <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>,
566 <em class="parameter"><code><span class="type">void</span> *data</code></em>,
567 <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>,
568 <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>
569 <p>Attaches a user-data key/data pair to the specified map.</p>
570 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
571 <div class="refsect3">
572 <a name="hb-map-set-user-data.parameters"></a><h4>Parameters</h4>
573 <div class="informaltable"><table class="informaltable" width="100%" border="0">
575 <col width="150px" class="parameters_name">
576 <col class="parameters_description">
577 <col width="200px" class="parameters_annotations">
581 <td class="parameter_name"><p>map</p></td>
582 <td class="parameter_description"><p>A map</p></td>
583 <td class="parameter_annotations"> </td>
586 <td class="parameter_name"><p>key</p></td>
587 <td class="parameter_description"><p>The user-data key to set</p></td>
588 <td class="parameter_annotations"> </td>
591 <td class="parameter_name"><p>data</p></td>
592 <td class="parameter_description"><p>A pointer to the user data to set</p></td>
593 <td class="parameter_annotations"> </td>
596 <td class="parameter_name"><p>destroy</p></td>
597 <td class="parameter_description"><p>A callback to call when <em class="parameter"><code>data</code></em>
598 is not needed anymore. </p></td>
599 <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>
602 <td class="parameter_name"><p>replace</p></td>
603 <td class="parameter_description"><p>Whether to replace an existing data with the same key</p></td>
604 <td class="parameter_annotations"> </td>
609 <div class="refsect3">
610 <a name="hb-map-set-user-data.returns"></a><h4>Returns</h4>
611 <p> <code class="literal">true</code> if success, <code class="literal">false</code> otherwise</p>
613 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
616 <div class="refsect1">
617 <a name="harfbuzz-hb-map.other_details"></a><h2>Types and Values</h2>
618 <div class="refsect2">
619 <a name="HB-MAP-VALUE-INVALID:CAPS"></a><h3>HB_MAP_VALUE_INVALID</h3>
620 <pre class="programlisting">#define HB_MAP_VALUE_INVALID ((hb_codepoint_t) -1)
622 <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>
623 <p class="since">Since: <a class="link" href="api-index-1-7-7.html#api-index-1.7.7">1.7.7</a></p>
626 <div class="refsect2">
627 <a name="hb-map-t"></a><h3>hb_map_t</h3>
628 <pre class="programlisting">typedef struct hb_map_t hb_map_t;
630 <p>Data type for holding integer-to-integer hash maps.</p>
635 <hr>Generated by GTK-Doc V1.32</div>