make cleanup and some bash-ism removal
[charfbuzz.git] / hb-buffer-private.h
blob045519300e0994a11484696fa5c533663e4338db
1 #ifndef HB_BUFFER_PRIVATE_H
2 #define HB_BUFFER_PRIVATE_H
3 struct hb_buffer_t {
4 atomic_int32_t ref_cnt;
5 hb_unicode_funcs_t *unicode;//Unicode functions
6 hb_segment_properties_t props;//Script, language, direction
7 hb_buffer_flags_t flags;//BOT / EOT / etc.
9 //Buffer contents
11 hb_buffer_content_type_t content_type;
13 hb_bool_t in_error;//Allocation failed
14 hb_bool_t have_output;//Whether we have an output buffer going on
15 hb_bool_t have_positions;//Whether we have positions
17 unsigned idx;//Cursor into ->info and ->pos arrays
18 unsigned len;//Length of ->info and ->pos arrays
19 unsigned out_len;//Length of ->out array if have_output
21 unsigned allocated;//Length of allocated arrays
22 hb_glyph_info_t *info;
23 hb_glyph_info_t *out_info;
24 hb_glyph_position_t *pos;
26 unsigned serial;
28 //These reflect current allocations of the bytes in glyph_info_t's var1 and
29 //var2.
30 uint8_t allocated_var_bytes[8];
31 const char *allocated_var_owner[8];
33 //Text before / after the main buffer contents.
34 //Always in Unicode, and ordered outward.
35 //Index 0 is for "pre-context", 1 for "post-context".
36 #define HB_BUFFER_CONTEXT_LENGTH 5
37 hb_codepoint_t context[2][HB_BUFFER_CONTEXT_LENGTH];
38 unsigned context_len[2];
41 void
42 hb_buffer_clear_positions(hb_buffer_t *buffer);
43 #endif