Lines Matching refs:buffer
683 hb_buffer_t *buffer; in hb_buffer_create() local
685 if (!(buffer = hb_object_create<hb_buffer_t> ())) in hb_buffer_create()
688 buffer->max_len = HB_BUFFER_MAX_LEN_DEFAULT; in hb_buffer_create()
690 buffer->reset (); in hb_buffer_create()
692 return buffer; in hb_buffer_create()
742 hb_buffer_reference (hb_buffer_t *buffer) in hb_buffer_reference() argument
744 return hb_object_reference (buffer); in hb_buffer_reference()
758 hb_buffer_destroy (hb_buffer_t *buffer) in hb_buffer_destroy() argument
760 if (!hb_object_destroy (buffer)) return; in hb_buffer_destroy()
762 hb_unicode_funcs_destroy (buffer->unicode); in hb_buffer_destroy()
764 free (buffer->info); in hb_buffer_destroy()
765 free (buffer->pos); in hb_buffer_destroy()
766 if (buffer->message_destroy) in hb_buffer_destroy()
767 buffer->message_destroy (buffer->message_data); in hb_buffer_destroy()
769 free (buffer); in hb_buffer_destroy()
787 hb_buffer_set_user_data (hb_buffer_t *buffer, in hb_buffer_set_user_data() argument
793 return hb_object_set_user_data (buffer, key, data, destroy, replace); in hb_buffer_set_user_data()
808 hb_buffer_get_user_data (hb_buffer_t *buffer, in hb_buffer_get_user_data() argument
811 return hb_object_get_user_data (buffer, key); in hb_buffer_get_user_data()
826 hb_buffer_set_content_type (hb_buffer_t *buffer, in hb_buffer_set_content_type() argument
829 buffer->content_type = content_type; in hb_buffer_set_content_type()
844 hb_buffer_get_content_type (hb_buffer_t *buffer) in hb_buffer_get_content_type() argument
846 return buffer->content_type; in hb_buffer_get_content_type()
860 hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, in hb_buffer_set_unicode_funcs() argument
863 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_unicode_funcs()
871 hb_unicode_funcs_destroy (buffer->unicode); in hb_buffer_set_unicode_funcs()
872 buffer->unicode = unicode_funcs; in hb_buffer_set_unicode_funcs()
886 hb_buffer_get_unicode_funcs (hb_buffer_t *buffer) in hb_buffer_get_unicode_funcs() argument
888 return buffer->unicode; in hb_buffer_get_unicode_funcs()
907 hb_buffer_set_direction (hb_buffer_t *buffer, in hb_buffer_set_direction() argument
911 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_direction()
914 buffer->props.direction = direction; in hb_buffer_set_direction()
929 hb_buffer_get_direction (hb_buffer_t *buffer) in hb_buffer_get_direction() argument
931 return buffer->props.direction; in hb_buffer_get_direction()
952 hb_buffer_set_script (hb_buffer_t *buffer, in hb_buffer_set_script() argument
955 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_script()
958 buffer->props.script = script; in hb_buffer_set_script()
973 hb_buffer_get_script (hb_buffer_t *buffer) in hb_buffer_get_script() argument
975 return buffer->props.script; in hb_buffer_get_script()
996 hb_buffer_set_language (hb_buffer_t *buffer, in hb_buffer_set_language() argument
999 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_language()
1002 buffer->props.language = language; in hb_buffer_set_language()
1017 hb_buffer_get_language (hb_buffer_t *buffer) in hb_buffer_get_language() argument
1019 return buffer->props.language; in hb_buffer_get_language()
1034 hb_buffer_set_segment_properties (hb_buffer_t *buffer, in hb_buffer_set_segment_properties() argument
1037 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_segment_properties()
1040 buffer->props = *props; in hb_buffer_set_segment_properties()
1053 hb_buffer_get_segment_properties (hb_buffer_t *buffer, in hb_buffer_get_segment_properties() argument
1056 *props = buffer->props; in hb_buffer_get_segment_properties()
1070 hb_buffer_set_flags (hb_buffer_t *buffer, in hb_buffer_set_flags() argument
1073 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_flags()
1076 buffer->flags = flags; in hb_buffer_set_flags()
1091 hb_buffer_get_flags (hb_buffer_t *buffer) in hb_buffer_get_flags() argument
1093 return buffer->flags; in hb_buffer_get_flags()
1106 hb_buffer_set_cluster_level (hb_buffer_t *buffer, in hb_buffer_set_cluster_level() argument
1109 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_cluster_level()
1112 buffer->cluster_level = cluster_level; in hb_buffer_set_cluster_level()
1126 hb_buffer_get_cluster_level (hb_buffer_t *buffer) in hb_buffer_get_cluster_level() argument
1128 return buffer->cluster_level; in hb_buffer_get_cluster_level()
1145 hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, in hb_buffer_set_replacement_codepoint() argument
1148 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_replacement_codepoint()
1151 buffer->replacement = replacement; in hb_buffer_set_replacement_codepoint()
1166 hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer) in hb_buffer_get_replacement_codepoint() argument
1168 return buffer->replacement; in hb_buffer_get_replacement_codepoint()
1182 hb_buffer_reset (hb_buffer_t *buffer) in hb_buffer_reset() argument
1184 buffer->reset (); in hb_buffer_reset()
1197 hb_buffer_clear_contents (hb_buffer_t *buffer) in hb_buffer_clear_contents() argument
1199 buffer->clear (); in hb_buffer_clear_contents()
1215 hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size) in hb_buffer_pre_allocate() argument
1217 return buffer->ensure (size); in hb_buffer_pre_allocate()
1232 hb_buffer_allocation_successful (hb_buffer_t *buffer) in hb_buffer_allocation_successful() argument
1234 return !buffer->in_error; in hb_buffer_allocation_successful()
1255 hb_buffer_add (hb_buffer_t *buffer, in hb_buffer_add() argument
1259 buffer->add (codepoint, cluster); in hb_buffer_add()
1260 buffer->clear_context (1); in hb_buffer_add()
1277 hb_buffer_set_length (hb_buffer_t *buffer, in hb_buffer_set_length() argument
1280 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_set_length()
1283 if (!buffer->ensure (length)) in hb_buffer_set_length()
1287 if (length > buffer->len) { in hb_buffer_set_length()
1288 memset (buffer->info + buffer->len, 0, sizeof (buffer->info[0]) * (length - buffer->len)); in hb_buffer_set_length()
1289 if (buffer->have_positions) in hb_buffer_set_length()
1290 memset (buffer->pos + buffer->len, 0, sizeof (buffer->pos[0]) * (length - buffer->len)); in hb_buffer_set_length()
1293 buffer->len = length; in hb_buffer_set_length()
1297 buffer->content_type = HB_BUFFER_CONTENT_TYPE_INVALID; in hb_buffer_set_length()
1298 buffer->clear_context (0); in hb_buffer_set_length()
1300 buffer->clear_context (1); in hb_buffer_set_length()
1318 hb_buffer_get_length (hb_buffer_t *buffer) in hb_buffer_get_length() argument
1320 return buffer->len; in hb_buffer_get_length()
1338 hb_buffer_get_glyph_infos (hb_buffer_t *buffer, in hb_buffer_get_glyph_infos() argument
1342 *length = buffer->len; in hb_buffer_get_glyph_infos()
1344 return (hb_glyph_info_t *) buffer->info; in hb_buffer_get_glyph_infos()
1362 hb_buffer_get_glyph_positions (hb_buffer_t *buffer, in hb_buffer_get_glyph_positions() argument
1365 if (!buffer->have_positions) in hb_buffer_get_glyph_positions()
1366 buffer->clear_positions (); in hb_buffer_get_glyph_positions()
1369 *length = buffer->len; in hb_buffer_get_glyph_positions()
1371 return (hb_glyph_position_t *) buffer->pos; in hb_buffer_get_glyph_positions()
1383 hb_buffer_reverse (hb_buffer_t *buffer) in hb_buffer_reverse() argument
1385 buffer->reverse (); in hb_buffer_reverse()
1399 hb_buffer_reverse_range (hb_buffer_t *buffer, in hb_buffer_reverse_range() argument
1402 buffer->reverse_range (start, end); in hb_buffer_reverse_range()
1416 hb_buffer_reverse_clusters (hb_buffer_t *buffer) in hb_buffer_reverse_clusters() argument
1418 buffer->reverse_clusters (); in hb_buffer_reverse_clusters()
1446 hb_buffer_guess_segment_properties (hb_buffer_t *buffer) in hb_buffer_guess_segment_properties() argument
1448 buffer->guess_segment_properties (); in hb_buffer_guess_segment_properties()
1453 hb_buffer_add_utf (hb_buffer_t *buffer, in hb_buffer_add_utf() argument
1460 const hb_codepoint_t replacement = buffer->replacement; in hb_buffer_add_utf()
1462 assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || in hb_buffer_add_utf()
1463 (!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); in hb_buffer_add_utf()
1465 if (unlikely (hb_object_is_inert (buffer))) in hb_buffer_add_utf()
1474 buffer->ensure (buffer->len + item_length * sizeof (T) / 4); in hb_buffer_add_utf()
1483 if (!buffer->len && item_offset > 0) in hb_buffer_add_utf()
1486 buffer->clear_context (0); in hb_buffer_add_utf()
1489 while (start < prev && buffer->context_len[0] < buffer->CONTEXT_LENGTH) in hb_buffer_add_utf()
1493 buffer->context[0][buffer->context_len[0]++] = u; in hb_buffer_add_utf()
1504 buffer->add (u, old_next - (const T *) text); in hb_buffer_add_utf()
1508 buffer->clear_context (1); in hb_buffer_add_utf()
1510 while (next < end && buffer->context_len[1] < buffer->CONTEXT_LENGTH) in hb_buffer_add_utf()
1514 buffer->context[1][buffer->context_len[1]++] = u; in hb_buffer_add_utf()
1517 buffer->content_type = HB_BUFFER_CONTENT_TYPE_UNICODE; in hb_buffer_add_utf()
1538 hb_buffer_add_utf8 (hb_buffer_t *buffer, in hb_buffer_add_utf8() argument
1544 …hb_buffer_add_utf<hb_utf8_t> (buffer, (const uint8_t *) text, text_length, item_offset, item_lengt… in hb_buffer_add_utf8()
1564 hb_buffer_add_utf16 (hb_buffer_t *buffer, in hb_buffer_add_utf16() argument
1570 hb_buffer_add_utf<hb_utf16_t> (buffer, text, text_length, item_offset, item_length); in hb_buffer_add_utf16()
1590 hb_buffer_add_utf32 (hb_buffer_t *buffer, in hb_buffer_add_utf32() argument
1596 hb_buffer_add_utf<hb_utf32_t<> > (buffer, text, text_length, item_offset, item_length); in hb_buffer_add_utf32()
1617 hb_buffer_add_latin1 (hb_buffer_t *buffer, in hb_buffer_add_latin1() argument
1623 hb_buffer_add_utf<hb_latin1_t> (buffer, text, text_length, item_offset, item_length); in hb_buffer_add_latin1()
1651 hb_buffer_add_codepoints (hb_buffer_t *buffer, in hb_buffer_add_codepoints() argument
1657 hb_buffer_add_utf<hb_utf32_t<false> > (buffer, text, text_length, item_offset, item_length); in hb_buffer_add_codepoints()
1669 normalize_glyphs_cluster (hb_buffer_t *buffer, in normalize_glyphs_cluster() argument
1674 hb_glyph_position_t *pos = buffer->pos; in normalize_glyphs_cluster()
1703 …hb_stable_sort (buffer->info + start, end - start - 1, compare_info_codepoint, buffer->pos + start… in normalize_glyphs_cluster()
1712 …hb_stable_sort (buffer->info + start + 1, end - start - 1, compare_info_codepoint, buffer->pos + s… in normalize_glyphs_cluster()
1728 hb_buffer_normalize_glyphs (hb_buffer_t *buffer) in hb_buffer_normalize_glyphs() argument
1730 assert (buffer->have_positions); in hb_buffer_normalize_glyphs()
1731 assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS); in hb_buffer_normalize_glyphs()
1733 bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); in hb_buffer_normalize_glyphs()
1735 unsigned int count = buffer->len; in hb_buffer_normalize_glyphs()
1737 hb_glyph_info_t *info = buffer->info; in hb_buffer_normalize_glyphs()
1743 normalize_glyphs_cluster (buffer, start, end, backward); in hb_buffer_normalize_glyphs()
1746 normalize_glyphs_cluster (buffer, start, end, backward); in hb_buffer_normalize_glyphs()
1786 hb_buffer_set_message_func (hb_buffer_t *buffer, in hb_buffer_set_message_func() argument
1790 if (buffer->message_destroy) in hb_buffer_set_message_func()
1791 buffer->message_destroy (buffer->message_data); in hb_buffer_set_message_func()
1794 buffer->message_func = func; in hb_buffer_set_message_func()
1795 buffer->message_data = user_data; in hb_buffer_set_message_func()
1796 buffer->message_destroy = destroy; in hb_buffer_set_message_func()
1798 buffer->message_func = NULL; in hb_buffer_set_message_func()
1799 buffer->message_data = NULL; in hb_buffer_set_message_func()
1800 buffer->message_destroy = NULL; in hb_buffer_set_message_func()