2 * Copyright (C) 2009 Red Hat, Inc.
4 * This is part of HarfBuzz, a text shaping library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Red Hat Author(s): Behdad Esfahbod
30 #include "hb-common.h"
39 typedef struct _hb_unicode_funcs_t hb_unicode_funcs_t;
42 hb_unicode_funcs_create (void);
45 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
48 hb_unicode_funcs_get_reference_count (hb_unicode_funcs_t *ufuncs);
51 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
54 hb_unicode_funcs_copy (hb_unicode_funcs_t *ufuncs);
57 hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
60 hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
69 typedef hb_codepoint_t (*hb_unicode_get_mirroring_func_t) (hb_codepoint_t unicode);
70 typedef hb_unicode_general_category_t (*hb_unicode_get_general_category_func_t) (hb_codepoint_t unicode);
71 typedef hb_script_t (*hb_unicode_get_script_func_t) (hb_codepoint_t unicode);
72 typedef unsigned int (*hb_unicode_get_combining_class_func_t) (hb_codepoint_t unicode);
73 typedef unsigned int (*hb_unicode_get_eastasian_width_func_t) (hb_codepoint_t unicode);
79 hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
80 hb_unicode_get_mirroring_func_t mirroring_func);
83 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
84 hb_unicode_get_general_category_func_t general_category_func);
87 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
88 hb_unicode_get_script_func_t script_func);
91 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
92 hb_unicode_get_combining_class_func_t combining_class_func);
95 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
96 hb_unicode_get_eastasian_width_func_t eastasian_width_func);
101 /* These never return NULL. Return fallback defaults instead. */
103 hb_unicode_get_mirroring_func_t
104 hb_unicode_funcs_get_mirroring_func (hb_unicode_funcs_t *ufuncs);
106 hb_unicode_get_general_category_func_t
107 hb_unicode_funcs_get_general_category_func (hb_unicode_funcs_t *ufuncs);
109 hb_unicode_get_script_func_t
110 hb_unicode_funcs_get_script_func (hb_unicode_funcs_t *ufuncs);
112 hb_unicode_get_combining_class_func_t
113 hb_unicode_funcs_get_combining_class_func (hb_unicode_funcs_t *ufuncs);
115 hb_unicode_get_eastasian_width_func_t
116 hb_unicode_funcs_get_eastasian_width_func (hb_unicode_funcs_t *ufuncs);
122 hb_unicode_get_mirroring (hb_unicode_funcs_t *ufuncs,
123 hb_codepoint_t unicode);
125 hb_unicode_general_category_t
126 hb_unicode_get_general_category (hb_unicode_funcs_t *ufuncs,
127 hb_codepoint_t unicode);
130 hb_unicode_get_script (hb_unicode_funcs_t *ufuncs,
131 hb_codepoint_t unicode);
134 hb_unicode_get_combining_class (hb_unicode_funcs_t *ufuncs,
135 hb_codepoint_t unicode);
138 hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs,
139 hb_codepoint_t unicode);
144 #endif /* HB_UNICODE_H */