c49a42b3ca03dbfb3aa08dc87645d29480d45c38
[platform/upstream/harfbuzz.git] / docs / html / harfbuzz-hb-map.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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>
19 </td>
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>
24 </tr></table>
25 <div class="refentry">
26 <a name="harfbuzz-hb-map"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
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>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
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">
37 <colgroup>
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
40 </colgroup>
41 <tbody>
42 <tr>
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>
45 </td>
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>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
53 </td>
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>
56 </td>
57 </tr>
58 <tr>
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> *
61 </td>
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>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
69 </td>
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>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
77 </td>
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>
80 </td>
81 </tr>
82 <tr>
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>
85 </td>
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>
88 </td>
89 </tr>
90 <tr>
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> *
93 </td>
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>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">unsigned <span class="returnvalue">int</span>
100 </td>
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>
103 </td>
104 </tr>
105 <tr>
106 <td class="function_type">
107 <span class="returnvalue">void</span> *
108 </td>
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>
111 </td>
112 </tr>
113 <tr>
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>
116 </td>
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>
119 </td>
120 </tr>
121 <tr>
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>
124 </td>
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>
127 </td>
128 </tr>
129 <tr>
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> *
132 </td>
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>
135 </td>
136 </tr>
137 <tr>
138 <td class="function_type">
139 <span class="returnvalue">void</span>
140 </td>
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>
143 </td>
144 </tr>
145 <tr>
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>
148 </td>
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>
151 </td>
152 </tr>
153 </tbody>
154 </table></div>
155 </div>
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">
159 <colgroup>
160 <col width="150px" class="other_proto_type">
161 <col class="other_proto_name">
162 </colgroup>
163 <tbody>
164 <tr>
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>
167 </tr>
168 <tr>
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>
171 </tr>
172 </tbody>
173 </table></div>
174 </div>
175 <div class="refsect1">
176 <a name="harfbuzz-hb-map.includes"></a><h2>Includes</h2>
177 <pre class="synopsis">#include &lt;hb.h&gt;
178 </pre>
179 </div>
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
184 use if desired.</p>
185 </div>
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">
196 <colgroup>
197 <col width="150px" class="parameters_name">
198 <col class="parameters_description">
199 <col width="200px" class="parameters_annotations">
200 </colgroup>
201 <tbody><tr>
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>
205 </tr></tbody>
206 </table></div>
207 </div>
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>
211 </div>
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>
213 </div>
214 <hr>
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>
220 .</p>
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">
224 <colgroup>
225 <col width="150px" class="parameters_name">
226 <col class="parameters_description">
227 <col width="200px" class="parameters_annotations">
228 </colgroup>
229 <tbody><tr>
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>
233 </tr></tbody>
234 </table></div>
235 </div>
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>
237 </div>
238 <hr>
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>
249 </div>
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>
251 </div>
252 <hr>
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>
260 .</p>
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">
264 <colgroup>
265 <col width="150px" class="parameters_name">
266 <col class="parameters_description">
267 <col width="200px" class="parameters_annotations">
268 </colgroup>
269 <tbody>
270 <tr>
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>
274 </tr>
275 <tr>
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>
279 </tr>
280 </tbody>
281 </table></div>
282 </div>
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>
284 </div>
285 <hr>
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">
297 <colgroup>
298 <col width="150px" class="parameters_name">
299 <col class="parameters_description">
300 <col width="200px" class="parameters_annotations">
301 </colgroup>
302 <tbody><tr>
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>
306 </tr></tbody>
307 </table></div>
308 </div>
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>
310 </div>
311 <hr>
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>
319 .</p>
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">
323 <colgroup>
324 <col width="150px" class="parameters_name">
325 <col class="parameters_description">
326 <col width="200px" class="parameters_annotations">
327 </colgroup>
328 <tbody>
329 <tr>
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>
333 </tr>
334 <tr>
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>
338 </tr>
339 </tbody>
340 </table></div>
341 </div>
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>
343 </div>
344 <hr>
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>
354 </div>
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>
356 </div>
357 <hr>
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">
366 <colgroup>
367 <col width="150px" class="parameters_name">
368 <col class="parameters_description">
369 <col width="200px" class="parameters_annotations">
370 </colgroup>
371 <tbody><tr>
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>
375 </tr></tbody>
376 </table></div>
377 </div>
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>
381 </p>
382 </div>
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>
384 </div>
385 <hr>
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">
397 <colgroup>
398 <col width="150px" class="parameters_name">
399 <col class="parameters_description">
400 <col width="200px" class="parameters_annotations">
401 </colgroup>
402 <tbody>
403 <tr>
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>
407 </tr>
408 <tr>
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>
412 </tr>
413 </tbody>
414 </table></div>
415 </div>
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>
420 </div>
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>
422 </div>
423 <hr>
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>
431 .</p>
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">
435 <colgroup>
436 <col width="150px" class="parameters_name">
437 <col class="parameters_description">
438 <col width="200px" class="parameters_annotations">
439 </colgroup>
440 <tbody>
441 <tr>
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>
445 </tr>
446 <tr>
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>
450 </tr>
451 </tbody>
452 </table></div>
453 </div>
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>
459 </div>
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>
461 </div>
462 <hr>
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">
472 <colgroup>
473 <col width="150px" class="parameters_name">
474 <col class="parameters_description">
475 <col width="200px" class="parameters_annotations">
476 </colgroup>
477 <tbody><tr>
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>
481 </tr></tbody>
482 </table></div>
483 </div>
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>
487 is empty</p>
488 </div>
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>
490 </div>
491 <hr>
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">
501 <colgroup>
502 <col width="150px" class="parameters_name">
503 <col class="parameters_description">
504 <col width="200px" class="parameters_annotations">
505 </colgroup>
506 <tbody><tr>
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>
510 </tr></tbody>
511 </table></div>
512 </div>
513 <div class="refsect3">
514 <a name="hb-map-reference.returns"></a><h4>Returns</h4>
515 <p>The map. </p>
516 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
517 </div>
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>
519 </div>
520 <hr>
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>
529  in the map.</p>
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">
533 <colgroup>
534 <col width="150px" class="parameters_name">
535 <col class="parameters_description">
536 <col width="200px" class="parameters_annotations">
537 </colgroup>
538 <tbody>
539 <tr>
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>
543 </tr>
544 <tr>
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>
548 </tr>
549 <tr>
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>
552 </p></td>
553 <td class="parameter_annotations"> </td>
554 </tr>
555 </tbody>
556 </table></div>
557 </div>
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>
559 </div>
560 <hr>
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">
574 <colgroup>
575 <col width="150px" class="parameters_name">
576 <col class="parameters_description">
577 <col width="200px" class="parameters_annotations">
578 </colgroup>
579 <tbody>
580 <tr>
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>
584 </tr>
585 <tr>
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>
589 </tr>
590 <tr>
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>
594 </tr>
595 <tr>
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>
600 </tr>
601 <tr>
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>
605 </tr>
606 </tbody>
607 </table></div>
608 </div>
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>
612 </div>
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>
614 </div>
615 </div>
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)
621 </pre>
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>
624 </div>
625 <hr>
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;
629 </pre>
630 <p>Data type for holding integer-to-integer hash maps.</p>
631 </div>
632 </div>
633 </div>
634 <div class="footer">
635 <hr>Generated by GTK-Doc V1.32</div>
636 </body>
637 </html>