Mercurial > emacs
comparison src/dispextern.h @ 107583:f35e7896a0fe
Retrospective commit.
These are the original changes made by Kenichi Handa on the old
pre Emacs 22 emacs-bidi branch.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 31 Dec 2009 14:44:59 -0500 |
parents | 562676f8dfb2 |
children | e0df0337f248 |
comparison
equal
deleted
inserted
replaced
106687:8c60b70f9505 | 107583:f35e7896a0fe |
---|---|
1699 | 1699 |
1700 /* Non-zero means face attributes have been changed since the last | 1700 /* Non-zero means face attributes have been changed since the last |
1701 redisplay. Used in redisplay_internal. */ | 1701 redisplay. Used in redisplay_internal. */ |
1702 | 1702 |
1703 extern int face_change_count; | 1703 extern int face_change_count; |
1704 | |
1705 /* For BIDI */ | |
1706 #define BIDI_MAXLEVEL 64 | |
1707 | |
1708 /* Data type for describing the bidirectional character types. */ | |
1709 typedef enum { | |
1710 UNKNOWN_BT, | |
1711 STRONG_L, /* strong left-to-right */ | |
1712 STRONG_R, /* strong right-to-left */ | |
1713 STRONG_AL, /* arabic right-to-left letter */ | |
1714 LRE, /* left-to-right embedding */ | |
1715 LRO, /* left-to-right override */ | |
1716 RLE, /* right-to-left embedding */ | |
1717 RLO, /* right-to-left override */ | |
1718 PDF, /* pop directional format */ | |
1719 WEAK_EN, /* european number */ | |
1720 WEAK_ES, /* european number separator */ | |
1721 WEAK_ET, /* european number terminator */ | |
1722 WEAK_AN, /* arabic number */ | |
1723 WEAK_CS, /* common separator */ | |
1724 WEAK_NSM, /* non-spacing mark */ | |
1725 WEAK_BN, /* boundary neutral */ | |
1726 NEUTRAL_B, /* paragraph separator */ | |
1727 NEUTRAL_S, /* segment separator */ | |
1728 NEUTRAL_WS, /* whitespace */ | |
1729 NEUTRAL_ON /* other neutrals */ | |
1730 } bidi_type_t; | |
1731 | |
1732 /* The basic directionality data type. */ | |
1733 typedef enum { NEUTRAL_DIR, L2R, R2L } bidi_dir_t; | |
1734 | |
1735 /* Data type for storing information about characters we need to | |
1736 remember. */ | |
1737 struct bidi_saved_info { | |
1738 int bytepos, charpos; /* character's buffer position */ | |
1739 bidi_type_t type; /* character bidi type */ | |
1740 bidi_type_t orig_type; /* original type of the character, after W1 */ | |
1741 bidi_type_t pristine_type; /* type as we found it in the buffer */ | |
1742 }; | |
1743 | |
1744 /* Data type for keeping track of saved embedding levels and override | |
1745 status information. */ | |
1746 struct bidi_stack { | |
1747 int level; | |
1748 bidi_dir_t override; | |
1749 }; | |
1750 | |
1751 /* Data type for iterating over bidi text. */ | |
1752 struct bidi_it { | |
1753 int bytepos; /* iterator's position in buffer */ | |
1754 int charpos; | |
1755 int ch; /* the character itself */ | |
1756 int ch_len; /* the length of its multibyte sequence */ | |
1757 bidi_type_t type; /* type of this character */ | |
1758 bidi_type_t orig_type; /* original type, after overrides and W1 */ | |
1759 bidi_type_t pristine_type; /* original type, as found in the buffer */ | |
1760 int resolved_level; /* final resolved level of this character */ | |
1761 int invalid_levels; /* how many PDFs should we ignore */ | |
1762 int invalid_rl_levels; /* how many PDFs from RLE/RLO should ignore */ | |
1763 int new_paragraph; /* if non-zero, a new paragraph begins here */ | |
1764 int prev_was_pdf; /* if non-zero, prev char was PDF */ | |
1765 struct bidi_saved_info prev; /* info about the previous character */ | |
1766 struct bidi_saved_info last_strong; /* last-seen strong directional char */ | |
1767 struct bidi_saved_info next_for_neutral; /* surrounding characters for... */ | |
1768 struct bidi_saved_info prev_for_neutral; /* ...resolving neutrals */ | |
1769 struct bidi_saved_info next_for_ws; /* character after sequence of ws */ | |
1770 int next_en_pos; /* position of next EN char for ET */ | |
1771 int ignore_bn_limit; /* position until which we should ignore BNs */ | |
1772 bidi_dir_t sor; /* direction of start-of-run in effect */ | |
1773 int scan_dir; /* direction of text scan */ | |
1774 int stack_idx; /* index of current data on the stack */ | |
1775 struct bidi_stack level_stack[BIDI_MAXLEVEL]; /* stack of embedding levels */ | |
1776 }; | |
1704 | 1777 |
1705 | 1778 |
1706 | 1779 |
1707 | 1780 |
1708 /*********************************************************************** | 1781 /*********************************************************************** |
2231 /* Face of the left fringe glyph. */ | 2304 /* Face of the left fringe glyph. */ |
2232 unsigned left_user_fringe_face_id : FACE_ID_BITS; | 2305 unsigned left_user_fringe_face_id : FACE_ID_BITS; |
2233 | 2306 |
2234 /* Face of the right fringe glyph. */ | 2307 /* Face of the right fringe glyph. */ |
2235 unsigned right_user_fringe_face_id : FACE_ID_BITS; | 2308 unsigned right_user_fringe_face_id : FACE_ID_BITS; |
2309 | |
2310 /* 1 means we need bidi processing. */ | |
2311 int bidi_p; | |
2312 | |
2313 /* For iterating over bidi text. */ | |
2314 struct bidi_it bidi_it; | |
2236 }; | 2315 }; |
2237 | 2316 |
2238 | 2317 |
2239 /* Access to positions of iterator IT. */ | 2318 /* Access to positions of iterator IT. */ |
2240 | 2319 |
2701 | 2780 |
2702 | 2781 |
2703 /*********************************************************************** | 2782 /*********************************************************************** |
2704 Function Prototypes | 2783 Function Prototypes |
2705 ***********************************************************************/ | 2784 ***********************************************************************/ |
2785 | |
2786 /* Defined in bidi.c */ | |
2787 | |
2788 extern void bidi_init_it P_ ((int pos, bidi_dir_t dir, | |
2789 struct bidi_it *bidi_it)); | |
2790 extern void bidi_get_next_char_visually P_ ((struct bidi_it *bidi_it)); | |
2706 | 2791 |
2707 /* Defined in xdisp.c */ | 2792 /* Defined in xdisp.c */ |
2708 | 2793 |
2709 struct glyph_row *row_containing_pos P_ ((struct window *, int, | 2794 struct glyph_row *row_containing_pos P_ ((struct window *, int, |
2710 struct glyph_row *, | 2795 struct glyph_row *, |