-\f
-#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,
- "Return the frame that is now selected.")
- ()
-{
- Lisp_Object tem;
- XFASTINT (tem) = 0;
- return tem;
-}
-DEFUN ("framep", Fframep, Sframep, 1, 1, 0,
- "Return non-nil if OBJECT is a frame.\n\
-Value is t for a termcap frame (a character-only terminal),\n\
-`x' for an Emacs frame that is really an X window.\n\
-Also see `live-frame-p'.")
- (object)
- Lisp_Object object;
-{
- return Qnil;
-}
-
-DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0,
- "Specify that the frame FRAME has LINES lines.\n\
-Optional third arg non-nil means that redisplay should use LINES lines\n\
-but that the idea of the actual height of the frame should not be changed.")
- (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,
- "Specify that the frame FRAME has COLS columns.\n\
-Optional third arg non-nil means that redisplay should use COLS columns\n\
-but that the idea of the actual width of the frame should not be changed.")
- (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,
- "Sets size of FRAME to COLS by ROWS, measured in characters.")
- (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,
- "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,
- "Height in pixels of a line in the font in frame FRAME.\n\
-If FRAME is omitted, the selected frame is used.\n\
-For a terminal frame, the value is always 1.")
- (frame)
- Lisp_Object frame;
-{
- return make_number (1);
-}
-
-
-DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width,
- 0, 1, 0,
- "Width in pixels of characters in the font in frame FRAME.\n\
-If FRAME is omitted, the selected frame is used.\n\
-The width is the same for all characters, because\n\
-currently Emacs supports only fixed-width fonts.\n\
-For a terminal screen, the value is always 1.")
- (frame)
- Lisp_Object frame;
-{
- return make_number (1);
-}
-
-DEFUN ("frame-pixel-height", Fframe_pixel_height,
- Sframe_pixel_height, 0, 1, 0,
- "Return FRAME's height in pixels.\n\
-For a terminal frame, the result really gives the height in characters.\n\
-If FRAME is omitted, the selected frame is used.")
- (frame)
- Lisp_Object frame;
-{
- return make_number (FRAME_HEIGHT (f));
-}
-
-DEFUN ("frame-pixel-width", Fframe_pixel_width,
- Sframe_pixel_width, 0, 1, 0,
- "Return FRAME's width in pixels.\n\
-For a terminal frame, the result really gives the width in characters.\n\
-If FRAME is omitted, the selected frame is used.")
- (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,
- "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\
-The position is given in character cells, where (0, 0) is the\n\
-upper-left corner.\n\
-If Emacs is running on a mouseless terminal or hasn't been programmed\n\
-to read the mouse position, it returns the selected frame for FRAME\n\
-and nil for X and Y.")
- ()
-{
- FRAME_PTR f;
- Lisp_Object lispy_dummy;
- enum scroll_bar_part party_dummy;
- Lisp_Object x, y;
- unsigned long long_dummy;
-
- f = selected_frame;
- x = y = Qnil;
-
- /* It's okay for the hook to refrain from storing anything. */
- if (mouse_position_hook)
- (*mouse_position_hook) (&f,
- &lispy_dummy, &party_dummy,
- &x, &y,
- &long_dummy);
-
- /* Always return nil for frame. */
- return Fcons (Qnil, Fcons (x, y));
-}
-
-syms_of_frame ()
-{
- defsubr (&Sselected_frame);
- 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);
-}
-
-keys_of_frame ()
-{
-}
-
-#endif /* not MULTI_FRAME */
-
-
-
-