diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-05 12:31:26 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-05 13:40:04 +0200 |
commit | a45b3a21c67476c703ddd5d5b4755364671c26c1 (patch) | |
tree | a755086e3fa8dd4a11d044f7765875b6f6ad0e19 /include | |
parent | 353a05d9e8e8023e1c3c24816f712bdcb05502ca (diff) | |
download | mupdf-a45b3a21c67476c703ddd5d5b4755364671c26c1.tar.xz |
Clean up bidi enum names.
And use the same enum for both the internal bidi code and the layout code.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz.h | 3 | ||||
-rw-r--r-- | include/mupdf/fitz/bidi.h | 21 | ||||
-rw-r--r-- | include/mupdf/fitz/text.h | 12 |
3 files changed, 9 insertions, 27 deletions
diff --git a/include/mupdf/fitz.h b/include/mupdf/fitz.h index 7ffca1cf..ec0c87a4 100644 --- a/include/mupdf/fitz.h +++ b/include/mupdf/fitz.h @@ -17,6 +17,7 @@ extern "C" { #include "mupdf/fitz/string.h" #include "mupdf/fitz/tree.h" #include "mupdf/fitz/ucdn.h" +#include "mupdf/fitz/bidi.h" #include "mupdf/fitz/xml.h" /* I/O */ @@ -65,8 +66,6 @@ extern "C" { #include "mupdf/fitz/output-svg.h" #include "mupdf/fitz/output-tga.h" -#include "mupdf/fitz/bidi.h" - #ifdef __cplusplus } #endif diff --git a/include/mupdf/fitz/bidi.h b/include/mupdf/fitz/bidi.h index f458c498..e5cb87ed 100644 --- a/include/mupdf/fitz/bidi.h +++ b/include/mupdf/fitz/bidi.h @@ -23,9 +23,9 @@ typedef enum fz_bidi_direction_e { - BIDI_LEFT_TO_RIGHT = 0, - BIDI_RIGHT_TO_LEFT = 1, - BIDI_NEUTRAL = 2 + FZ_BIDI_LTR = 0, + FZ_BIDI_RTL = 1, + FZ_BIDI_NEUTRAL = 2 } fz_bidi_direction; @@ -36,16 +36,8 @@ typedef enum fz_bidi_flags_e } fz_bidi_flags; -typedef uint8_t fz_bidi_chartype; -typedef int fz_bidi_level; /* Note: Max level is 125 */ - -enum -{ - BIDI_LEVEL_MAX = 125 /* Updated for 6.3.0 */ -}; - /** - * Prototype for callback function supplied to Bidi_fragmentText. + * Prototype for callback function supplied to fz_bidi_fragment_text. * * @param fragment first character in fragment * @param fragmentLen number of characters in fragment @@ -76,8 +68,7 @@ typedef void (fz_bidi_fragment_callback)(const uint32_t *fragment, * * @param[in] text start of Unicode sequence * @param[in] textlen number of Unicodes to analyse - * @param[in] baseDir direction of paragraph (specify BIDI_NEUTRAL - * to force auto-detection) + * @param[in] baseDir direction of paragraph (specify FZ_BIDI_NEUTRAL to force auto-detection) * @param[in] callback function to be called for each fragment * @param[in] arg data to be passed to the callback function * @param[in] flags flags to control operation (see fz_bidi_flags above) @@ -90,4 +81,4 @@ void fz_bidi_fragment_text(fz_context *ctx, void *arg, int flags); -#endif /* FITZ_BIDI_H */ +#endif diff --git a/include/mupdf/fitz/text.h b/include/mupdf/fitz/text.h index 84f72957..52035bc5 100644 --- a/include/mupdf/fitz/text.h +++ b/include/mupdf/fitz/text.h @@ -29,14 +29,6 @@ struct fz_text_item_s int ucs; /* -1 for one ucs to many gid mappings */ }; -typedef enum fz_text_direction_e -{ - /* There are various possible 'directions' for text */ - FZ_DIR_UNSET = 0, /* Unset (or Neutral). All PDF text is sent as this. */ - FZ_DIR_R2L = 1, /* Text is r2l */ - FZ_DIR_L2R = 2 /* Text is l2r */ -} fz_text_direction; - typedef enum fz_text_language_e { FZ_LANG_UNSET = 0 @@ -66,8 +58,8 @@ fz_text *fz_new_text(fz_context *ctx); fz_text *fz_keep_text(fz_context *ctx, const fz_text *text); void fz_drop_text(fz_context *ctx, const fz_text *text); -void fz_show_glyph(fz_context *ctx, fz_text *text, fz_font *font, const fz_matrix *trm, int glyph, int unicode, int wmode, int bidi_level, fz_text_direction markup_dir, fz_text_language language); -void fz_show_string(fz_context *ctx, fz_text *text, fz_font *font, fz_matrix *trm, const char *s, int wmode, int bidi_level, fz_text_direction markup_dir, fz_text_language language); +void fz_show_glyph(fz_context *ctx, fz_text *text, fz_font *font, const fz_matrix *trm, int glyph, int unicode, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language); +void fz_show_string(fz_context *ctx, fz_text *text, fz_font *font, fz_matrix *trm, const char *s, int wmode, int bidi_level, fz_bidi_direction markup_dir, fz_text_language language); fz_rect *fz_bound_text(fz_context *ctx, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm, fz_rect *r); fz_text *fz_clone_text(fz_context *ctx, const fz_text *text); |