2 * Copyright © 2009 Red Hat, Inc.
3 * Copyright © 2011 Codethink Limited
4 * Copyright © 2011 Google, Inc.
6 * This is part of HarfBuzz, a text shaping library.
8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the
11 * above copyright notice and the following two paragraphs appear in
12 * all copies of this software.
14 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
15 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
17 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
20 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
21 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
26 * Red Hat Author(s): Behdad Esfahbod
27 * Codethink Author(s): Ryan Lortie
28 * Google Author(s): Behdad Esfahbod
34 #include "hb-common.h"
43 typedef struct _hb_unicode_funcs_t hb_unicode_funcs_t;
47 * just give me the best implementation you've got there.
50 hb_unicode_funcs_get_default (void);
54 hb_unicode_funcs_create (hb_unicode_funcs_t *parent);
57 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
60 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
63 hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
64 hb_user_data_key_t *key,
66 hb_destroy_func_t destroy);
70 hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
71 hb_user_data_key_t *key);
75 hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
78 hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
81 hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
90 typedef unsigned int (*hb_unicode_get_combining_class_func_t) (hb_unicode_funcs_t *ufuncs,
91 hb_codepoint_t unicode,
93 typedef unsigned int (*hb_unicode_get_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,
94 hb_codepoint_t unicode,
96 typedef hb_unicode_general_category_t (*hb_unicode_get_general_category_func_t) (hb_unicode_funcs_t *ufuncs,
97 hb_codepoint_t unicode,
99 typedef hb_codepoint_t (*hb_unicode_get_mirroring_func_t) (hb_unicode_funcs_t *ufuncs,
100 hb_codepoint_t unicode,
102 typedef hb_script_t (*hb_unicode_get_script_func_t) (hb_unicode_funcs_t *ufuncs,
103 hb_codepoint_t unicode,
109 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
110 hb_unicode_get_combining_class_func_t combining_class_func,
111 void *user_data, hb_destroy_func_t destroy);
114 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
115 hb_unicode_get_eastasian_width_func_t eastasian_width_func,
116 void *user_data, hb_destroy_func_t destroy);
119 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
120 hb_unicode_get_general_category_func_t general_category_func,
121 void *user_data, hb_destroy_func_t destroy);
124 hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
125 hb_unicode_get_mirroring_func_t mirroring_func,
126 void *user_data, hb_destroy_func_t destroy);
129 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
130 hb_unicode_get_script_func_t script_func,
131 void *user_data, hb_destroy_func_t destroy);
138 hb_unicode_get_combining_class (hb_unicode_funcs_t *ufuncs,
139 hb_codepoint_t unicode);
142 hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs,
143 hb_codepoint_t unicode);
145 hb_unicode_general_category_t
146 hb_unicode_get_general_category (hb_unicode_funcs_t *ufuncs,
147 hb_codepoint_t unicode);
150 hb_unicode_get_mirroring (hb_unicode_funcs_t *ufuncs,
151 hb_codepoint_t unicode);
154 hb_unicode_get_script (hb_unicode_funcs_t *ufuncs,
155 hb_codepoint_t unicode);
160 #endif /* HB_UNICODE_H */