diff options
Diffstat (limited to 'src/composite.h')
-rw-r--r-- | src/composite.h | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/src/composite.h b/src/composite.h index 5343dd51469..5d4dd024ce6 100644 --- a/src/composite.h +++ b/src/composite.h @@ -1,7 +1,10 @@ /* Header for composite sequence handler. Copyright (C) 1999 Electrotechnical Laboratory, JAPAN. - Licensed to the Free Software Foundation. + Licensed to the Free Software Foundation. Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2003 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H13PRO009 This file is part of GNU Emacs. @@ -25,20 +28,18 @@ Boston, MA 02111-1307, USA. */ /* Methods to display a sequence of components a composition. */ enum composition_method { - /* The first two are actually not methods, but used in code - conversion to specify the current composing status. */ - COMPOSITION_DISABLED, /* Never handle composition data */ - COMPOSITION_NO, /* Not processing composition data */ /* Compose relatively without alternate characters. */ COMPOSITION_RELATIVE, - /* Compose by specified composition rule. This is not used in Emacs - 21 but we need it to decode files saved in the older versions of - Emacs. */ + /* Compose by specified composition rules. This is not used in + Emacs 21 but we need it to decode files saved in the older + versions of Emacs. */ COMPOSITION_WITH_RULE, /* Compose relatively with alternate characters. */ COMPOSITION_WITH_ALTCHARS, - /* Compose by specified composition rule with alternate characters. */ - COMPOSITION_WITH_RULE_ALTCHARS + /* Compose by specified composition rules with alternate characters. */ + COMPOSITION_WITH_RULE_ALTCHARS, + /* This is not a method. */ + COMPOSITION_NO }; /* Maximum number of compoments a single composition can have. */ @@ -126,13 +127,19 @@ extern Lisp_Object composition_temp; ->contents[(n) * 2 - 1]) /* Decode encoded composition rule RULE_CODE into GREF (global - reference point code) and NREF (new reference point code). Don't - check RULE_CODE, always set GREF and NREF to valid values. */ -#define COMPOSITION_DECODE_RULE(rule_code, gref, nref) \ - do { \ - gref = (rule_code) / 12; \ - if (gref > 12) gref = 11; \ - nref = (rule_code) % 12; \ + reference point code), NREF (new reference point code), XOFF + (horizontal offset) YOFF (vertical offset). Don't check RULE_CODE, + always set GREF and NREF to valid values. By side effect, + RULE_CODE is modified. */ + +#define COMPOSITION_DECODE_RULE(rule_code, gref, nref, xoff, yoff) \ + do { \ + xoff = (rule_code) >> 16; \ + yoff = ((rule_code) >> 8) & 0xFF; \ + rule_code &= 0xFF; \ + gref = (rule_code) / 12; \ + if (gref > 12) gref = 11; \ + nref = (rule_code) % 12; \ } while (0) /* Return encoded composition rule for the pair of global reference @@ -159,6 +166,8 @@ struct composition { /* Width, ascent, and descent pixels of the composition. */ short pixel_width, ascent, descent; + short lbearing, rbearing; + /* How many columns the overall glyphs occupy on the screen. This gives an approximate value for column calculation in Fcurrent_column, and etc. */ @@ -198,11 +207,14 @@ extern int n_compositions; extern Lisp_Object Qcomposition; extern Lisp_Object composition_hash_table; +extern Lisp_Object Qauto_composed; +extern Lisp_Object Vauto_composition_function; +extern Lisp_Object Qauto_composition_function; extern int get_composition_id P_ ((int, int, int, Lisp_Object, Lisp_Object)); -extern int find_composition P_ ((int, int, int *, int *, Lisp_Object *, +extern int find_composition P_ ((int, int, EMACS_INT *, EMACS_INT *, Lisp_Object *, Lisp_Object)); -extern void update_compositions P_ ((int, int, int)); +extern void update_compositions P_ ((EMACS_INT, EMACS_INT, int)); extern void make_composition_value_copy P_ ((Lisp_Object)); extern void compose_region P_ ((int, int, Lisp_Object, Lisp_Object, Lisp_Object)); |