Mercurial > hg > xemacs-beta
comparison src/redisplay-tty.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | c5d627a313b1 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
112 { | 112 { |
113 return emchar_string_displayed_columns (str, len); | 113 return emchar_string_displayed_columns (str, len); |
114 } | 114 } |
115 | 115 |
116 /***************************************************************************** | 116 /***************************************************************************** |
117 tty_divider_width | |
118 | |
119 Return the width of the vertical divider. This is a function because | |
120 divider_width is a console method. | |
121 ****************************************************************************/ | |
122 static int | |
123 tty_divider_width (void) | |
124 { | |
125 return 1; | |
126 } | |
127 | |
128 /***************************************************************************** | |
129 tty_divider_height | 117 tty_divider_height |
130 | 118 |
131 Return the width of the horizontal divider. This is a function | 119 Return the width of the horizontal divider. This is a function |
132 because divider_height is a console method. | 120 because divider_height is a console method. |
133 ****************************************************************************/ | 121 ****************************************************************************/ |
434 | 422 |
435 | 423 |
436 /***************************************************************************** | 424 /***************************************************************************** |
437 tty_output_vertical_divider | 425 tty_output_vertical_divider |
438 | 426 |
439 Draw a vertical divider down the left side of the given window. | 427 Draw a vertical divider down the right side of the given window. |
440 ****************************************************************************/ | 428 ****************************************************************************/ |
441 static void | 429 static void |
442 tty_output_vertical_divider (struct window *w, int clear) | 430 tty_output_vertical_divider (struct window *w, int clear) |
443 { | 431 { |
444 struct frame *f = XFRAME (w->frame); | 432 /* Divider width can either be 0 or 1 on TTYs */ |
445 struct console *c = XCONSOLE (FRAME_CONSOLE (f)); | 433 if (window_divider_width (w)) |
446 int line; | 434 { |
447 int y_top = WINDOW_TEXT_TOP (w); | 435 struct frame *f = XFRAME (w->frame); |
448 int y_bot = WINDOW_TEXT_BOTTOM (w); | 436 struct console *c = XCONSOLE (FRAME_CONSOLE (f)); |
449 unsigned char divv = '|'; | 437 int line; |
450 | 438 int y_top = WINDOW_TEXT_TOP (w); |
451 tty_turn_on_face (w, MODELINE_INDEX); | 439 int y_bot = WINDOW_TEXT_BOTTOM (w); |
452 for (line = y_top; line < y_bot; line++) | 440 unsigned char divv = '|'; |
453 { | 441 |
454 cmgoto (f, line, WINDOW_TEXT_LEFT (w) - 1); | 442 tty_turn_on_face (w, MODELINE_INDEX); |
443 for (line = y_top; line < y_bot; line++) | |
444 { | |
445 cmgoto (f, line, WINDOW_TEXT_RIGHT (w)); | |
446 send_string_to_tty_console (c, &divv, 1); | |
447 TTY_INC_CURSOR_X (c, 1); | |
448 } | |
449 | |
450 /* Draw the divider in the modeline. */ | |
451 cmgoto (f, y_bot, WINDOW_TEXT_RIGHT (w)); | |
455 send_string_to_tty_console (c, &divv, 1); | 452 send_string_to_tty_console (c, &divv, 1); |
456 TTY_INC_CURSOR_X (c, 1); | 453 TTY_INC_CURSOR_X (c, 1); |
457 } | 454 tty_turn_off_face (w, MODELINE_INDEX); |
458 | 455 } |
459 /* Draw the divider in the modeline. */ | |
460 cmgoto (f, y_bot, WINDOW_TEXT_LEFT (w) - 1); | |
461 send_string_to_tty_console (c, &divv, 1); | |
462 TTY_INC_CURSOR_X (c, 1); | |
463 tty_turn_off_face (w, MODELINE_INDEX); | |
464 } | 456 } |
465 | 457 |
466 /**************************************************************************** | 458 /**************************************************************************** |
467 tty_clear_region | 459 tty_clear_region |
468 | 460 |
1546 { | 1538 { |
1547 /* redisplay methods */ | 1539 /* redisplay methods */ |
1548 CONSOLE_HAS_METHOD (tty, text_width); | 1540 CONSOLE_HAS_METHOD (tty, text_width); |
1549 CONSOLE_HAS_METHOD (tty, output_display_block); | 1541 CONSOLE_HAS_METHOD (tty, output_display_block); |
1550 CONSOLE_HAS_METHOD (tty, output_vertical_divider); | 1542 CONSOLE_HAS_METHOD (tty, output_vertical_divider); |
1551 CONSOLE_HAS_METHOD (tty, divider_width); | |
1552 CONSOLE_HAS_METHOD (tty, divider_height); | 1543 CONSOLE_HAS_METHOD (tty, divider_height); |
1553 CONSOLE_HAS_METHOD (tty, eol_cursor_width); | 1544 CONSOLE_HAS_METHOD (tty, eol_cursor_width); |
1554 CONSOLE_HAS_METHOD (tty, clear_to_window_end); | 1545 CONSOLE_HAS_METHOD (tty, clear_to_window_end); |
1555 CONSOLE_HAS_METHOD (tty, clear_region); | 1546 CONSOLE_HAS_METHOD (tty, clear_region); |
1556 CONSOLE_HAS_METHOD (tty, clear_frame); | 1547 CONSOLE_HAS_METHOD (tty, clear_frame); |