~alcinnz/harfbuzz-pure

ref: 9f5f9d846191c5785a723c2a20dcb8089721f749 harfbuzz-pure/c-bits/hbc-buffer.c -rw-r--r-- 7.9 KiB
9f5f9d84 — Adrian Cochrane Try adding C++ to Haskell bridge via C. 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
#include <hb-buffer.h>

extern "C" {

hb_glyph_flags_t hbc_glyph_info_get_glyph_flags (const hb_glyph_info_t *info) {
    return hb_glyph_info_get_glyph_flags (info);
}

hb_bool_t hbc_segment_properties_equal (const hb_segment_properties_t *a,
			     const hb_segment_properties_t *b) {
    return hb_segment_properties_equal (a, b)
}

unsigned int hbc_segment_properties_hash (const hb_segment_properties_t *p) {
    return hb_segment_properties_hash (p);
}

void hbc_segment_properties_overlay (hb_segment_properties_t *p,
			       const hb_segment_properties_t *src) {
    return hb_segment_properties_overlay (p, src);
}

hb_buffer_t *hbc_buffer_create () {
    return hb_buffer_create ();
}

hb_buffer_t *hbc_buffer_create_similar (const hb_buffer_t *src) {
    return hb_buffer_create_similar (src);
}

void hbc_buffer_reset (hb_buffer_t *buffer) {
    return hb_buffer_reset (buffer);
}

hb_buffer_t * hbc_buffer_get_empty (void) {
    return hb_buffer_get_empty ();
}

hb_buffer_t *hbc_buffer_reference (hb_buffer_t *buffer) {
    return hb_buffer_reference (buffer);
}

void hbc_buffer_destroy (hb_buffer_t *buffer) {
    return hb_buffer_destroy (buffer);
}

hb_bool_t hbc_buffer_set_user_data (hb_buffer_t        *buffer,
			 hb_user_data_key_t *key,
			 void *              data,
			 hb_destroy_func_t   destroy,
			 hb_bool_t           replace) {
    return hb_buffer_set_user_data (buffer, key, data, destroy, replace);
}

void * hbc_buffer_get_user_data (hb_buffer_t        *buffer,
			 hb_user_data_key_t *key) {
    return hb_buffer_get_user_data (buffer, key);
}

void hb_buffer_set_content_type (hb_buffer_t              *buffer,
			    hb_buffer_content_type_t  content_type) {
    return hb_buffer_set_content_type (buffer, content_type);
}

hb_buffer_content_type_t hb_buffer_get_content_type (hb_buffer_t *buffer) {
    return hb_buffer_get_content_type (buffer);
}

void hbc_buffer_set_unicode_funcs (hb_buffer_t        *buffer,
			     hb_unicode_funcs_t *unicode_funcs) {
    return hb_buffer_set_unicode_funcs (buffer, unicode_funcs);
}

hb_unicode_funcs_t *hbc_buffer_get_unicode_funcs (hb_buffer_t* buffer) {
    return hb_buffer_get_unicode_funcs (buffer);
}

void hbc_buffer_set_direction (hb_buffer_t    *buffer,
			 hb_direction_t  direction) {
    return hb_buffer_set_direction (buffer, direction);
}

hb_direction_t hbc_buffer_get_direction (hb_buffer_t *buffer) {
    return hb_buffer_get_direction (buffer);
}

void hbc_buffer_set_script (hb_buffer_t *buffer,
		      hb_script_t  script) {
    return hb_buffer_set_script (*buffer, script);
}

hb_script_t hbc_buffer_get_script (hb_buffer_t *buffer) {
    return hb_buffer_get_script (buffer);
}

void hbc_buffer_set_language (hb_buffer_t   *buffer,
			hb_language_t  language) {
    return hb_buffer_set_language (buffer, language);
}

hb_language_t hbc_buffer_get_language (hb_buffer_t *buffer) {
    return hb_buffer_get_language (buffer);
}

void hbc_buffer_set_segment_properties (hb_buffer_t *buffer,
				  const hb_segment_properties_t *props) {
    return hb_buffer_set_segment_properties (buffer, props);
}

void hbc_buffer_get_segment_properties (hb_buffer_t *buffer,
				  hb_segment_properties_t *props) {
    return hb_buffer_get_segment_properties (buffer, props);
}

void hbc_buffer_guess_segment_properties (hb_buffer_t *buffer) {
    return hb_buffer_guess_segment_properties ();
}

void hbc_buffer_set_flags (hb_buffer_t       *buffer,
		     hb_buffer_flags_t  flags) {
    return hb_buffer_set_flags (buffer, flags);
}

hb_buffer_flags_t hbc_buffer_get_flags (hb_buffer_t *buffer) {
    return hb_buffer_get_flags (buffer);
}

void hbc_buffer_set_cluster_level (hb_buffer_t               *buffer,
			     hb_buffer_cluster_level_t  cluster_level) {
    return hb_buffer_set_cluster_level (buffer, cluster_level);
}

hb_buffer_cluster_level_t hbc_buffer_get_cluster_level (hb_buffer_t *buffer) {
    return hb_buffer_get_cluster_level (buffer);
}

void hbc_buffer_set_replacement_codepoint (hb_buffer_t    *buffer,
				     hb_codepoint_t  replacement) {
    return hb_buffer_set_replacement_codepoint (buffer, replacement);
}

hb_codepoint_t hbc_buffer_get_replacement_codepoint (hb_buffer_t    *buffer) {
    return hb_buffer_get_replacement_codepoint (buffer);
}

void hbc_buffer_set_invisible_glyph (hb_buffer_t    *buffer,
			       hb_codepoint_t  invisible) {
    return hb_buffer_set_invisible_glyph (*buffer, invisible);
}

hb_codepoint_t hbc_buffer_get_invisible_glyph (hb_buffer_t    *buffer) {
    return hb_buffer_get_invisible_glyph (buffer);
}

void hbc_buffer_set_not_found_glyph (hb_buffer_t    *buffer,
			       hb_codepoint_t  not_found) {
    return hb_buffer_set_not_found_glyph (buffer, not_found);
}

hb_codepoint_t hb_buffer_get_not_found_glyph (hb_buffer_t    *buffer) {
    return hb_buffer_get_not_found_glyph (buffer);
}

void hbc_buffer_clear_contents (hb_buffer_t *buffer) {
    return hb_buffer_clear_contents (buffer);
}

hb_bool_t hbc_buffer_pre_allocate (hb_buffer_t  *buffer,
			unsigned int  size) {
    return hb_buffer_pre_allocate (buffer, size);
}

hb_bool_t hbc_buffer_allocation_successful (hb_buffer_t  *buffer) {
    return hb_buffer_allocation_successful (buffer);
}

void hbc_buffer_reverse (hb_buffer_t *buffer) {
    return hb_buffer_reverse (buffer);
}

void hbc_buffer_reverse_range (hb_buffer_t *buffer,
			 unsigned int start, unsigned int end) {
    return hb_buffer_reverse_range (buffer, start, end);
}

void hbc_buffer_reverse_clusters (hb_buffer_t *buffer) {
    return hb_buffer_reverse_clusters (buffer);
}

void hbc_buffer_add (hb_buffer_t    *buffer,
	       hb_codepoint_t  codepoint,
	       unsigned int    cluster) {
    hb_buffer_add (buffer, codepoint, cluster);
}

void hbc_buffer_add_utf8 (hb_buffer_t  *buffer,
		    const char   *text,
		    int           text_length,
		    unsigned int  item_offset,
		    int           item_length) {
    hb_buffer_add_utf8 (buffer, text, text_length, item_offset, item_length);
}

void hbc_buffer_add_utf16 (hb_buffer_t    *buffer,
		     const uint16_t *text,
		     int             text_length,
		     unsigned int    item_offset,
		     int             item_length) {
    hb_buffer_add_utf16 (buffer, text, text_length, item_offset, item_length);
}

void hbc_buffer_add_utf32 (hb_buffer_t    *buffer,
		     const uint32_t *text,
		     int             text_length,
		     unsigned int    item_offset,
		     int             item_length) {
    hb_buffer_add_utf32 (buffer, text, text_length, item_offset, item_length);
}

void hbc_buffer_add_latin1 (hb_buffer_t   *buffer,
		      const uint8_t *text,
		      int            text_length,
		      unsigned int   item_offset,
		      int            item_length) {
    hb_buffer_add_latin1 (buffer, text, text_length, item_offset, item_length);
}

void hbc_buffer_add_codepoints (hb_buffer_t          *buffer,
			  const hb_codepoint_t *text,
			  int                   text_length,
			  unsigned int          item_offset,
			  int                   item_length) {
    hb_buffer_add_codepoints (buffer, text, text_length, item_offset, item_length);
}

void hbc_buffer_append (hb_buffer_t *buffer,
		  const hb_buffer_t *source,
		  unsigned int start,
		  unsigned int end) {
    hb_buffer_append (buffer, source, start, end);
}

hb_bool_t hbc_buffer_set_length (hb_buffer_t  *buffer,
		      unsigned int  length) {
    return hb_buffer_set_length (buffer, length);
}

unsigned int hbc_buffer_get_length (hb_buffer_t *buffer) {
    return hb_buffer_get_length (buffer);
}

hb_glyph_info_t *hbc_buffer_get_glyph_infos (hb_buffer_t  *buffer,
			   unsigned int *length) {
    return hb_buffer_get_glyph_infos (buffer, length);
}

hb_glyph_position_t *hbc_buffer_get_glyph_positions (hb_buffer_t  *buffer,
			       unsigned int *length) {
    return hb_buffer_get_glyph_positions (buffer, length);
}

hb_bool_t hbc_buffer_has_positions (hb_buffer_t  *buffer) {
    return hb_buffer_has_positions (buffer);
}

void hbc_buffer_normalize_glyphs (hb_buffer_t *buffer) {
    hb_buffer_normalize_glyphs (buffer);
}

}