diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-09-01 21:04:32 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-09-01 21:04:32 +0000 |
commit | e3678b64333787df03e203b1ed5a4c2ec76d0272 (patch) | |
tree | 1477eeda61aa36cf198eeb1af76a351bb424464c /src/frame.c | |
parent | 8c09486ac8aff2efb726ea76a58bcbac030b7bfa (diff) | |
download | emacs-e3678b64333787df03e203b1ed5a4c2ec76d0272.tar.gz |
Removed support for !MULTI_FRAME.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 430 |
1 files changed, 1 insertions, 429 deletions
diff --git a/src/frame.c b/src/frame.c index 06d2fbf48d2..8dea582b7c8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -62,8 +62,6 @@ Boston, MA 02111-1307, USA. */ (setq symbol-list (cdr symbol-list))))) */ -/* We need most of these symbols even if not MULTI_FRAME; - easiest to define them all, all of the time. */ /*&&& symbols declared here &&&*/ Lisp_Object Qframep; Lisp_Object Qframe_live_p; @@ -172,7 +170,7 @@ set_menu_bar_lines (f, value, oldval) /* Right now, menu bars don't work properly in minibuf-only frames; most of the commands try to apply themselves to the minibuffer - frame itslef, and get an error because you can't switch buffers + frame itself, and get an error because you can't switch buffers in or split the minibuffer window. */ if (FRAME_MINIBUF_ONLY_P (f)) return; @@ -191,8 +189,6 @@ set_menu_bar_lines (f, value, oldval) } } -#ifdef MULTI_FRAME - #include "buffer.h" /* These help us bind and responding to switch-frame events. */ @@ -2133,427 +2129,3 @@ keys_of_frame () initial_define_lispy_key (global_map, "iconify-frame", "ignore-event"); initial_define_lispy_key (global_map, "make-frame-visible", "ignore-event"); } - -#else /* not MULTI_FRAME */ - -/* If we're not using multi-frame stuff, we still need to provide some - support functions. */ - -/* Unless this function is defined, providing set-frame-height and - set-frame-width doesn't help compatibility any, since they both - want this as their first argument. */ -DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - /* For your possible information, this code is unfolded into the - second WINDOW_FRAME in frame.h. */ - Lisp_Object tem; - XSETFASTINT (tem, 0); - return tem; -} - -DEFUN ("active-minibuffer-window", Factive_minibuffer_window, - Sactive_minibuffer_window, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - return minibuf_level ? minibuf_window : Qnil; -} - -DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (window) - Lisp_Object window; -{ - /* For your possible information, this code is unfolded into the - second WINDOW_FRAME in frame.h. */ - Lisp_Object tem; - XSETFASTINT (tem, 0); - return tem; -} - -DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, - 0) - (frame) - Lisp_Object frame; -{ - Lisp_Object w; - - w = FRAME_ROOT_WINDOW (selected_frame); - - while (NILP (XWINDOW (w)->buffer)) - { - if (! NILP (XWINDOW (w)->hchild)) - w = XWINDOW (w)->hchild; - else if (! NILP (XWINDOW (w)->vchild)) - w = XWINDOW (w)->vchild; - else - abort (); - } - return w; -} - -DEFUN ("framep", Fframep, Sframep, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (object) - Lisp_Object object; -{ -#ifdef MSDOS - if (FRAME_X_P (object)) - return intern ("pc"); -#endif - return Qnil; -} - -DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, rows, pretend) - Lisp_Object frame, rows, pretend; -{ - CHECK_NUMBER (rows, 0); - - change_frame_size (0, XINT (rows), 0, !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, cols, pretend) - Lisp_Object frame, cols, pretend; -{ - CHECK_NUMBER (cols, 0); - - change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, cols, rows) - Lisp_Object frame, cols, rows; -{ - CHECK_NUMBER (cols, 2); - CHECK_NUMBER (rows, 1); - - change_frame_size (0, XINT (rows), XINT (cols), 0, 0); - - return Qnil; -} - -DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_HEIGHT (selected_frame)); -} - -DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_WIDTH (selected_frame)); -} - -DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, - 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (1); -} - - -DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width, - 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (1); -} - -DEFUN ("frame-pixel-height", Fframe_pixel_height, - Sframe_pixel_height, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_HEIGHT (f)); -} - -DEFUN ("frame-pixel-width", Fframe_pixel_width, - Sframe_pixel_width, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_WIDTH (f)); -} - -/* These are for backward compatibility with Emacs 18. */ - -DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (lines, pretend) - Lisp_Object lines, pretend; -{ - CHECK_NUMBER (lines, 0); - - change_frame_size (0, XINT (lines), 0, !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-screen-width", Fset_screen_width, Sset_screen_width, 1, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (cols, pretend) - Lisp_Object cols, pretend; -{ - CHECK_NUMBER (cols, 0); - - change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ -#ifdef HAVE_MOUSE - if (mouse_position_hook) - { - FRAME_PTR f; - Lisp_Object lispy_dummy; - enum scroll_bar_part party_dummy; - Lisp_Object x, y; - unsigned long long_dummy; - - (*mouse_position_hook) (&f, 0, - &lispy_dummy, &party_dummy, - &x, &y, - &long_dummy); - return Fcons (Fselected_frame (), Fcons (x, y)); - } -#endif - return Fcons (Qnil, Fcons (Qnil, Qnil)); -} - -void -store_in_alist (alistptr, prop, val) - Lisp_Object *alistptr, val; - Lisp_Object prop; -{ - register Lisp_Object tem; - - tem = Fassq (prop, *alistptr); - if (EQ (tem, Qnil)) - *alistptr = Fcons (Fcons (prop, val), *alistptr); - else - Fsetcdr (tem, val); -} - -DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - Lisp_Object alist; - FRAME_PTR f; - int height, width; - - if (EQ (frame, Qnil)) - f = selected_frame; - else - { - CHECK_FRAME (frame, 0); - f = XFRAME (frame); - } - - if (!FRAME_LIVE_P (f)) - return Qnil; - - alist = Qnil; -#ifdef MSDOS - if (FRAME_X_P (f)) - { - static char *colornames[16] = - { - "black", "blue", "green", "cyan", "red", "magenta", "brown", - "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan", - "lightred", "lightmagenta", "yellow", "white" - }; - store_in_alist (&alist, intern ("foreground-color"), - build_string (colornames[FRAME_FOREGROUND_PIXEL (f)])); - store_in_alist (&alist, intern ("background-color"), - build_string (colornames[FRAME_BACKGROUND_PIXEL (f)])); - } -#endif - store_in_alist (&alist, intern ("font"), build_string ("default")); - store_in_alist (&alist, Qname, build_string ("emacs")); - height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); - store_in_alist (&alist, Qheight, make_number (height)); - width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); - store_in_alist (&alist, Qwidth, make_number (width)); - store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); - store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); - store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); - store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); - - return alist; -} - -DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, - Smodify_frame_parameters, 2, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, alist) - Lisp_Object frame, alist; -{ - Lisp_Object tail, elt, prop, val; - FRAME_PTR f; - - if (NILP (frame)) - f = selected_frame; - else - { - CHECK_LIVE_FRAME (frame, 0); - f = XFRAME (frame); - } - -#ifdef MSDOS - if (FRAME_X_P (frame)) - IT_set_frame_parameters (XFRAME (frame), alist); - else -#endif - for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) - { - elt = Fcar (tail); - prop = Fcar (elt); - val = Fcdr (elt); - if (EQ (prop, Qmenu_bar_lines)) - set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f))); - } - - return Qnil; -} - -DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return Qt; -} - -DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return Qt; -} - -DEFUN ("frame-list", Fframe_list, Sframe_list, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - return Fcons (Fselected_frame (), Qnil); -} - -syms_of_frame () -{ - syms_of_frame_1 (); - - DEFVAR_LISP ("terminal-frame", &Vterminal_frame, - /* Don't confuse make-docfile by having two doc strings for this variable. - make-docfile does not pay attention to #if, for good reason! */ - 0); - XSETFASTINT (Vterminal_frame, 0); - - defsubr (&Sselected_frame); - defsubr (&Sactive_minibuffer_window); - defsubr (&Swindow_frame); - defsubr (&Sframe_first_window); - defsubr (&Sframep); - defsubr (&Sframe_char_height); - defsubr (&Sframe_char_width); - defsubr (&Sframe_pixel_height); - defsubr (&Sframe_pixel_width); - defsubr (&Sset_frame_height); - defsubr (&Sset_frame_width); - defsubr (&Sset_frame_size); - defsubr (&Sset_screen_height); - defsubr (&Sset_screen_width); - defsubr (&Sframe_height); - Ffset (intern ("screen-height"), intern ("frame-height")); - defsubr (&Sframe_width); - Ffset (intern ("screen-width"), intern ("frame-width")); - defsubr (&Smouse_position); - Ffset (intern ("mouse-pixel-position"), intern ("mouse-position")); - defsubr (&Sframe_parameters); - defsubr (&Smodify_frame_parameters); - defsubr (&Sframe_live_p); - defsubr (&Sframe_visible_p); - defsubr (&Sframe_list); - -#ifdef MSDOS - /* A comment in dispnew.c says the_only_frame is not protected. */ - the_only_frame.face_alist = Qnil; - staticpro (&the_only_frame.face_alist); - the_only_frame.menu_bar_items = Qnil; - staticpro (&the_only_frame.menu_bar_items); - the_only_frame.menu_bar_vector = Qnil; - staticpro (&the_only_frame.menu_bar_vector); - the_only_frame.menu_bar_items = menu_bar_items (Qnil); -#endif -} - -keys_of_frame () -{ -} - -#endif /* not MULTI_FRAME */ |