Mercurial > hg > xemacs-beta
comparison src/redisplay-tty.c @ 408:501cfd01ee6d r21-2-34
Import from CVS: tag r21-2-34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:18:11 +0200 |
parents | b8cc9ab3f761 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
407:ed6218a7d4d3 | 408:501cfd01ee6d |
---|---|
136 { | 136 { |
137 return 1; | 137 return 1; |
138 } | 138 } |
139 | 139 |
140 /***************************************************************************** | 140 /***************************************************************************** |
141 tty_output_begin | 141 tty_frame_output_begin |
142 | 142 |
143 Perform any necessary initialization prior to an update. | 143 Perform any necessary initialization prior to an update. |
144 ****************************************************************************/ | 144 ****************************************************************************/ |
145 #ifdef DEBUG_XEMACS | 145 #ifdef DEBUG_XEMACS |
146 void tty_output_begin (struct device *d); | 146 void tty_frame_output_begin (struct frame *f); |
147 void | 147 void |
148 #else | 148 #else |
149 static void | 149 static void |
150 #endif | 150 #endif |
151 tty_output_begin (struct device *d) | 151 tty_frame_output_begin (struct frame *f) |
152 { | 152 { |
153 #ifndef HAVE_TERMIOS | 153 #ifndef HAVE_TERMIOS |
154 /* Termcap requires `ospeed' to be a global variable so we have to | 154 /* Termcap requires `ospeed' to be a global variable so we have to |
155 always set it for whatever tty console we are actually currently | 155 always set it for whatever tty console we are actually currently |
156 working with. */ | 156 working with. */ |
157 ospeed = DEVICE_TTY_DATA (d)->ospeed; | 157 ospeed = DEVICE_TTY_DATA (XDEVICE (FRAME_DEVICE (f)))->ospeed; |
158 #endif | 158 #endif |
159 } | 159 } |
160 | 160 |
161 /***************************************************************************** | 161 /***************************************************************************** |
162 tty_output_end | 162 tty_frame_output_end |
163 | 163 |
164 Perform any necessary flushing of queues when an update has completed. | 164 Perform any necessary flushing of queues when an update has completed. |
165 ****************************************************************************/ | 165 ****************************************************************************/ |
166 #ifdef DEBUG_XEMACS | 166 #ifdef DEBUG_XEMACS |
167 void tty_output_end (struct device *d); | 167 void tty_frame_output_end (struct frame *f); |
168 void | 168 void |
169 #else | 169 #else |
170 static void | 170 static void |
171 #endif | 171 #endif |
172 tty_output_end (struct device *d) | 172 tty_frame_output_end (struct frame *f) |
173 { | 173 { |
174 struct device *d = XDEVICE (FRAME_DEVICE (f)); | |
174 struct console *c = XCONSOLE (DEVICE_CONSOLE (d)); | 175 struct console *c = XCONSOLE (DEVICE_CONSOLE (d)); |
175 | 176 |
176 CONSOLE_TTY_CURSOR_X (c) = CONSOLE_TTY_FINAL_CURSOR_X (c); | 177 CONSOLE_TTY_CURSOR_X (c) = CONSOLE_TTY_FINAL_CURSOR_X (c); |
177 CONSOLE_TTY_CURSOR_Y (c) = CONSOLE_TTY_FINAL_CURSOR_Y (c); | 178 CONSOLE_TTY_CURSOR_Y (c) = CONSOLE_TTY_FINAL_CURSOR_Y (c); |
178 FORCE_CURSOR_UPDATE (c); | 179 FORCE_CURSOR_UPDATE (c); |
338 { | 339 { |
339 case IMAGE_MONO_PIXMAP: | 340 case IMAGE_MONO_PIXMAP: |
340 case IMAGE_COLOR_PIXMAP: | 341 case IMAGE_COLOR_PIXMAP: |
341 case IMAGE_SUBWINDOW: | 342 case IMAGE_SUBWINDOW: |
342 case IMAGE_WIDGET: | 343 case IMAGE_WIDGET: |
343 case IMAGE_LAYOUT: | |
344 /* just do nothing here */ | 344 /* just do nothing here */ |
345 break; | 345 break; |
346 | 346 |
347 case IMAGE_NOTHING: | 347 case IMAGE_NOTHING: |
348 /* nothing is as nothing does */ | 348 /* nothing is as nothing does */ |
349 break; | 349 break; |
350 | 350 |
351 case IMAGE_TEXT: | 351 case IMAGE_TEXT: |
352 case IMAGE_POINTER: | 352 case IMAGE_POINTER: |
353 default: | 353 default: |
354 abort (); | 354 abort (); |
355 } | 355 } |
356 IMAGE_INSTANCE_OPTIMIZE_OUTPUT | 356 IMAGE_INSTANCE_OPTIMIZE_OUTPUT |
357 (XIMAGE_INSTANCE (instance)) = 0; | 357 (XIMAGE_INSTANCE (instance)) = 0; |
358 } | 358 } |
359 | 359 |
360 xpos += rb->width; | 360 xpos += rb->width; |
361 elt++; | 361 elt++; |
885 | 885 |
886 OUTPUT1_IF (c, TTY_SD (c).orig_pair); | 886 OUTPUT1_IF (c, TTY_SD (c).orig_pair); |
887 OUTPUT1_IF (c, TTY_SD (c).keypad_off); | 887 OUTPUT1_IF (c, TTY_SD (c).keypad_off); |
888 OUTPUT1_IF (c, TTY_SD (c).cursor_normal); | 888 OUTPUT1_IF (c, TTY_SD (c).cursor_normal); |
889 OUTPUT1_IF (c, TTY_SD (c).end_motion); | 889 OUTPUT1_IF (c, TTY_SD (c).end_motion); |
890 tty_output_end (XDEVICE (CONSOLE_SELECTED_DEVICE (c))); | 890 tty_frame_output_end (XFRAME (CONSOLE_SELECTED_FRAME (c))); |
891 } | 891 } |
892 | 892 |
893 /***************************************************************************** | 893 /***************************************************************************** |
894 tty_redisplay_shutdown | 894 tty_redisplay_shutdown |
895 | 895 |
912 redisplay_clear_region (FRAME_SELECTED_WINDOW (f), DEFAULT_INDEX, 0, | 912 redisplay_clear_region (FRAME_SELECTED_WINDOW (f), DEFAULT_INDEX, 0, |
913 f->height, f->width, 1); | 913 f->height, f->width, 1); |
914 | 914 |
915 /* And then stick the cursor there. */ | 915 /* And then stick the cursor there. */ |
916 tty_set_final_cursor_coords (f, f->height, 0); | 916 tty_set_final_cursor_coords (f, f->height, 0); |
917 tty_output_end (XDEVICE (dev)); | 917 tty_frame_output_end (f); |
918 } | 918 } |
919 } | 919 } |
920 } | 920 } |
921 | 921 |
922 | 922 |
923 /* #### Everything below here is old shit. It should either be moved | 923 /* #### Everything below here is old shit. It should either be moved |
924 up or removed. */ | 924 up or removed. */ |
925 | 925 |
926 | 926 |
927 /* FLAGS - these don't need to be console local since only one console | 927 /* FLAGS - these don't need to be console local since only one console |
928 can be being updated at a time. */ | 928 can be being updated at a time. */ |
929 static int insert_mode_on; /* nonzero if in insert mode */ | 929 static int insert_mode_on; /* nonzero if in insert mode */ |
930 static int standout_mode_on; /* nonzero if in standout mode */ | 930 static int standout_mode_on; /* nonzero if in standout mode */ |
931 static int underline_mode_on; /* nonzero if in underline mode */ | 931 static int underline_mode_on; /* nonzero if in underline mode */ |
932 static int alternate_mode_on; /* nonzero if in alternate char set */ | 932 static int alternate_mode_on; /* nonzero if in alternate char set */ |
933 static int attributes_on; /* nonzero if any attributes on */ | 933 static int attributes_on; /* nonzero if any attributes on */ |
1489 CONSOLE_HAS_METHOD (tty, divider_height); | 1489 CONSOLE_HAS_METHOD (tty, divider_height); |
1490 CONSOLE_HAS_METHOD (tty, eol_cursor_width); | 1490 CONSOLE_HAS_METHOD (tty, eol_cursor_width); |
1491 CONSOLE_HAS_METHOD (tty, clear_to_window_end); | 1491 CONSOLE_HAS_METHOD (tty, clear_to_window_end); |
1492 CONSOLE_HAS_METHOD (tty, clear_region); | 1492 CONSOLE_HAS_METHOD (tty, clear_region); |
1493 CONSOLE_HAS_METHOD (tty, clear_frame); | 1493 CONSOLE_HAS_METHOD (tty, clear_frame); |
1494 CONSOLE_HAS_METHOD (tty, output_begin); | 1494 CONSOLE_HAS_METHOD (tty, frame_output_begin); |
1495 CONSOLE_HAS_METHOD (tty, output_end); | 1495 CONSOLE_HAS_METHOD (tty, frame_output_end); |
1496 CONSOLE_HAS_METHOD (tty, flash); | 1496 CONSOLE_HAS_METHOD (tty, flash); |
1497 CONSOLE_HAS_METHOD (tty, ring_bell); | 1497 CONSOLE_HAS_METHOD (tty, ring_bell); |
1498 CONSOLE_HAS_METHOD (tty, set_final_cursor_coords); | 1498 CONSOLE_HAS_METHOD (tty, set_final_cursor_coords); |
1499 } | 1499 } |