1 /* Generic frame functions.
2 Copyright (C) 1989, 1992, 1993 Free Software Foundation.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
30 #include "termhooks.h"
32 /* These help us bind and responding to switch-frame events. */
36 Lisp_Object Vemacs_iconified
;
37 Lisp_Object Vframe_list
;
38 Lisp_Object Vterminal_frame
;
39 Lisp_Object Vdefault_minibuffer_frame
;
40 Lisp_Object Vdefault_frame_alist
;
42 /* Evaluate this expression to rebuild the section of syms_of_frame
43 that initializes and staticpros the symbols declared below. Note
44 that Emacs 18 has a bug that keeps C-x C-e from being able to
45 evaluate this expression.
48 ;; Accumulate a list of the symbols we want to initialize from the
49 ;; declarations at the top of the file.
50 (goto-char (point-min))
51 (search-forward "/\*&&& symbols declared here &&&*\/\n")
53 (while (looking-at "Lisp_Object \\(Q[a-z_]+\\)")
55 (cons (buffer-substring (match-beginning 1) (match-end 1))
58 (setq symbol-list (nreverse symbol-list))
59 ;; Delete the section of syms_of_... where we initialize the symbols.
60 (search-forward "\n /\*&&& init symbols here &&&*\/\n")
61 (let ((start (point)))
62 (while (looking-at "^ Q")
64 (kill-region start (point)))
65 ;; Write a new symbol initialization section.
67 (insert (format " %s = intern (\"" (car symbol-list)))
68 (let ((start (point)))
69 (insert (substring (car symbol-list) 1))
70 (subst-char-in-region start (point) ?_ ?-))
71 (insert (format "\");\n staticpro (&%s);\n" (car symbol-list)))
72 (setq symbol-list (cdr symbol-list)))))
75 /*&&& symbols declared here &&&*/
77 Lisp_Object Qframe_live_p
;
80 Lisp_Object Qminibuffer
;
81 Lisp_Object Qmodeline
;
84 Lisp_Object Qunsplittable
;
85 Lisp_Object Qmenu_bar_lines
;
89 extern Lisp_Object Vminibuffer_list
;
90 extern Lisp_Object
get_minibuffer ();
92 DEFUN ("framep", Fframep
, Sframep
, 1, 1, 0,
93 "Return non-nil if OBJECT is a frame.\n\
94 Value is t for a termcap frame (a character-only terminal),\n\
95 `x' for an Emacs frame that is really an X window.\n\
96 Also see `live-frame-p'.")
100 if (XTYPE (object
) != Lisp_Frame
)
102 switch (XFRAME (object
)->output_method
)
106 case output_x_window
:
113 DEFUN ("frame-live-p", Fframe_live_p
, Sframe_live_p
, 1, 1, 0,
114 "Return non-nil if OBJECT is a frame which has not been deleted.\n\
115 Value is nil if OBJECT is not a live frame. If object is a live\n\
116 frame, the return value indicates what sort of output device it is\n\
117 displayed on. Value is t for a termcap frame (a character-only\n\
118 terminal), `x' for an Emacs frame being displayed in an X window.")
122 return ((FRAMEP (object
)
123 && FRAME_LIVE_P (XFRAME (object
)))
133 register struct frame
*f
;
134 register Lisp_Object root_window
;
135 register Lisp_Object mini_window
;
137 frame
= Fmake_vector (((sizeof (struct frame
) - (sizeof (Lisp_Vector
)
138 - sizeof (Lisp_Object
)))
139 / sizeof (Lisp_Object
)),
141 XSETTYPE (frame
, Lisp_Frame
);
146 f
->current_glyphs
= 0;
147 f
->desired_glyphs
= 0;
149 f
->async_visible
= 0;
150 f
->display
.nothing
= 0;
152 f
->async_iconified
= 0;
153 f
->wants_modeline
= 1;
158 f
->has_minibuffer
= mini_p
;
159 f
->focus_frame
= Qnil
;
160 f
->explicit_name
= 0;
161 f
->can_have_scroll_bars
= 0;
162 f
->has_vertical_scroll_bars
= 0;
163 f
->param_alist
= Qnil
;
164 f
->scroll_bars
= Qnil
;
165 f
->condemned_scroll_bars
= Qnil
;
167 root_window
= make_window ();
170 mini_window
= make_window ();
171 XWINDOW (root_window
)->next
= mini_window
;
172 XWINDOW (mini_window
)->prev
= root_window
;
173 XWINDOW (mini_window
)->mini_p
= Qt
;
174 XWINDOW (mini_window
)->frame
= frame
;
175 f
->minibuffer_window
= mini_window
;
180 XWINDOW (root_window
)->next
= Qnil
;
181 f
->minibuffer_window
= Qnil
;
184 XWINDOW (root_window
)->frame
= frame
;
187 just so that there is "something there."
188 Correct size will be set up later with change_frame_size. */
193 XFASTINT (XWINDOW (root_window
)->width
) = 10;
194 XFASTINT (XWINDOW (root_window
)->height
) = (mini_p
? 9 : 10);
198 XFASTINT (XWINDOW (mini_window
)->width
) = 10;
199 XFASTINT (XWINDOW (mini_window
)->top
) = 9;
200 XFASTINT (XWINDOW (mini_window
)->height
) = 1;
203 /* Choose a buffer for the frame's root window. */
207 XWINDOW (root_window
)->buffer
= Qt
;
208 buf
= Fcurrent_buffer ();
209 /* If buf is a 'hidden' buffer (i.e. one whose name starts with
210 a space), try to find another one. */
211 if (XSTRING (Fbuffer_name (buf
))->data
[0] == ' ')
212 buf
= Fother_buffer (buf
, Qnil
);
213 Fset_window_buffer (root_window
, buf
);
218 XWINDOW (mini_window
)->buffer
= Qt
;
219 Fset_window_buffer (mini_window
,
220 (NILP (Vminibuffer_list
)
222 : Fcar (Vminibuffer_list
)));
225 f
->root_window
= root_window
;
226 f
->selected_window
= root_window
;
227 /* Make sure this window seems more recently used than
228 a newly-created, never-selected window. */
229 XFASTINT (XWINDOW (f
->selected_window
)->use_time
) = ++window_select_count
;
231 Vframe_list
= Fcons (frame
, Vframe_list
);
236 /* Make a frame using a separate minibuffer window on another frame.
237 MINI_WINDOW is the minibuffer window to use. nil means use the
238 default (the global minibuffer). */
241 make_frame_without_minibuffer (mini_window
)
242 register Lisp_Object mini_window
;
244 register struct frame
*f
;
246 /* Choose the minibuffer window to use. */
247 if (NILP (mini_window
))
249 if (XTYPE (Vdefault_minibuffer_frame
) != Lisp_Frame
)
250 error ("default-minibuffer-frame must be set when creating minibufferless frames");
251 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame
)))
252 error ("default-minibuffer-frame must be a live frame");
253 mini_window
= XFRAME (Vdefault_minibuffer_frame
)->minibuffer_window
;
257 CHECK_LIVE_WINDOW (mini_window
, 0);
260 /* Make a frame containing just a root window. */
263 /* Install the chosen minibuffer window, with proper buffer. */
264 f
->minibuffer_window
= mini_window
;
265 Fset_window_buffer (mini_window
,
266 (NILP (Vminibuffer_list
)
268 : Fcar (Vminibuffer_list
)));
272 /* Make a frame containing only a minibuffer window. */
275 make_minibuffer_frame ()
277 /* First make a frame containing just a root window, no minibuffer. */
279 register struct frame
*f
= make_frame (0);
280 register Lisp_Object mini_window
;
281 register Lisp_Object frame
;
283 XSET (frame
, Lisp_Frame
, f
);
288 f
->wants_modeline
= 0;
289 f
->has_minibuffer
= 1;
291 /* Now label the root window as also being the minibuffer.
292 Avoid infinite looping on the window chain by marking next pointer
295 mini_window
= f
->minibuffer_window
= f
->root_window
;
296 XWINDOW (mini_window
)->mini_p
= Qt
;
297 XWINDOW (mini_window
)->next
= Qnil
;
298 XWINDOW (mini_window
)->prev
= Qnil
;
299 XWINDOW (mini_window
)->frame
= frame
;
301 /* Put the proper buffer in that window. */
303 Fset_window_buffer (mini_window
,
304 (NILP (Vminibuffer_list
)
306 : Fcar (Vminibuffer_list
)));
310 /* Construct a frame that refers to the terminal (stdin and stdout). */
313 make_terminal_frame ()
315 register struct frame
*f
;
319 f
->name
= build_string ("terminal");
320 FRAME_SET_VISIBLE (f
, 1);
321 f
->display
.nothing
= 1; /* Nonzero means frame isn't deleted. */
322 XSET (Vterminal_frame
, Lisp_Frame
, f
);
326 DEFUN ("select-frame", Fselect_frame
, Sselect_frame
, 1, 2, "e",
327 "Select the frame FRAME.\n\
328 Subseqent editing commands apply to its selected window.\n\
329 The selection of FRAME lasts until the next time the user does\n\
330 something to select a different frame, or until the next time this\n\
331 function is called.")
333 Lisp_Object frame
, no_enter
;
335 return Fhandle_switch_frame (frame
, no_enter
);
339 DEFUN ("handle-switch-frame", Fhandle_switch_frame
, Shandle_switch_frame
, 1, 2, "e",
340 "Handle a switch-frame event EVENT.\n\
341 Switch-frame events is usually bound to this function.\n\
342 A switch-frame event tells Emacs that the window manager has requested\n\
343 that the user's events be directed to the frame mentioned in the event.\n\
344 This function selects the selected window of the frame of EVENT.\n\
346 If EVENT is frame object, handle it as if it were a switch-frame event\n\
349 Lisp_Object frame
, no_enter
;
351 /* If FRAME is a switch-frame event, extract the frame we should
354 && EQ (XCONS (frame
)->car
, Qswitch_frame
)
355 && CONSP (XCONS (frame
)->cdr
))
356 frame
= XCONS (XCONS (frame
)->cdr
)->car
;
358 CHECK_LIVE_FRAME (frame
, 0);
360 if (selected_frame
== XFRAME (frame
))
363 /* If a frame's focus has been redirected toward the currently
364 selected frame, we should change the redirection to point to the
365 newly selected frame. This means that if the focus is redirected
366 from a minibufferless frame to a surrogate minibuffer frame, we
367 can use `other-window' to switch between all the frames using
368 that minibuffer frame, and the focus redirection will follow us
373 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
377 if (XTYPE (XCONS (tail
)->car
) != Lisp_Frame
)
380 focus
= FRAME_FOCUS_FRAME (XFRAME (XCONS (tail
)->car
));
382 if (XTYPE (focus
) == Lisp_Frame
383 && XFRAME (focus
) == selected_frame
)
384 Fredirect_frame_focus (XCONS (tail
)->car
, frame
);
388 selected_frame
= XFRAME (frame
);
389 if (! FRAME_MINIBUF_ONLY_P (selected_frame
))
390 last_nonminibuf_frame
= selected_frame
;
392 Fselect_window (XFRAME (frame
)->selected_window
);
394 /* I think this should be done with a hook. */
395 #ifdef HAVE_X_WINDOWS
396 if (FRAME_X_P (XFRAME (frame
))
399 Ffocus_frame (frame
);
402 choose_minibuf_frame ();
404 /* We want to make sure that the next event generates a frame-switch
405 event to the appropriate frame. This seems kludgey to me, but
406 before you take it out, make sure that evaluating something like
407 (select-window (frame-root-window (new-frame))) doesn't end up
408 with your typing being interpreted in the new frame instead of
409 the one you're actually typing in. */
410 internal_last_event_frame
= Qnil
;
415 DEFUN ("selected-frame", Fselected_frame
, Sselected_frame
, 0, 0, 0,
416 "Return the frame that is now selected.")
420 XSET (tem
, Lisp_Frame
, selected_frame
);
424 DEFUN ("window-frame", Fwindow_frame
, Swindow_frame
, 1, 1, 0,
425 "Return the frame object that window WINDOW is on.")
429 CHECK_LIVE_WINDOW (window
, 0);
430 return XWINDOW (window
)->frame
;
433 DEFUN ("frame-root-window", Fframe_root_window
, Sframe_root_window
, 0, 1, 0,
434 "Returns the root-window of FRAME.\n\
435 If omitted, FRAME defaults to the currently selected frame.")
440 XSET (frame
, Lisp_Frame
, selected_frame
);
442 CHECK_LIVE_FRAME (frame
, 0);
444 return XFRAME (frame
)->root_window
;
447 DEFUN ("frame-selected-window", Fframe_selected_window
,
448 Sframe_selected_window
, 0, 1, 0,
449 "Return the selected window of frame object FRAME.\n\
450 If omitted, FRAME defaults to the currently selected frame.")
455 XSET (frame
, Lisp_Frame
, selected_frame
);
457 CHECK_LIVE_FRAME (frame
, 0);
459 return XFRAME (frame
)->selected_window
;
462 DEFUN ("frame-list", Fframe_list
, Sframe_list
,
464 "Return a list of all frames.")
467 return Fcopy_sequence (Vframe_list
);
470 /* Return the next frame in the frame list after FRAME.
471 If MINIBUF is nil, exclude minibuffer-only frames.
472 If MINIBUF is a window, include only frames using that window for
474 If MINIBUF is non-nil, and not a window, include all frames. */
476 next_frame (frame
, minibuf
)
483 /* There must always be at least one frame in Vframe_list. */
484 if (! CONSP (Vframe_list
))
487 /* If this frame is dead, it won't be in Vframe_list, and we'll loop
488 forever. Forestall that. */
489 CHECK_LIVE_FRAME (frame
, 0);
492 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
494 Lisp_Object f
= XCONS (tail
)->car
;
498 /* Decide whether this frame is eligible to be returned. */
500 /* If we've looped all the way around without finding any
501 eligible frames, return the original frame. */
505 /* Let minibuf decide if this frame is acceptable. */
508 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f
)))
511 else if (XTYPE (minibuf
) == Lisp_Window
)
513 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f
)), minibuf
))
525 /* Return the previous frame in the frame list before FRAME.
526 If MINIBUF is nil, exclude minibuffer-only frames.
527 If MINIBUF is a window, include only frames using that window for
529 If MINIBUF is non-nil and not a window, include all frames. */
531 prev_frame (frame
, minibuf
)
538 /* There must always be at least one frame in Vframe_list. */
539 if (! CONSP (Vframe_list
))
543 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
545 Lisp_Object f
= XCONS (tail
)->car
;
547 if (XTYPE (f
) != Lisp_Frame
)
550 if (EQ (frame
, f
) && !NILP (prev
))
553 /* Decide whether this frame is eligible to be returned,
554 according to minibuf. */
557 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f
)))
560 else if (XTYPE (minibuf
) == Lisp_Window
)
562 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f
)), minibuf
))
569 /* We've scanned the entire list. */
571 /* We went through the whole frame list without finding a single
572 acceptable frame. Return the original frame. */
575 /* There were no acceptable frames in the list before FRAME; otherwise,
576 we would have returned directly from the loop. Since PREV is the last
577 acceptable frame in the list, return it. */
581 DEFUN ("next-frame", Fnext_frame
, Snext_frame
, 0, 2, 0,
582 "Return the next frame in the frame list after FRAME.\n\
583 By default, skip minibuffer-only frames.\n\
584 If omitted, FRAME defaults to the selected frame.\n\
585 If optional argument MINIFRAME is non-nil, include minibuffer-only frames.\n\
586 If MINIFRAME is a window, include only frames using that window for their\n\
588 If MINIFRAME is non-nil and not a window, include all frames.")
590 Lisp_Object frame
, miniframe
;
595 XSET (frame
, Lisp_Frame
, selected_frame
);
597 CHECK_LIVE_FRAME (frame
, 0);
599 return next_frame (frame
, miniframe
);
603 DEFUN ("delete-frame", Fdelete_frame
, Sdelete_frame
, 0, 1, "",
604 "Delete FRAME, permanently eliminating it from use.\n\
605 If omitted, FRAME defaults to the selected frame.\n\
606 A frame may not be deleted if its minibuffer is used by other frames.")
612 if (EQ (frame
, Qnil
))
615 XSET (frame
, Lisp_Frame
, f
);
619 CHECK_FRAME (frame
, 0);
623 if (! FRAME_LIVE_P (f
))
626 /* Are there any other frames besides this one? */
627 if (f
== selected_frame
&& EQ (next_frame (frame
, Qt
), frame
))
628 error ("Attempt to delete the only frame");
630 /* Does this frame have a minibuffer, and is it the surrogate
631 minibuffer for any other frame? */
632 if (FRAME_HAS_MINIBUF_P (XFRAME (frame
)))
636 for (frames
= Vframe_list
;
638 frames
= XCONS (frames
)->cdr
)
640 Lisp_Object
this = XCONS (frames
)->car
;
642 if (! EQ (this, frame
)
646 (FRAME_MINIBUF_WINDOW
648 error ("Attempt to delete a surrogate minibuffer frame");
652 /* Don't let the frame remain selected. */
653 if (f
== selected_frame
)
654 Fhandle_switch_frame (next_frame (frame
, Qt
), Qnil
);
656 /* Don't allow minibuf_window to remain on a deleted frame. */
657 if (EQ (f
->minibuffer_window
, minibuf_window
))
659 Fset_window_buffer (selected_frame
->minibuffer_window
,
660 XWINDOW (minibuf_window
)->buffer
);
661 minibuf_window
= selected_frame
->minibuffer_window
;
664 /* Mark all the windows that used to be on FRAME as deleted, and then
665 remove the reference to them. */
666 delete_all_subwindows (XWINDOW (f
->root_window
));
667 f
->root_window
= Qnil
;
669 Vframe_list
= Fdelq (frame
, Vframe_list
);
670 FRAME_SET_VISIBLE (f
, 0);
672 /* Since some events are handled at the interrupt level, we may get
673 an event for f at any time; if we zero out the frame's display
674 now, then we may trip up the event-handling code. Instead, we'll
675 promise that the display of the frame must be valid until we have
676 called the window-system-dependent frame destruction routine. */
678 /* I think this should be done with a hook. */
679 #ifdef HAVE_X_WINDOWS
681 x_destroy_window (f
);
684 f
->display
.nothing
= 0;
686 /* If we've deleted the last_nonminibuf_frame, then try to find
688 if (f
== last_nonminibuf_frame
)
692 last_nonminibuf_frame
= 0;
694 for (frames
= Vframe_list
;
696 frames
= XCONS (frames
)->cdr
)
698 f
= XFRAME (XCONS (frames
)->car
);
699 if (!FRAME_MINIBUF_ONLY_P (f
))
701 last_nonminibuf_frame
= f
;
707 /* If we've deleted Vdefault_minibuffer_frame, try to find another
708 one. Prefer minibuffer-only frames, but also notice frames
709 with other windows. */
710 if (EQ (frame
, Vdefault_minibuffer_frame
))
714 /* The last frame we saw with a minibuffer, minibuffer-only or not. */
715 Lisp_Object frame_with_minibuf
= Qnil
;
717 for (frames
= Vframe_list
;
719 frames
= XCONS (frames
)->cdr
)
721 Lisp_Object
this = XCONS (frames
)->car
;
723 if (XTYPE (this) != Lisp_Frame
)
727 if (FRAME_HAS_MINIBUF_P (f
))
729 frame_with_minibuf
= this;
730 if (FRAME_MINIBUF_ONLY_P (f
))
735 /* We know that there must be some frame with a minibuffer out
736 there. If this were not true, all of the frames present
737 would have to be minibufferless, which implies that at some
738 point their minibuffer frames must have been deleted, but
739 that is prohibited at the top; you can't delete surrogate
740 minibuffer frames. */
741 if (NILP (frame_with_minibuf
))
744 Vdefault_minibuffer_frame
= frame_with_minibuf
;
750 /* Return mouse position in character cell units. */
752 DEFUN ("mouse-position", Fmouse_position
, Smouse_position
, 0, 0, 0,
753 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\
754 If Emacs is running on a mouseless terminal or hasn't been programmed\n\
755 to read the mouse position, it returns the selected frame for FRAME\n\
756 and nil for X and Y.")
760 Lisp_Object lispy_dummy
;
761 enum scroll_bar_part party_dummy
;
763 unsigned long long_dummy
;
765 if (mouse_position_hook
)
766 (*mouse_position_hook
) (&f
,
767 &lispy_dummy
, &party_dummy
,
776 XSET (lispy_dummy
, Lisp_Frame
, f
);
777 return Fcons (lispy_dummy
, Fcons (make_number (x
), make_number (y
)));
780 DEFUN ("set-mouse-position", Fset_mouse_position
, Sset_mouse_position
, 3, 3, 0,
781 "Move the mouse pointer to the center of cell (X,Y) in FRAME.\n\
782 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.")
784 Lisp_Object frame
, x
, y
;
786 CHECK_LIVE_FRAME (frame
, 0);
790 /* I think this should be done with a hook. */
791 #ifdef HAVE_X_WINDOWS
792 if (FRAME_X_P (XFRAME (frame
)))
793 /* Warping the mouse will cause enternotify and focus events. */
794 x_set_mouse_position (XFRAME (frame
), x
, y
);
800 DEFUN ("make-frame-visible", Fmake_frame_visible
, Smake_frame_visible
,
802 "Make the frame FRAME visible (assuming it is an X-window).\n\
803 Also raises the frame so that nothing obscures it.\n\
804 If omitted, FRAME defaults to the currently selected frame.")
809 XSET (frame
, Lisp_Frame
, selected_frame
);
811 CHECK_LIVE_FRAME (frame
, 0);
813 /* I think this should be done with a hook. */
814 #ifdef HAVE_X_WINDOWS
815 if (FRAME_X_P (XFRAME (frame
)))
816 x_make_frame_visible (XFRAME (frame
));
822 DEFUN ("make-frame-invisible", Fmake_frame_invisible
, Smake_frame_invisible
,
824 "Make the frame FRAME invisible (assuming it is an X-window).\n\
825 If omitted, FRAME defaults to the currently selected frame.")
830 XSET (frame
, Lisp_Frame
, selected_frame
);
832 CHECK_LIVE_FRAME (frame
, 0);
834 /* I think this should be done with a hook. */
835 #ifdef HAVE_X_WINDOWS
836 if (FRAME_X_P (XFRAME (frame
)))
837 x_make_frame_invisible (XFRAME (frame
));
843 DEFUN ("iconify-frame", Ficonify_frame
, Siconify_frame
,
845 "Make the frame FRAME into an icon.\n\
846 If omitted, FRAME defaults to the currently selected frame.")
851 XSET (frame
, Lisp_Frame
, selected_frame
);
853 CHECK_LIVE_FRAME (frame
, 0);
855 /* I think this should be done with a hook. */
856 #ifdef HAVE_X_WINDOWS
857 if (FRAME_X_P (XFRAME (frame
)))
858 x_iconify_frame (XFRAME (frame
));
864 DEFUN ("frame-visible-p", Fframe_visible_p
, Sframe_visible_p
,
866 "Return t if FRAME is now \"visible\" (actually in use for display).\n\
867 A frame that is not \"visible\" is not updated and, if it works through\n\
868 a window system, it may not show at all.\n\
869 Return the symbol `icon' if frame is visible only as an icon.")
873 CHECK_LIVE_FRAME (frame
, 0);
875 if (FRAME_VISIBLE_P (XFRAME (frame
)))
877 if (FRAME_ICONIFIED_P (XFRAME (frame
)))
882 DEFUN ("visible-frame-list", Fvisible_frame_list
, Svisible_frame_list
,
884 "Return a list of all frames now \"visible\" (being updated).")
887 Lisp_Object tail
, frame
;
892 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
894 frame
= XCONS (tail
)->car
;
895 if (XTYPE (frame
) != Lisp_Frame
)
898 if (FRAME_VISIBLE_P (f
))
899 value
= Fcons (frame
, value
);
905 DEFUN ("raise-frame", Fraise_frame
, Sraise_frame
, 1, 1, 0,
906 "Bring FRAME to the front, so it occludes any frames it overlaps.\n\
907 If FRAME is invisible, make it visible.\n\
908 If Emacs is displaying on an ordinary terminal or some other device which\n\
909 doesn't support multiple overlapping frames, this function does nothing.")
913 CHECK_LIVE_FRAME (frame
, 0);
915 if (frame_raise_lower_hook
)
916 (*frame_raise_lower_hook
) (XFRAME (frame
), 1);
921 /* Should we have a corresponding function called Flower_Power? */
922 DEFUN ("lower-frame", Flower_frame
, Slower_frame
, 1, 1, 0,
923 "Send FRAME to the back, so it is occluded by any frames that overlap it.\n\
924 If Emacs is displaying on an ordinary terminal or some other device which\n\
925 doesn't support multiple overlapping frames, this function does nothing.")
929 CHECK_LIVE_FRAME (frame
, 0);
931 if (frame_raise_lower_hook
)
932 (*frame_raise_lower_hook
) (XFRAME (frame
), 0);
938 DEFUN ("redirect-frame-focus", Fredirect_frame_focus
, Sredirect_frame_focus
,
940 "Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.\n\
941 In other words, switch-frame events caused by events in FRAME will\n\
942 request a switch to FOCUS-FRAME, and `last-event-frame' will be\n\
943 FOCUS-FRAME after reading an event typed at FRAME.\n\
945 If FOCUS-FRAME is omitted or nil, any existing redirection is\n\
946 cancelled, and the frame again receives its own keystrokes.\n\
948 Focus redirection is useful for temporarily redirecting keystrokes to\n\
949 a surrogate minibuffer frame when a frame doesn't have its own\n\
950 minibuffer window.\n\
952 A frame's focus redirection can be changed by select-frame. If frame\n\
953 FOO is selected, and then a different frame BAR is selected, any\n\
954 frames redirecting their focus to FOO are shifted to redirect their\n\
955 focus to BAR. This allows focus redirection to work properly when the\n\
956 user switches from one frame to another using `select-window'.\n\
958 This means that a frame whose focus is redirected to itself is treated\n\
959 differently from a frame whose focus is redirected to nil; the former\n\
960 is affected by select-frame, while the latter is not.\n\
962 The redirection lasts until `redirect-frame-focus' is called to change it.")
964 Lisp_Object frame
, focus_frame
;
966 CHECK_LIVE_FRAME (frame
, 0);
968 if (! NILP (focus_frame
))
969 CHECK_LIVE_FRAME (focus_frame
, 1);
971 XFRAME (frame
)->focus_frame
= focus_frame
;
973 if (frame_rehighlight_hook
)
974 (*frame_rehighlight_hook
) ();
980 DEFUN ("frame-focus", Fframe_focus
, Sframe_focus
, 1, 1, 0,
981 "Return the frame to which FRAME's keystrokes are currently being sent.\n\
982 This returns nil if FRAME's focus is not redirected.\n\
983 See `redirect-frame-focus'.")
987 CHECK_LIVE_FRAME (frame
, 0);
989 return FRAME_FOCUS_FRAME (XFRAME (frame
));
995 get_frame_param (frame
, prop
)
996 register struct frame
*frame
;
999 register Lisp_Object tem
;
1001 tem
= Fassq (prop
, frame
->param_alist
);
1008 store_in_alist (alistptr
, prop
, val
)
1009 Lisp_Object
*alistptr
, val
;
1012 register Lisp_Object tem
;
1014 tem
= Fassq (prop
, *alistptr
);
1016 *alistptr
= Fcons (Fcons (prop
, val
), *alistptr
);
1022 store_frame_param (f
, prop
, val
)
1024 Lisp_Object prop
, val
;
1026 register Lisp_Object tem
;
1028 tem
= Fassq (prop
, f
->param_alist
);
1030 f
->param_alist
= Fcons (Fcons (prop
, val
), f
->param_alist
);
1034 if (EQ (prop
, Qminibuffer
)
1035 && XTYPE (val
) == Lisp_Window
)
1037 if (! MINI_WINDOW_P (XWINDOW (val
)))
1038 error ("Surrogate minibuffer windows must be minibuffer windows.");
1040 if (FRAME_HAS_MINIBUF_P (f
) || FRAME_MINIBUF_ONLY_P (f
))
1041 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer.");
1043 /* Install the chosen minibuffer window, with proper buffer. */
1044 f
->minibuffer_window
= val
;
1048 DEFUN ("frame-parameters", Fframe_parameters
, Sframe_parameters
, 0, 1, 0,
1049 "Return the parameters-alist of frame FRAME.\n\
1050 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.\n\
1051 The meaningful PARMs depend on the kind of frame.\n\
1052 If FRAME is omitted, return information on the currently selected frame.")
1059 if (EQ (frame
, Qnil
))
1063 CHECK_FRAME (frame
, 0);
1067 if (f
->display
.nothing
== 0)
1070 alist
= Fcopy_alist (f
->param_alist
);
1071 store_in_alist (&alist
, Qname
, f
->name
);
1072 store_in_alist (&alist
, Qheight
, make_number (f
->height
));
1073 store_in_alist (&alist
, Qwidth
, make_number (f
->width
));
1074 store_in_alist (&alist
, Qmodeline
, (f
->wants_modeline
? Qt
: Qnil
));
1075 store_in_alist (&alist
, Qminibuffer
,
1076 (! FRAME_HAS_MINIBUF_P (f
) ? Qnil
1077 : (FRAME_MINIBUF_ONLY_P (f
) ? Qonly
1078 : FRAME_MINIBUF_WINDOW (f
))));
1079 store_in_alist (&alist
, Qunsplittable
, (f
->no_split
? Qt
: Qnil
));
1080 store_in_alist (&alist
, Qmenu_bar_lines
, (FRAME_MENU_BAR_LINES (f
)));
1082 /* I think this should be done with a hook. */
1083 #ifdef HAVE_X_WINDOWS
1085 x_report_frame_params (f
, &alist
);
1090 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters
,
1091 Smodify_frame_parameters
, 2, 2, 0,
1092 "Modify the parameters of frame FRAME according to ALIST.\n\
1093 ALIST is an alist of parameters to change and their new values.\n\
1094 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\
1095 The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.")
1097 Lisp_Object frame
, alist
;
1100 register Lisp_Object tail
, elt
, prop
, val
;
1102 if (EQ (frame
, Qnil
))
1106 CHECK_LIVE_FRAME (frame
, 0);
1110 /* I think this should be done with a hook. */
1111 #ifdef HAVE_X_WINDOWS
1114 x_set_frame_parameters (f
, alist
);
1116 for (tail
= alist
; !EQ (tail
, Qnil
); tail
= Fcdr (tail
))
1121 x_set_frame_param (f
, prop
, val
, get_frame_param (f
, prop
));
1122 store_frame_param (f
, prop
, val
);
1130 DEFUN ("frame-char-height", Fframe_char_height
, Sframe_char_height
,
1132 "Height in pixels of a line in the font in frame FRAME.\n\
1133 If FRAME is omitted, the selected frame is used.\n\
1134 For a terminal frame, the value is always 1.")
1144 CHECK_FRAME (frame
, 0);
1148 #ifdef HAVE_X_WINDOWS
1150 return make_number (x_char_height (f
));
1153 return make_number (1);
1157 DEFUN ("frame-char-width", Fframe_char_width
, Sframe_char_width
,
1159 "Width in pixels of characters in the font in frame FRAME.\n\
1160 If FRAME is omitted, the selected frame is used.\n\
1161 The width is the same for all characters, because\n\
1162 currently Emacs supports only fixed-width fonts.\n\
1163 For a terminal screen, the value is always 1.")
1173 CHECK_FRAME (frame
, 0);
1177 #ifdef HAVE_X_WINDOWS
1179 return make_number (x_char_width (f
));
1182 return make_number (1);
1185 DEFUN ("frame-pixel-height", Fframe_pixel_height
,
1186 Sframe_pixel_height
, 0, 1, 0,
1187 "Return a FRAME's heightin pixels.\n\
1188 For a terminal frame, the result really gives the sizes in characters.\n\
1189 If FRAME is omitted, the selected frame is used.")
1199 CHECK_FRAME (frame
, 0);
1203 #ifdef HAVE_X_WINDOWS
1205 return make_number (x_pixel_height (f
));
1208 return make_number (FRAME_HEIGHT (f
));
1211 DEFUN ("frame-pixel-width", Fframe_pixel_width
,
1212 Sframe_pixel_width
, 0, 1, 0,
1213 "Return FRAME's width in pixels.\n\
1214 For a terminal frame, the result really gives the sizes in characters.\n\
1215 If FRAME is omitted, the selected frame is used.")
1225 CHECK_FRAME (frame
, 0);
1229 #ifdef HAVE_X_WINDOWS
1231 return make_number (x_pixel_width (f
));
1234 return make_number (FRAME_WIDTH (f
));
1237 DEFUN ("set-frame-height", Fset_frame_height
, Sset_frame_height
, 2, 3, 0,
1238 "Specify that the frame FRAME has LINES lines.\n\
1239 Optional third arg non-nil means that redisplay should use LINES lines\n\
1240 but that the idea of the actual height of the frame should not be changed.")
1241 (frame
, rows
, pretend
)
1242 Lisp_Object frame
, rows
, pretend
;
1244 register struct frame
*f
;
1246 CHECK_NUMBER (rows
, 0);
1251 CHECK_LIVE_FRAME (frame
, 0);
1255 /* I think this should be done with a hook. */
1256 #ifdef HAVE_X_WINDOWS
1259 if (XINT (rows
) != f
->width
)
1260 x_set_window_size (f
, f
->width
, XINT (rows
));
1264 change_frame_size (f
, XINT (rows
), 0, !NILP (pretend
), 0);
1268 DEFUN ("set-frame-width", Fset_frame_width
, Sset_frame_width
, 2, 3, 0,
1269 "Specify that the frame FRAME has COLS columns.\n\
1270 Optional third arg non-nil means that redisplay should use COLS columns\n\
1271 but that the idea of the actual width of the frame should not be changed.")
1272 (frame
, cols
, pretend
)
1273 Lisp_Object frame
, cols
, pretend
;
1275 register struct frame
*f
;
1276 CHECK_NUMBER (cols
, 0);
1281 CHECK_LIVE_FRAME (frame
, 0);
1285 /* I think this should be done with a hook. */
1286 #ifdef HAVE_X_WINDOWS
1289 if (XINT (cols
) != f
->width
)
1290 x_set_window_size (f
, XINT (cols
), f
->height
);
1294 change_frame_size (f
, 0, XINT (cols
), !NILP (pretend
), 0);
1298 DEFUN ("set-frame-size", Fset_frame_size
, Sset_frame_size
, 3, 3, 0,
1299 "Sets size of FRAME to COLS by ROWS, measured in characters.")
1301 Lisp_Object frame
, cols
, rows
;
1303 register struct frame
*f
;
1306 CHECK_LIVE_FRAME (frame
, 0);
1307 CHECK_NUMBER (cols
, 2);
1308 CHECK_NUMBER (rows
, 1);
1311 /* I think this should be done with a hook. */
1312 #ifdef HAVE_X_WINDOWS
1315 if (XINT (rows
) != f
->height
|| XINT (cols
) != f
->width
)
1316 x_set_window_size (f
, XINT (cols
), XINT (rows
));
1320 change_frame_size (f
, XINT (rows
), XINT (cols
), 0, 0);
1325 DEFUN ("set-frame-position", Fset_frame_position
,
1326 Sset_frame_position
, 3, 3, 0,
1327 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\
1328 If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\
1329 the leftmost or bottommost position FRAME could occupy without going\n\
1331 (frame
, xoffset
, yoffset
)
1332 Lisp_Object frame
, xoffset
, yoffset
;
1334 register struct frame
*f
;
1337 CHECK_LIVE_FRAME (frame
, 0);
1338 CHECK_NUMBER (xoffset
, 1);
1339 CHECK_NUMBER (yoffset
, 2);
1342 /* I think this should be done with a hook. */
1343 #ifdef HAVE_X_WINDOWS
1345 x_set_offset (f
, XINT (xoffset
), XINT (yoffset
));
1353 DEFUN ("rubber-band-rectangle", Frubber_band_rectangle
, Srubber_band_rectangle
,
1355 "Ask user to specify a window position and size on FRAME with the mouse.\n\
1356 Arguments are FRAME, NAME and GEO. NAME is a name to be displayed as\n\
1357 the purpose of this rectangle. GEO is an X-windows size spec that can\n\
1358 specify defaults for some sizes/positions. If GEO specifies everything,\n\
1359 the mouse is not used.\n\
1360 Returns a list of five values: (FRAME LEFT TOP WIDTH HEIGHT).")
1367 Lisp_Object nums
[4];
1370 CHECK_FRAME (frame
, 0);
1371 CHECK_STRING (name
, 1);
1372 CHECK_STRING (geo
, 2);
1374 switch (XFRAME (frame
)->output_method
)
1376 case output_x_window
:
1377 x_rubber_band (XFRAME (frame
), &vals
[0], &vals
[1], &vals
[2], &vals
[3],
1378 XSTRING (geo
)->data
, XSTRING (name
)->data
);
1385 for (i
= 0; i
< 4; i
++)
1386 XFASTINT (nums
[i
]) = vals
[i
];
1387 return Fcons (frame
, Flist (4, nums
));
1390 #endif /* not HAVE_X11 */
1392 choose_minibuf_frame ()
1394 /* For lowest-level minibuf, put it on currently selected frame
1395 if frame has a minibuffer. */
1397 if (minibuf_level
== 0
1398 && selected_frame
!= 0
1399 && !EQ (minibuf_window
, selected_frame
->minibuffer_window
))
1401 /* I don't think that any frames may validly have a null minibuffer
1403 if (NILP (selected_frame
->minibuffer_window
))
1406 Fset_window_buffer (selected_frame
->minibuffer_window
,
1407 XWINDOW (minibuf_window
)->buffer
);
1408 minibuf_window
= selected_frame
->minibuffer_window
;
1414 /*&&& init symbols here &&&*/
1415 Qframep
= intern ("framep");
1416 staticpro (&Qframep
);
1417 Qframe_live_p
= intern ("frame-live-p");
1418 staticpro (&Qframe_live_p
);
1419 Qheight
= intern ("height");
1420 staticpro (&Qheight
);
1421 Qicon
= intern ("icon");
1423 Qminibuffer
= intern ("minibuffer");
1424 staticpro (&Qminibuffer
);
1425 Qmodeline
= intern ("modeline");
1426 staticpro (&Qmodeline
);
1427 Qname
= intern ("name");
1429 Qonly
= intern ("only");
1431 Qunsplittable
= intern ("unsplittable");
1432 staticpro (&Qunsplittable
);
1433 Qwidth
= intern ("width");
1434 staticpro (&Qwidth
);
1437 Qmenu_bar_lines
= intern ("menu-bar-lines");
1438 staticpro (&Qmenu_bar_lines
);
1440 staticpro (&Vframe_list
);
1442 DEFVAR_LISP ("terminal-frame", &Vterminal_frame
,
1443 "The initial frame-object, which represents Emacs's stdout.");
1445 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified
,
1446 "Non-nil if all of emacs is iconified and frame updates are not needed.");
1447 Vemacs_iconified
= Qnil
;
1449 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame
,
1450 "Minibufferless frames use this frame's minibuffer.\n\
1452 Emacs cannot create minibufferless frames unless this is set to an\n\
1453 appropriate surrogate.\n\
1455 Emacs consults this variable only when creating minibufferless\n\
1456 frames; once the frame is created, it sticks with its assigned\n\
1457 minibuffer, no matter what this variable is set to. This means that\n\
1458 this variable doesn't necessarily say anything meaningful about the\n\
1459 current set of frames, or where the minibuffer is currently being\n\
1461 Vdefault_minibuffer_frame
= Qnil
;
1463 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist
,
1464 "Alist of default values for frame creation.\n\
1465 These may be set in your init file, like this:\n\
1466 (setq default-frame-alist '((width . 80) (height . 55)))\n\
1467 These override values given in window system configuration data, like\n\
1468 X Windows' defaults database.\n\
1469 For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
1470 For values specific to the separate minibuffer frame, see\n\
1471 `minibuffer-frame-alist'.");
1472 Vdefault_frame_alist
= Qnil
;
1475 defsubr (&Sframe_live_p
);
1476 defsubr (&Shandle_switch_frame
);
1477 defsubr (&Sselect_frame
);
1478 defsubr (&Sselected_frame
);
1479 defsubr (&Swindow_frame
);
1480 defsubr (&Sframe_root_window
);
1481 defsubr (&Sframe_selected_window
);
1482 defsubr (&Sframe_list
);
1483 defsubr (&Snext_frame
);
1484 defsubr (&Sdelete_frame
);
1485 defsubr (&Smouse_position
);
1486 defsubr (&Sset_mouse_position
);
1488 defsubr (&Sframe_configuration
);
1489 defsubr (&Srestore_frame_configuration
);
1491 defsubr (&Smake_frame_visible
);
1492 defsubr (&Smake_frame_invisible
);
1493 defsubr (&Siconify_frame
);
1494 defsubr (&Sframe_visible_p
);
1495 defsubr (&Svisible_frame_list
);
1496 defsubr (&Sraise_frame
);
1497 defsubr (&Slower_frame
);
1498 defsubr (&Sredirect_frame_focus
);
1499 defsubr (&Sframe_focus
);
1500 defsubr (&Sframe_parameters
);
1501 defsubr (&Smodify_frame_parameters
);
1502 defsubr (&Sframe_char_height
);
1503 defsubr (&Sframe_char_width
);
1504 defsubr (&Sframe_pixel_height
);
1505 defsubr (&Sframe_pixel_width
);
1506 defsubr (&Sset_frame_height
);
1507 defsubr (&Sset_frame_width
);
1508 defsubr (&Sset_frame_size
);
1509 defsubr (&Sset_frame_position
);
1511 defsubr (&Srubber_band_rectangle
);
1512 #endif /* HAVE_X11 */
1517 initial_define_lispy_key (global_map
, "switch-frame", "handle-switch-frame");
1520 #else /* not MULTI_FRAME */
1522 /* If we're not using multi-frame stuff, we still need to provide some
1523 support functions. */
1525 /* Unless this function is defined, providing set-frame-height and
1526 set-frame-width doesn't help compatibility any, since they both
1527 want this as their first argument. */
1528 DEFUN ("selected-frame", Fselected_frame
, Sselected_frame
, 0, 0, 0,
1529 "Return the frame that is now selected.")
1537 DEFUN ("set-frame-height", Fset_frame_height
, Sset_frame_height
, 2, 3, 0,
1538 "Specify that the frame FRAME has LINES lines.\n\
1539 Optional third arg non-nil means that redisplay should use LINES lines\n\
1540 but that the idea of the actual height of the frame should not be changed.")
1541 (frame
, rows
, pretend
)
1542 Lisp_Object frame
, rows
, pretend
;
1544 CHECK_NUMBER (rows
, 0);
1546 change_frame_size (0, XINT (rows
), 0, !NILP (pretend
), 0);
1550 DEFUN ("set-frame-width", Fset_frame_width
, Sset_frame_width
, 2, 3, 0,
1551 "Specify that the frame FRAME has COLS columns.\n\
1552 Optional third arg non-nil means that redisplay should use COLS columns\n\
1553 but that the idea of the actual width of the frame should not be changed.")
1554 (frame
, cols
, pretend
)
1555 Lisp_Object frame
, cols
, pretend
;
1557 CHECK_NUMBER (cols
, 0);
1559 change_frame_size (0, 0, XINT (cols
), !NILP (pretend
), 0);
1563 DEFUN ("set-frame-size", Fset_frame_size
, Sset_frame_size
, 3, 3, 0,
1564 "Sets size of FRAME to COLS by ROWS, measured in characters.")
1566 Lisp_Object frame
, cols
, rows
;
1568 CHECK_NUMBER (cols
, 2);
1569 CHECK_NUMBER (rows
, 1);
1571 change_frame_size (0, XINT (rows
), XINT (cols
), 0, 0);
1576 DEFUN ("frame-height", Fframe_height
, Sframe_height
, 0, 1, 0,
1577 "Return number of lines available for display on FRAME.\n\
1578 If FRAME is omitted, describe the currently selected frame.")
1582 return make_number (FRAME_HEIGHT (selected_frame
));
1585 DEFUN ("frame-width", Fframe_width
, Sframe_width
, 0, 1, 0,
1586 "Return number of columns available for display on FRAME.\n\
1587 If FRAME is omitted, describe the currently selected frame.")
1591 return make_number (FRAME_WIDTH (selected_frame
));
1594 DEFUN ("frame-char-height", Fframe_char_height
, Sframe_char_height
,
1596 "Height in pixels of a line in the font in frame FRAME.\n\
1597 If FRAME is omitted, the selected frame is used.\n\
1598 For a terminal frame, the value is always 1.")
1602 return make_number (1);
1606 DEFUN ("frame-char-width", Fframe_char_width
, Sframe_char_width
,
1608 "Width in pixels of characters in the font in frame FRAME.\n\
1609 If FRAME is omitted, the selected frame is used.\n\
1610 The width is the same for all characters, because\n\
1611 currently Emacs supports only fixed-width fonts.\n\
1612 For a terminal screen, the value is always 1.")
1616 return make_number (1);
1619 DEFUN ("frame-pixel-height", Fframe_pixel_height
,
1620 Sframe_pixel_height
, 0, 1, 0,
1621 "Return FRAME's height in pixels.\n\
1622 For a terminal frame, the result really gives the height in characters.\n\
1623 If FRAME is omitted, the selected frame is used.")
1627 return make_number (FRAME_HEIGHT (f
));
1630 DEFUN ("frame-pixel-width", Fframe_pixel_width
,
1631 Sframe_pixel_width
, 0, 1, 0,
1632 "Return FRAME's width in pixels.\n\
1633 For a terminal frame, the result really gives the width in characters.\n\
1634 If FRAME is omitted, the selected frame is used.")
1638 return make_number (FRAME_WIDTH (f
));
1641 /* These are for backward compatibility with Emacs 18. */
1643 DEFUN ("set-screen-height", Fset_screen_height
, Sset_screen_height
, 1, 2, 0,
1644 "Tell redisplay that the screen has LINES lines.\n\
1645 Optional second arg non-nil means that redisplay should use LINES lines\n\
1646 but that the idea of the actual height of the screen should not be changed.")
1648 Lisp_Object lines
, pretend
;
1650 CHECK_NUMBER (lines
, 0);
1652 change_frame_size (0, XINT (lines
), 0, !NILP (pretend
), 0);
1656 DEFUN ("set-screen-width", Fset_screen_width
, Sset_screen_width
, 1, 2, 0,
1657 "Tell redisplay that the screen has COLS columns.\n\
1658 Optional second arg non-nil means that redisplay should use COLS columns\n\
1659 but that the idea of the actual width of the screen should not be changed.")
1661 Lisp_Object cols
, pretend
;
1663 CHECK_NUMBER (cols
, 0);
1665 change_frame_size (0, 0, XINT (cols
), !NILP (pretend
), 0);
1671 defsubr (&Sselected_frame
);
1672 defsubr (&Sframe_char_height
);
1673 defsubr (&Sframe_char_width
);
1674 defsubr (&Sframe_pixel_height
);
1675 defsubr (&Sframe_pixel_width
);
1676 defsubr (&Sset_frame_height
);
1677 defsubr (&Sset_frame_width
);
1678 defsubr (&Sset_frame_size
);
1679 defsubr (&Sset_screen_height
);
1680 defsubr (&Sset_screen_width
);
1681 defsubr (&Sframe_height
);
1682 Ffset (intern ("screen-height"), intern ("frame-height"));
1683 defsubr (&Sframe_width
);
1684 Ffset (intern ("screen-width"), intern ("frame-width"));
1691 #endif /* not MULTI_FRAME */