Mercurial > emacs
annotate src/frame.c @ 1297:28e8b21e8bba
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Fri, 02 Oct 1992 02:26:36 +0000 |
parents | a2d017a57391 |
children | 5e27c3e71a78 |
rev | line source |
---|---|
765 | 1 /* Generic frame functions. |
708 | 2 Copyright (C) 1989, 1992 Free Software Foundation. |
286 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
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 | |
708 | 8 the Free Software Foundation; either version 2, or (at your option) |
286 | 9 any later version. |
10 | |
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. | |
15 | |
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. */ | |
19 | |
363 | 20 #include <stdio.h> |
21 | |
286 | 22 #include "config.h" |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
23 #include "lisp.h" |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
24 #include "frame.h" |
732 | 25 |
765 | 26 #ifdef MULTI_FRAME |
732 | 27 |
286 | 28 #include "window.h" |
363 | 29 #include "termhooks.h" |
286 | 30 |
31 Lisp_Object Vemacs_iconified; | |
765 | 32 Lisp_Object Vframe_list; |
33 Lisp_Object Vterminal_frame; | |
34 Lisp_Object Vdefault_minibuffer_frame; | |
35 Lisp_Object Vdefault_frame_alist; | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
36 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
37 /* Evaluate this expression to rebuild the section of syms_of_frame |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
38 that initializes and staticpros the symbols declared below. Note |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
39 that Emacs 18 has a bug that keeps C-x C-e from being able to |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
40 evaluate this expression. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
41 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
42 (progn |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
43 ;; Accumulate a list of the symbols we want to initialize from the |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
44 ;; declarations at the top of the file. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
45 (goto-char (point-min)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
46 (search-forward "/\*&&& symbols declared here &&&*\/\n") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
47 (let (symbol-list) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
48 (while (looking-at "Lisp_Object \\(Q[a-z_]+\\)") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
49 (setq symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
50 (cons (buffer-substring (match-beginning 1) (match-end 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
51 symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
52 (forward-line 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
53 (setq symbol-list (nreverse symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
54 ;; Delete the section of syms_of_... where we initialize the symbols. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
55 (search-forward "\n /\*&&& init symbols here &&&*\/\n") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
56 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
57 (while (looking-at "^ Q") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
58 (forward-line 2)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
59 (kill-region start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
60 ;; Write a new symbol initialization section. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
61 (while symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
62 (insert (format " %s = intern (\"" (car symbol-list))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
63 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
64 (insert (substring (car symbol-list) 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
65 (subst-char-in-region start (point) ?_ ?-)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
66 (insert (format "\");\n staticpro (&%s);\n" (car symbol-list))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
67 (setq symbol-list (cdr symbol-list))))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
68 */ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
69 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
70 /*&&& symbols declared here &&&*/ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
71 Lisp_Object Qframep; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
72 Lisp_Object Qlive_frame_p; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
73 Lisp_Object Qheight; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
74 Lisp_Object Qicon; |
539 | 75 Lisp_Object Qminibuffer; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
76 Lisp_Object Qmodeline; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
77 Lisp_Object Qname; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
78 Lisp_Object Qnone; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
79 Lisp_Object Qonly; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
80 Lisp_Object Qunsplittable; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
81 Lisp_Object Qwidth; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
82 Lisp_Object Qx; |
286 | 83 |
84 extern Lisp_Object Vminibuffer_list; | |
85 extern Lisp_Object get_minibuffer (); | |
86 | |
765 | 87 DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
88 "Return non-nil if OBJECT is a frame.\n\ | |
89 Value is t for a termcap frame (a character-only terminal),\n\ | |
90 `x' for an Emacs frame that is really an X window.\n\ | |
91 Also see `live-frame-p'.") | |
454 | 92 (object) |
93 Lisp_Object object; | |
286 | 94 { |
765 | 95 if (XTYPE (object) != Lisp_Frame) |
286 | 96 return Qnil; |
765 | 97 switch (XFRAME (object)->output_method) |
286 | 98 { |
99 case output_termcap: | |
100 return Qt; | |
101 case output_x_window: | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
102 return Qx; |
286 | 103 default: |
104 abort (); | |
105 } | |
106 } | |
107 | |
765 | 108 DEFUN ("live-frame-p", Flive_frame_p, Slive_frame_p, 1, 1, 0, |
109 "Return non-nil if OBJECT is a frame which has not been deleted.\n\ | |
110 Value is nil if OBJECT is not a live frame. If object is a live\n\ | |
111 frame, the return value indicates what sort of output device it is\n\ | |
112 displayed on. Value is t for a termcap frame (a character-only\n\ | |
113 terminal), `x' for an Emacs frame being displayed in an X window.") | |
454 | 114 (object) |
115 Lisp_Object object; | |
116 { | |
765 | 117 return ((FRAMEP (object) |
118 && FRAME_LIVE_P (XFRAME (object))) | |
119 ? Fframep (object) | |
454 | 120 : Qnil); |
121 } | |
122 | |
765 | 123 struct frame * |
124 make_frame (mini_p) | |
286 | 125 int mini_p; |
126 { | |
765 | 127 Lisp_Object frame; |
128 register struct frame *f; | |
286 | 129 register Lisp_Object root_window; |
130 register Lisp_Object mini_window; | |
131 | |
765 | 132 frame = Fmake_vector (((sizeof (struct frame) - (sizeof (Lisp_Vector) |
363 | 133 - sizeof (Lisp_Object))) |
134 / sizeof (Lisp_Object)), | |
286 | 135 make_number (0)); |
765 | 136 XSETTYPE (frame, Lisp_Frame); |
137 f = XFRAME (frame); | |
286 | 138 |
765 | 139 f->cursor_x = 0; |
140 f->cursor_y = 0; | |
141 f->current_glyphs = 0; | |
142 f->desired_glyphs = 0; | |
143 f->visible = 0; | |
144 f->display.nothing = 0; | |
145 f->iconified = 0; | |
146 f->wants_modeline = 1; | |
147 f->auto_raise = 0; | |
148 f->auto_lower = 0; | |
149 f->no_split = 0; | |
150 f->garbaged = 0; | |
151 f->has_minibuffer = mini_p; | |
152 f->focus_frame = frame; | |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
153 f->explicit_name = 0; |
286 | 154 |
765 | 155 f->param_alist = Qnil; |
286 | 156 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
157 root_window = make_window (); |
286 | 158 if (mini_p) |
159 { | |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
160 mini_window = make_window (); |
286 | 161 XWINDOW (root_window)->next = mini_window; |
162 XWINDOW (mini_window)->prev = root_window; | |
163 XWINDOW (mini_window)->mini_p = Qt; | |
765 | 164 XWINDOW (mini_window)->frame = frame; |
165 f->minibuffer_window = mini_window; | |
286 | 166 } |
167 else | |
168 { | |
169 mini_window = Qnil; | |
170 XWINDOW (root_window)->next = Qnil; | |
765 | 171 f->minibuffer_window = Qnil; |
286 | 172 } |
173 | |
765 | 174 XWINDOW (root_window)->frame = frame; |
286 | 175 |
176 /* 10 is arbitrary, | |
177 just so that there is "something there." | |
765 | 178 Correct size will be set up later with change_frame_size. */ |
286 | 179 |
765 | 180 f->width = 10; |
181 f->height = 10; | |
286 | 182 |
183 XFASTINT (XWINDOW (root_window)->width) = 10; | |
184 XFASTINT (XWINDOW (root_window)->height) = (mini_p ? 9 : 10); | |
185 | |
186 if (mini_p) | |
187 { | |
188 XFASTINT (XWINDOW (mini_window)->width) = 10; | |
189 XFASTINT (XWINDOW (mini_window)->top) = 9; | |
190 XFASTINT (XWINDOW (mini_window)->height) = 1; | |
191 } | |
192 | |
765 | 193 /* Choose a buffer for the frame's root window. */ |
386 | 194 { |
195 Lisp_Object buf; | |
196 | |
197 XWINDOW (root_window)->buffer = Qt; | |
198 buf = Fcurrent_buffer (); | |
199 /* If buf is a 'hidden' buffer (i.e. one whose name starts with | |
200 a space), try to find another one. */ | |
201 if (XSTRING (Fbuffer_name (buf))->data[0] == ' ') | |
202 buf = Fother_buffer (buf); | |
203 Fset_window_buffer (root_window, buf); | |
204 } | |
205 | |
286 | 206 if (mini_p) |
207 { | |
208 XWINDOW (mini_window)->buffer = Qt; | |
209 Fset_window_buffer (mini_window, | |
485 | 210 (NILP (Vminibuffer_list) |
286 | 211 ? get_minibuffer (0) |
212 : Fcar (Vminibuffer_list))); | |
213 } | |
214 | |
765 | 215 f->root_window = root_window; |
216 f->selected_window = root_window; | |
363 | 217 /* Make sure this window seems more recently used than |
218 a newly-created, never-selected window. */ | |
765 | 219 XFASTINT (XWINDOW (f->selected_window)->use_time) = ++window_select_count; |
286 | 220 |
765 | 221 Vframe_list = Fcons (frame, Vframe_list); |
286 | 222 |
765 | 223 return f; |
286 | 224 } |
225 | |
765 | 226 /* Make a frame using a separate minibuffer window on another frame. |
286 | 227 MINI_WINDOW is the minibuffer window to use. nil means use the |
228 default (the global minibuffer). */ | |
229 | |
765 | 230 struct frame * |
231 make_frame_without_minibuffer (mini_window) | |
286 | 232 register Lisp_Object mini_window; |
233 { | |
765 | 234 register struct frame *f; |
286 | 235 |
236 /* Choose the minibuffer window to use. */ | |
485 | 237 if (NILP (mini_window)) |
286 | 238 { |
765 | 239 if (XTYPE (Vdefault_minibuffer_frame) != Lisp_Frame) |
240 error ("default-minibuffer-frame must be set when creating minibufferless frames"); | |
241 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame))) | |
242 error ("default-minibuffer-frame must be a live frame"); | |
243 mini_window = XFRAME (Vdefault_minibuffer_frame)->minibuffer_window; | |
286 | 244 } |
245 else | |
246 { | |
247 CHECK_WINDOW (mini_window, 0); | |
248 } | |
249 | |
765 | 250 /* Make a frame containing just a root window. */ |
251 f = make_frame (0); | |
286 | 252 |
253 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 254 f->minibuffer_window = mini_window; |
286 | 255 Fset_window_buffer (mini_window, |
485 | 256 (NILP (Vminibuffer_list) |
286 | 257 ? get_minibuffer (0) |
258 : Fcar (Vminibuffer_list))); | |
765 | 259 return f; |
286 | 260 } |
261 | |
765 | 262 /* Make a frame containing only a minibuffer window. */ |
286 | 263 |
765 | 264 struct frame * |
265 make_minibuffer_frame () | |
286 | 266 { |
765 | 267 /* First make a frame containing just a root window, no minibuffer. */ |
286 | 268 |
765 | 269 register struct frame *f = make_frame (0); |
286 | 270 register Lisp_Object mini_window; |
765 | 271 register Lisp_Object frame; |
286 | 272 |
765 | 273 XSET (frame, Lisp_Frame, f); |
286 | 274 |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
275 f->auto_raise = 0; |
765 | 276 f->auto_lower = 0; |
277 f->no_split = 1; | |
278 f->wants_modeline = 0; | |
279 f->has_minibuffer = 1; | |
286 | 280 |
281 /* Now label the root window as also being the minibuffer. | |
282 Avoid infinite looping on the window chain by marking next pointer | |
283 as nil. */ | |
284 | |
765 | 285 mini_window = f->minibuffer_window = f->root_window; |
286 | 286 XWINDOW (mini_window)->mini_p = Qt; |
287 XWINDOW (mini_window)->next = Qnil; | |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
288 XWINDOW (mini_window)->prev = Qnil; |
765 | 289 XWINDOW (mini_window)->frame = frame; |
286 | 290 |
291 /* Put the proper buffer in that window. */ | |
292 | |
293 Fset_window_buffer (mini_window, | |
485 | 294 (NILP (Vminibuffer_list) |
286 | 295 ? get_minibuffer (0) |
296 : Fcar (Vminibuffer_list))); | |
765 | 297 return f; |
286 | 298 } |
299 | |
765 | 300 /* Construct a frame that refers to the terminal (stdin and stdout). */ |
286 | 301 |
765 | 302 struct frame * |
303 make_terminal_frame () | |
286 | 304 { |
765 | 305 register struct frame *f; |
286 | 306 |
765 | 307 Vframe_list = Qnil; |
308 f = make_frame (1); | |
309 f->name = build_string ("terminal"); | |
310 f->visible = 1; | |
311 f->display.nothing = 1; /* Nonzero means frame isn't deleted. */ | |
312 XSET (Vterminal_frame, Lisp_Frame, f); | |
313 return f; | |
286 | 314 } |
315 | |
765 | 316 DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, 0, |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
317 "Select the frame FRAME. FRAME's selected window becomes \"the\"\n\ |
363 | 318 selected window. If the optional parameter NO-ENTER is non-nil, don't\n\ |
765 | 319 focus on that frame.") |
320 (frame, no_enter) | |
321 Lisp_Object frame, no_enter; | |
286 | 322 { |
765 | 323 CHECK_LIVE_FRAME (frame, 0); |
286 | 324 |
765 | 325 if (selected_frame == XFRAME (frame)) |
326 return frame; | |
286 | 327 |
765 | 328 selected_frame = XFRAME (frame); |
329 if (! FRAME_MINIBUF_ONLY_P (selected_frame)) | |
330 last_nonminibuf_frame = selected_frame; | |
363 | 331 |
765 | 332 Fselect_window (XFRAME (frame)->selected_window); |
286 | 333 |
334 #ifdef HAVE_X_WINDOWS | |
765 | 335 #ifdef MULTI_FRAME |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
336 if (FRAME_X_P (XFRAME (frame)) |
485 | 337 && NILP (no_enter)) |
286 | 338 { |
765 | 339 Ffocus_frame (frame); |
286 | 340 } |
341 #endif | |
342 #endif | |
765 | 343 choose_minibuf_frame (); |
286 | 344 |
765 | 345 return frame; |
286 | 346 } |
347 | |
765 | 348 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, |
349 "Return the frame that is now selected.") | |
286 | 350 () |
351 { | |
352 Lisp_Object tem; | |
765 | 353 XSET (tem, Lisp_Frame, selected_frame); |
286 | 354 return tem; |
355 } | |
356 | |
765 | 357 DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, |
358 "Return the frame object that window WINDOW is on.") | |
286 | 359 (window) |
360 Lisp_Object window; | |
361 { | |
362 CHECK_WINDOW (window, 0); | |
765 | 363 return XWINDOW (window)->frame; |
286 | 364 } |
365 | |
765 | 366 DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
367 "Returns the root-window of FRAME.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
368 If omitted, FRAME defaults to the currently selected frame.") |
765 | 369 (frame) |
370 Lisp_Object frame; | |
286 | 371 { |
765 | 372 if (NILP (frame)) |
373 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 374 else |
765 | 375 CHECK_LIVE_FRAME (frame, 0); |
286 | 376 |
765 | 377 return XFRAME (frame)->root_window; |
286 | 378 } |
379 | |
765 | 380 DEFUN ("frame-selected-window", Fframe_selected_window, |
381 Sframe_selected_window, 0, 1, 0, | |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
382 "Return the selected window of frame object FRAME.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
383 If omitted, FRAME defaults to the currently selected frame.") |
765 | 384 (frame) |
385 Lisp_Object frame; | |
286 | 386 { |
765 | 387 if (NILP (frame)) |
388 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 389 else |
765 | 390 CHECK_LIVE_FRAME (frame, 0); |
286 | 391 |
765 | 392 return XFRAME (frame)->selected_window; |
286 | 393 } |
394 | |
765 | 395 DEFUN ("frame-list", Fframe_list, Sframe_list, |
286 | 396 0, 0, 0, |
765 | 397 "Return a list of all frames.") |
286 | 398 () |
399 { | |
765 | 400 return Fcopy_sequence (Vframe_list); |
286 | 401 } |
402 | |
765 | 403 #ifdef MULTI_FRAME |
454 | 404 |
765 | 405 /* Return the next frame in the frame list after FRAME. |
406 If MINIBUF is nil, exclude minibuffer-only frames. | |
407 If MINIBUF is a window, include only frames using that window for | |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
408 their minibuffer. |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
409 If MINIBUF is non-nil, and not a window, include all frames. */ |
286 | 410 Lisp_Object |
765 | 411 next_frame (frame, minibuf) |
412 Lisp_Object frame; | |
454 | 413 Lisp_Object minibuf; |
286 | 414 { |
415 Lisp_Object tail; | |
416 int passed = 0; | |
417 | |
765 | 418 /* There must always be at least one frame in Vframe_list. */ |
419 if (! CONSP (Vframe_list)) | |
454 | 420 abort (); |
421 | |
286 | 422 while (1) |
765 | 423 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 424 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
425 Lisp_Object f = XCONS (tail)->car; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
426 |
286 | 427 if (passed) |
363 | 428 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
429 /* Decide whether this frame is eligible to be returned. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
430 |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
431 /* If we've looped all the way around without finding any |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
432 eligible frames, return the original frame. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
433 if (EQ (f, frame)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
434 return f; |
335 | 435 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
436 /* Let minibuf decide if this frame is acceptable. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
437 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
438 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
439 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f))) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
440 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
441 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
442 else if (XTYPE (minibuf) == Lisp_Window) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
443 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
444 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
445 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
446 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
447 else |
765 | 448 return f; |
363 | 449 } |
286 | 450 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
451 if (EQ (frame, f)) |
286 | 452 passed++; |
453 } | |
454 } | |
455 | |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
456 #if 0 |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
457 /* Nobody seems to be using this code right now. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
458 |
765 | 459 /* Return the previous frame in the frame list before FRAME. |
460 If MINIBUF is nil, exclude minibuffer-only frames. | |
461 If MINIBUF is a window, include only frames using that window for | |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
462 their minibuffer. |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
463 If MINIBUF is non-nil and not a window, include all frames. */ |
286 | 464 Lisp_Object |
765 | 465 prev_frame (frame, minibuf) |
466 Lisp_Object frame; | |
454 | 467 Lisp_Object minibuf; |
286 | 468 { |
469 Lisp_Object tail; | |
470 Lisp_Object prev; | |
471 | |
765 | 472 /* There must always be at least one frame in Vframe_list. */ |
473 if (! CONSP (Vframe_list)) | |
454 | 474 abort (); |
475 | |
286 | 476 prev = Qnil; |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
477 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
454 | 478 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
479 Lisp_Object f = XCONS (tail)->car; |
454 | 480 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
481 if (XTYPE (f) != Lisp_Frame) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
482 abort (); |
454 | 483 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
484 if (EQ (frame, f) && !NILP (prev)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
485 return prev; |
454 | 486 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
487 /* Decide whether this frame is eligible to be returned, |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
488 according to minibuf. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
489 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
490 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
491 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f))) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
492 prev = f; |
454 | 493 } |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
494 else if (XTYPE (minibuf) == Lisp_Window) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
495 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
496 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
497 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
498 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
499 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
500 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
501 } |
454 | 502 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
503 /* We've scanned the entire list. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
504 if (NILP (prev)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
505 /* We went through the whole frame list without finding a single |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
506 acceptable frame. Return the original frame. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
507 return frame; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
508 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
509 /* There were no acceptable frames in the list before FRAME; otherwise, |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
510 we would have returned directly from the loop. Since PREV is the last |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
511 acceptable frame in the list, return it. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
512 return prev; |
286 | 513 } |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
514 #endif |
286 | 515 |
765 | 516 DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0, |
517 "Return the next frame in the frame list after FRAME.\n\ | |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
518 By default, skip minibuffer-only frames. |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
519 If omitted, FRAME defaults to the selected frame.\n\ |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
520 If optional argument MINIFRAME is non-nil, include minibuffer-only frames.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
521 If MINIFRAME is a window, include only frames using that window for their\n\ |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
522 minibuffer.\n\ |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
523 If MINIFRAME is non-nil and not a window, include all frames.") |
765 | 524 (frame, miniframe) |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
525 Lisp_Object frame, miniframe; |
286 | 526 { |
527 Lisp_Object tail; | |
528 | |
765 | 529 if (NILP (frame)) |
530 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 531 else |
765 | 532 CHECK_LIVE_FRAME (frame, 0); |
286 | 533 |
765 | 534 return next_frame (frame, miniframe); |
286 | 535 } |
765 | 536 #endif /* MULTI_FRAME */ |
286 | 537 |
765 | 538 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 1, "", |
539 "Delete FRAME, permanently eliminating it from use.\n\ | |
540 If omitted, FRAME defaults to the selected frame.\n\ | |
541 A frame may not be deleted if its minibuffer is used by other frames.") | |
542 (frame) | |
543 Lisp_Object frame; | |
286 | 544 { |
765 | 545 struct frame *f; |
286 | 546 union display displ; |
547 | |
765 | 548 if (EQ (frame, Qnil)) |
286 | 549 { |
765 | 550 f = selected_frame; |
551 XSET (frame, Lisp_Frame, f); | |
286 | 552 } |
553 else | |
554 { | |
765 | 555 CHECK_FRAME (frame, 0); |
556 f = XFRAME (frame); | |
286 | 557 } |
558 | |
765 | 559 if (! FRAME_LIVE_P (f)) |
454 | 560 return; |
561 | |
765 | 562 /* Are there any other frames besides this one? */ |
563 if (f == selected_frame && EQ (next_frame (frame, Qt), frame)) | |
564 error ("Attempt to delete the only frame"); | |
286 | 565 |
765 | 566 /* Does this frame have a minibuffer, and is it the surrogate |
567 minibuffer for any other frame? */ | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
568 if (FRAME_HAS_MINIBUF_P (XFRAME (frame))) |
363 | 569 { |
765 | 570 Lisp_Object frames; |
708 | 571 |
765 | 572 for (frames = Vframe_list; |
573 CONSP (frames); | |
574 frames = XCONS (frames)->cdr) | |
708 | 575 { |
765 | 576 Lisp_Object this = XCONS (frames)->car; |
363 | 577 |
765 | 578 if (! EQ (this, frame) |
579 && EQ (frame, | |
580 (WINDOW_FRAME | |
708 | 581 (XWINDOW |
765 | 582 (FRAME_MINIBUF_WINDOW |
583 (XFRAME (this))))))) | |
584 error ("Attempt to delete a surrogate minibuffer frame"); | |
708 | 585 } |
286 | 586 } |
587 | |
765 | 588 /* Don't let the frame remain selected. */ |
589 if (f == selected_frame) | |
1260
a2d017a57391
* frame.c (Fdelete_frame): Call Fselect_frame with the appropriate
Jim Blandy <jimb@redhat.com>
parents:
1251
diff
changeset
|
590 Fselect_frame (next_frame (frame, Qt), Qnil); |
286 | 591 |
765 | 592 /* Don't allow minibuf_window to remain on a deleted frame. */ |
593 if (EQ (f->minibuffer_window, minibuf_window)) | |
286 | 594 { |
765 | 595 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 596 XWINDOW (minibuf_window)->buffer); |
765 | 597 minibuf_window = selected_frame->minibuffer_window; |
286 | 598 } |
599 | |
765 | 600 Vframe_list = Fdelq (frame, Vframe_list); |
601 f->visible = 0; | |
602 displ = f->display; | |
603 f->display.nothing = 0; | |
286 | 604 |
363 | 605 #ifdef HAVE_X_WINDOWS |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
606 if (FRAME_X_P (f)) |
765 | 607 x_destroy_window (f, displ); |
363 | 608 #endif |
609 | |
765 | 610 /* If we've deleted the last_nonminibuf_frame, then try to find |
363 | 611 another one. */ |
765 | 612 if (f == last_nonminibuf_frame) |
363 | 613 { |
765 | 614 Lisp_Object frames; |
708 | 615 |
765 | 616 last_nonminibuf_frame = 0; |
363 | 617 |
765 | 618 for (frames = Vframe_list; |
619 CONSP (frames); | |
620 frames = XCONS (frames)->cdr) | |
363 | 621 { |
765 | 622 f = XFRAME (XCONS (frames)->car); |
623 if (!FRAME_MINIBUF_ONLY_P (f)) | |
363 | 624 { |
765 | 625 last_nonminibuf_frame = f; |
363 | 626 break; |
627 } | |
628 } | |
629 } | |
286 | 630 |
765 | 631 /* If we've deleted Vdefault_minibuffer_frame, try to find another |
632 one. Prefer minibuffer-only frames, but also notice frames | |
708 | 633 with other windows. */ |
765 | 634 if (EQ (frame, Vdefault_minibuffer_frame)) |
708 | 635 { |
765 | 636 Lisp_Object frames; |
708 | 637 |
765 | 638 /* The last frame we saw with a minibuffer, minibuffer-only or not. */ |
639 Lisp_Object frame_with_minibuf = Qnil; | |
708 | 640 |
765 | 641 for (frames = Vframe_list; |
642 CONSP (frames); | |
643 frames = XCONS (frames)->cdr) | |
708 | 644 { |
765 | 645 Lisp_Object this = XCONS (frames)->car; |
708 | 646 |
765 | 647 if (XTYPE (this) != Lisp_Frame) |
708 | 648 abort (); |
765 | 649 f = XFRAME (this); |
708 | 650 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
651 if (FRAME_HAS_MINIBUF_P (f)) |
708 | 652 { |
765 | 653 frame_with_minibuf = this; |
654 if (FRAME_MINIBUF_ONLY_P (f)) | |
708 | 655 break; |
656 } | |
657 } | |
658 | |
765 | 659 /* We know that there must be some frame with a minibuffer out |
660 there. If this were not true, all of the frames present | |
708 | 661 would have to be minibufferless, which implies that at some |
765 | 662 point their minibuffer frames must have been deleted, but |
708 | 663 that is prohibited at the top; you can't delete surrogate |
765 | 664 minibuffer frames. */ |
665 if (NILP (frame_with_minibuf)) | |
708 | 666 abort (); |
667 | |
765 | 668 Vdefault_minibuffer_frame = frame_with_minibuf; |
708 | 669 } |
670 | |
286 | 671 return Qnil; |
672 } | |
673 | |
674 /* Return mouse position in character cell units. */ | |
675 | |
454 | 676 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, |
765 | 677 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\ |
454 | 678 If Emacs is running on a mouseless terminal or hasn't been programmed\n\ |
765 | 679 to read the mouse position, it returns the selected frame for FRAME\n\ |
454 | 680 and nil for X and Y.") |
681 () | |
286 | 682 { |
454 | 683 Lisp_Object x, y, dummy; |
765 | 684 FRAME_PTR f; |
286 | 685 |
454 | 686 if (mouse_position_hook) |
765 | 687 (*mouse_position_hook) (&f, &x, &y, &dummy); |
454 | 688 else |
689 { | |
765 | 690 f = selected_frame; |
454 | 691 x = y = Qnil; |
692 } | |
286 | 693 |
765 | 694 XSET (dummy, Lisp_Frame, f); |
454 | 695 return Fcons (dummy, Fcons (make_number (x), make_number (y))); |
286 | 696 } |
697 | |
698 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, | |
765 | 699 "Move the mouse pointer to the center of cell (X,Y) in FRAME.\n\ |
700 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.") | |
701 (frame, x, y) | |
702 Lisp_Object frame, x, y; | |
286 | 703 { |
765 | 704 CHECK_LIVE_FRAME (frame, 0); |
286 | 705 CHECK_NUMBER (x, 2); |
706 CHECK_NUMBER (y, 1); | |
707 | |
708 #ifdef HAVE_X_WINDOWS | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
709 if (FRAME_X_P (XFRAME (frame))) |
286 | 710 /* Warping the mouse will cause enternotify and focus events. */ |
765 | 711 x_set_mouse_position (XFRAME (frame), x, y); |
286 | 712 #endif |
713 | |
714 return Qnil; | |
715 } | |
716 | |
717 #if 0 | |
718 /* ??? Can this be replaced with a Lisp function? | |
756 | 719 It is used in minibuf.c. Can we get rid of that? |
720 Yes. All uses in minibuf.c are gone, and parallels to these | |
765 | 721 functions have been defined in frame.el. */ |
286 | 722 |
765 | 723 DEFUN ("frame-configuration", Fframe_configuration, Sframe_configuration, |
286 | 724 0, 0, 0, |
765 | 725 "Return object describing current frame configuration.\n\ |
726 The frame configuration is the current mouse position and selected frame.\n\ | |
727 This object can be given to `restore-frame-configuration'\n\ | |
728 to restore this frame configuration.") | |
286 | 729 () |
730 { | |
454 | 731 Lisp_Object c, time; |
286 | 732 |
454 | 733 c = Fmake_vector (make_number(4), Qnil); |
765 | 734 XVECTOR (c)->contents[0] = Fselected_frame(); |
454 | 735 if (mouse_position_hook) |
736 (*mouse_position_hook) (&XVECTOR (c)->contents[1] | |
737 &XVECTOR (c)->contents[2], | |
738 &XVECTOR (c)->contents[3], | |
739 &time); | |
286 | 740 return c; |
741 } | |
742 | |
765 | 743 DEFUN ("restore-frame-configuration", Frestore_frame_configuration, |
744 Srestore_frame_configuration, | |
286 | 745 1, 1, 0, |
765 | 746 "Restores frame configuration CONFIGURATION.") |
286 | 747 (config) |
748 Lisp_Object config; | |
749 { | |
765 | 750 Lisp_Object x_pos, y_pos, frame; |
286 | 751 |
752 CHECK_VECTOR (config, 0); | |
753 if (XVECTOR (config)->size != 3) | |
754 { | |
765 | 755 error ("Wrong size vector passed to restore-frame-configuration"); |
286 | 756 } |
765 | 757 frame = XVECTOR (config)->contents[0]; |
758 CHECK_LIVE_FRAME (frame, 0); | |
286 | 759 |
765 | 760 Fselect_frame (frame, Qnil); |
286 | 761 |
762 #if 0 | |
765 | 763 /* This seems to interfere with the frame selection mechanism. jla */ |
454 | 764 x_pos = XVECTOR (config)->contents[2]; |
765 y_pos = XVECTOR (config)->contents[3]; | |
765 | 766 set_mouse_position (frame, XINT (x_pos), XINT (y_pos)); |
286 | 767 #endif |
768 | |
765 | 769 return frame; |
286 | 770 } |
771 #endif | |
772 | |
765 | 773 DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, |
872 | 774 0, 1, 0, |
765 | 775 "Make the frame FRAME visible (assuming it is an X-window).\n\ |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
776 Also raises the frame so that nothing obscures it.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
777 If omitted, FRAME defaults to the currently selected frame.") |
765 | 778 (frame) |
779 Lisp_Object frame; | |
286 | 780 { |
872 | 781 if (NILP (frame)) |
886 | 782 XSET (frame, Lisp_Frame, selected_frame); |
872 | 783 |
765 | 784 CHECK_LIVE_FRAME (frame, 0); |
286 | 785 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
786 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
787 if (FRAME_X_P (XFRAME (frame))) |
765 | 788 x_make_frame_visible (XFRAME (frame)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
789 #endif |
286 | 790 |
765 | 791 return frame; |
286 | 792 } |
793 | |
765 | 794 DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible, |
872 | 795 0, 1, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
796 "Make the frame FRAME invisible (assuming it is an X-window).\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
797 If omitted, FRAME defaults to the currently selected frame.") |
765 | 798 (frame) |
799 Lisp_Object frame; | |
286 | 800 { |
872 | 801 if (NILP (frame)) |
886 | 802 XSET (frame, Lisp_Frame, selected_frame); |
872 | 803 |
765 | 804 CHECK_LIVE_FRAME (frame, 0); |
286 | 805 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
806 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
807 if (FRAME_X_P (XFRAME (frame))) |
765 | 808 x_make_frame_invisible (XFRAME (frame)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
809 #endif |
286 | 810 |
811 return Qnil; | |
812 } | |
813 | |
765 | 814 DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, |
872 | 815 0, 1, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
816 "Make the frame FRAME into an icon.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
817 If omitted, FRAME defaults to the currently selected frame.") |
765 | 818 (frame) |
819 Lisp_Object frame; | |
286 | 820 { |
872 | 821 if (NILP (frame)) |
886 | 822 XSET (frame, Lisp_Frame, selected_frame); |
872 | 823 |
765 | 824 CHECK_LIVE_FRAME (frame, 0); |
286 | 825 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
826 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
827 if (FRAME_X_P (XFRAME (frame))) |
765 | 828 x_iconify_frame (XFRAME (frame)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
829 #endif |
286 | 830 |
831 return Qnil; | |
832 } | |
833 | |
765 | 834 DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, |
286 | 835 1, 1, 0, |
765 | 836 "Return t if FRAME is now \"visible\" (actually in use for display).\n\ |
837 A frame that is not \"visible\" is not updated and, if it works through\n\ | |
286 | 838 a window system, it may not show at all.\n\ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
839 Return the symbol `icon' if frame is visible only as an icon.") |
765 | 840 (frame) |
841 Lisp_Object frame; | |
286 | 842 { |
765 | 843 CHECK_LIVE_FRAME (frame, 0); |
286 | 844 |
765 | 845 if (XFRAME (frame)->visible) |
286 | 846 return Qt; |
765 | 847 if (XFRAME (frame)->iconified) |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
848 return Qicon; |
286 | 849 return Qnil; |
850 } | |
851 | |
765 | 852 DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, |
286 | 853 0, 0, 0, |
765 | 854 "Return a list of all frames now \"visible\" (being updated).") |
286 | 855 () |
856 { | |
765 | 857 Lisp_Object tail, frame; |
858 struct frame *f; | |
286 | 859 Lisp_Object value; |
860 | |
861 value = Qnil; | |
765 | 862 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 863 { |
765 | 864 frame = XCONS (tail)->car; |
865 if (XTYPE (frame) != Lisp_Frame) | |
286 | 866 continue; |
765 | 867 f = XFRAME (frame); |
868 if (f->visible) | |
869 value = Fcons (frame, value); | |
286 | 870 } |
871 return value; | |
872 } | |
363 | 873 |
874 | |
875 | |
765 | 876 DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, |
363 | 877 1, 2, 0, |
765 | 878 "Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.\n\ |
879 This means that, after reading a keystroke typed at FRAME,\n\ | |
880 `last-event-frame' will be FOCUS-FRAME.\n\ | |
363 | 881 \n\ |
765 | 882 If FOCUS-FRAME is omitted or eq to FRAME, any existing redirection is\n\ |
883 cancelled, and the frame again receives its own keystrokes.\n\ | |
363 | 884 \n\ |
765 | 885 The redirection lasts until the next call to `redirect-frame-focus'\n\ |
886 or `select-frame'.\n\ | |
363 | 887 \n\ |
888 This is useful for temporarily redirecting keystrokes to the minibuffer\n\ | |
765 | 889 window when a frame doesn't have its own minibuffer.") |
890 (frame, focus_frame) | |
891 Lisp_Object frame, focus_frame; | |
363 | 892 { |
765 | 893 CHECK_LIVE_FRAME (frame, 0); |
454 | 894 |
765 | 895 if (NILP (focus_frame)) |
896 focus_frame = frame; | |
363 | 897 else |
765 | 898 CHECK_LIVE_FRAME (focus_frame, 1); |
363 | 899 |
765 | 900 XFRAME (frame)->focus_frame = focus_frame; |
363 | 901 |
765 | 902 if (frame_rehighlight_hook) |
903 (*frame_rehighlight_hook) (); | |
363 | 904 |
905 return Qnil; | |
906 } | |
907 | |
908 | |
765 | 909 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0, |
910 "Return the frame to which FRAME's keystrokes are currently being sent.\n\ | |
911 See `redirect-frame-focus'.") | |
912 (frame) | |
913 Lisp_Object frame; | |
363 | 914 { |
765 | 915 CHECK_LIVE_FRAME (frame, 0); |
916 return FRAME_FOCUS_FRAME (XFRAME (frame)); | |
363 | 917 } |
918 | |
919 | |
286 | 920 |
921 Lisp_Object | |
765 | 922 get_frame_param (frame, prop) |
923 register struct frame *frame; | |
286 | 924 Lisp_Object prop; |
925 { | |
926 register Lisp_Object tem; | |
927 | |
765 | 928 tem = Fassq (prop, frame->param_alist); |
286 | 929 if (EQ (tem, Qnil)) |
930 return tem; | |
931 return Fcdr (tem); | |
932 } | |
933 | |
934 void | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
935 store_in_alist (alistptr, prop, val) |
286 | 936 Lisp_Object *alistptr, val; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
937 Lisp_Object prop; |
286 | 938 { |
939 register Lisp_Object tem; | |
940 | |
941 tem = Fassq (prop, *alistptr); | |
942 if (EQ (tem, Qnil)) | |
943 *alistptr = Fcons (Fcons (prop, val), *alistptr); | |
944 else | |
945 Fsetcdr (tem, val); | |
946 } | |
947 | |
948 void | |
765 | 949 store_frame_param (f, prop, val) |
950 struct frame *f; | |
286 | 951 Lisp_Object prop, val; |
952 { | |
953 register Lisp_Object tem; | |
954 | |
765 | 955 tem = Fassq (prop, f->param_alist); |
286 | 956 if (EQ (tem, Qnil)) |
765 | 957 f->param_alist = Fcons (Fcons (prop, val), f->param_alist); |
286 | 958 else |
959 Fsetcdr (tem, val); | |
539 | 960 |
961 if (EQ (prop, Qminibuffer) | |
962 && XTYPE (val) == Lisp_Window) | |
963 { | |
964 if (! MINI_WINDOW_P (XWINDOW (val))) | |
965 error ("Surrogate minibuffer windows must be minibuffer windows."); | |
966 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
967 if (FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f)) |
765 | 968 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer."); |
539 | 969 |
970 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 971 f->minibuffer_window = val; |
539 | 972 } |
286 | 973 } |
974 | |
765 | 975 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, |
976 "Return the parameters-alist of frame FRAME.\n\ | |
286 | 977 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.\n\ |
777 | 978 The meaningful PARMs depend on the kind of frame.\n\ |
979 If FRAME is omitted, return information on the currently selected frame.") | |
765 | 980 (frame) |
981 Lisp_Object frame; | |
286 | 982 { |
983 Lisp_Object alist; | |
765 | 984 struct frame *f; |
286 | 985 |
765 | 986 if (EQ (frame, Qnil)) |
987 f = selected_frame; | |
286 | 988 else |
989 { | |
765 | 990 CHECK_FRAME (frame, 0); |
991 f = XFRAME (frame); | |
286 | 992 } |
993 | |
765 | 994 if (f->display.nothing == 0) |
286 | 995 return Qnil; |
996 | |
765 | 997 alist = Fcopy_alist (f->param_alist); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
998 store_in_alist (&alist, Qname, f->name); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
999 store_in_alist (&alist, Qheight, make_number (f->height)); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1000 store_in_alist (&alist, Qwidth, make_number (f->width)); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1001 store_in_alist (&alist, Qmodeline, (f->wants_modeline ? Qt : Qnil)); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1002 store_in_alist (&alist, Qminibuffer, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1003 (! FRAME_HAS_MINIBUF_P (f) ? Qnone |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1004 : (FRAME_MINIBUF_ONLY_P (f) ? Qonly |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1005 : FRAME_MINIBUF_WINDOW (f)))); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1006 store_in_alist (&alist, Qunsplittable, (f->no_split ? Qt : Qnil)); |
286 | 1007 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1008 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1009 if (FRAME_X_P (f)) |
765 | 1010 x_report_frame_params (f, &alist); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1011 #endif |
286 | 1012 return alist; |
1013 } | |
1014 | |
765 | 1015 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, |
1016 Smodify_frame_parameters, 2, 2, 0, | |
1017 "Modify the parameters of frame FRAME according to ALIST.\n\ | |
286 | 1018 ALIST is an alist of parameters to change and their new values.\n\ |
1019 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\ | |
765 | 1020 The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.") |
1021 (frame, alist) | |
1022 Lisp_Object frame, alist; | |
286 | 1023 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1024 FRAME_PTR f; |
286 | 1025 register Lisp_Object tail, elt, prop, val; |
1026 | |
765 | 1027 if (EQ (frame, Qnil)) |
1028 f = selected_frame; | |
286 | 1029 else |
1030 { | |
765 | 1031 CHECK_LIVE_FRAME (frame, 0); |
1032 f = XFRAME (frame); | |
286 | 1033 } |
1034 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1035 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1036 if (FRAME_X_P (f)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1037 #if 1 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1038 x_set_frame_parameters (f, alist); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1039 #else |
286 | 1040 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) |
1041 { | |
1042 elt = Fcar (tail); | |
1043 prop = Fcar (elt); | |
1044 val = Fcdr (elt); | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1045 x_set_frame_param (f, prop, val, get_frame_param (f, prop)); |
765 | 1046 store_frame_param (f, prop, val); |
286 | 1047 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1048 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1049 #endif |
286 | 1050 |
1051 return Qnil; | |
1052 } | |
1053 | |
1054 | |
777 | 1055 #if 0 |
1056 /* This function isn't useful enough by itself to include; we need to | |
1057 add functions to allow the user to find the size of a font before | |
1058 this is actually useful. */ | |
1059 | |
765 | 1060 DEFUN ("frame-pixel-size", Fframe_pixel_size, |
1061 Sframe_pixel_size, 1, 1, 0, | |
1062 "Return a cons (width . height) of FRAME's size in pixels.") | |
1063 (frame) | |
1064 Lisp_Object frame; | |
286 | 1065 { |
765 | 1066 register struct frame *f; |
286 | 1067 int width, height; |
1068 | |
765 | 1069 CHECK_LIVE_FRAME (frame, 0); |
1070 f = XFRAME (frame); | |
286 | 1071 |
765 | 1072 return Fcons (make_number (x_pixel_width (f)), |
1073 make_number (x_pixel_height (f))); | |
286 | 1074 } |
777 | 1075 #endif |
1076 | |
1077 #if 0 | |
1078 /* These functions have no C callers, and can be written nicely in lisp. */ | |
286 | 1079 |
765 | 1080 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 0, 0, |
1081 "Return number of lines available for display on selected frame.") | |
286 | 1082 () |
1083 { | |
765 | 1084 return make_number (FRAME_HEIGHT (selected_frame)); |
286 | 1085 } |
1086 | |
765 | 1087 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 0, 0, |
1088 "Return number of columns available for display on selected frame.") | |
286 | 1089 () |
1090 { | |
765 | 1091 return make_number (FRAME_WIDTH (selected_frame)); |
286 | 1092 } |
777 | 1093 #endif |
286 | 1094 |
765 | 1095 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, |
1096 "Specify that the frame FRAME has LINES lines.\n\ | |
286 | 1097 Optional third arg non-nil means that redisplay should use LINES lines\n\ |
765 | 1098 but that the idea of the actual height of the frame should not be changed.") |
1099 (frame, rows, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1100 Lisp_Object frame, rows, pretend; |
286 | 1101 { |
765 | 1102 register struct frame *f; |
286 | 1103 |
1104 CHECK_NUMBER (rows, 0); | |
765 | 1105 if (NILP (frame)) |
1106 f = selected_frame; | |
286 | 1107 else |
1108 { | |
765 | 1109 CHECK_LIVE_FRAME (frame, 0); |
1110 f = XFRAME (frame); | |
286 | 1111 } |
1112 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1113 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1114 if (FRAME_X_P (f)) |
286 | 1115 { |
765 | 1116 if (XINT (rows) != f->width) |
1117 x_set_window_size (f, f->width, XINT (rows)); | |
286 | 1118 } |
1119 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1120 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1121 change_frame_size (f, XINT (rows), 0, !NILP (pretend), 0); |
286 | 1122 return Qnil; |
1123 } | |
1124 | |
765 | 1125 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, |
1126 "Specify that the frame FRAME has COLS columns.\n\ | |
286 | 1127 Optional third arg non-nil means that redisplay should use COLS columns\n\ |
765 | 1128 but that the idea of the actual width of the frame should not be changed.") |
1129 (frame, cols, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1130 Lisp_Object frame, cols, pretend; |
286 | 1131 { |
765 | 1132 register struct frame *f; |
286 | 1133 CHECK_NUMBER (cols, 0); |
765 | 1134 if (NILP (frame)) |
1135 f = selected_frame; | |
286 | 1136 else |
1137 { | |
765 | 1138 CHECK_LIVE_FRAME (frame, 0); |
1139 f = XFRAME (frame); | |
286 | 1140 } |
1141 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1142 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1143 if (FRAME_X_P (f)) |
286 | 1144 { |
765 | 1145 if (XINT (cols) != f->width) |
1146 x_set_window_size (f, XINT (cols), f->height); | |
286 | 1147 } |
1148 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1149 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1150 change_frame_size (f, 0, XINT (cols), !NILP (pretend), 0); |
286 | 1151 return Qnil; |
1152 } | |
1153 | |
765 | 1154 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, |
1155 "Sets size of FRAME to COLS by ROWS, measured in characters.") | |
1156 (frame, cols, rows) | |
1157 Lisp_Object frame, cols, rows; | |
286 | 1158 { |
765 | 1159 register struct frame *f; |
286 | 1160 int mask; |
1161 | |
765 | 1162 CHECK_LIVE_FRAME (frame, 0); |
286 | 1163 CHECK_NUMBER (cols, 2); |
1164 CHECK_NUMBER (rows, 1); | |
765 | 1165 f = XFRAME (frame); |
286 | 1166 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1167 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1168 if (FRAME_X_P (f)) |
286 | 1169 { |
765 | 1170 if (XINT (rows) != f->height || XINT (cols) != f->width) |
1171 x_set_window_size (f, XINT (cols), XINT (rows)); | |
286 | 1172 } |
1173 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1174 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1175 change_frame_size (f, XINT (rows), XINT (cols), 0, 0); |
286 | 1176 |
1177 return Qnil; | |
1178 } | |
1179 | |
765 | 1180 DEFUN ("set-frame-position", Fset_frame_position, |
1181 Sset_frame_position, 3, 3, 0, | |
1182 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\ | |
454 | 1183 If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\ |
765 | 1184 the leftmost or bottommost position FRAME could occupy without going\n\ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1185 off the screen.") |
765 | 1186 (frame, xoffset, yoffset) |
1187 Lisp_Object frame, xoffset, yoffset; | |
286 | 1188 { |
765 | 1189 register struct frame *f; |
286 | 1190 int mask; |
1191 | |
765 | 1192 CHECK_LIVE_FRAME (frame, 0); |
286 | 1193 CHECK_NUMBER (xoffset, 1); |
1194 CHECK_NUMBER (yoffset, 2); | |
765 | 1195 f = XFRAME (frame); |
286 | 1196 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1197 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1198 if (FRAME_X_P (f)) |
765 | 1199 x_set_offset (f, XINT (xoffset), XINT (yoffset)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1200 #endif |
286 | 1201 |
1202 return Qt; | |
1203 } | |
777 | 1204 |
286 | 1205 |
1206 #ifndef HAVE_X11 | |
1207 DEFUN ("rubber-band-rectangle", Frubber_band_rectangle, Srubber_band_rectangle, | |
1208 3, 3, "", | |
765 | 1209 "Ask user to specify a window position and size on FRAME with the mouse.\n\ |
1210 Arguments are FRAME, NAME and GEO. NAME is a name to be displayed as\n\ | |
286 | 1211 the purpose of this rectangle. GEO is an X-windows size spec that can\n\ |
1212 specify defaults for some sizes/positions. If GEO specifies everything,\n\ | |
1213 the mouse is not used.\n\ | |
765 | 1214 Returns a list of five values: (FRAME LEFT TOP WIDTH HEIGHT).") |
1215 (frame, name, geo) | |
1216 Lisp_Object frame; | |
286 | 1217 Lisp_Object name; |
1218 Lisp_Object geo; | |
1219 { | |
1220 int vals[4]; | |
1221 Lisp_Object nums[4]; | |
1222 int i; | |
1223 | |
765 | 1224 CHECK_FRAME (frame, 0); |
286 | 1225 CHECK_STRING (name, 1); |
1226 CHECK_STRING (geo, 2); | |
1227 | |
765 | 1228 switch (XFRAME (frame)->output_method) |
286 | 1229 { |
1230 case output_x_window: | |
765 | 1231 x_rubber_band (XFRAME (frame), &vals[0], &vals[1], &vals[2], &vals[3], |
286 | 1232 XSTRING (geo)->data, XSTRING (name)->data); |
1233 break; | |
1234 | |
1235 default: | |
1236 return Qnil; | |
1237 } | |
1238 | |
1239 for (i = 0; i < 4; i++) | |
1240 XFASTINT (nums[i]) = vals[i]; | |
765 | 1241 return Fcons (frame, Flist (4, nums)); |
286 | 1242 return Qnil; |
1243 } | |
1244 #endif /* not HAVE_X11 */ | |
1245 | |
765 | 1246 choose_minibuf_frame () |
286 | 1247 { |
765 | 1248 /* For lowest-level minibuf, put it on currently selected frame |
1249 if frame has a minibuffer. */ | |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1250 |
286 | 1251 if (minibuf_level == 0 |
765 | 1252 && selected_frame != 0 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1253 && !EQ (minibuf_window, selected_frame->minibuffer_window)) |
286 | 1254 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1255 /* I don't think that any frames may validly have a null minibuffer |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1256 window anymore. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1257 if (NILP (selected_frame->minibuffer_window)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1258 abort (); |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1259 |
765 | 1260 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 1261 XWINDOW (minibuf_window)->buffer); |
765 | 1262 minibuf_window = selected_frame->minibuffer_window; |
286 | 1263 } |
1264 } | |
1265 | |
765 | 1266 syms_of_frame () |
286 | 1267 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1268 /*&&& init symbols here &&&*/ |
765 | 1269 Qframep = intern ("framep"); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1270 staticpro (&Qframep); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1271 Qlive_frame_p = intern ("live-frame-p"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1272 staticpro (&Qlive_frame_p); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1273 Qheight = intern ("height"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1274 staticpro (&Qheight); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1275 Qicon = intern ("icon"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1276 staticpro (&Qicon); |
539 | 1277 Qminibuffer = intern ("minibuffer"); |
1278 staticpro (&Qminibuffer); | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1279 Qmodeline = intern ("modeline"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1280 staticpro (&Qmodeline); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1281 Qname = intern ("name"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1282 staticpro (&Qname); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1283 Qnone = intern ("none"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1284 staticpro (&Qnone); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1285 Qonly = intern ("only"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1286 staticpro (&Qonly); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1287 Qunsplittable = intern ("unsplittable"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1288 staticpro (&Qunsplittable); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1289 Qwidth = intern ("width"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1290 staticpro (&Qwidth); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1291 Qx = intern ("x"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1292 staticpro (&Qx); |
286 | 1293 |
765 | 1294 staticpro (&Vframe_list); |
286 | 1295 |
765 | 1296 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
1297 "The initial frame-object, which represents Emacs's stdout."); | |
286 | 1298 |
1299 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified, | |
765 | 1300 "Non-nil if all of emacs is iconified and frame updates are not needed."); |
286 | 1301 Vemacs_iconified = Qnil; |
1302 | |
765 | 1303 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame, |
1304 "Minibufferless frames use this frame's minibuffer.\n\ | |
454 | 1305 \n\ |
765 | 1306 Emacs cannot create minibufferless frames unless this is set to an\n\ |
454 | 1307 appropriate surrogate.\n\ |
1308 \n\ | |
1309 Emacs consults this variable only when creating minibufferless\n\ | |
765 | 1310 frames; once the frame is created, it sticks with its assigned\n\ |
454 | 1311 minibuffer, no matter what this variable is set to. This means that\n\ |
1312 this variable doesn't necessarily say anything meaningful about the\n\ | |
765 | 1313 current set of frames, or where the minibuffer is currently being\n\ |
454 | 1314 displayed."); |
765 | 1315 Vdefault_minibuffer_frame = Qnil; |
286 | 1316 |
765 | 1317 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist, |
1318 "Alist of default values for frame creation.\n\ | |
386 | 1319 These may be set in your init file, like this:\n\ |
765 | 1320 (setq default-frame-alist '((width . 80) (height . 55)))\n\ |
386 | 1321 These override values given in window system configuration data, like\n\ |
1322 X Windows' defaults database.\n\ | |
765 | 1323 For values specific to the first Emacs frame, see `initial-frame-alist'.\n\ |
1324 For values specific to the separate minibuffer frame, see\n\ | |
1325 `minibuffer-frame-alist'."); | |
1326 Vdefault_frame_alist = Qnil; | |
386 | 1327 |
765 | 1328 defsubr (&Sframep); |
1329 defsubr (&Slive_frame_p); | |
1330 defsubr (&Sselect_frame); | |
1331 defsubr (&Sselected_frame); | |
1332 defsubr (&Swindow_frame); | |
1333 defsubr (&Sframe_root_window); | |
1334 defsubr (&Sframe_selected_window); | |
1335 defsubr (&Sframe_list); | |
1336 defsubr (&Snext_frame); | |
1337 defsubr (&Sdelete_frame); | |
454 | 1338 defsubr (&Smouse_position); |
286 | 1339 defsubr (&Sset_mouse_position); |
1340 #if 0 | |
765 | 1341 defsubr (&Sframe_configuration); |
1342 defsubr (&Srestore_frame_configuration); | |
286 | 1343 #endif |
765 | 1344 defsubr (&Smake_frame_visible); |
1345 defsubr (&Smake_frame_invisible); | |
1346 defsubr (&Siconify_frame); | |
1347 defsubr (&Sframe_visible_p); | |
1348 defsubr (&Svisible_frame_list); | |
1349 defsubr (&Sredirect_frame_focus); | |
1350 defsubr (&Sframe_focus); | |
1351 defsubr (&Sframe_parameters); | |
1352 defsubr (&Smodify_frame_parameters); | |
785 | 1353 #if 0 |
765 | 1354 defsubr (&Sframe_pixel_size); |
1355 defsubr (&Sframe_height); | |
1356 defsubr (&Sframe_width); | |
785 | 1357 #endif |
765 | 1358 defsubr (&Sset_frame_height); |
1359 defsubr (&Sset_frame_width); | |
1360 defsubr (&Sset_frame_size); | |
1361 defsubr (&Sset_frame_position); | |
286 | 1362 #ifndef HAVE_X11 |
1363 defsubr (&Srubber_band_rectangle); | |
1364 #endif /* HAVE_X11 */ | |
1365 } | |
732 | 1366 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1367 #else /* not MULTI_FRAME */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1368 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1369 /* If we're not using multi-frame stuff, we still need to provide some |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1370 support functions. */ |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1371 |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1372 /* Unless this function is defined, providing set-frame-height and |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1373 set-frame-width doesn't help compatibility any, since they both |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1374 want this as their first argument. */ |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1375 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1376 "Return the frame that is now selected.") |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1377 () |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1378 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1379 Lisp_Object tem; |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1380 XFASTINT (tem) = 0; |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1381 return tem; |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1382 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1383 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1384 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1385 "Specify that the frame FRAME has LINES lines.\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1386 Optional third arg non-nil means that redisplay should use LINES lines\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1387 but that the idea of the actual height of the frame should not be changed.") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1388 (frame, rows, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1389 Lisp_Object frame, rows, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1390 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1391 CHECK_NUMBER (rows, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1392 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1393 change_frame_size (0, XINT (rows), 0, !NILP (pretend), 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1394 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1395 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1396 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1397 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1398 "Specify that the frame FRAME has COLS columns.\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1399 Optional third arg non-nil means that redisplay should use COLS columns\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1400 but that the idea of the actual width of the frame should not be changed.") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1401 (frame, cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1402 Lisp_Object frame, cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1403 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1404 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1405 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1406 change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1407 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1408 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1409 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1410 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1411 "Sets size of FRAME to COLS by ROWS, measured in characters.") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1412 (frame, cols, rows) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1413 Lisp_Object frame, cols, rows; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1414 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1415 CHECK_NUMBER (cols, 2); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1416 CHECK_NUMBER (rows, 1); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1417 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1418 change_frame_size (0, XINT (rows), XINT (cols), 0, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1419 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1420 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1421 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1422 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1423 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 0, 0, |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1424 "Return number of lines available for display on selected frame.") |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1425 () |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1426 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1427 return make_number (FRAME_HEIGHT (selected_frame)); |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1428 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1429 |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1430 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 0, 0, |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1431 "Return number of columns available for display on selected frame.") |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1432 () |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1433 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1434 return make_number (FRAME_WIDTH (selected_frame)); |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1435 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1436 |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1437 /* These are for backward compatibility with Emacs 18. */ |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1438 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1439 DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1440 "Tell redisplay that the screen has LINES lines.\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1441 Optional second arg non-nil means that redisplay should use LINES lines\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1442 but that the idea of the actual height of the screen should not be changed.") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1443 (lines, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1444 Lisp_Object lines, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1445 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1446 CHECK_NUMBER (lines, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1447 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1448 change_frame_size (0, XINT (lines), 0, !NILP (pretend), 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1449 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1450 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1451 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1452 DEFUN ("set-screen-width", Fset_screen_width, Sset_screen_width, 1, 2, 0, |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1453 "Tell redisplay that the screen has COLS columns.\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1454 Optional second arg non-nil means that redisplay should use COLS columns\n\ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1455 but that the idea of the actual width of the screen should not be changed.") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1456 (cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1457 Lisp_Object cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1458 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1459 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1460 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1461 change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1462 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1463 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1464 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1465 syms_of_frame () |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1466 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1467 defsubr (&Sset_frame_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1468 defsubr (&Sset_frame_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1469 defsubr (&Sset_frame_size); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1470 defsubr (&Sset_screen_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1471 defsubr (&Sset_screen_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1472 defsubr (&Sframe_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1473 Ffset (intern ("screen-height"), intern ("frame-height")); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1474 defsubr (&Sframe_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1475 Ffset (intern ("screen-width"), intern ("frame-width")); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1476 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1477 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1478 #endif /* not MULTI_FRAME */ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1479 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1480 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1481 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1482 |