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
;
166 f
->face_alist
= Qnil
;
168 root_window
= make_window ();
171 mini_window
= make_window ();
172 XWINDOW (root_window
)->next
= mini_window
;
173 XWINDOW (mini_window
)->prev
= root_window
;
174 XWINDOW (mini_window
)->mini_p
= Qt
;
175 XWINDOW (mini_window
)->frame
= frame
;
176 f
->minibuffer_window
= mini_window
;
181 XWINDOW (root_window
)->next
= Qnil
;
182 f
->minibuffer_window
= Qnil
;
185 XWINDOW (root_window
)->frame
= frame
;
188 just so that there is "something there."
189 Correct size will be set up later with change_frame_size. */
194 XFASTINT (XWINDOW (root_window
)->width
) = 10;
195 XFASTINT (XWINDOW (root_window
)->height
) = (mini_p
? 9 : 10);
199 XFASTINT (XWINDOW (mini_window
)->width
) = 10;
200 XFASTINT (XWINDOW (mini_window
)->top
) = 9;
201 XFASTINT (XWINDOW (mini_window
)->height
) = 1;
204 /* Choose a buffer for the frame's root window. */
208 XWINDOW (root_window
)->buffer
= Qt
;
209 buf
= Fcurrent_buffer ();
210 /* If buf is a 'hidden' buffer (i.e. one whose name starts with
211 a space), try to find another one. */
212 if (XSTRING (Fbuffer_name (buf
))->data
[0] == ' ')
213 buf
= Fother_buffer (buf
, Qnil
);
214 Fset_window_buffer (root_window
, buf
);
219 XWINDOW (mini_window
)->buffer
= Qt
;
220 Fset_window_buffer (mini_window
,
221 (NILP (Vminibuffer_list
)
223 : Fcar (Vminibuffer_list
)));
226 f
->root_window
= root_window
;
227 f
->selected_window
= root_window
;
228 /* Make sure this window seems more recently used than
229 a newly-created, never-selected window. */
230 XFASTINT (XWINDOW (f
->selected_window
)->use_time
) = ++window_select_count
;
232 Vframe_list
= Fcons (frame
, Vframe_list
);
237 /* Make a frame using a separate minibuffer window on another frame.
238 MINI_WINDOW is the minibuffer window to use. nil means use the
239 default (the global minibuffer). */
242 make_frame_without_minibuffer (mini_window
)
243 register Lisp_Object mini_window
;
245 register struct frame
*f
;
247 /* Choose the minibuffer window to use. */
248 if (NILP (mini_window
))
250 if (XTYPE (Vdefault_minibuffer_frame
) != Lisp_Frame
)
251 error ("default-minibuffer-frame must be set when creating minibufferless frames");
252 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame
)))
253 error ("default-minibuffer-frame must be a live frame");
254 mini_window
= XFRAME (Vdefault_minibuffer_frame
)->minibuffer_window
;
258 CHECK_LIVE_WINDOW (mini_window
, 0);
261 /* Make a frame containing just a root window. */
264 /* Install the chosen minibuffer window, with proper buffer. */
265 f
->minibuffer_window
= mini_window
;
266 Fset_window_buffer (mini_window
,
267 (NILP (Vminibuffer_list
)
269 : Fcar (Vminibuffer_list
)));
273 /* Make a frame containing only a minibuffer window. */
276 make_minibuffer_frame ()
278 /* First make a frame containing just a root window, no minibuffer. */
280 register struct frame
*f
= make_frame (0);
281 register Lisp_Object mini_window
;
282 register Lisp_Object frame
;
284 XSET (frame
, Lisp_Frame
, f
);
289 f
->wants_modeline
= 0;
290 f
->has_minibuffer
= 1;
292 /* Now label the root window as also being the minibuffer.
293 Avoid infinite looping on the window chain by marking next pointer
296 mini_window
= f
->minibuffer_window
= f
->root_window
;
297 XWINDOW (mini_window
)->mini_p
= Qt
;
298 XWINDOW (mini_window
)->next
= Qnil
;
299 XWINDOW (mini_window
)->prev
= Qnil
;
300 XWINDOW (mini_window
)->frame
= frame
;
302 /* Put the proper buffer in that window. */
304 Fset_window_buffer (mini_window
,
305 (NILP (Vminibuffer_list
)
307 : Fcar (Vminibuffer_list
)));
311 /* Construct a frame that refers to the terminal (stdin and stdout). */
314 make_terminal_frame ()
316 register struct frame
*f
;
320 f
->name
= build_string ("terminal");
321 FRAME_SET_VISIBLE (f
, 1);
322 f
->display
.nothing
= 1; /* Nonzero means frame isn't deleted. */
323 XSET (Vterminal_frame
, Lisp_Frame
, f
);
327 DEFUN ("select-frame", Fselect_frame
, Sselect_frame
, 1, 2, "e",
328 "Select the frame FRAME.\n\
329 Subseqent editing commands apply to its selected window.\n\
330 The selection of FRAME lasts until the next time the user does\n\
331 something to select a different frame, or until the next time this\n\
332 function is called.")
334 Lisp_Object frame
, no_enter
;
336 return Fhandle_switch_frame (frame
, no_enter
);
340 DEFUN ("handle-switch-frame", Fhandle_switch_frame
, Shandle_switch_frame
, 1, 2, "e",
341 "Handle a switch-frame event EVENT.\n\
342 Switch-frame events is usually bound to this function.\n\
343 A switch-frame event tells Emacs that the window manager has requested\n\
344 that the user's events be directed to the frame mentioned in the event.\n\
345 This function selects the selected window of the frame of EVENT.\n\
347 If EVENT is frame object, handle it as if it were a switch-frame event\n\
350 Lisp_Object frame
, no_enter
;
352 /* If FRAME is a switch-frame event, extract the frame we should
355 && EQ (XCONS (frame
)->car
, Qswitch_frame
)
356 && CONSP (XCONS (frame
)->cdr
))
357 frame
= XCONS (XCONS (frame
)->cdr
)->car
;
359 CHECK_LIVE_FRAME (frame
, 0);
361 if (selected_frame
== XFRAME (frame
))
364 /* If a frame's focus has been redirected toward the currently
365 selected frame, we should change the redirection to point to the
366 newly selected frame. This means that if the focus is redirected
367 from a minibufferless frame to a surrogate minibuffer frame, we
368 can use `other-window' to switch between all the frames using
369 that minibuffer frame, and the focus redirection will follow us
374 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
378 if (XTYPE (XCONS (tail
)->car
) != Lisp_Frame
)
381 focus
= FRAME_FOCUS_FRAME (XFRAME (XCONS (tail
)->car
));
383 if (XTYPE (focus
) == Lisp_Frame
384 && XFRAME (focus
) == selected_frame
)
385 Fredirect_frame_focus (XCONS (tail
)->car
, frame
);
389 selected_frame
= XFRAME (frame
);
390 if (! FRAME_MINIBUF_ONLY_P (selected_frame
))
391 last_nonminibuf_frame
= selected_frame
;
393 Fselect_window (XFRAME (frame
)->selected_window
);
395 /* I think this should be done with a hook. */
396 #ifdef HAVE_X_WINDOWS
397 if (FRAME_X_P (XFRAME (frame
))
400 Ffocus_frame (frame
);
403 choose_minibuf_frame ();
405 /* We want to make sure that the next event generates a frame-switch
406 event to the appropriate frame. This seems kludgey to me, but
407 before you take it out, make sure that evaluating something like
408 (select-window (frame-root-window (new-frame))) doesn't end up
409 with your typing being interpreted in the new frame instead of
410 the one you're actually typing in. */
411 internal_last_event_frame
= Qnil
;
416 DEFUN ("selected-frame", Fselected_frame
, Sselected_frame
, 0, 0, 0,
417 "Return the frame that is now selected.")
421 XSET (tem
, Lisp_Frame
, selected_frame
);
425 DEFUN ("window-frame", Fwindow_frame
, Swindow_frame
, 1, 1, 0,
426 "Return the frame object that window WINDOW is on.")
430 CHECK_LIVE_WINDOW (window
, 0);
431 return XWINDOW (window
)->frame
;
434 DEFUN ("frame-root-window", Fframe_root_window
, Sframe_root_window
, 0, 1, 0,
435 "Returns the root-window of FRAME.\n\
436 If omitted, FRAME defaults to the currently selected frame.")
441 XSET (frame
, Lisp_Frame
, selected_frame
);
443 CHECK_LIVE_FRAME (frame
, 0);
445 return XFRAME (frame
)->root_window
;
448 DEFUN ("frame-selected-window", Fframe_selected_window
,
449 Sframe_selected_window
, 0, 1, 0,
450 "Return the selected window of frame object FRAME.\n\
451 If omitted, FRAME defaults to the currently selected frame.")
456 XSET (frame
, Lisp_Frame
, selected_frame
);
458 CHECK_LIVE_FRAME (frame
, 0);
460 return XFRAME (frame
)->selected_window
;
463 DEFUN ("frame-list", Fframe_list
, Sframe_list
,
465 "Return a list of all frames.")
468 return Fcopy_sequence (Vframe_list
);
471 /* Return the next frame in the frame list after FRAME.
472 If MINIBUF is nil, exclude minibuffer-only frames.
473 If MINIBUF is a window, include only frames using that window for
475 If MINIBUF is non-nil, and not a window, include all frames. */
477 next_frame (frame
, minibuf
)
484 /* There must always be at least one frame in Vframe_list. */
485 if (! CONSP (Vframe_list
))
488 /* If this frame is dead, it won't be in Vframe_list, and we'll loop
489 forever. Forestall that. */
490 CHECK_LIVE_FRAME (frame
, 0);
493 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
495 Lisp_Object f
= XCONS (tail
)->car
;
499 /* Decide whether this frame is eligible to be returned. */
501 /* If we've looped all the way around without finding any
502 eligible frames, return the original frame. */
506 /* Let minibuf decide if this frame is acceptable. */
509 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f
)))
512 else if (XTYPE (minibuf
) == Lisp_Window
)
514 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f
)), minibuf
))
526 /* Return the previous frame in the frame list before FRAME.
527 If MINIBUF is nil, exclude minibuffer-only frames.
528 If MINIBUF is a window, include only frames using that window for
530 If MINIBUF is non-nil and not a window, include all frames. */
532 prev_frame (frame
, minibuf
)
539 /* There must always be at least one frame in Vframe_list. */
540 if (! CONSP (Vframe_list
))
544 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
546 Lisp_Object f
= XCONS (tail
)->car
;
548 if (XTYPE (f
) != Lisp_Frame
)
551 if (EQ (frame
, f
) && !NILP (prev
))
554 /* Decide whether this frame is eligible to be returned,
555 according to minibuf. */
558 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f
)))
561 else if (XTYPE (minibuf
) == Lisp_Window
)
563 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f
)), minibuf
))
570 /* We've scanned the entire list. */
572 /* We went through the whole frame list without finding a single
573 acceptable frame. Return the original frame. */
576 /* There were no acceptable frames in the list before FRAME; otherwise,
577 we would have returned directly from the loop. Since PREV is the last
578 acceptable frame in the list, return it. */
582 DEFUN ("next-frame", Fnext_frame
, Snext_frame
, 0, 2, 0,
583 "Return the next frame in the frame list after FRAME.\n\
584 By default, skip minibuffer-only frames.\n\
585 If omitted, FRAME defaults to the selected frame.\n\
586 If optional argument MINIFRAME is non-nil, include minibuffer-only frames.\n\
587 If MINIFRAME is a window, include only frames using that window for their\n\
589 If MINIFRAME is non-nil and not a window, include all frames.")
591 Lisp_Object frame
, miniframe
;
596 XSET (frame
, Lisp_Frame
, selected_frame
);
598 CHECK_LIVE_FRAME (frame
, 0);
600 return next_frame (frame
, miniframe
);
604 DEFUN ("delete-frame", Fdelete_frame
, Sdelete_frame
, 0, 1, "",
605 "Delete FRAME, permanently eliminating it from use.\n\
606 If omitted, FRAME defaults to the selected frame.\n\
607 A frame may not be deleted if its minibuffer is used by other frames.")
613 if (EQ (frame
, Qnil
))
616 XSET (frame
, Lisp_Frame
, f
);
620 CHECK_FRAME (frame
, 0);
624 if (! FRAME_LIVE_P (f
))
627 /* Are there any other frames besides this one? */
628 if (f
== selected_frame
&& EQ (next_frame (frame
, Qt
), frame
))
629 error ("Attempt to delete the only frame");
631 /* Does this frame have a minibuffer, and is it the surrogate
632 minibuffer for any other frame? */
633 if (FRAME_HAS_MINIBUF_P (XFRAME (frame
)))
637 for (frames
= Vframe_list
;
639 frames
= XCONS (frames
)->cdr
)
641 Lisp_Object
this = XCONS (frames
)->car
;
643 if (! EQ (this, frame
)
647 (FRAME_MINIBUF_WINDOW
649 error ("Attempt to delete a surrogate minibuffer frame");
653 /* Don't let the frame remain selected. */
654 if (f
== selected_frame
)
655 Fhandle_switch_frame (next_frame (frame
, Qt
), Qnil
);
657 /* Don't allow minibuf_window to remain on a deleted frame. */
658 if (EQ (f
->minibuffer_window
, minibuf_window
))
660 Fset_window_buffer (selected_frame
->minibuffer_window
,
661 XWINDOW (minibuf_window
)->buffer
);
662 minibuf_window
= selected_frame
->minibuffer_window
;
665 /* Mark all the windows that used to be on FRAME as deleted, and then
666 remove the reference to them. */
667 delete_all_subwindows (XWINDOW (f
->root_window
));
668 f
->root_window
= Qnil
;
670 Vframe_list
= Fdelq (frame
, Vframe_list
);
671 FRAME_SET_VISIBLE (f
, 0);
673 /* Since some events are handled at the interrupt level, we may get
674 an event for f at any time; if we zero out the frame's display
675 now, then we may trip up the event-handling code. Instead, we'll
676 promise that the display of the frame must be valid until we have
677 called the window-system-dependent frame destruction routine. */
679 /* I think this should be done with a hook. */
680 #ifdef HAVE_X_WINDOWS
682 x_destroy_window (f
);
685 f
->display
.nothing
= 0;
687 /* If we've deleted the last_nonminibuf_frame, then try to find
689 if (f
== last_nonminibuf_frame
)
693 last_nonminibuf_frame
= 0;
695 for (frames
= Vframe_list
;
697 frames
= XCONS (frames
)->cdr
)
699 f
= XFRAME (XCONS (frames
)->car
);
700 if (!FRAME_MINIBUF_ONLY_P (f
))
702 last_nonminibuf_frame
= f
;
708 /* If we've deleted Vdefault_minibuffer_frame, try to find another
709 one. Prefer minibuffer-only frames, but also notice frames
710 with other windows. */
711 if (EQ (frame
, Vdefault_minibuffer_frame
))
715 /* The last frame we saw with a minibuffer, minibuffer-only or not. */
716 Lisp_Object frame_with_minibuf
= Qnil
;
718 for (frames
= Vframe_list
;
720 frames
= XCONS (frames
)->cdr
)
722 Lisp_Object
this = XCONS (frames
)->car
;
724 if (XTYPE (this) != Lisp_Frame
)
728 if (FRAME_HAS_MINIBUF_P (f
))
730 frame_with_minibuf
= this;
731 if (FRAME_MINIBUF_ONLY_P (f
))
736 /* We know that there must be some frame with a minibuffer out
737 there. If this were not true, all of the frames present
738 would have to be minibufferless, which implies that at some
739 point their minibuffer frames must have been deleted, but
740 that is prohibited at the top; you can't delete surrogate
741 minibuffer frames. */
742 if (NILP (frame_with_minibuf
))
745 Vdefault_minibuffer_frame
= frame_with_minibuf
;
751 /* Return mouse position in character cell units. */
753 DEFUN ("mouse-position", Fmouse_position
, Smouse_position
, 0, 0, 0,
754 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\
755 If Emacs is running on a mouseless terminal or hasn't been programmed\n\
756 to read the mouse position, it returns the selected frame for FRAME\n\
757 and nil for X and Y.")
761 Lisp_Object lispy_dummy
;
762 enum scroll_bar_part party_dummy
;
764 unsigned long long_dummy
;
766 if (mouse_position_hook
)
767 (*mouse_position_hook
) (&f
,
768 &lispy_dummy
, &party_dummy
,
777 XSET (lispy_dummy
, Lisp_Frame
, f
);
778 return Fcons (lispy_dummy
, Fcons (make_number (x
), make_number (y
)));
781 DEFUN ("set-mouse-position", Fset_mouse_position
, Sset_mouse_position
, 3, 3, 0,
782 "Move the mouse pointer to the center of cell (X,Y) in FRAME.\n\
783 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.")
785 Lisp_Object frame
, x
, y
;
787 CHECK_LIVE_FRAME (frame
, 0);
791 /* I think this should be done with a hook. */
792 #ifdef HAVE_X_WINDOWS
793 if (FRAME_X_P (XFRAME (frame
)))
794 /* Warping the mouse will cause enternotify and focus events. */
795 x_set_mouse_position (XFRAME (frame
), x
, y
);
801 DEFUN ("make-frame-visible", Fmake_frame_visible
, Smake_frame_visible
,
803 "Make the frame FRAME visible (assuming it is an X-window).\n\
804 Also raises the frame so that nothing obscures it.\n\
805 If omitted, FRAME defaults to the currently selected frame.")
810 XSET (frame
, Lisp_Frame
, selected_frame
);
812 CHECK_LIVE_FRAME (frame
, 0);
814 /* I think this should be done with a hook. */
815 #ifdef HAVE_X_WINDOWS
816 if (FRAME_X_P (XFRAME (frame
)))
817 x_make_frame_visible (XFRAME (frame
));
823 DEFUN ("make-frame-invisible", Fmake_frame_invisible
, Smake_frame_invisible
,
825 "Make the frame FRAME invisible (assuming it is an X-window).\n\
826 If omitted, FRAME defaults to the currently selected frame.")
831 XSET (frame
, Lisp_Frame
, selected_frame
);
833 CHECK_LIVE_FRAME (frame
, 0);
835 /* I think this should be done with a hook. */
836 #ifdef HAVE_X_WINDOWS
837 if (FRAME_X_P (XFRAME (frame
)))
838 x_make_frame_invisible (XFRAME (frame
));
844 DEFUN ("iconify-frame", Ficonify_frame
, Siconify_frame
,
846 "Make the frame FRAME into an icon.\n\
847 If omitted, FRAME defaults to the currently selected frame.")
852 XSET (frame
, Lisp_Frame
, selected_frame
);
854 CHECK_LIVE_FRAME (frame
, 0);
856 /* I think this should be done with a hook. */
857 #ifdef HAVE_X_WINDOWS
858 if (FRAME_X_P (XFRAME (frame
)))
859 x_iconify_frame (XFRAME (frame
));
865 DEFUN ("frame-visible-p", Fframe_visible_p
, Sframe_visible_p
,
867 "Return t if FRAME is now \"visible\" (actually in use for display).\n\
868 A frame that is not \"visible\" is not updated and, if it works through\n\
869 a window system, it may not show at all.\n\
870 Return the symbol `icon' if frame is visible only as an icon.")
874 CHECK_LIVE_FRAME (frame
, 0);
876 if (FRAME_VISIBLE_P (XFRAME (frame
)))
878 if (FRAME_ICONIFIED_P (XFRAME (frame
)))
883 DEFUN ("visible-frame-list", Fvisible_frame_list
, Svisible_frame_list
,
885 "Return a list of all frames now \"visible\" (being updated).")
888 Lisp_Object tail
, frame
;
893 for (tail
= Vframe_list
; CONSP (tail
); tail
= XCONS (tail
)->cdr
)
895 frame
= XCONS (tail
)->car
;
896 if (XTYPE (frame
) != Lisp_Frame
)
899 if (FRAME_VISIBLE_P (f
))
900 value
= Fcons (frame
, value
);
906 DEFUN ("raise-frame", Fraise_frame
, Sraise_frame
, 1, 1, 0,
907 "Bring FRAME to the front, so it occludes any frames it overlaps.\n\
908 If FRAME is invisible, make it visible.\n\
909 If Emacs is displaying on an ordinary terminal or some other device which\n\
910 doesn't support multiple overlapping frames, this function does nothing.")
914 CHECK_LIVE_FRAME (frame
, 0);
916 if (frame_raise_lower_hook
)
917 (*frame_raise_lower_hook
) (XFRAME (frame
), 1);
922 /* Should we have a corresponding function called Flower_Power? */
923 DEFUN ("lower-frame", Flower_frame
, Slower_frame
, 1, 1, 0,
924 "Send FRAME to the back, so it is occluded by any frames that overlap it.\n\
925 If Emacs is displaying on an ordinary terminal or some other device which\n\
926 doesn't support multiple overlapping frames, this function does nothing.")
930 CHECK_LIVE_FRAME (frame
, 0);
932 if (frame_raise_lower_hook
)
933 (*frame_raise_lower_hook
) (XFRAME (frame
), 0);
939 DEFUN ("redirect-frame-focus", Fredirect_frame_focus
, Sredirect_frame_focus
,
941 "Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.\n\
942 In other words, switch-frame events caused by events in FRAME will\n\
943 request a switch to FOCUS-FRAME, and `last-event-frame' will be\n\
944 FOCUS-FRAME after reading an event typed at FRAME.\n\
946 If FOCUS-FRAME is omitted or nil, any existing redirection is\n\
947 cancelled, and the frame again receives its own keystrokes.\n\
949 Focus redirection is useful for temporarily redirecting keystrokes to\n\
950 a surrogate minibuffer frame when a frame doesn't have its own\n\
951 minibuffer window.\n\
953 A frame's focus redirection can be changed by select-frame. If frame\n\
954 FOO is selected, and then a different frame BAR is selected, any\n\
955 frames redirecting their focus to FOO are shifted to redirect their\n\
956 focus to BAR. This allows focus redirection to work properly when the\n\
957 user switches from one frame to another using `select-window'.\n\
959 This means that a frame whose focus is redirected to itself is treated\n\
960 differently from a frame whose focus is redirected to nil; the former\n\
961 is affected by select-frame, while the latter is not.\n\
963 The redirection lasts until `redirect-frame-focus' is called to change it.")
965 Lisp_Object frame
, focus_frame
;
967 CHECK_LIVE_FRAME (frame
, 0);
969 if (! NILP (focus_frame
))
970 CHECK_LIVE_FRAME (focus_frame
, 1);
972 XFRAME (frame
)->focus_frame
= focus_frame
;
974 if (frame_rehighlight_hook
)
975 (*frame_rehighlight_hook
) ();
981 DEFUN ("frame-focus", Fframe_focus
, Sframe_focus
, 1, 1, 0,
982 "Return the frame to which FRAME's keystrokes are currently being sent.\n\
983 This returns nil if FRAME's focus is not redirected.\n\
984 See `redirect-frame-focus'.")
988 CHECK_LIVE_FRAME (frame
, 0);
990 return FRAME_FOCUS_FRAME (XFRAME (frame
));
996 get_frame_param (frame
, prop
)
997 register struct frame
*frame
;
1000 register Lisp_Object tem
;
1002 tem
= Fassq (prop
, frame
->param_alist
);
1009 store_in_alist (alistptr
, prop
, val
)
1010 Lisp_Object
*alistptr
, val
;
1013 register Lisp_Object tem
;
1015 tem
= Fassq (prop
, *alistptr
);
1017 *alistptr
= Fcons (Fcons (prop
, val
), *alistptr
);
1023 store_frame_param (f
, prop
, val
)
1025 Lisp_Object prop
, val
;
1027 register Lisp_Object tem
;
1029 tem
= Fassq (prop
, f
->param_alist
);
1031 f
->param_alist
= Fcons (Fcons (prop
, val
), f
->param_alist
);
1035 if (EQ (prop
, Qminibuffer
)
1036 && XTYPE (val
) == Lisp_Window
)
1038 if (! MINI_WINDOW_P (XWINDOW (val
)))
1039 error ("Surrogate minibuffer windows must be minibuffer windows.");
1041 if (FRAME_HAS_MINIBUF_P (f
) || FRAME_MINIBUF_ONLY_P (f
))
1042 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer.");
1044 /* Install the chosen minibuffer window, with proper buffer. */
1045 f
->minibuffer_window
= val
;
1049 DEFUN ("frame-parameters", Fframe_parameters
, Sframe_parameters
, 0, 1, 0,
1050 "Return the parameters-alist of frame FRAME.\n\
1051 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.\n\
1052 The meaningful PARMs depend on the kind of frame.\n\
1053 If FRAME is omitted, return information on the currently selected frame.")
1060 if (EQ (frame
, Qnil
))
1064 CHECK_FRAME (frame
, 0);
1068 if (f
->display
.nothing
== 0)
1071 alist
= Fcopy_alist (f
->param_alist
);
1072 store_in_alist (&alist
, Qname
, f
->name
);
1073 store_in_alist (&alist
, Qheight
, make_number (f
->height
));
1074 store_in_alist (&alist
, Qwidth
, make_number (f
->width
));
1075 store_in_alist (&alist
, Qmodeline
, (f
->wants_modeline
? Qt
: Qnil
));
1076 store_in_alist (&alist
, Qminibuffer
,
1077 (! FRAME_HAS_MINIBUF_P (f
) ? Qnil
1078 : (FRAME_MINIBUF_ONLY_P (f
) ? Qonly
1079 : FRAME_MINIBUF_WINDOW (f
))));
1080 store_in_alist (&alist
, Qunsplittable
, (f
->no_split
? Qt
: Qnil
));
1081 store_in_alist (&alist
, Qmenu_bar_lines
, (FRAME_MENU_BAR_LINES (f
)));
1083 /* I think this should be done with a hook. */
1084 #ifdef HAVE_X_WINDOWS
1086 x_report_frame_params (f
, &alist
);
1091 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters
,
1092 Smodify_frame_parameters
, 2, 2, 0,
1093 "Modify the parameters of frame FRAME according to ALIST.\n\
1094 ALIST is an alist of parameters to change and their new values.\n\
1095 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\
1096 The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.")
1098 Lisp_Object frame
, alist
;
1101 register Lisp_Object tail
, elt
, prop
, val
;
1103 if (EQ (frame
, Qnil
))
1107 CHECK_LIVE_FRAME (frame
, 0);
1111 /* I think this should be done with a hook. */
1112 #ifdef HAVE_X_WINDOWS
1115 x_set_frame_parameters (f
, alist
);
1117 for (tail
= alist
; !EQ (tail
, Qnil
); tail
= Fcdr (tail
))
1122 x_set_frame_param (f
, prop
, val
, get_frame_param (f
, prop
));
1123 store_frame_param (f
, prop
, val
);
1131 DEFUN ("frame-char-height", Fframe_char_height
, Sframe_char_height
,
1133 "Height in pixels of a line in the font in frame FRAME.\n\
1134 If FRAME is omitted, the selected frame is used.\n\
1135 For a terminal frame, the value is always 1.")
1145 CHECK_FRAME (frame
, 0);
1149 #ifdef HAVE_X_WINDOWS
1151 return make_number (x_char_height (f
));
1154 return make_number (1);
1158 DEFUN ("frame-char-width", Fframe_char_width
, Sframe_char_width
,
1160 "Width in pixels of characters in the font in frame FRAME.\n\
1161 If FRAME is omitted, the selected frame is used.\n\
1162 The width is the same for all characters, because\n\
1163 currently Emacs supports only fixed-width fonts.\n\
1164 For a terminal screen, the value is always 1.")
1174 CHECK_FRAME (frame
, 0);
1178 #ifdef HAVE_X_WINDOWS
1180 return make_number (x_char_width (f
));
1183 return make_number (1);
1186 DEFUN ("frame-pixel-height", Fframe_pixel_height
,
1187 Sframe_pixel_height
, 0, 1, 0,
1188 "Return a FRAME's heightin pixels.\n\
1189 For a terminal frame, the result really gives the sizes in characters.\n\
1190 If FRAME is omitted, the selected frame is used.")
1200 CHECK_FRAME (frame
, 0);
1204 #ifdef HAVE_X_WINDOWS
1206 return make_number (x_pixel_height (f
));
1209 return make_number (FRAME_HEIGHT (f
));
1212 DEFUN ("frame-pixel-width", Fframe_pixel_width
,
1213 Sframe_pixel_width
, 0, 1, 0,
1214 "Return FRAME's width in pixels.\n\
1215 For a terminal frame, the result really gives the sizes in characters.\n\
1216 If FRAME is omitted, the selected frame is used.")
1226 CHECK_FRAME (frame
, 0);
1230 #ifdef HAVE_X_WINDOWS
1232 return make_number (x_pixel_width (f
));
1235 return make_number (FRAME_WIDTH (f
));
1238 DEFUN ("set-frame-height", Fset_frame_height
, Sset_frame_height
, 2, 3, 0,
1239 "Specify that the frame FRAME has LINES lines.\n\
1240 Optional third arg non-nil means that redisplay should use LINES lines\n\
1241 but that the idea of the actual height of the frame should not be changed.")
1242 (frame
, rows
, pretend
)
1243 Lisp_Object frame
, rows
, pretend
;
1245 register struct frame
*f
;
1247 CHECK_NUMBER (rows
, 0);
1252 CHECK_LIVE_FRAME (frame
, 0);
1256 /* I think this should be done with a hook. */
1257 #ifdef HAVE_X_WINDOWS
1260 if (XINT (rows
) != f
->width
)
1261 x_set_window_size (f
, f
->width
, XINT (rows
));
1265 change_frame_size (f
, XINT (rows
), 0, !NILP (pretend
), 0);
1269 DEFUN ("set-frame-width", Fset_frame_width
, Sset_frame_width
, 2, 3, 0,
1270 "Specify that the frame FRAME has COLS columns.\n\
1271 Optional third arg non-nil means that redisplay should use COLS columns\n\
1272 but that the idea of the actual width of the frame should not be changed.")
1273 (frame
, cols
, pretend
)
1274 Lisp_Object frame
, cols
, pretend
;
1276 register struct frame
*f
;
1277 CHECK_NUMBER (cols
, 0);
1282 CHECK_LIVE_FRAME (frame
, 0);
1286 /* I think this should be done with a hook. */
1287 #ifdef HAVE_X_WINDOWS
1290 if (XINT (cols
) != f
->width
)
1291 x_set_window_size (f
, XINT (cols
), f
->height
);
1295 change_frame_size (f
, 0, XINT (cols
), !NILP (pretend
), 0);
1299 DEFUN ("set-frame-size", Fset_frame_size
, Sset_frame_size
, 3, 3, 0,
1300 "Sets size of FRAME to COLS by ROWS, measured in characters.")
1302 Lisp_Object frame
, cols
, rows
;
1304 register struct frame
*f
;
1307 CHECK_LIVE_FRAME (frame
, 0);
1308 CHECK_NUMBER (cols
, 2);
1309 CHECK_NUMBER (rows
, 1);
1312 /* I think this should be done with a hook. */
1313 #ifdef HAVE_X_WINDOWS
1316 if (XINT (rows
) != f
->height
|| XINT (cols
) != f
->width
)
1317 x_set_window_size (f
, XINT (cols
), XINT (rows
));
1321 change_frame_size (f
, XINT (rows
), XINT (cols
), 0, 0);
1326 DEFUN ("set-frame-position", Fset_frame_position
,
1327 Sset_frame_position
, 3, 3, 0,
1328 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\
1329 If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\
1330 the leftmost or bottommost position FRAME could occupy without going\n\
1332 (frame
, xoffset
, yoffset
)
1333 Lisp_Object frame
, xoffset
, yoffset
;
1335 register struct frame
*f
;
1338 CHECK_LIVE_FRAME (frame
, 0);
1339 CHECK_NUMBER (xoffset
, 1);
1340 CHECK_NUMBER (yoffset
, 2);
1343 /* I think this should be done with a hook. */
1344 #ifdef HAVE_X_WINDOWS
1346 x_set_offset (f
, XINT (xoffset
), XINT (yoffset
));
1354 DEFUN ("rubber-band-rectangle", Frubber_band_rectangle
, Srubber_band_rectangle
,
1356 "Ask user to specify a window position and size on FRAME with the mouse.\n\
1357 Arguments are FRAME, NAME and GEO. NAME is a name to be displayed as\n\
1358 the purpose of this rectangle. GEO is an X-windows size spec that can\n\
1359 specify defaults for some sizes/positions. If GEO specifies everything,\n\
1360 the mouse is not used.\n\
1361 Returns a list of five values: (FRAME LEFT TOP WIDTH HEIGHT).")
1368 Lisp_Object nums
[4];
1371 CHECK_FRAME (frame
, 0);
1372 CHECK_STRING (name
, 1);
1373 CHECK_STRING (geo
, 2);
1375 switch (XFRAME (frame
)->output_method
)
1377 case output_x_window
:
1378 x_rubber_band (XFRAME (frame
), &vals
[0], &vals
[1], &vals
[2], &vals
[3],
1379 XSTRING (geo
)->data
, XSTRING (name
)->data
);
1386 for (i
= 0; i
< 4; i
++)
1387 XFASTINT (nums
[i
]) = vals
[i
];
1388 return Fcons (frame
, Flist (4, nums
));
1391 #endif /* not HAVE_X11 */
1393 choose_minibuf_frame ()
1395 /* For lowest-level minibuf, put it on currently selected frame
1396 if frame has a minibuffer. */
1398 if (minibuf_level
== 0
1399 && selected_frame
!= 0
1400 && !EQ (minibuf_window
, selected_frame
->minibuffer_window
))
1402 /* I don't think that any frames may validly have a null minibuffer
1404 if (NILP (selected_frame
->minibuffer_window
))
1407 Fset_window_buffer (selected_frame
->minibuffer_window
,
1408 XWINDOW (minibuf_window
)->buffer
);
1409 minibuf_window
= selected_frame
->minibuffer_window
;
1415 /*&&& init symbols here &&&*/
1416 Qframep
= intern ("framep");
1417 staticpro (&Qframep
);
1418 Qframe_live_p
= intern ("frame-live-p");
1419 staticpro (&Qframe_live_p
);
1420 Qheight
= intern ("height");
1421 staticpro (&Qheight
);
1422 Qicon
= intern ("icon");
1424 Qminibuffer
= intern ("minibuffer");
1425 staticpro (&Qminibuffer
);
1426 Qmodeline
= intern ("modeline");
1427 staticpro (&Qmodeline
);
1428 Qname
= intern ("name");
1430 Qonly
= intern ("only");
1432 Qunsplittable
= intern ("unsplittable");
1433 staticpro (&Qunsplittable
);
1434 Qwidth
= intern ("width");
1435 staticpro (&Qwidth
);
1438 Qmenu_bar_lines
= intern ("menu-bar-lines");
1439 staticpro (&Qmenu_bar_lines
);
1441 staticpro (&Vframe_list
);
1443 DEFVAR_LISP ("terminal-frame", &Vterminal_frame
,
1444 "The initial frame-object, which represents Emacs's stdout.");
1446 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified
,
1447 "Non-nil if all of emacs is iconified and frame updates are not needed.");
1448 Vemacs_iconified
= Qnil
;
1450 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame
,
1451 "Minibufferless frames use this frame's minibuffer.\n\
1453 Emacs cannot create minibufferless frames unless this is set to an\n\
1454 appropriate surrogate.\n\
1456 Emacs consults this variable only when creating minibufferless\n\
1457 frames; once the frame is created, it sticks with its assigned\n\
1458 minibuffer, no matter what this variable is set to. This means that\n\
1459 this variable doesn't necessarily say anything meaningful about the\n\
1460 current set of frames, or where the minibuffer is currently being\n\
1462 Vdefault_minibuffer_frame
= Qnil
;
1464 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist
,
1465 "Alist of default values for frame creation.\n\
1466 These may be set in your init file, like this:\n\
1467 (setq default-frame-alist '((width . 80) (height . 55)))\n\
1468 These override values given in window system configuration data, like\n\
1469 X Windows' defaults database.\n\
1470 For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
1471 For values specific to the separate minibuffer frame, see\n\
1472 `minibuffer-frame-alist'.");
1473 Vdefault_frame_alist
= Qnil
;
1476 defsubr (&Sframe_live_p
);
1477 defsubr (&Shandle_switch_frame
);
1478 defsubr (&Sselect_frame
);
1479 defsubr (&Sselected_frame
);
1480 defsubr (&Swindow_frame
);
1481 defsubr (&Sframe_root_window
);
1482 defsubr (&Sframe_selected_window
);
1483 defsubr (&Sframe_list
);
1484 defsubr (&Snext_frame
);
1485 defsubr (&Sdelete_frame
);
1486 defsubr (&Smouse_position
);
1487 defsubr (&Sset_mouse_position
);
1489 defsubr (&Sframe_configuration
);
1490 defsubr (&Srestore_frame_configuration
);
1492 defsubr (&Smake_frame_visible
);
1493 defsubr (&Smake_frame_invisible
);
1494 defsubr (&Siconify_frame
);
1495 defsubr (&Sframe_visible_p
);
1496 defsubr (&Svisible_frame_list
);
1497 defsubr (&Sraise_frame
);
1498 defsubr (&Slower_frame
);
1499 defsubr (&Sredirect_frame_focus
);
1500 defsubr (&Sframe_focus
);
1501 defsubr (&Sframe_parameters
);
1502 defsubr (&Smodify_frame_parameters
);
1503 defsubr (&Sframe_char_height
);
1504 defsubr (&Sframe_char_width
);
1505 defsubr (&Sframe_pixel_height
);
1506 defsubr (&Sframe_pixel_width
);
1507 defsubr (&Sset_frame_height
);
1508 defsubr (&Sset_frame_width
);
1509 defsubr (&Sset_frame_size
);
1510 defsubr (&Sset_frame_position
);
1512 defsubr (&Srubber_band_rectangle
);
1513 #endif /* HAVE_X11 */
1518 initial_define_lispy_key (global_map
, "switch-frame", "handle-switch-frame");
1521 #else /* not MULTI_FRAME */
1523 /* If we're not using multi-frame stuff, we still need to provide some
1524 support functions. */
1526 /* Unless this function is defined, providing set-frame-height and
1527 set-frame-width doesn't help compatibility any, since they both
1528 want this as their first argument. */
1529 DEFUN ("selected-frame", Fselected_frame
, Sselected_frame
, 0, 0, 0,
1530 "Return the frame that is now selected.")
1538 DEFUN ("set-frame-height", Fset_frame_height
, Sset_frame_height
, 2, 3, 0,
1539 "Specify that the frame FRAME has LINES lines.\n\
1540 Optional third arg non-nil means that redisplay should use LINES lines\n\
1541 but that the idea of the actual height of the frame should not be changed.")
1542 (frame
, rows
, pretend
)
1543 Lisp_Object frame
, rows
, pretend
;
1545 CHECK_NUMBER (rows
, 0);
1547 change_frame_size (0, XINT (rows
), 0, !NILP (pretend
), 0);
1551 DEFUN ("set-frame-width", Fset_frame_width
, Sset_frame_width
, 2, 3, 0,
1552 "Specify that the frame FRAME has COLS columns.\n\
1553 Optional third arg non-nil means that redisplay should use COLS columns\n\
1554 but that the idea of the actual width of the frame should not be changed.")
1555 (frame
, cols
, pretend
)
1556 Lisp_Object frame
, cols
, pretend
;
1558 CHECK_NUMBER (cols
, 0);
1560 change_frame_size (0, 0, XINT (cols
), !NILP (pretend
), 0);
1564 DEFUN ("set-frame-size", Fset_frame_size
, Sset_frame_size
, 3, 3, 0,
1565 "Sets size of FRAME to COLS by ROWS, measured in characters.")
1567 Lisp_Object frame
, cols
, rows
;
1569 CHECK_NUMBER (cols
, 2);
1570 CHECK_NUMBER (rows
, 1);
1572 change_frame_size (0, XINT (rows
), XINT (cols
), 0, 0);
1577 DEFUN ("frame-height", Fframe_height
, Sframe_height
, 0, 1, 0,
1578 "Return number of lines available for display on FRAME.\n\
1579 If FRAME is omitted, describe the currently selected frame.")
1583 return make_number (FRAME_HEIGHT (selected_frame
));
1586 DEFUN ("frame-width", Fframe_width
, Sframe_width
, 0, 1, 0,
1587 "Return number of columns available for display on FRAME.\n\
1588 If FRAME is omitted, describe the currently selected frame.")
1592 return make_number (FRAME_WIDTH (selected_frame
));
1595 DEFUN ("frame-char-height", Fframe_char_height
, Sframe_char_height
,
1597 "Height in pixels of a line in the font in frame FRAME.\n\
1598 If FRAME is omitted, the selected frame is used.\n\
1599 For a terminal frame, the value is always 1.")
1603 return make_number (1);
1607 DEFUN ("frame-char-width", Fframe_char_width
, Sframe_char_width
,
1609 "Width in pixels of characters in the font in frame FRAME.\n\
1610 If FRAME is omitted, the selected frame is used.\n\
1611 The width is the same for all characters, because\n\
1612 currently Emacs supports only fixed-width fonts.\n\
1613 For a terminal screen, the value is always 1.")
1617 return make_number (1);
1620 DEFUN ("frame-pixel-height", Fframe_pixel_height
,
1621 Sframe_pixel_height
, 0, 1, 0,
1622 "Return FRAME's height in pixels.\n\
1623 For a terminal frame, the result really gives the height in characters.\n\
1624 If FRAME is omitted, the selected frame is used.")
1628 return make_number (FRAME_HEIGHT (f
));
1631 DEFUN ("frame-pixel-width", Fframe_pixel_width
,
1632 Sframe_pixel_width
, 0, 1, 0,
1633 "Return FRAME's width in pixels.\n\
1634 For a terminal frame, the result really gives the width in characters.\n\
1635 If FRAME is omitted, the selected frame is used.")
1639 return make_number (FRAME_WIDTH (f
));
1642 /* These are for backward compatibility with Emacs 18. */
1644 DEFUN ("set-screen-height", Fset_screen_height
, Sset_screen_height
, 1, 2, 0,
1645 "Tell redisplay that the screen has LINES lines.\n\
1646 Optional second arg non-nil means that redisplay should use LINES lines\n\
1647 but that the idea of the actual height of the screen should not be changed.")
1649 Lisp_Object lines
, pretend
;
1651 CHECK_NUMBER (lines
, 0);
1653 change_frame_size (0, XINT (lines
), 0, !NILP (pretend
), 0);
1657 DEFUN ("set-screen-width", Fset_screen_width
, Sset_screen_width
, 1, 2, 0,
1658 "Tell redisplay that the screen has COLS columns.\n\
1659 Optional second arg non-nil means that redisplay should use COLS columns\n\
1660 but that the idea of the actual width of the screen should not be changed.")
1662 Lisp_Object cols
, pretend
;
1664 CHECK_NUMBER (cols
, 0);
1666 change_frame_size (0, 0, XINT (cols
), !NILP (pretend
), 0);
1672 defsubr (&Sselected_frame
);
1673 defsubr (&Sframe_char_height
);
1674 defsubr (&Sframe_char_width
);
1675 defsubr (&Sframe_pixel_height
);
1676 defsubr (&Sframe_pixel_width
);
1677 defsubr (&Sset_frame_height
);
1678 defsubr (&Sset_frame_width
);
1679 defsubr (&Sset_frame_size
);
1680 defsubr (&Sset_screen_height
);
1681 defsubr (&Sset_screen_width
);
1682 defsubr (&Sframe_height
);
1683 Ffset (intern ("screen-height"), intern ("frame-height"));
1684 defsubr (&Sframe_width
);
1685 Ffset (intern ("screen-width"), intern ("frame-width"));
1692 #endif /* not MULTI_FRAME */