| Index: third_party/harfbuzz-ng/src/hb-gobject-structs.cc
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-private.hh b/third_party/harfbuzz-ng/src/hb-gobject-structs.cc
|
| similarity index 51%
|
| copy from third_party/harfbuzz-ng/src/hb-ot-shape-private.hh
|
| copy to third_party/harfbuzz-ng/src/hb-gobject-structs.cc
|
| index deaec97a881248b0738465743efc95d415e52431..cec48542275b84a7897338b58eb2d36ebf3a451a 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ot-shape-private.hh
|
| +++ b/third_party/harfbuzz-ng/src/hb-gobject-structs.cc
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2010 Google, Inc.
|
| + * Copyright © 2011 Google, Inc.
|
| *
|
| * This is part of HarfBuzz, a text shaping library.
|
| *
|
| @@ -24,53 +24,40 @@
|
| * Google Author(s): Behdad Esfahbod
|
| */
|
|
|
| -#ifndef HB_OT_SHAPE_PRIVATE_HH
|
| -#define HB_OT_SHAPE_PRIVATE_HH
|
| +#include "hb-private.hh"
|
| +
|
| +/* g++ didn't like older gtype.h gcc-only code path. */
|
| +#include <glib.h>
|
| +#if !GLIB_CHECK_VERSION(2,29,16)
|
| +#undef __GNUC__
|
| +#undef __GNUC_MINOR__
|
| +#define __GNUC__ 2
|
| +#define __GNUC_MINOR__ 6
|
| +#endif
|
| +
|
| +#include "hb-gobject.h"
|
| +
|
| +#define _HB_DEFINE_BOXED_TYPE(Name,underscore_name,copy_func,free_func) \
|
| +GType \
|
| +underscore_name##_get_type (void) \
|
| +{ \
|
| + static volatile gsize type = 0; \
|
| + if (g_once_init_enter (&type)) { \
|
| + GType t = g_boxed_type_register_static (g_intern_static_string (#Name), \
|
| + (GBoxedCopyFunc) copy_func, \
|
| + (GBoxedFreeFunc) free_func); \
|
| + g_once_init_leave (&type, t); \
|
| + } \
|
| + return type; \
|
| +}
|
| +
|
| +#define HB_DEFINE_BOXED_TYPE(name) \
|
| + _HB_DEFINE_BOXED_TYPE (hb_##name, hb_gobject_##name, hb_##name##_reference, hb_##name##_destroy);
|
| +
|
| +HB_DEFINE_BOXED_TYPE (buffer)
|
| +HB_DEFINE_BOXED_TYPE (blob)
|
| +HB_DEFINE_BOXED_TYPE (face)
|
| +HB_DEFINE_BOXED_TYPE (font)
|
| +HB_DEFINE_BOXED_TYPE (font_funcs)
|
| +HB_DEFINE_BOXED_TYPE (unicode_funcs)
|
|
|
| -#include "hb-private.h"
|
| -
|
| -#include "hb-ot-shape.h"
|
| -
|
| -#include "hb-ot-map-private.hh"
|
| -
|
| -HB_BEGIN_DECLS
|
| -
|
| -
|
| -/* buffer var allocations */
|
| -#define general_category() var1.u8[0] /* unicode general_category (hb_category_t) */
|
| -#define combining_class() var1.u8[1] /* unicode combining_class (uint8_t) */
|
| -
|
| -
|
| -enum hb_ot_complex_shaper_t {
|
| - hb_ot_complex_shaper_none,
|
| - hb_ot_complex_shaper_arabic
|
| -};
|
| -
|
| -
|
| -struct hb_ot_shape_plan_t
|
| -{
|
| - hb_ot_map_t map;
|
| - hb_ot_complex_shaper_t shaper;
|
| -};
|
| -
|
| -
|
| -struct hb_ot_shape_context_t
|
| -{
|
| - /* Input to hb_ot_shape_execute() */
|
| - hb_ot_shape_plan_t *plan;
|
| - hb_font_t *font;
|
| - hb_face_t *face;
|
| - hb_buffer_t *buffer;
|
| - const hb_feature_t *user_features;
|
| - unsigned int num_user_features;
|
| -
|
| - /* Transient stuff */
|
| - hb_direction_t target_direction;
|
| - hb_bool_t applied_substitute_complex;
|
| - hb_bool_t applied_position_complex;
|
| -};
|
| -
|
| -
|
| -HB_END_DECLS
|
| -
|
| -#endif /* HB_OT_SHAPE_PRIVATE_HH */
|
|
|