Mercurial > emacs
annotate src/frame.c @ 3884:19b4e1fef348
* buffer.c (list_buffers_1): Make desired_point a lisp object; set
it to nil, unless we find the current buffer.
(Flist_buffers): Don't try to set point in the buffer list unless
list_buffers_1 actually returns an integer. Don't use a full
save_excursion; just save and restore the buffer.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 22 Jun 1993 07:39:26 +0000 |
parents | 1b2144b795aa |
children | 020fe391d5c1 |
rev | line source |
---|---|
765 | 1 /* Generic frame functions. |
2961 | 2 Copyright (C) 1993 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 |
1514
ceaecac6bf2e
* frame.c: #include buffer.h.
Jim Blandy <jimb@redhat.com>
parents:
1437
diff
changeset
|
28 #include "buffer.h" |
286 | 29 #include "window.h" |
363 | 30 #include "termhooks.h" |
286 | 31 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
32 /* These help us bind and responding to switch-frame events. */ |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
33 #include "commands.h" |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
34 #include "keyboard.h" |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
35 |
286 | 36 Lisp_Object Vemacs_iconified; |
765 | 37 Lisp_Object Vframe_list; |
38 Lisp_Object Vterminal_frame; | |
39 Lisp_Object Vdefault_minibuffer_frame; | |
40 Lisp_Object Vdefault_frame_alist; | |
965
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 /* 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
|
43 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
|
44 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
|
45 evaluate this expression. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
46 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
47 (progn |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
48 ;; 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
|
49 ;; 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
|
50 (goto-char (point-min)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
51 (search-forward "/\*&&& symbols declared here &&&*\/\n") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
52 (let (symbol-list) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
53 (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
|
54 (setq symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
55 (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
|
56 symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
57 (forward-line 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
58 (setq symbol-list (nreverse symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
59 ;; 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
|
60 (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
|
61 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
62 (while (looking-at "^ Q") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
63 (forward-line 2)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
64 (kill-region start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
65 ;; Write a new symbol initialization section. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
66 (while symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
67 (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
|
68 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
69 (insert (substring (car symbol-list) 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
70 (subst-char-in-region start (point) ?_ ?-)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
71 (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
|
72 (setq symbol-list (cdr symbol-list))))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
73 */ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
74 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
75 /*&&& symbols declared here &&&*/ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
76 Lisp_Object Qframep; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
77 Lisp_Object Qframe_live_p; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
78 Lisp_Object Qheight; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
79 Lisp_Object Qicon; |
539 | 80 Lisp_Object Qminibuffer; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
81 Lisp_Object Qmodeline; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
82 Lisp_Object Qname; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
83 Lisp_Object Qonly; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
84 Lisp_Object Qunsplittable; |
2131
468df2d7e371
(x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents:
2068
diff
changeset
|
85 Lisp_Object Qmenu_bar_lines; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
86 Lisp_Object Qwidth; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
87 Lisp_Object Qx; |
286 | 88 |
89 extern Lisp_Object Vminibuffer_list; | |
90 extern Lisp_Object get_minibuffer (); | |
91 | |
765 | 92 DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
93 "Return non-nil if OBJECT is a frame.\n\ | |
94 Value is t for a termcap frame (a character-only terminal),\n\ | |
95 `x' for an Emacs frame that is really an X window.\n\ | |
96 Also see `live-frame-p'.") | |
454 | 97 (object) |
98 Lisp_Object object; | |
286 | 99 { |
765 | 100 if (XTYPE (object) != Lisp_Frame) |
286 | 101 return Qnil; |
765 | 102 switch (XFRAME (object)->output_method) |
286 | 103 { |
104 case output_termcap: | |
105 return Qt; | |
106 case output_x_window: | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
107 return Qx; |
286 | 108 default: |
109 abort (); | |
110 } | |
111 } | |
112 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
113 DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, |
765 | 114 "Return non-nil if OBJECT is a frame which has not been deleted.\n\ |
115 Value is nil if OBJECT is not a live frame. If object is a live\n\ | |
116 frame, the return value indicates what sort of output device it is\n\ | |
117 displayed on. Value is t for a termcap frame (a character-only\n\ | |
118 terminal), `x' for an Emacs frame being displayed in an X window.") | |
454 | 119 (object) |
120 Lisp_Object object; | |
121 { | |
765 | 122 return ((FRAMEP (object) |
123 && FRAME_LIVE_P (XFRAME (object))) | |
124 ? Fframep (object) | |
454 | 125 : Qnil); |
126 } | |
127 | |
765 | 128 struct frame * |
129 make_frame (mini_p) | |
286 | 130 int mini_p; |
131 { | |
765 | 132 Lisp_Object frame; |
133 register struct frame *f; | |
286 | 134 register Lisp_Object root_window; |
135 register Lisp_Object mini_window; | |
136 | |
765 | 137 frame = Fmake_vector (((sizeof (struct frame) - (sizeof (Lisp_Vector) |
363 | 138 - sizeof (Lisp_Object))) |
139 / sizeof (Lisp_Object)), | |
286 | 140 make_number (0)); |
765 | 141 XSETTYPE (frame, Lisp_Frame); |
142 f = XFRAME (frame); | |
286 | 143 |
765 | 144 f->cursor_x = 0; |
145 f->cursor_y = 0; | |
146 f->current_glyphs = 0; | |
147 f->desired_glyphs = 0; | |
148 f->visible = 0; | |
1652
93497cd89204
* frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents:
1514
diff
changeset
|
149 f->async_visible = 0; |
765 | 150 f->display.nothing = 0; |
151 f->iconified = 0; | |
1652
93497cd89204
* frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents:
1514
diff
changeset
|
152 f->async_iconified = 0; |
765 | 153 f->wants_modeline = 1; |
154 f->auto_raise = 0; | |
155 f->auto_lower = 0; | |
156 f->no_split = 0; | |
157 f->garbaged = 0; | |
158 f->has_minibuffer = mini_p; | |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
159 f->focus_frame = Qnil; |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
160 f->explicit_name = 0; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
161 f->can_have_scroll_bars = 0; |
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
162 f->has_vertical_scroll_bars = 0; |
765 | 163 f->param_alist = Qnil; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
164 f->scroll_bars = Qnil; |
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
165 f->condemned_scroll_bars = Qnil; |
2417
8c07933beed9
(make_frame): Init face_alist field.
Richard M. Stallman <rms@gnu.org>
parents:
2298
diff
changeset
|
166 f->face_alist = Qnil; |
286 | 167 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
168 root_window = make_window (); |
286 | 169 if (mini_p) |
170 { | |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
171 mini_window = make_window (); |
286 | 172 XWINDOW (root_window)->next = mini_window; |
173 XWINDOW (mini_window)->prev = root_window; | |
174 XWINDOW (mini_window)->mini_p = Qt; | |
765 | 175 XWINDOW (mini_window)->frame = frame; |
176 f->minibuffer_window = mini_window; | |
286 | 177 } |
178 else | |
179 { | |
180 mini_window = Qnil; | |
181 XWINDOW (root_window)->next = Qnil; | |
765 | 182 f->minibuffer_window = Qnil; |
286 | 183 } |
184 | |
765 | 185 XWINDOW (root_window)->frame = frame; |
286 | 186 |
187 /* 10 is arbitrary, | |
188 just so that there is "something there." | |
765 | 189 Correct size will be set up later with change_frame_size. */ |
286 | 190 |
765 | 191 f->width = 10; |
192 f->height = 10; | |
286 | 193 |
194 XFASTINT (XWINDOW (root_window)->width) = 10; | |
195 XFASTINT (XWINDOW (root_window)->height) = (mini_p ? 9 : 10); | |
196 | |
197 if (mini_p) | |
198 { | |
199 XFASTINT (XWINDOW (mini_window)->width) = 10; | |
200 XFASTINT (XWINDOW (mini_window)->top) = 9; | |
201 XFASTINT (XWINDOW (mini_window)->height) = 1; | |
202 } | |
203 | |
765 | 204 /* Choose a buffer for the frame's root window. */ |
386 | 205 { |
206 Lisp_Object buf; | |
207 | |
208 XWINDOW (root_window)->buffer = Qt; | |
209 buf = Fcurrent_buffer (); | |
210 /* If buf is a 'hidden' buffer (i.e. one whose name starts with | |
211 a space), try to find another one. */ | |
212 if (XSTRING (Fbuffer_name (buf))->data[0] == ' ') | |
1346
5e27c3e71a78
(make_frame): Pass 2nd arg to Fother_buffer.
Richard M. Stallman <rms@gnu.org>
parents:
1260
diff
changeset
|
213 buf = Fother_buffer (buf, Qnil); |
386 | 214 Fset_window_buffer (root_window, buf); |
215 } | |
216 | |
286 | 217 if (mini_p) |
218 { | |
219 XWINDOW (mini_window)->buffer = Qt; | |
220 Fset_window_buffer (mini_window, | |
485 | 221 (NILP (Vminibuffer_list) |
286 | 222 ? get_minibuffer (0) |
223 : Fcar (Vminibuffer_list))); | |
224 } | |
225 | |
765 | 226 f->root_window = root_window; |
227 f->selected_window = root_window; | |
363 | 228 /* Make sure this window seems more recently used than |
229 a newly-created, never-selected window. */ | |
765 | 230 XFASTINT (XWINDOW (f->selected_window)->use_time) = ++window_select_count; |
286 | 231 |
765 | 232 Vframe_list = Fcons (frame, Vframe_list); |
286 | 233 |
765 | 234 return f; |
286 | 235 } |
236 | |
765 | 237 /* Make a frame using a separate minibuffer window on another frame. |
286 | 238 MINI_WINDOW is the minibuffer window to use. nil means use the |
239 default (the global minibuffer). */ | |
240 | |
765 | 241 struct frame * |
242 make_frame_without_minibuffer (mini_window) | |
286 | 243 register Lisp_Object mini_window; |
244 { | |
765 | 245 register struct frame *f; |
286 | 246 |
247 /* Choose the minibuffer window to use. */ | |
485 | 248 if (NILP (mini_window)) |
286 | 249 { |
765 | 250 if (XTYPE (Vdefault_minibuffer_frame) != Lisp_Frame) |
251 error ("default-minibuffer-frame must be set when creating minibufferless frames"); | |
252 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame))) | |
253 error ("default-minibuffer-frame must be a live frame"); | |
254 mini_window = XFRAME (Vdefault_minibuffer_frame)->minibuffer_window; | |
286 | 255 } |
256 else | |
257 { | |
1437
36ef55ecb265
* frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents:
1385
diff
changeset
|
258 CHECK_LIVE_WINDOW (mini_window, 0); |
286 | 259 } |
260 | |
765 | 261 /* Make a frame containing just a root window. */ |
262 f = make_frame (0); | |
286 | 263 |
264 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 265 f->minibuffer_window = mini_window; |
286 | 266 Fset_window_buffer (mini_window, |
485 | 267 (NILP (Vminibuffer_list) |
286 | 268 ? get_minibuffer (0) |
269 : Fcar (Vminibuffer_list))); | |
765 | 270 return f; |
286 | 271 } |
272 | |
765 | 273 /* Make a frame containing only a minibuffer window. */ |
286 | 274 |
765 | 275 struct frame * |
276 make_minibuffer_frame () | |
286 | 277 { |
765 | 278 /* First make a frame containing just a root window, no minibuffer. */ |
286 | 279 |
765 | 280 register struct frame *f = make_frame (0); |
286 | 281 register Lisp_Object mini_window; |
765 | 282 register Lisp_Object frame; |
286 | 283 |
765 | 284 XSET (frame, Lisp_Frame, f); |
286 | 285 |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
286 f->auto_raise = 0; |
765 | 287 f->auto_lower = 0; |
288 f->no_split = 1; | |
289 f->wants_modeline = 0; | |
290 f->has_minibuffer = 1; | |
286 | 291 |
292 /* Now label the root window as also being the minibuffer. | |
293 Avoid infinite looping on the window chain by marking next pointer | |
294 as nil. */ | |
295 | |
765 | 296 mini_window = f->minibuffer_window = f->root_window; |
286 | 297 XWINDOW (mini_window)->mini_p = Qt; |
298 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
|
299 XWINDOW (mini_window)->prev = Qnil; |
765 | 300 XWINDOW (mini_window)->frame = frame; |
286 | 301 |
302 /* Put the proper buffer in that window. */ | |
303 | |
304 Fset_window_buffer (mini_window, | |
485 | 305 (NILP (Vminibuffer_list) |
286 | 306 ? get_minibuffer (0) |
307 : Fcar (Vminibuffer_list))); | |
765 | 308 return f; |
286 | 309 } |
310 | |
765 | 311 /* Construct a frame that refers to the terminal (stdin and stdout). */ |
286 | 312 |
765 | 313 struct frame * |
314 make_terminal_frame () | |
286 | 315 { |
765 | 316 register struct frame *f; |
286 | 317 |
765 | 318 Vframe_list = Qnil; |
319 f = make_frame (1); | |
320 f->name = build_string ("terminal"); | |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
321 FRAME_SET_VISIBLE (f, 1); |
765 | 322 f->display.nothing = 1; /* Nonzero means frame isn't deleted. */ |
323 XSET (Vterminal_frame, Lisp_Frame, f); | |
324 return f; | |
286 | 325 } |
326 | |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
327 DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
328 "Select the frame FRAME.\n\ |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3497
diff
changeset
|
329 Subsequent editing commands apply to its selected window.\n\ |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
330 The selection of FRAME lasts until the next time the user does\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
331 something to select a different frame, or until the next time this\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
332 function is called.") |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
333 (frame, no_enter) |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
334 Lisp_Object frame, no_enter; |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
335 { |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
336 return Fhandle_switch_frame (frame, no_enter); |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
337 } |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
338 |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
339 |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
340 DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 2, "e", |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
341 "Handle a switch-frame event EVENT.\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
342 Switch-frame events is usually bound to this function.\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
343 A switch-frame event tells Emacs that the window manager has requested\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
344 that the user's events be directed to the frame mentioned in the event.\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
345 This function selects the selected window of the frame of EVENT.\n\ |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
346 \n\ |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
347 If EVENT is frame object, handle it as if it were a switch-frame event\n\ |
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
348 to that frame.") |
765 | 349 (frame, no_enter) |
350 Lisp_Object frame, no_enter; | |
286 | 351 { |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
352 /* If FRAME is a switch-frame event, extract the frame we should |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
353 switch to. */ |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
354 if (CONSP (frame) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
355 && EQ (XCONS (frame)->car, Qswitch_frame) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
356 && CONSP (XCONS (frame)->cdr)) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
357 frame = XCONS (XCONS (frame)->cdr)->car; |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
358 |
765 | 359 CHECK_LIVE_FRAME (frame, 0); |
286 | 360 |
765 | 361 if (selected_frame == XFRAME (frame)) |
362 return frame; | |
286 | 363 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
364 /* If a frame's focus has been redirected toward the currently |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
365 selected frame, we should change the redirection to point to the |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
366 newly selected frame. This means that if the focus is redirected |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
367 from a minibufferless frame to a surrogate minibuffer frame, we |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
368 can use `other-window' to switch between all the frames using |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
369 that minibuffer frame, and the focus redirection will follow us |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
370 around. */ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
371 { |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
372 Lisp_Object tail; |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
373 |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
374 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
375 { |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
376 Lisp_Object focus; |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
377 |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
378 if (XTYPE (XCONS (tail)->car) != Lisp_Frame) |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
379 abort (); |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
380 |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
381 focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car)); |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
382 |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
383 if (XTYPE (focus) == Lisp_Frame |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
384 && XFRAME (focus) == selected_frame) |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
385 Fredirect_frame_focus (XCONS (tail)->car, frame); |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
386 } |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
387 } |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
388 |
765 | 389 selected_frame = XFRAME (frame); |
390 if (! FRAME_MINIBUF_ONLY_P (selected_frame)) | |
391 last_nonminibuf_frame = selected_frame; | |
363 | 392 |
765 | 393 Fselect_window (XFRAME (frame)->selected_window); |
394 choose_minibuf_frame (); | |
286 | 395 |
1920
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
396 /* We want to make sure that the next event generates a frame-switch |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3497
diff
changeset
|
397 event to the appropriate frame. This seems kludgy to me, but |
1920
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
398 before you take it out, make sure that evaluating something like |
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
399 (select-window (frame-root-window (new-frame))) doesn't end up |
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
400 with your typing being interpreted in the new frame instead of |
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
401 the one you're actually typing in. */ |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
402 internal_last_event_frame = Qnil; |
1920
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
403 |
765 | 404 return frame; |
286 | 405 } |
406 | |
765 | 407 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, |
408 "Return the frame that is now selected.") | |
286 | 409 () |
410 { | |
411 Lisp_Object tem; | |
765 | 412 XSET (tem, Lisp_Frame, selected_frame); |
286 | 413 return tem; |
414 } | |
415 | |
765 | 416 DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, |
417 "Return the frame object that window WINDOW is on.") | |
286 | 418 (window) |
419 Lisp_Object window; | |
420 { | |
1437
36ef55ecb265
* frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents:
1385
diff
changeset
|
421 CHECK_LIVE_WINDOW (window, 0); |
765 | 422 return XWINDOW (window)->frame; |
286 | 423 } |
424 | |
765 | 425 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
|
426 "Returns the root-window of FRAME.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
427 If omitted, FRAME defaults to the currently selected frame.") |
765 | 428 (frame) |
429 Lisp_Object frame; | |
286 | 430 { |
765 | 431 if (NILP (frame)) |
432 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 433 else |
765 | 434 CHECK_LIVE_FRAME (frame, 0); |
286 | 435 |
765 | 436 return XFRAME (frame)->root_window; |
286 | 437 } |
438 | |
765 | 439 DEFUN ("frame-selected-window", Fframe_selected_window, |
440 Sframe_selected_window, 0, 1, 0, | |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
441 "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
|
442 If omitted, FRAME defaults to the currently selected frame.") |
765 | 443 (frame) |
444 Lisp_Object frame; | |
286 | 445 { |
765 | 446 if (NILP (frame)) |
447 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 448 else |
765 | 449 CHECK_LIVE_FRAME (frame, 0); |
286 | 450 |
765 | 451 return XFRAME (frame)->selected_window; |
286 | 452 } |
453 | |
765 | 454 DEFUN ("frame-list", Fframe_list, Sframe_list, |
286 | 455 0, 0, 0, |
765 | 456 "Return a list of all frames.") |
286 | 457 () |
458 { | |
765 | 459 return Fcopy_sequence (Vframe_list); |
286 | 460 } |
461 | |
765 | 462 /* Return the next frame in the frame list after FRAME. |
463 If MINIBUF is nil, exclude minibuffer-only frames. | |
464 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
|
465 their minibuffer. |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
466 If MINIBUF is non-nil, and not a window, include all frames. */ |
286 | 467 Lisp_Object |
765 | 468 next_frame (frame, minibuf) |
469 Lisp_Object frame; | |
454 | 470 Lisp_Object minibuf; |
286 | 471 { |
472 Lisp_Object tail; | |
473 int passed = 0; | |
474 | |
765 | 475 /* There must always be at least one frame in Vframe_list. */ |
476 if (! CONSP (Vframe_list)) | |
454 | 477 abort (); |
478 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
479 /* If this frame is dead, it won't be in Vframe_list, and we'll loop |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
480 forever. Forestall that. */ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
481 CHECK_LIVE_FRAME (frame, 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
482 |
286 | 483 while (1) |
765 | 484 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 485 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
486 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
|
487 |
286 | 488 if (passed) |
363 | 489 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
490 /* 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
|
491 |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
492 /* 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
|
493 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
|
494 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
|
495 return f; |
335 | 496 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
497 /* 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
|
498 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
499 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
500 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
|
501 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
502 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
503 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
|
504 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
505 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
|
506 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
507 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
508 else |
765 | 509 return f; |
363 | 510 } |
286 | 511 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
512 if (EQ (frame, f)) |
286 | 513 passed++; |
514 } | |
515 } | |
516 | |
765 | 517 /* Return the previous frame in the frame list before FRAME. |
518 If MINIBUF is nil, exclude minibuffer-only frames. | |
519 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
|
520 their minibuffer. |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
521 If MINIBUF is non-nil and not a window, include all frames. */ |
286 | 522 Lisp_Object |
765 | 523 prev_frame (frame, minibuf) |
524 Lisp_Object frame; | |
454 | 525 Lisp_Object minibuf; |
286 | 526 { |
527 Lisp_Object tail; | |
528 Lisp_Object prev; | |
529 | |
765 | 530 /* There must always be at least one frame in Vframe_list. */ |
531 if (! CONSP (Vframe_list)) | |
454 | 532 abort (); |
533 | |
286 | 534 prev = Qnil; |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
535 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
454 | 536 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
537 Lisp_Object f = XCONS (tail)->car; |
454 | 538 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
539 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
|
540 abort (); |
454 | 541 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
542 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
|
543 return prev; |
454 | 544 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
545 /* 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
|
546 according to minibuf. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
547 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
548 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
549 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
|
550 prev = f; |
454 | 551 } |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
552 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
|
553 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
554 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
|
555 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
556 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
557 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
558 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
559 } |
454 | 560 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
561 /* 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
|
562 if (NILP (prev)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
563 /* 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
|
564 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
|
565 return frame; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
566 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
567 /* 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
|
568 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
|
569 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
|
570 return prev; |
286 | 571 } |
572 | |
765 | 573 DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0, |
574 "Return the next frame in the frame list after FRAME.\n\ | |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
575 By default, skip minibuffer-only frames.\n\ |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
576 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
|
577 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
|
578 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
|
579 minibuffer.\n\ |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
580 If MINIFRAME is non-nil and not a window, include all frames.") |
765 | 581 (frame, miniframe) |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
582 Lisp_Object frame, miniframe; |
286 | 583 { |
584 Lisp_Object tail; | |
585 | |
765 | 586 if (NILP (frame)) |
587 XSET (frame, Lisp_Frame, selected_frame); | |
454 | 588 else |
765 | 589 CHECK_LIVE_FRAME (frame, 0); |
286 | 590 |
765 | 591 return next_frame (frame, miniframe); |
286 | 592 } |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
593 |
286 | 594 |
765 | 595 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 1, "", |
596 "Delete FRAME, permanently eliminating it from use.\n\ | |
597 If omitted, FRAME defaults to the selected frame.\n\ | |
598 A frame may not be deleted if its minibuffer is used by other frames.") | |
599 (frame) | |
600 Lisp_Object frame; | |
286 | 601 { |
765 | 602 struct frame *f; |
286 | 603 |
765 | 604 if (EQ (frame, Qnil)) |
286 | 605 { |
765 | 606 f = selected_frame; |
607 XSET (frame, Lisp_Frame, f); | |
286 | 608 } |
609 else | |
610 { | |
765 | 611 CHECK_FRAME (frame, 0); |
612 f = XFRAME (frame); | |
286 | 613 } |
614 | |
765 | 615 if (! FRAME_LIVE_P (f)) |
1920
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
616 return Qnil; |
454 | 617 |
765 | 618 /* Are there any other frames besides this one? */ |
619 if (f == selected_frame && EQ (next_frame (frame, Qt), frame)) | |
620 error ("Attempt to delete the only frame"); | |
286 | 621 |
765 | 622 /* Does this frame have a minibuffer, and is it the surrogate |
623 minibuffer for any other frame? */ | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
624 if (FRAME_HAS_MINIBUF_P (XFRAME (frame))) |
363 | 625 { |
765 | 626 Lisp_Object frames; |
708 | 627 |
765 | 628 for (frames = Vframe_list; |
629 CONSP (frames); | |
630 frames = XCONS (frames)->cdr) | |
708 | 631 { |
765 | 632 Lisp_Object this = XCONS (frames)->car; |
363 | 633 |
765 | 634 if (! EQ (this, frame) |
635 && EQ (frame, | |
636 (WINDOW_FRAME | |
708 | 637 (XWINDOW |
765 | 638 (FRAME_MINIBUF_WINDOW |
639 (XFRAME (this))))))) | |
640 error ("Attempt to delete a surrogate minibuffer frame"); | |
708 | 641 } |
286 | 642 } |
643 | |
765 | 644 /* Don't let the frame remain selected. */ |
645 if (f == selected_frame) | |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
646 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
286 | 647 |
765 | 648 /* Don't allow minibuf_window to remain on a deleted frame. */ |
649 if (EQ (f->minibuffer_window, minibuf_window)) | |
286 | 650 { |
765 | 651 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 652 XWINDOW (minibuf_window)->buffer); |
765 | 653 minibuf_window = selected_frame->minibuffer_window; |
286 | 654 } |
655 | |
1680
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
656 /* Mark all the windows that used to be on FRAME as deleted, and then |
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
657 remove the reference to them. */ |
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
658 delete_all_subwindows (XWINDOW (f->root_window)); |
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
659 f->root_window = Qnil; |
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
660 |
765 | 661 Vframe_list = Fdelq (frame, Vframe_list); |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
662 FRAME_SET_VISIBLE (f, 0); |
286 | 663 |
1809
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
664 /* Since some events are handled at the interrupt level, we may get |
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
665 an event for f at any time; if we zero out the frame's display |
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
666 now, then we may trip up the event-handling code. Instead, we'll |
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
667 promise that the display of the frame must be valid until we have |
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
668 called the window-system-dependent frame destruction routine. */ |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
669 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
670 /* I think this should be done with a hook. */ |
363 | 671 #ifdef HAVE_X_WINDOWS |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
672 if (FRAME_X_P (f)) |
1809
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
673 x_destroy_window (f); |
363 | 674 #endif |
675 | |
1809
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
676 f->display.nothing = 0; |
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
677 |
765 | 678 /* If we've deleted the last_nonminibuf_frame, then try to find |
363 | 679 another one. */ |
765 | 680 if (f == last_nonminibuf_frame) |
363 | 681 { |
765 | 682 Lisp_Object frames; |
708 | 683 |
765 | 684 last_nonminibuf_frame = 0; |
363 | 685 |
765 | 686 for (frames = Vframe_list; |
687 CONSP (frames); | |
688 frames = XCONS (frames)->cdr) | |
363 | 689 { |
765 | 690 f = XFRAME (XCONS (frames)->car); |
691 if (!FRAME_MINIBUF_ONLY_P (f)) | |
363 | 692 { |
765 | 693 last_nonminibuf_frame = f; |
363 | 694 break; |
695 } | |
696 } | |
697 } | |
286 | 698 |
765 | 699 /* If we've deleted Vdefault_minibuffer_frame, try to find another |
700 one. Prefer minibuffer-only frames, but also notice frames | |
708 | 701 with other windows. */ |
765 | 702 if (EQ (frame, Vdefault_minibuffer_frame)) |
708 | 703 { |
765 | 704 Lisp_Object frames; |
708 | 705 |
765 | 706 /* The last frame we saw with a minibuffer, minibuffer-only or not. */ |
707 Lisp_Object frame_with_minibuf = Qnil; | |
708 | 708 |
765 | 709 for (frames = Vframe_list; |
710 CONSP (frames); | |
711 frames = XCONS (frames)->cdr) | |
708 | 712 { |
765 | 713 Lisp_Object this = XCONS (frames)->car; |
708 | 714 |
765 | 715 if (XTYPE (this) != Lisp_Frame) |
708 | 716 abort (); |
765 | 717 f = XFRAME (this); |
708 | 718 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
719 if (FRAME_HAS_MINIBUF_P (f)) |
708 | 720 { |
765 | 721 frame_with_minibuf = this; |
722 if (FRAME_MINIBUF_ONLY_P (f)) | |
708 | 723 break; |
724 } | |
725 } | |
726 | |
765 | 727 /* We know that there must be some frame with a minibuffer out |
728 there. If this were not true, all of the frames present | |
708 | 729 would have to be minibufferless, which implies that at some |
765 | 730 point their minibuffer frames must have been deleted, but |
708 | 731 that is prohibited at the top; you can't delete surrogate |
765 | 732 minibuffer frames. */ |
733 if (NILP (frame_with_minibuf)) | |
708 | 734 abort (); |
735 | |
765 | 736 Vdefault_minibuffer_frame = frame_with_minibuf; |
708 | 737 } |
738 | |
286 | 739 return Qnil; |
740 } | |
741 | |
742 /* Return mouse position in character cell units. */ | |
743 | |
454 | 744 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, |
765 | 745 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\ |
3693
8e83f20d0e39
* frame.c (Fmouse_position): Doc fix.
Jim Blandy <jimb@redhat.com>
parents:
3676
diff
changeset
|
746 The position is given in character cells, where (0, 0) is the\n\ |
8e83f20d0e39
* frame.c (Fmouse_position): Doc fix.
Jim Blandy <jimb@redhat.com>
parents:
3676
diff
changeset
|
747 upper-left corner.\n\ |
454 | 748 If Emacs is running on a mouseless terminal or hasn't been programmed\n\ |
765 | 749 to read the mouse position, it returns the selected frame for FRAME\n\ |
454 | 750 and nil for X and Y.") |
751 () | |
286 | 752 { |
765 | 753 FRAME_PTR f; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
754 Lisp_Object lispy_dummy; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
755 enum scroll_bar_part party_dummy; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
756 Lisp_Object x, y; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
757 unsigned long long_dummy; |
286 | 758 |
3658
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
759 f = selected_frame; |
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
760 x = y = Qnil; |
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
761 |
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
762 /* It's okay for the hook to refrain from storing anything. */ |
454 | 763 if (mouse_position_hook) |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
764 (*mouse_position_hook) (&f, |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
765 &lispy_dummy, &party_dummy, |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
766 &x, &y, |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
767 &long_dummy); |
286 | 768 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
769 XSET (lispy_dummy, Lisp_Frame, f); |
3658
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
770 return Fcons (lispy_dummy, Fcons (x, y)); |
286 | 771 } |
772 | |
773 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, | |
3694 | 774 "Move the mouse pointer to the center of character cell (X,Y) in FRAME.\n\ |
765 | 775 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.") |
776 (frame, x, y) | |
777 Lisp_Object frame, x, y; | |
286 | 778 { |
765 | 779 CHECK_LIVE_FRAME (frame, 0); |
286 | 780 CHECK_NUMBER (x, 2); |
781 CHECK_NUMBER (y, 1); | |
782 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
783 /* I think this should be done with a hook. */ |
286 | 784 #ifdef HAVE_X_WINDOWS |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
785 if (FRAME_X_P (XFRAME (frame))) |
286 | 786 /* Warping the mouse will cause enternotify and focus events. */ |
765 | 787 x_set_mouse_position (XFRAME (frame), x, y); |
286 | 788 #endif |
789 | |
790 return Qnil; | |
791 } | |
792 | |
765 | 793 DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, |
3834
1b2144b795aa
* frame.c (Fmake_frame_visible): Make this interactively callable;
Jim Blandy <jimb@redhat.com>
parents:
3763
diff
changeset
|
794 0, 1, "", |
765 | 795 "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
|
796 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
|
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 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
806 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
807 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
808 if (FRAME_X_P (XFRAME (frame))) |
765 | 809 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
|
810 #endif |
286 | 811 |
765 | 812 return frame; |
286 | 813 } |
814 | |
765 | 815 DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible, |
872 | 816 0, 1, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
817 "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
|
818 If omitted, FRAME defaults to the currently selected frame.") |
765 | 819 (frame) |
820 Lisp_Object frame; | |
286 | 821 { |
872 | 822 if (NILP (frame)) |
886 | 823 XSET (frame, Lisp_Frame, selected_frame); |
872 | 824 |
765 | 825 CHECK_LIVE_FRAME (frame, 0); |
286 | 826 |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
827 /* Don't let the frame remain selected. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
828 if (XFRAME (frame) == selected_frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
829 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
830 |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
831 /* Don't allow minibuf_window to remain on a deleted frame. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
832 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
833 { |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
834 Fset_window_buffer (selected_frame->minibuffer_window, |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
835 XWINDOW (minibuf_window)->buffer); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
836 minibuf_window = selected_frame->minibuffer_window; |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
837 } |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
838 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
839 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
840 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
841 if (FRAME_X_P (XFRAME (frame))) |
765 | 842 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
|
843 #endif |
286 | 844 |
845 return Qnil; | |
846 } | |
847 | |
765 | 848 DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, |
872 | 849 0, 1, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
850 "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
|
851 If omitted, FRAME defaults to the currently selected frame.") |
765 | 852 (frame) |
853 Lisp_Object frame; | |
286 | 854 { |
872 | 855 if (NILP (frame)) |
886 | 856 XSET (frame, Lisp_Frame, selected_frame); |
872 | 857 |
765 | 858 CHECK_LIVE_FRAME (frame, 0); |
286 | 859 |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
860 /* Don't let the frame remain selected. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
861 if (XFRAME (frame) == selected_frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
862 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
863 |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
864 /* Don't allow minibuf_window to remain on a deleted frame. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
865 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
866 { |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
867 Fset_window_buffer (selected_frame->minibuffer_window, |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
868 XWINDOW (minibuf_window)->buffer); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
869 minibuf_window = selected_frame->minibuffer_window; |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
870 } |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
871 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
872 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
873 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
874 if (FRAME_X_P (XFRAME (frame))) |
765 | 875 x_iconify_frame (XFRAME (frame)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
876 #endif |
286 | 877 |
878 return Qnil; | |
879 } | |
880 | |
765 | 881 DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, |
286 | 882 1, 1, 0, |
765 | 883 "Return t if FRAME is now \"visible\" (actually in use for display).\n\ |
884 A frame that is not \"visible\" is not updated and, if it works through\n\ | |
286 | 885 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
|
886 Return the symbol `icon' if frame is visible only as an icon.") |
765 | 887 (frame) |
888 Lisp_Object frame; | |
286 | 889 { |
765 | 890 CHECK_LIVE_FRAME (frame, 0); |
286 | 891 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
892 if (FRAME_VISIBLE_P (XFRAME (frame))) |
286 | 893 return Qt; |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
894 if (FRAME_ICONIFIED_P (XFRAME (frame))) |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
895 return Qicon; |
286 | 896 return Qnil; |
897 } | |
898 | |
765 | 899 DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, |
286 | 900 0, 0, 0, |
765 | 901 "Return a list of all frames now \"visible\" (being updated).") |
286 | 902 () |
903 { | |
765 | 904 Lisp_Object tail, frame; |
905 struct frame *f; | |
286 | 906 Lisp_Object value; |
907 | |
908 value = Qnil; | |
765 | 909 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 910 { |
765 | 911 frame = XCONS (tail)->car; |
912 if (XTYPE (frame) != Lisp_Frame) | |
286 | 913 continue; |
765 | 914 f = XFRAME (frame); |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
915 if (FRAME_VISIBLE_P (f)) |
765 | 916 value = Fcons (frame, value); |
286 | 917 } |
918 return value; | |
919 } | |
363 | 920 |
921 | |
2282
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
922 DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 1, 1, 0, |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
923 "Bring FRAME to the front, so it occludes any frames it overlaps.\n\ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
924 If FRAME is invisible, make it visible.\n\ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
925 If Emacs is displaying on an ordinary terminal or some other device which\n\ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
926 doesn't support multiple overlapping frames, this function does nothing.") |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
927 (frame) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
928 Lisp_Object frame; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
929 { |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
930 CHECK_LIVE_FRAME (frame, 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
931 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
932 if (frame_raise_lower_hook) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
933 (*frame_raise_lower_hook) (XFRAME (frame), 1); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
934 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
935 return Qnil; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
936 } |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
937 |
2282
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
938 /* Should we have a corresponding function called Flower_Power? */ |
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
939 DEFUN ("lower-frame", Flower_frame, Slower_frame, 1, 1, 0, |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
940 "Send FRAME to the back, so it is occluded by any frames that overlap it.\n\ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
941 If Emacs is displaying on an ordinary terminal or some other device which\n\ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
942 doesn't support multiple overlapping frames, this function does nothing.") |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
943 (frame) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
944 Lisp_Object frame; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
945 { |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
946 CHECK_LIVE_FRAME (frame, 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
947 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
948 if (frame_raise_lower_hook) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
949 (*frame_raise_lower_hook) (XFRAME (frame), 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
950 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
951 return Qnil; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
952 } |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
953 |
363 | 954 |
765 | 955 DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, |
363 | 956 1, 2, 0, |
765 | 957 "Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.\n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
958 In other words, switch-frame events caused by events in FRAME will\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
959 request a switch to FOCUS-FRAME, and `last-event-frame' will be\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
960 FOCUS-FRAME after reading an event typed at FRAME.\n\ |
363 | 961 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
962 If FOCUS-FRAME is omitted or nil, any existing redirection is\n\ |
765 | 963 cancelled, and the frame again receives its own keystrokes.\n\ |
363 | 964 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
965 Focus redirection is useful for temporarily redirecting keystrokes to\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
966 a surrogate minibuffer frame when a frame doesn't have its own\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
967 minibuffer window.\n\ |
363 | 968 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
969 A frame's focus redirection can be changed by select-frame. If frame\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
970 FOO is selected, and then a different frame BAR is selected, any\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
971 frames redirecting their focus to FOO are shifted to redirect their\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
972 focus to BAR. This allows focus redirection to work properly when the\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
973 user switches from one frame to another using `select-window'.\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
974 \n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
975 This means that a frame whose focus is redirected to itself is treated\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
976 differently from a frame whose focus is redirected to nil; the former\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
977 is affected by select-frame, while the latter is not.\n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
978 \n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
979 The redirection lasts until `redirect-frame-focus' is called to change it.") |
765 | 980 (frame, focus_frame) |
981 Lisp_Object frame, focus_frame; | |
363 | 982 { |
765 | 983 CHECK_LIVE_FRAME (frame, 0); |
454 | 984 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
985 if (! NILP (focus_frame)) |
765 | 986 CHECK_LIVE_FRAME (focus_frame, 1); |
363 | 987 |
765 | 988 XFRAME (frame)->focus_frame = focus_frame; |
363 | 989 |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
990 /* I think this should be done with a hook. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
991 #ifdef HAVE_X_WINDOWS |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
992 if (!NILP (focus_frame) && ! EQ (focus_frame, frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
993 && FRAME_X_P (XFRAME (focus_frame))) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
994 Ffocus_frame (focus_frame); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
995 #endif |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
996 |
765 | 997 if (frame_rehighlight_hook) |
998 (*frame_rehighlight_hook) (); | |
363 | 999 |
1000 return Qnil; | |
1001 } | |
1002 | |
1003 | |
765 | 1004 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0, |
1005 "Return the frame to which FRAME's keystrokes are currently being sent.\n\ | |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1006 This returns nil if FRAME's focus is not redirected.\n\ |
765 | 1007 See `redirect-frame-focus'.") |
1008 (frame) | |
1009 Lisp_Object frame; | |
363 | 1010 { |
765 | 1011 CHECK_LIVE_FRAME (frame, 0); |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1012 |
765 | 1013 return FRAME_FOCUS_FRAME (XFRAME (frame)); |
363 | 1014 } |
1015 | |
1016 | |
286 | 1017 |
1018 Lisp_Object | |
765 | 1019 get_frame_param (frame, prop) |
1020 register struct frame *frame; | |
286 | 1021 Lisp_Object prop; |
1022 { | |
1023 register Lisp_Object tem; | |
1024 | |
765 | 1025 tem = Fassq (prop, frame->param_alist); |
286 | 1026 if (EQ (tem, Qnil)) |
1027 return tem; | |
1028 return Fcdr (tem); | |
1029 } | |
1030 | |
1031 void | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1032 store_in_alist (alistptr, prop, val) |
286 | 1033 Lisp_Object *alistptr, val; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1034 Lisp_Object prop; |
286 | 1035 { |
1036 register Lisp_Object tem; | |
1037 | |
1038 tem = Fassq (prop, *alistptr); | |
1039 if (EQ (tem, Qnil)) | |
1040 *alistptr = Fcons (Fcons (prop, val), *alistptr); | |
1041 else | |
1042 Fsetcdr (tem, val); | |
1043 } | |
1044 | |
1045 void | |
765 | 1046 store_frame_param (f, prop, val) |
1047 struct frame *f; | |
286 | 1048 Lisp_Object prop, val; |
1049 { | |
1050 register Lisp_Object tem; | |
1051 | |
765 | 1052 tem = Fassq (prop, f->param_alist); |
286 | 1053 if (EQ (tem, Qnil)) |
765 | 1054 f->param_alist = Fcons (Fcons (prop, val), f->param_alist); |
286 | 1055 else |
1056 Fsetcdr (tem, val); | |
539 | 1057 |
1058 if (EQ (prop, Qminibuffer) | |
1059 && XTYPE (val) == Lisp_Window) | |
1060 { | |
1061 if (! MINI_WINDOW_P (XWINDOW (val))) | |
1062 error ("Surrogate minibuffer windows must be minibuffer windows."); | |
1063 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1064 if (FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f)) |
3763
c58fb240170d
* frame.c (store_frame_param): Fix error message punctuation.
Jim Blandy <jimb@redhat.com>
parents:
3694
diff
changeset
|
1065 error ("can't change the surrogate minibuffer of a frame with its own minibuffer"); |
539 | 1066 |
1067 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 1068 f->minibuffer_window = val; |
539 | 1069 } |
286 | 1070 } |
1071 | |
765 | 1072 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, |
1073 "Return the parameters-alist of frame FRAME.\n\ | |
286 | 1074 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.\n\ |
777 | 1075 The meaningful PARMs depend on the kind of frame.\n\ |
1076 If FRAME is omitted, return information on the currently selected frame.") | |
765 | 1077 (frame) |
1078 Lisp_Object frame; | |
286 | 1079 { |
1080 Lisp_Object alist; | |
765 | 1081 struct frame *f; |
286 | 1082 |
765 | 1083 if (EQ (frame, Qnil)) |
1084 f = selected_frame; | |
286 | 1085 else |
1086 { | |
765 | 1087 CHECK_FRAME (frame, 0); |
1088 f = XFRAME (frame); | |
286 | 1089 } |
1090 | |
765 | 1091 if (f->display.nothing == 0) |
286 | 1092 return Qnil; |
1093 | |
765 | 1094 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
|
1095 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
|
1096 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
|
1097 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
|
1098 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
|
1099 store_in_alist (&alist, Qminibuffer, |
1870
d90e9fecad48
* frame.c (Fframe_parameters): Report the `minibuffer' parameter of
Jim Blandy <jimb@redhat.com>
parents:
1821
diff
changeset
|
1100 (! FRAME_HAS_MINIBUF_P (f) ? Qnil |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1101 : (FRAME_MINIBUF_ONLY_P (f) ? Qonly |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1102 : FRAME_MINIBUF_WINDOW (f)))); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1103 store_in_alist (&alist, Qunsplittable, (f->no_split ? Qt : Qnil)); |
2131
468df2d7e371
(x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents:
2068
diff
changeset
|
1104 store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); |
286 | 1105 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1106 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1107 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1108 if (FRAME_X_P (f)) |
765 | 1109 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
|
1110 #endif |
286 | 1111 return alist; |
1112 } | |
1113 | |
765 | 1114 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, |
1115 Smodify_frame_parameters, 2, 2, 0, | |
1116 "Modify the parameters of frame FRAME according to ALIST.\n\ | |
286 | 1117 ALIST is an alist of parameters to change and their new values.\n\ |
1118 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\ | |
765 | 1119 The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.") |
1120 (frame, alist) | |
1121 Lisp_Object frame, alist; | |
286 | 1122 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1123 FRAME_PTR f; |
286 | 1124 register Lisp_Object tail, elt, prop, val; |
1125 | |
765 | 1126 if (EQ (frame, Qnil)) |
1127 f = selected_frame; | |
286 | 1128 else |
1129 { | |
765 | 1130 CHECK_LIVE_FRAME (frame, 0); |
1131 f = XFRAME (frame); | |
286 | 1132 } |
1133 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1134 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1135 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1136 if (FRAME_X_P (f)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1137 #if 1 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1138 x_set_frame_parameters (f, alist); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1139 #else |
286 | 1140 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) |
1141 { | |
1142 elt = Fcar (tail); | |
1143 prop = Fcar (elt); | |
1144 val = Fcdr (elt); | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1145 x_set_frame_param (f, prop, val, get_frame_param (f, prop)); |
765 | 1146 store_frame_param (f, prop, val); |
286 | 1147 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1148 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1149 #endif |
286 | 1150 |
1151 return Qnil; | |
1152 } | |
1153 | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1154 DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1155 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1156 "Height in pixels of a line in the font in frame FRAME.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1157 If FRAME is omitted, the selected frame is used.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1158 For a terminal frame, the value is always 1.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1159 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1160 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1161 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1162 struct frame *f; |
286 | 1163 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1164 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1165 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1166 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1167 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1168 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1169 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1170 } |
777 | 1171 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1172 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1173 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1174 return make_number (x_char_height (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1175 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1176 #endif |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1177 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1178 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1179 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1180 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1181 DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1182 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1183 "Width in pixels of characters in the font in frame FRAME.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1184 If FRAME is omitted, the selected frame is used.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1185 The width is the same for all characters, because\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1186 currently Emacs supports only fixed-width fonts.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1187 For a terminal screen, the value is always 1.") |
765 | 1188 (frame) |
1189 Lisp_Object frame; | |
286 | 1190 { |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1191 struct frame *f; |
286 | 1192 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1193 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1194 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1195 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1196 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1197 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1198 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1199 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1200 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1201 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1202 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1203 return make_number (x_char_width (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1204 else |
777 | 1205 #endif |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1206 return make_number (1); |
286 | 1207 } |
1208 | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1209 DEFUN ("frame-pixel-height", Fframe_pixel_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1210 Sframe_pixel_height, 0, 1, 0, |
3676 | 1211 "Return a FRAME's height in pixels.\n\ |
1212 For a terminal frame, the result really gives the height in characters.\n\ | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1213 If FRAME is omitted, the selected frame is used.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1214 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1215 Lisp_Object frame; |
286 | 1216 { |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1217 struct frame *f; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1218 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1219 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1220 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1221 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1222 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1223 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1224 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1225 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1226 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1227 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1228 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1229 return make_number (x_pixel_height (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1230 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1231 #endif |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1232 return make_number (FRAME_HEIGHT (f)); |
286 | 1233 } |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1234 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1235 DEFUN ("frame-pixel-width", Fframe_pixel_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1236 Sframe_pixel_width, 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1237 "Return FRAME's width in pixels.\n\ |
3676 | 1238 For a terminal frame, the result really gives the width in characters.\n\ |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1239 If FRAME is omitted, the selected frame is used.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1240 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1241 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1242 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1243 struct frame *f; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1244 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1245 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1246 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1247 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1248 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1249 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1250 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1251 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1252 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1253 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1254 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1255 return make_number (x_pixel_width (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1256 else |
777 | 1257 #endif |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1258 return make_number (FRAME_WIDTH (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1259 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1260 |
765 | 1261 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, |
1262 "Specify that the frame FRAME has LINES lines.\n\ | |
286 | 1263 Optional third arg non-nil means that redisplay should use LINES lines\n\ |
765 | 1264 but that the idea of the actual height of the frame should not be changed.") |
1265 (frame, rows, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1266 Lisp_Object frame, rows, pretend; |
286 | 1267 { |
765 | 1268 register struct frame *f; |
286 | 1269 |
1270 CHECK_NUMBER (rows, 0); | |
765 | 1271 if (NILP (frame)) |
1272 f = selected_frame; | |
286 | 1273 else |
1274 { | |
765 | 1275 CHECK_LIVE_FRAME (frame, 0); |
1276 f = XFRAME (frame); | |
286 | 1277 } |
1278 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1279 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1280 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1281 if (FRAME_X_P (f)) |
286 | 1282 { |
765 | 1283 if (XINT (rows) != f->width) |
1284 x_set_window_size (f, f->width, XINT (rows)); | |
286 | 1285 } |
1286 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1287 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1288 change_frame_size (f, XINT (rows), 0, !NILP (pretend), 0); |
286 | 1289 return Qnil; |
1290 } | |
1291 | |
765 | 1292 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, |
1293 "Specify that the frame FRAME has COLS columns.\n\ | |
286 | 1294 Optional third arg non-nil means that redisplay should use COLS columns\n\ |
765 | 1295 but that the idea of the actual width of the frame should not be changed.") |
1296 (frame, cols, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1297 Lisp_Object frame, cols, pretend; |
286 | 1298 { |
765 | 1299 register struct frame *f; |
286 | 1300 CHECK_NUMBER (cols, 0); |
765 | 1301 if (NILP (frame)) |
1302 f = selected_frame; | |
286 | 1303 else |
1304 { | |
765 | 1305 CHECK_LIVE_FRAME (frame, 0); |
1306 f = XFRAME (frame); | |
286 | 1307 } |
1308 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1309 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1310 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1311 if (FRAME_X_P (f)) |
286 | 1312 { |
765 | 1313 if (XINT (cols) != f->width) |
1314 x_set_window_size (f, XINT (cols), f->height); | |
286 | 1315 } |
1316 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1317 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1318 change_frame_size (f, 0, XINT (cols), !NILP (pretend), 0); |
286 | 1319 return Qnil; |
1320 } | |
1321 | |
765 | 1322 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, |
1323 "Sets size of FRAME to COLS by ROWS, measured in characters.") | |
1324 (frame, cols, rows) | |
1325 Lisp_Object frame, cols, rows; | |
286 | 1326 { |
765 | 1327 register struct frame *f; |
286 | 1328 int mask; |
1329 | |
765 | 1330 CHECK_LIVE_FRAME (frame, 0); |
286 | 1331 CHECK_NUMBER (cols, 2); |
1332 CHECK_NUMBER (rows, 1); | |
765 | 1333 f = XFRAME (frame); |
286 | 1334 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1335 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1336 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1337 if (FRAME_X_P (f)) |
286 | 1338 { |
765 | 1339 if (XINT (rows) != f->height || XINT (cols) != f->width) |
1340 x_set_window_size (f, XINT (cols), XINT (rows)); | |
286 | 1341 } |
1342 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1343 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1344 change_frame_size (f, XINT (rows), XINT (cols), 0, 0); |
286 | 1345 |
1346 return Qnil; | |
1347 } | |
1348 | |
765 | 1349 DEFUN ("set-frame-position", Fset_frame_position, |
1350 Sset_frame_position, 3, 3, 0, | |
1351 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\ | |
454 | 1352 If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\ |
765 | 1353 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
|
1354 off the screen.") |
765 | 1355 (frame, xoffset, yoffset) |
1356 Lisp_Object frame, xoffset, yoffset; | |
286 | 1357 { |
765 | 1358 register struct frame *f; |
286 | 1359 int mask; |
1360 | |
765 | 1361 CHECK_LIVE_FRAME (frame, 0); |
286 | 1362 CHECK_NUMBER (xoffset, 1); |
1363 CHECK_NUMBER (yoffset, 2); | |
765 | 1364 f = XFRAME (frame); |
286 | 1365 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1366 /* I think this should be done with a hook. */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1367 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1368 if (FRAME_X_P (f)) |
765 | 1369 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
|
1370 #endif |
286 | 1371 |
1372 return Qt; | |
1373 } | |
777 | 1374 |
286 | 1375 |
765 | 1376 choose_minibuf_frame () |
286 | 1377 { |
765 | 1378 /* For lowest-level minibuf, put it on currently selected frame |
1379 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
|
1380 |
286 | 1381 if (minibuf_level == 0 |
765 | 1382 && 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
|
1383 && !EQ (minibuf_window, selected_frame->minibuffer_window)) |
286 | 1384 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1385 /* 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
|
1386 window anymore. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1387 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
|
1388 abort (); |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1389 |
765 | 1390 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 1391 XWINDOW (minibuf_window)->buffer); |
765 | 1392 minibuf_window = selected_frame->minibuffer_window; |
286 | 1393 } |
1394 } | |
1395 | |
765 | 1396 syms_of_frame () |
286 | 1397 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1398 /*&&& init symbols here &&&*/ |
765 | 1399 Qframep = intern ("framep"); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1400 staticpro (&Qframep); |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1401 Qframe_live_p = intern ("frame-live-p"); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1402 staticpro (&Qframe_live_p); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1403 Qheight = intern ("height"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1404 staticpro (&Qheight); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1405 Qicon = intern ("icon"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1406 staticpro (&Qicon); |
539 | 1407 Qminibuffer = intern ("minibuffer"); |
1408 staticpro (&Qminibuffer); | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1409 Qmodeline = intern ("modeline"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1410 staticpro (&Qmodeline); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1411 Qname = intern ("name"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1412 staticpro (&Qname); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1413 Qonly = intern ("only"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1414 staticpro (&Qonly); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1415 Qunsplittable = intern ("unsplittable"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1416 staticpro (&Qunsplittable); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1417 Qwidth = intern ("width"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1418 staticpro (&Qwidth); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1419 Qx = intern ("x"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1420 staticpro (&Qx); |
2131
468df2d7e371
(x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents:
2068
diff
changeset
|
1421 Qmenu_bar_lines = intern ("menu-bar-lines"); |
468df2d7e371
(x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents:
2068
diff
changeset
|
1422 staticpro (&Qmenu_bar_lines); |
286 | 1423 |
765 | 1424 staticpro (&Vframe_list); |
286 | 1425 |
765 | 1426 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
1427 "The initial frame-object, which represents Emacs's stdout."); | |
286 | 1428 |
1429 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified, | |
765 | 1430 "Non-nil if all of emacs is iconified and frame updates are not needed."); |
286 | 1431 Vemacs_iconified = Qnil; |
1432 | |
765 | 1433 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame, |
1434 "Minibufferless frames use this frame's minibuffer.\n\ | |
454 | 1435 \n\ |
765 | 1436 Emacs cannot create minibufferless frames unless this is set to an\n\ |
454 | 1437 appropriate surrogate.\n\ |
1438 \n\ | |
1439 Emacs consults this variable only when creating minibufferless\n\ | |
765 | 1440 frames; once the frame is created, it sticks with its assigned\n\ |
454 | 1441 minibuffer, no matter what this variable is set to. This means that\n\ |
1442 this variable doesn't necessarily say anything meaningful about the\n\ | |
765 | 1443 current set of frames, or where the minibuffer is currently being\n\ |
454 | 1444 displayed."); |
765 | 1445 Vdefault_minibuffer_frame = Qnil; |
286 | 1446 |
765 | 1447 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist, |
1448 "Alist of default values for frame creation.\n\ | |
386 | 1449 These may be set in your init file, like this:\n\ |
765 | 1450 (setq default-frame-alist '((width . 80) (height . 55)))\n\ |
386 | 1451 These override values given in window system configuration data, like\n\ |
1452 X Windows' defaults database.\n\ | |
765 | 1453 For values specific to the first Emacs frame, see `initial-frame-alist'.\n\ |
1454 For values specific to the separate minibuffer frame, see\n\ | |
1455 `minibuffer-frame-alist'."); | |
1456 Vdefault_frame_alist = Qnil; | |
386 | 1457 |
765 | 1458 defsubr (&Sframep); |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1459 defsubr (&Sframe_live_p); |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
1460 defsubr (&Shandle_switch_frame); |
765 | 1461 defsubr (&Sselect_frame); |
1462 defsubr (&Sselected_frame); | |
1463 defsubr (&Swindow_frame); | |
1464 defsubr (&Sframe_root_window); | |
1465 defsubr (&Sframe_selected_window); | |
1466 defsubr (&Sframe_list); | |
1467 defsubr (&Snext_frame); | |
1468 defsubr (&Sdelete_frame); | |
454 | 1469 defsubr (&Smouse_position); |
286 | 1470 defsubr (&Sset_mouse_position); |
1471 #if 0 | |
765 | 1472 defsubr (&Sframe_configuration); |
1473 defsubr (&Srestore_frame_configuration); | |
286 | 1474 #endif |
765 | 1475 defsubr (&Smake_frame_visible); |
1476 defsubr (&Smake_frame_invisible); | |
1477 defsubr (&Siconify_frame); | |
1478 defsubr (&Sframe_visible_p); | |
1479 defsubr (&Svisible_frame_list); | |
2282
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
1480 defsubr (&Sraise_frame); |
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
1481 defsubr (&Slower_frame); |
765 | 1482 defsubr (&Sredirect_frame_focus); |
1483 defsubr (&Sframe_focus); | |
1484 defsubr (&Sframe_parameters); | |
1485 defsubr (&Smodify_frame_parameters); | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1486 defsubr (&Sframe_char_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1487 defsubr (&Sframe_char_width); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1488 defsubr (&Sframe_pixel_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1489 defsubr (&Sframe_pixel_width); |
765 | 1490 defsubr (&Sset_frame_height); |
1491 defsubr (&Sset_frame_width); | |
1492 defsubr (&Sset_frame_size); | |
1493 defsubr (&Sset_frame_position); | |
286 | 1494 } |
732 | 1495 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1496 keys_of_frame () |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1497 { |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
1498 initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame"); |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1499 } |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1500 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1501 #else /* not MULTI_FRAME */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1502 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1503 /* 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
|
1504 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
|
1505 |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1506 /* 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
|
1507 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
|
1508 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
|
1509 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
|
1510 "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
|
1511 () |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1512 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1513 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
|
1514 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
|
1515 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
|
1516 } |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1517 DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1518 "Return non-nil if OBJECT is a frame.\n\ |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1519 Value is t for a termcap frame (a character-only terminal),\n\ |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1520 `x' for an Emacs frame that is really an X window.\n\ |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1521 Also see `live-frame-p'.") |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1522 (object) |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1523 Lisp_Object object; |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1524 { |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1525 return Qnil; |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1526 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1527 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1528 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
|
1529 "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
|
1530 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
|
1531 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
|
1532 (frame, rows, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1533 Lisp_Object frame, rows, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1534 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1535 CHECK_NUMBER (rows, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1536 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1537 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
|
1538 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1539 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1540 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1541 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
|
1542 "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
|
1543 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
|
1544 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
|
1545 (frame, cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1546 Lisp_Object frame, cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1547 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1548 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1549 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1550 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
|
1551 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1552 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1553 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1554 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
|
1555 "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
|
1556 (frame, cols, rows) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1557 Lisp_Object frame, cols, rows; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1558 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1559 CHECK_NUMBER (cols, 2); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1560 CHECK_NUMBER (rows, 1); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1561 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1562 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
|
1563 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1564 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1565 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1566 |
2207
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1567 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0, |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1568 "Return number of lines available for display on FRAME.\n\ |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1569 If FRAME is omitted, describe the currently selected frame.") |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1570 (frame) |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1571 Lisp_Object frame; |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1572 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1573 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
|
1574 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1575 |
2207
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1576 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0, |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1577 "Return number of columns available for display on FRAME.\n\ |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1578 If FRAME is omitted, describe the currently selected frame.") |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1579 (frame) |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
1580 Lisp_Object frame; |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1581 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1582 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
|
1583 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1584 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1585 DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1586 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1587 "Height in pixels of a line in the font in frame FRAME.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1588 If FRAME is omitted, the selected frame is used.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1589 For a terminal frame, the value is always 1.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1590 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1591 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1592 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1593 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1594 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1595 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1596 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1597 DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1598 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1599 "Width in pixels of characters in the font in frame FRAME.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1600 If FRAME is omitted, the selected frame is used.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1601 The width is the same for all characters, because\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1602 currently Emacs supports only fixed-width fonts.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1603 For a terminal screen, the value is always 1.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1604 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1605 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1606 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1607 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1608 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1609 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1610 DEFUN ("frame-pixel-height", Fframe_pixel_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1611 Sframe_pixel_height, 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1612 "Return FRAME's height in pixels.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1613 For a terminal frame, the result really gives the height in characters.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1614 If FRAME is omitted, the selected frame is used.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1615 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1616 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1617 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1618 return make_number (FRAME_HEIGHT (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1619 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1620 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1621 DEFUN ("frame-pixel-width", Fframe_pixel_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1622 Sframe_pixel_width, 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1623 "Return FRAME's width in pixels.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1624 For a terminal frame, the result really gives the width in characters.\n\ |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1625 If FRAME is omitted, the selected frame is used.") |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1626 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1627 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1628 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1629 return make_number (FRAME_WIDTH (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1630 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1631 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1632 /* 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
|
1633 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1634 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
|
1635 "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
|
1636 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
|
1637 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
|
1638 (lines, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1639 Lisp_Object lines, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1640 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1641 CHECK_NUMBER (lines, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1642 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1643 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
|
1644 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1645 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1646 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1647 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
|
1648 "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
|
1649 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
|
1650 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
|
1651 (cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1652 Lisp_Object cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1653 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1654 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1655 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1656 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
|
1657 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1658 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1659 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1660 syms_of_frame () |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1661 { |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1662 defsubr (&Sselected_frame); |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
1663 defsubr (&Sframep); |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1664 defsubr (&Sframe_char_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1665 defsubr (&Sframe_char_width); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1666 defsubr (&Sframe_pixel_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1667 defsubr (&Sframe_pixel_width); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1668 defsubr (&Sset_frame_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1669 defsubr (&Sset_frame_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1670 defsubr (&Sset_frame_size); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1671 defsubr (&Sset_screen_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1672 defsubr (&Sset_screen_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1673 defsubr (&Sframe_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1674 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
|
1675 defsubr (&Sframe_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1676 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
|
1677 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1678 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1679 keys_of_frame () |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1680 { |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1681 } |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1682 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1683 #endif /* not MULTI_FRAME */ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1684 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1685 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1686 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1687 |