-\f
-#else /* not MULTI_FRAME */
-
-/* If we're not using multi-frame stuff, we still need to provide some
- support functions. */
-
-Lisp_Object Qheight;
-Lisp_Object Qminibuffer;
-Lisp_Object Qmodeline;
-Lisp_Object Qname;
-Lisp_Object Qunsplittable;
-Lisp_Object Qmenu_bar_lines;
-Lisp_Object Qwidth;
-
-Lisp_Object Vterminal_frame;
-
-/* 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)
- ()
-{
- Lisp_Object tem;
- XFASTINT (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;
-{
- 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;
-}
-\f
-DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0,
- "Return number of lines available for display on FRAME.\n\
-If FRAME is omitted, describe the currently selected frame.")
- (frame)
- Lisp_Object frame;
-{
- return make_number (FRAME_HEIGHT (selected_frame));
-}
-
-DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0,
- "Return number of columns available for display on FRAME.\n\
-If FRAME is omitted, describe the currently selected frame.")
- (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,
- "Tell redisplay that the screen has LINES lines.\n\
-Optional second arg non-nil means that redisplay should use LINES lines\n\
-but that the idea of the actual height of the screen should not be changed.")
- (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,
- "Tell redisplay that the screen has COLS columns.\n\
-Optional second arg non-nil means that redisplay should use COLS columns\n\
-but that the idea of the actual width of the screen should not be changed.")
- (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)
- ()
-{
- return Fcons (Qnil, Fcons (Qnil, Qnil));
-}
-\f
-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;
-
- if (EQ (frame, Qnil))
- f = selected_frame;
- else
- {
- CHECK_FRAME (frame, 0);
- f = XFRAME (frame);
- }
-
- if (!FRAME_LIVE_P (f))
- return Qnil;
-
- alist = Qnil;
- store_in_alist (&alist, Qname, build_string ("emacs"));
- store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f)));
- store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f)));
- 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;
-{
- 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;
-}
-
-syms_of_frame ()
-{
- Qheight = intern ("height");
- staticpro (&Qheight);
- Qminibuffer = intern ("minibuffer");
- staticpro (&Qminibuffer);
- Qmodeline = intern ("modeline");
- staticpro (&Qmodeline);
- Qname = intern ("name");
- staticpro (&Qname);
- Qunsplittable = intern ("unsplittable");
- staticpro (&Qunsplittable);
- Qmenu_bar_lines = intern ("menu-bar-lines");
- staticpro (&Qmenu_bar_lines);
- Qwidth = intern ("width");
- staticpro (&Qwidth);
-
- DEFVAR_LISP ("terminal-frame", &Vterminal_frame,
- "The initial frame-object, which represents Emacs's stdout.");
- XFASTINT (Vterminal_frame) = 0;
-
- defsubr (&Sselected_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);
- defsubr (&Sframe_parameters);
- defsubr (&Smodify_frame_parameters);
- defsubr (&Sframe_live_p);
-}
-
-keys_of_frame ()
-{
-}
-
-#endif /* not MULTI_FRAME */