comparison src/frame.c @ 15391:d4cec5d7566d

(Fset_mouse_position): Remove the DOS-specific definition (it's defined on `frame.c'). (syms_of_dosfns): Remove defsubr of `Fset_mouse_position'.
author Richard M. Stallman <rms@gnu.org>
date Mon, 10 Jun 1996 21:08:24 +0000
parents de7528327c39
children ac7e878c5526
comparison
equal deleted inserted replaced
15390:d01198d2bc40 15391:d4cec5d7566d
76 Lisp_Object Qunsplittable; 76 Lisp_Object Qunsplittable;
77 Lisp_Object Qmenu_bar_lines; 77 Lisp_Object Qmenu_bar_lines;
78 Lisp_Object Qwidth; 78 Lisp_Object Qwidth;
79 Lisp_Object Qx; 79 Lisp_Object Qx;
80 Lisp_Object Qwin32; 80 Lisp_Object Qwin32;
81 Lisp_Object Qpc;
81 Lisp_Object Qvisible; 82 Lisp_Object Qvisible;
82 Lisp_Object Qbuffer_predicate; 83 Lisp_Object Qbuffer_predicate;
83 Lisp_Object Qtitle; 84 Lisp_Object Qtitle;
84 85
85 Lisp_Object Vterminal_frame; 86 Lisp_Object Vterminal_frame;
115 staticpro (&Qwidth); 116 staticpro (&Qwidth);
116 Qx = intern ("x"); 117 Qx = intern ("x");
117 staticpro (&Qx); 118 staticpro (&Qx);
118 Qwin32 = intern ("win32"); 119 Qwin32 = intern ("win32");
119 staticpro (&Qwin32); 120 staticpro (&Qwin32);
121 Qpc = intern ("pc");
122 staticpro (&Qpc);
120 Qvisible = intern ("visible"); 123 Qvisible = intern ("visible");
121 staticpro (&Qvisible); 124 staticpro (&Qvisible);
122 Qbuffer_predicate = intern ("buffer-predicate"); 125 Qbuffer_predicate = intern ("buffer-predicate");
123 staticpro (&Qbuffer_predicate); 126 staticpro (&Qbuffer_predicate);
124 Qtitle = intern ("title"); 127 Qtitle = intern ("title");
227 return Qt; 230 return Qt;
228 case output_x_window: 231 case output_x_window:
229 return Qx; 232 return Qx;
230 case output_win32: 233 case output_win32:
231 return Qwin32; 234 return Qwin32;
232 /* The `pc' case is in the Fframep below. */ 235 case output_msdos_raw:
236 return Qpc;
233 default: 237 default:
234 abort (); 238 abort ();
235 } 239 }
236 } 240 }
237 241
496 f->name = build_string (name); 500 f->name = build_string (name);
497 } 501 }
498 502
499 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ 503 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
500 f->async_visible = 1; /* Don't let visible be cleared later. */ 504 f->async_visible = 1; /* Don't let visible be cleared later. */
505 #ifdef MSDOS
506 f->output_data.x = &the_only_x_display;
507 f->output_method = output_msdos_raw;
508 init_frame_faces (f);
509 #else /* not MSDOS */
501 f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */ 510 f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */
511 #endif
502 return f; 512 return f;
503 } 513 }
504 514
505 DEFUN ("make-terminal-frame", Fmake_terminal_frame, Smake_terminal_frame, 515 DEFUN ("make-terminal-frame", Fmake_terminal_frame, Smake_terminal_frame,
506 1, 1, 0, "Create an additional terminal frame.\n\ 516 1, 1, 0, "Create an additional terminal frame.\n\
513 Lisp_Object parms; 523 Lisp_Object parms;
514 { 524 {
515 struct frame *f; 525 struct frame *f;
516 Lisp_Object frame; 526 Lisp_Object frame;
517 527
528 #ifdef __MSDOS__
529 if (selected_frame->output_method != output_msdos_raw)
530 abort ();
531 #else
518 if (selected_frame->output_method != output_termcap) 532 if (selected_frame->output_method != output_termcap)
519 error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); 533 error ("Not using an ASCII terminal now; cannot make a new ASCII frame");
534 #endif
520 535
521 f = make_terminal_frame (); 536 f = make_terminal_frame ();
522 change_frame_size (f, FRAME_HEIGHT (selected_frame), 537 change_frame_size (f, FRAME_HEIGHT (selected_frame),
523 FRAME_WIDTH (selected_frame), 0, 0); 538 FRAME_WIDTH (selected_frame), 0, 0);
524 remake_frame_glyphs (f); 539 remake_frame_glyphs (f);
1324 /* I think this should be done with a hook. */ 1339 /* I think this should be done with a hook. */
1325 #ifdef HAVE_WINDOW_SYSTEM 1340 #ifdef HAVE_WINDOW_SYSTEM
1326 if (FRAME_WINDOW_P (XFRAME (frame))) 1341 if (FRAME_WINDOW_P (XFRAME (frame)))
1327 /* Warping the mouse will cause enternotify and focus events. */ 1342 /* Warping the mouse will cause enternotify and focus events. */
1328 x_set_mouse_position (XFRAME (frame), x, y); 1343 x_set_mouse_position (XFRAME (frame), x, y);
1344 #else
1345 #if defined(MSDOS) && defined(HAVE_MOUSE)
1346 if (FRAME_MSDOS_P (XFRAME (frame)))
1347 {
1348 Fselect_frame (frame, Qnil);
1349 mouse_moveto (XINT (x), XINT (y));
1350 }
1351 #endif
1329 #endif 1352 #endif
1330 1353
1331 return Qnil; 1354 return Qnil;
1332 } 1355 }
1333 1356
1348 /* I think this should be done with a hook. */ 1371 /* I think this should be done with a hook. */
1349 #ifdef HAVE_WINDOW_SYSTEM 1372 #ifdef HAVE_WINDOW_SYSTEM
1350 if (FRAME_WINDOW_P (XFRAME (frame))) 1373 if (FRAME_WINDOW_P (XFRAME (frame)))
1351 /* Warping the mouse will cause enternotify and focus events. */ 1374 /* Warping the mouse will cause enternotify and focus events. */
1352 x_set_mouse_pixel_position (XFRAME (frame), x, y); 1375 x_set_mouse_pixel_position (XFRAME (frame), x, y);
1376 #else
1377 #if defined(MSDOS) && defined(HAVE_MOUSE)
1378 if (FRAME_MSDOS_P (XFRAME (frame)))
1379 {
1380 Fselect_frame (frame, Qnil);
1381 mouse_moveto (XINT (x), XINT (y));
1382 }
1383 #endif
1353 #endif 1384 #endif
1354 1385
1355 return Qnil; 1386 return Qnil;
1356 } 1387 }
1357 1388
1711 1742
1712 if (!FRAME_LIVE_P (f)) 1743 if (!FRAME_LIVE_P (f))
1713 return Qnil; 1744 return Qnil;
1714 1745
1715 alist = Fcopy_alist (f->param_alist); 1746 alist = Fcopy_alist (f->param_alist);
1747 #ifdef MSDOS
1748 if (FRAME_MSDOS_P (f))
1749 {
1750 static char *colornames[16] =
1751 {
1752 "black", "blue", "green", "cyan", "red", "magenta", "brown",
1753 "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan",
1754 "lightred", "lightmagenta", "yellow", "white"
1755 };
1756 store_in_alist (&alist, intern ("foreground-color"),
1757 build_string (colornames[FRAME_FOREGROUND_PIXEL (f)]));
1758 store_in_alist (&alist, intern ("background-color"),
1759 build_string (colornames[FRAME_BACKGROUND_PIXEL (f)]));
1760 }
1761 store_in_alist (&alist, intern ("font"), build_string ("default"));
1762 #endif
1716 store_in_alist (&alist, Qname, f->name); 1763 store_in_alist (&alist, Qname, f->name);
1717 height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); 1764 height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f));
1718 store_in_alist (&alist, Qheight, make_number (height)); 1765 store_in_alist (&alist, Qheight, make_number (height));
1719 width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); 1766 width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f));
1720 store_in_alist (&alist, Qwidth, make_number (width)); 1767 store_in_alist (&alist, Qwidth, make_number (width));
1762 1809
1763 /* I think this should be done with a hook. */ 1810 /* I think this should be done with a hook. */
1764 #ifdef HAVE_WINDOW_SYSTEM 1811 #ifdef HAVE_WINDOW_SYSTEM
1765 if (FRAME_WINDOW_P (f)) 1812 if (FRAME_WINDOW_P (f))
1766 x_set_frame_parameters (f, alist); 1813 x_set_frame_parameters (f, alist);
1814 else
1815 #endif
1816 #ifdef MSDOS
1817 if (FRAME_MSDOS_P (f))
1818 IT_set_frame_parameters (f, alist);
1767 else 1819 else
1768 #endif 1820 #endif
1769 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) 1821 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail))
1770 { 1822 {
1771 elt = Fcar (tail); 1823 elt = Fcar (tail);