comparison src/msdos.c @ 89909:68c22ea6027c

Sync to HEAD
author Kenichi Handa <handa@m17n.org>
date Fri, 16 Apr 2004 12:51:06 +0000
parents 2f877ed80fa6
children 4c90ffeb71c5
comparison
equal deleted inserted replaced
89908:ee1402f7b568 89909:68c22ea6027c
62 #include "window.h" 62 #include "window.h"
63 #include "buffer.h" 63 #include "buffer.h"
64 #include "commands.h" 64 #include "commands.h"
65 #include "blockinput.h" 65 #include "blockinput.h"
66 #include "keyboard.h" 66 #include "keyboard.h"
67 #include "intervals.h"
67 #include <go32.h> 68 #include <go32.h>
68 #include <pc.h> 69 #include <pc.h>
69 #include <ctype.h> 70 #include <ctype.h>
70 /* #include <process.h> */ 71 /* #include <process.h> */
71 /* Damn that local process.h! Instead we can define P_WAIT ourselves. */ 72 /* Damn that local process.h! Instead we can define P_WAIT ourselves. */
410 static unsigned short screen_virtual_segment = 0; 411 static unsigned short screen_virtual_segment = 0;
411 static unsigned short screen_virtual_offset = 0; 412 static unsigned short screen_virtual_offset = 0;
412 /* A flag to control how to display unibyte 8-bit characters. */ 413 /* A flag to control how to display unibyte 8-bit characters. */
413 extern int unibyte_display_via_language_environment; 414 extern int unibyte_display_via_language_environment;
414 415
415 Lisp_Object Qbar, Qhbar; 416 extern Lisp_Object Qcursor_type;
417 extern Lisp_Object Qbar, Qhbar;
416 418
417 /* The screen colors of the current frame, which serve as the default 419 /* The screen colors of the current frame, which serve as the default
418 colors for newly-created frames. */ 420 colors for newly-created frames. */
419 static int initial_screen_colors[2]; 421 static int initial_screen_colors[2];
420 422
1325 /* Clear out the mouse-highlighted active region. 1327 /* Clear out the mouse-highlighted active region.
1326 Redraw it un-highlighted first. */ 1328 Redraw it un-highlighted first. */
1327 static void 1329 static void
1328 clear_mouse_face (struct display_info *dpyinfo) 1330 clear_mouse_face (struct display_info *dpyinfo)
1329 { 1331 {
1330 if (! NILP (dpyinfo->mouse_face_window)) 1332 if (!dpyinfo->mouse_face_hidden && ! NILP (dpyinfo->mouse_face_window))
1331 show_mouse_face (dpyinfo, 0); 1333 show_mouse_face (dpyinfo, 0);
1332 1334
1333 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; 1335 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
1334 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 1336 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
1335 dpyinfo->mouse_face_window = Qnil; 1337 dpyinfo->mouse_face_window = Qnil;
1433 Lisp_Object help, map; 1435 Lisp_Object help, map;
1434 1436
1435 /* Find the glyph under X. */ 1437 /* Find the glyph under X. */
1436 glyph = (row->glyphs[TEXT_AREA] 1438 glyph = (row->glyphs[TEXT_AREA]
1437 + x 1439 + x
1438 /* Does MS-DOG really support scroll-bars?? ++KFS */ 1440 /* in case someone implements scroll bars some day... */
1439 - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w)); 1441 - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w));
1440 end = glyph + row->used[TEXT_AREA]; 1442 end = glyph + row->used[TEXT_AREA];
1441 if (glyph < end 1443 if (glyph < end
1442 && STRINGP (glyph->object) 1444 && STRINGP (glyph->object)
1443 && STRING_INTERVALS (glyph->object) 1445 && STRING_INTERVALS (glyph->object)
1989 static void 1991 static void
1990 IT_update_end (struct frame *f) 1992 IT_update_end (struct frame *f)
1991 { 1993 {
1992 FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; 1994 FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0;
1993 } 1995 }
1994
1995 Lisp_Object Qcursor_type;
1996 1996
1997 static void 1997 static void
1998 IT_frame_up_to_date (struct frame *f) 1998 IT_frame_up_to_date (struct frame *f)
1999 { 1999 {
2000 struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 2000 struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3129 { 3129 {
3130 struct input_event event; 3130 struct input_event event;
3131 union REGS regs; 3131 union REGS regs;
3132 struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME()); 3132 struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME());
3133 EVENT_INIT (event); 3133 EVENT_INIT (event);
3134 3134
3135 #ifndef HAVE_X_WINDOWS 3135 #ifndef HAVE_X_WINDOWS
3136 /* Maybe put the cursor where it should be. */ 3136 /* Maybe put the cursor where it should be. */
3137 IT_cmgoto (SELECTED_FRAME()); 3137 IT_cmgoto (SELECTED_FRAME());
3138 #endif 3138 #endif
3139 3139
3340 if (code == 0) 3340 if (code == 0)
3341 continue; 3341 continue;
3342 3342
3343 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 3343 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
3344 { 3344 {
3345 clear_mouse_face (dpyinfo);
3345 dpyinfo->mouse_face_hidden = 1; 3346 dpyinfo->mouse_face_hidden = 1;
3346 clear_mouse_face (dpyinfo);
3347 } 3347 }
3348 3348
3349 if (code >= 0x100) 3349 if (code >= 0x100)
3350 event.kind = NON_ASCII_KEYSTROKE_EVENT; 3350 event.kind = NON_ASCII_KEYSTROKE_EVENT;
3351 else 3351 else
5264 staticpro (&recent_doskeys); 5264 staticpro (&recent_doskeys);
5265 5265
5266 #ifndef HAVE_X_WINDOWS 5266 #ifndef HAVE_X_WINDOWS
5267 5267
5268 /* The following two are from xfns.c: */ 5268 /* The following two are from xfns.c: */
5269 Qbar = intern ("bar");
5270 staticpro (&Qbar);
5271 Qhbar = intern ("hbar");
5272 staticpro (&Qhbar);
5273 Qcursor_type = intern ("cursor-type");
5274 staticpro (&Qcursor_type);
5275 Qreverse = intern ("reverse"); 5269 Qreverse = intern ("reverse");
5276 staticpro (&Qreverse); 5270 staticpro (&Qreverse);
5277 5271
5278 DEFVAR_LISP ("dos-unsupported-char-glyph", &Vdos_unsupported_char_glyph, 5272 DEFVAR_LISP ("dos-unsupported-char-glyph", &Vdos_unsupported_char_glyph,
5279 doc: /* *Glyph to display instead of chars not supported by current codepage. 5273 doc: /* *Glyph to display instead of chars not supported by current codepage.
5280
5281 This variable is used only by MSDOS terminals. */); 5274 This variable is used only by MSDOS terminals. */);
5282 Vdos_unsupported_char_glyph = '\177'; 5275 Vdos_unsupported_char_glyph = '\177';
5283 5276
5284 #endif 5277 #endif
5285 #ifndef subprocesses 5278 #ifndef subprocesses
5295 defsubr (&Smsdos_remember_default_colors); 5288 defsubr (&Smsdos_remember_default_colors);
5296 defsubr (&Smsdos_set_mouse_buttons); 5289 defsubr (&Smsdos_set_mouse_buttons);
5297 } 5290 }
5298 5291
5299 #endif /* MSDOS */ 5292 #endif /* MSDOS */
5293
5294 /* arch-tag: db404e92-52a5-475f-9eb2-1cb78dd05f30
5295 (do not change this comment) */