comparison src/console-tty-impl.h @ 3571:f6cd5fe9bf4c

[xemacs-hg @ 2006-08-24 21:21:34 by aidan] Vary support for multiple-width characters on a per-console basis.
author aidan
date Thu, 24 Aug 2006 21:21:36 +0000
parents 141c2920ea48
children e0db3c197671
comparison
equal deleted inserted replaced
3570:1ebada1a4643 3571:f6cd5fe9bf4c
198 struct emacs_tty old_tty; 198 struct emacs_tty old_tty;
199 199
200 /* Is this TTY our controlling terminal? */ 200 /* Is this TTY our controlling terminal? */
201 unsigned int controlling_terminal :1; 201 unsigned int controlling_terminal :1;
202 unsigned int is_stdio :1; 202 unsigned int is_stdio :1;
203 /* Do East Asian chars take up two columns? */
204 unsigned int multiple_width :1;
203 }; 205 };
204 206
205 #ifdef NEW_GC 207 #ifdef NEW_GC
206 typedef struct tty_console Lisp_Tty_Console; 208 typedef struct tty_console Lisp_Tty_Console;
207 209
219 #define CONSOLE_TTY_REAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->real_cursor_x) 221 #define CONSOLE_TTY_REAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->real_cursor_x)
220 #define CONSOLE_TTY_REAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->real_cursor_y) 222 #define CONSOLE_TTY_REAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->real_cursor_y)
221 #define CONSOLE_TTY_FINAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->final_cursor_x) 223 #define CONSOLE_TTY_FINAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->final_cursor_x)
222 #define CONSOLE_TTY_FINAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->final_cursor_y) 224 #define CONSOLE_TTY_FINAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->final_cursor_y)
223 225
226 /* In a more ideal world where available terminfo files actually included
227 information on whether a given TTY supports double-width characters or
228 not, oh, and where Mule was not conditional, SUPPORTS_MULTIPLE_WIDTH
229 would be as console-specific as its syntax implies.
230
231 In this world, this is overengineering more than it is anything. */
232 #define CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c) (1 != MAX_ICHAR_LEN)
233 #define CONSOLE_TTY_MULTIPLE_WIDTH(c) \
234 (CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c) ? \
235 CONSOLE_TTY_DATA (c)->multiple_width : (0))
236
224 #define TTY_CM(c) (CONSOLE_TTY_DATA (c)->cm) 237 #define TTY_CM(c) (CONSOLE_TTY_DATA (c)->cm)
225 #define TTY_SE(c) (CONSOLE_TTY_DATA (c)->se) 238 #define TTY_SE(c) (CONSOLE_TTY_DATA (c)->se)
226 #define TTY_SD(c) (CONSOLE_TTY_DATA (c)->sd) 239 #define TTY_SD(c) (CONSOLE_TTY_DATA (c)->sd)
227 #define TTY_FLAGS(c) (CONSOLE_TTY_DATA (c)->flags) 240 #define TTY_FLAGS(c) (CONSOLE_TTY_DATA (c)->flags)
228 #define TTY_COST(c) (CONSOLE_TTY_DATA (c)->cost) 241 #define TTY_COST(c) (CONSOLE_TTY_DATA (c)->cost)