2 * Copyright (C) 2009 Red Hat, Inc.
3 * Copyright © 2011 Codethink Limited
5 * This is part of HarfBuzz, a text shaping library.
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 * Red Hat Author(s): Behdad Esfahbod
26 * Codethink Author(s): Ryan Lortie
32 #include "hb-common.h"
41 typedef struct _hb_unicode_funcs_t hb_unicode_funcs_t;
44 hb_unicode_funcs_create (hb_unicode_funcs_t *parent_funcs);
47 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
50 hb_unicode_funcs_get_reference_count (hb_unicode_funcs_t *ufuncs);
53 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
56 hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
59 hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
62 hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
71 typedef hb_codepoint_t (*hb_unicode_get_mirroring_func_t) (hb_unicode_funcs_t *ufuncs,
72 hb_codepoint_t unicode,
74 typedef hb_unicode_general_category_t (*hb_unicode_get_general_category_func_t) (hb_unicode_funcs_t *ufuncs,
75 hb_codepoint_t unicode,
77 typedef hb_script_t (*hb_unicode_get_script_func_t) (hb_unicode_funcs_t *ufuncs,
78 hb_codepoint_t unicode,
80 typedef unsigned int (*hb_unicode_get_combining_class_func_t) (hb_unicode_funcs_t *ufuncs,
81 hb_codepoint_t unicode,
83 typedef unsigned int (*hb_unicode_get_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,
84 hb_codepoint_t unicode,
90 hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
91 hb_unicode_get_mirroring_func_t mirroring_func,
92 void *user_data, hb_destroy_func_t destroy);
95 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
96 hb_unicode_get_general_category_func_t general_category_func,
97 void *user_data, hb_destroy_func_t destroy);
100 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
101 hb_unicode_get_script_func_t script_func,
102 void *user_data, hb_destroy_func_t destroy);
105 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
106 hb_unicode_get_combining_class_func_t combining_class_func,
107 void *user_data, hb_destroy_func_t destroy);
110 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
111 hb_unicode_get_eastasian_width_func_t eastasian_width_func,
112 void *user_data, hb_destroy_func_t destroy);
118 hb_unicode_get_mirroring (hb_unicode_funcs_t *ufuncs,
119 hb_codepoint_t unicode);
121 hb_unicode_general_category_t
122 hb_unicode_get_general_category (hb_unicode_funcs_t *ufuncs,
123 hb_codepoint_t unicode);
126 hb_unicode_get_script (hb_unicode_funcs_t *ufuncs,
127 hb_codepoint_t unicode);
130 hb_unicode_get_combining_class (hb_unicode_funcs_t *ufuncs,
131 hb_codepoint_t unicode);
134 hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs,
135 hb_codepoint_t unicode);
140 #endif /* HB_UNICODE_H */