From e50c3978d37b2c0d6ddd4ced6a6196f6857cd596 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 28 Jan 2008 00:16:49 -0500 Subject: [PATCH] Rename HB_OT_Layout to hb_ot_layout_t --- src/hb-ot-layout-private.h | 8 ++++---- src/hb-ot-layout.cc | 34 +++++++++++++++++----------------- src/hb-ot-layout.h | 33 +++++++++++++++------------------ 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/hb-ot-layout-private.h b/src/hb-ot-layout-private.h index 607ee26..8060e4f 100644 --- a/src/hb-ot-layout-private.h +++ b/src/hb-ot-layout-private.h @@ -49,14 +49,14 @@ HB_BEGIN_DECLS(); */ HB_OT_LAYOUT_INTERNAL hb_bool_t -_hb_ot_layout_has_new_glyph_classes (HB_OT_Layout *layout); +_hb_ot_layout_has_new_glyph_classes (hb_ot_layout_t *layout); HB_OT_LAYOUT_INTERNAL hb_ot_layout_glyph_properties_t -_hb_ot_layout_get_glyph_properties (HB_OT_Layout *layout, - hb_glyph_t glyph); +_hb_ot_layout_get_glyph_properties (hb_ot_layout_t *layout, + hb_glyph_t glyph); HB_OT_LAYOUT_INTERNAL hb_bool_t -_hb_ot_layout_check_glyph_properties (HB_OT_Layout *layout, +_hb_ot_layout_check_glyph_properties (hb_ot_layout_t *layout, HB_GlyphItem gitem, hb_ot_layout_lookup_flags_t lookup_flags, hb_ot_layout_glyph_properties_t *property); diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 39328a9..4cd70de 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -40,7 +40,7 @@ #include -struct _HB_OT_Layout { +struct _hb_ot_layout_t { const GDEF *gdef; const GSUB *gsub; //const GPOS *gpos; @@ -52,11 +52,11 @@ struct _HB_OT_Layout { }; -HB_OT_Layout * +hb_ot_layout_t * hb_ot_layout_create_for_data (const char *font_data, int face_index) { - HB_OT_Layout *layout = (HB_OT_Layout *) calloc (1, sizeof (HB_OT_Layout)); + hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t)); const OpenTypeFontFile &font = OpenTypeFontFile::get_for_data (font_data); const OpenTypeFontFace &face = font.get_face (face_index); @@ -69,7 +69,7 @@ hb_ot_layout_create_for_data (const char *font_data, } void -hb_ot_layout_destroy (HB_OT_Layout *layout) +hb_ot_layout_destroy (hb_ot_layout_t *layout) { free (layout); } @@ -79,20 +79,20 @@ hb_ot_layout_destroy (HB_OT_Layout *layout) */ hb_bool_t -hb_ot_layout_has_font_glyph_classes (HB_OT_Layout *layout) +hb_ot_layout_has_font_glyph_classes (hb_ot_layout_t *layout) { return layout->gdef->has_glyph_classes (); } HB_OT_LAYOUT_INTERNAL hb_bool_t -_hb_ot_layout_has_new_glyph_classes (HB_OT_Layout *layout) +_hb_ot_layout_has_new_glyph_classes (hb_ot_layout_t *layout) { return layout->new_gdef.len > 0; } HB_OT_LAYOUT_INTERNAL hb_ot_layout_glyph_properties_t -_hb_ot_layout_get_glyph_properties (HB_OT_Layout *layout, - hb_glyph_t glyph) +_hb_ot_layout_get_glyph_properties (hb_ot_layout_t *layout, + hb_glyph_t glyph) { hb_ot_layout_class_t klass; @@ -118,7 +118,7 @@ _hb_ot_layout_get_glyph_properties (HB_OT_Layout *layout, } HB_OT_LAYOUT_INTERNAL hb_bool_t -_hb_ot_layout_check_glyph_properties (HB_OT_Layout *layout, +_hb_ot_layout_check_glyph_properties (hb_ot_layout_t *layout, HB_GlyphItem gitem, hb_ot_layout_lookup_flags_t lookup_flags, hb_ot_layout_glyph_properties_t *property) @@ -168,8 +168,8 @@ _hb_ot_layout_check_glyph_properties (HB_OT_Layout *layout, hb_ot_layout_glyph_class_t -hb_ot_layout_get_glyph_class (HB_OT_Layout *layout, - hb_glyph_t glyph) +hb_ot_layout_get_glyph_class (hb_ot_layout_t *layout, + hb_glyph_t glyph) { hb_ot_layout_glyph_properties_t properties; hb_ot_layout_class_t klass; @@ -183,7 +183,7 @@ hb_ot_layout_get_glyph_class (HB_OT_Layout *layout, } void -hb_ot_layout_set_glyph_class (HB_OT_Layout *layout, +hb_ot_layout_set_glyph_class (hb_ot_layout_t *layout, hb_glyph_t glyph, hb_ot_layout_glyph_class_t klass) { @@ -224,11 +224,11 @@ hb_ot_layout_set_glyph_class (HB_OT_Layout *layout, } void -hb_ot_layout_build_glyph_classes (HB_OT_Layout *layout, - uint16_t num_total_glyphs, - hb_glyph_t *glyphs, - unsigned char *klasses, - uint16_t count) +hb_ot_layout_build_glyph_classes (hb_ot_layout_t *layout, + uint16_t num_total_glyphs, + hb_glyph_t *glyphs, + unsigned char *klasses, + uint16_t count) { int i; diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index ceb3647..c515d5b 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -32,23 +32,20 @@ HB_BEGIN_DECLS(); /* - * HB_OT_Layout + * hb_ot_layout_t */ -typedef struct _HB_OT_Layout HB_OT_Layout; +typedef struct _hb_ot_layout_t hb_ot_layout_t; -HB_OT_Layout * +hb_ot_layout_t * hb_ot_layout_create_for_data (const char *font_data, int face_index); void -hb_ot_layout_destroy (HB_OT_Layout *layout); +hb_ot_layout_destroy (hb_ot_layout_t *layout); -/* TODO -HB_OT_Layout * -hb_ot_layout_create_sanitize (char *data, - make_writable_func); -*/ +/* TODO sanitizing API/constructor (make_wrieable_func_t) */ +/* TODO get_table_func_t constructor */ /* * GDEF @@ -63,23 +60,23 @@ typedef enum { } hb_ot_layout_glyph_class_t; hb_bool_t -hb_ot_layout_has_font_glyph_classes (HB_OT_Layout *layout); +hb_ot_layout_has_font_glyph_classes (hb_ot_layout_t *layout); hb_ot_layout_glyph_class_t -hb_ot_layout_get_glyph_class (HB_OT_Layout *layout, - hb_glyph_t glyph); +hb_ot_layout_get_glyph_class (hb_ot_layout_t *layout, + hb_glyph_t glyph); void -hb_ot_layout_set_glyph_class (HB_OT_Layout *layout, +hb_ot_layout_set_glyph_class (hb_ot_layout_t *layout, hb_glyph_t glyph, hb_ot_layout_glyph_class_t klass); void -hb_ot_layout_build_glyph_classes (HB_OT_Layout *layout, - uint16_t num_total_glyphs, - hb_glyph_t *glyphs, - unsigned char *klasses, - uint16_t count); +hb_ot_layout_build_glyph_classes (hb_ot_layout_t *layout, + uint16_t num_total_glyphs, + hb_glyph_t *glyphs, + unsigned char *klasses, + uint16_t count); HB_END_DECLS(); -- 2.7.4