Mercurial > emacs
annotate src/frame.c @ 11273:96404b701856
(edt-keep-current-page-delimiter): Doc fix.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Apr 1995 22:11:47 +0000 |
parents | 2f9a24a4c9eb |
children | 74046c14a0ad |
rev | line source |
---|---|
765 | 1 /* Generic frame functions. |
11169
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
2 Copyright (C) 1993, 1994, 1995 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 | |
7900
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
20 #include <config.h> |
363 | 21 |
7900
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
22 #include <stdio.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" |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
25 #include "termhooks.h" |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
26 #include "window.h" |
9572 | 27 #ifdef MSDOS |
28 #include "msdos.h" | |
29 #endif | |
732 | 30 |
765 | 31 #ifdef MULTI_FRAME |
732 | 32 |
1514
ceaecac6bf2e
* frame.c: #include buffer.h.
Jim Blandy <jimb@redhat.com>
parents:
1437
diff
changeset
|
33 #include "buffer.h" |
286 | 34 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
35 /* 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
|
36 #include "commands.h" |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
37 #include "keyboard.h" |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
38 |
286 | 39 Lisp_Object Vemacs_iconified; |
765 | 40 Lisp_Object Vframe_list; |
41 Lisp_Object Vterminal_frame; | |
42 Lisp_Object Vdefault_minibuffer_frame; | |
43 Lisp_Object Vdefault_frame_alist; | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
44 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
45 /* 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
|
46 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
|
47 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
|
48 evaluate this expression. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
49 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
50 (progn |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
51 ;; 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
|
52 ;; 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
|
53 (goto-char (point-min)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
54 (search-forward "/\*&&& symbols declared here &&&*\/\n") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
55 (let (symbol-list) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
56 (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
|
57 (setq symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
58 (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
|
59 symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
60 (forward-line 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
61 (setq symbol-list (nreverse symbol-list)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
62 ;; 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
|
63 (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
|
64 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
65 (while (looking-at "^ Q") |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
66 (forward-line 2)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
67 (kill-region start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
68 ;; Write a new symbol initialization section. |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
69 (while symbol-list |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
70 (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
|
71 (let ((start (point))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
72 (insert (substring (car symbol-list) 1)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
73 (subst-char-in-region start (point) ?_ ?-)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
74 (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
|
75 (setq symbol-list (cdr symbol-list))))) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
76 */ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
77 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
78 /*&&& symbols declared here &&&*/ |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
79 Lisp_Object Qframep; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
80 Lisp_Object Qframe_live_p; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
81 Lisp_Object Qheight; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
82 Lisp_Object Qicon; |
539 | 83 Lisp_Object Qminibuffer; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
84 Lisp_Object Qmodeline; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
85 Lisp_Object Qname; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
86 Lisp_Object Qonly; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
87 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
|
88 Lisp_Object Qmenu_bar_lines; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
89 Lisp_Object Qwidth; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
90 Lisp_Object Qx; |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
91 Lisp_Object Qvisible; |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
92 Lisp_Object Qbuffer_predicate; |
286 | 93 |
94 extern Lisp_Object Vminibuffer_list; | |
95 extern Lisp_Object get_minibuffer (); | |
5172
9aa201005b16
(Fhandle_switch_frame, Fredirect_frame_focus): Declared.
Richard M. Stallman <rms@gnu.org>
parents:
5105
diff
changeset
|
96 extern Lisp_Object Fhandle_switch_frame (); |
9aa201005b16
(Fhandle_switch_frame, Fredirect_frame_focus): Declared.
Richard M. Stallman <rms@gnu.org>
parents:
5105
diff
changeset
|
97 extern Lisp_Object Fredirect_frame_focus (); |
286 | 98 |
765 | 99 DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
100 "Return non-nil if OBJECT is a frame.\n\ | |
101 Value is t for a termcap frame (a character-only terminal),\n\ | |
9572 | 102 `x' for an Emacs frame that is really an X window,\n\ |
103 `pc' for a direct-write MS-DOS frame.\n\ | |
10851 | 104 See also `frame-live-p'.") |
454 | 105 (object) |
106 Lisp_Object object; | |
286 | 107 { |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
108 if (!FRAMEP (object)) |
286 | 109 return Qnil; |
765 | 110 switch (XFRAME (object)->output_method) |
286 | 111 { |
112 case output_termcap: | |
113 return Qt; | |
114 case output_x_window: | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
115 return Qx; |
9572 | 116 /* The `pc' case is in the Fframep below. */ |
286 | 117 default: |
118 abort (); | |
119 } | |
120 } | |
121 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
122 DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, |
765 | 123 "Return non-nil if OBJECT is a frame which has not been deleted.\n\ |
124 Value is nil if OBJECT is not a live frame. If object is a live\n\ | |
125 frame, the return value indicates what sort of output device it is\n\ | |
126 displayed on. Value is t for a termcap frame (a character-only\n\ | |
127 terminal), `x' for an Emacs frame being displayed in an X window.") | |
454 | 128 (object) |
129 Lisp_Object object; | |
130 { | |
765 | 131 return ((FRAMEP (object) |
132 && FRAME_LIVE_P (XFRAME (object))) | |
133 ? Fframep (object) | |
454 | 134 : Qnil); |
135 } | |
136 | |
765 | 137 struct frame * |
138 make_frame (mini_p) | |
286 | 139 int mini_p; |
140 { | |
765 | 141 Lisp_Object frame; |
142 register struct frame *f; | |
286 | 143 register Lisp_Object root_window; |
144 register Lisp_Object mini_window; | |
9972
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
145 register struct Lisp_Vector *vec; |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
146 int i; |
286 | 147 |
9972
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
148 vec = allocate_vectorlike ((EMACS_INT) VECSIZE (struct frame)); |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
149 for (i = 0; i < VECSIZE (struct frame); i++) |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
150 XSETFASTINT (vec->contents[i], 0); |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
151 vec->size = VECSIZE (struct frame); |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
152 f = (struct frame *)vec; |
92b33538b36a
(make_frame): Use allocate_vectorlike and VECSIZE.
Karl Heuer <kwzh@gnu.org>
parents:
9901
diff
changeset
|
153 XSETFRAME (frame, f); |
286 | 154 |
765 | 155 f->cursor_x = 0; |
156 f->cursor_y = 0; | |
157 f->current_glyphs = 0; | |
158 f->desired_glyphs = 0; | |
159 f->visible = 0; | |
1652
93497cd89204
* frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents:
1514
diff
changeset
|
160 f->async_visible = 0; |
765 | 161 f->display.nothing = 0; |
162 f->iconified = 0; | |
1652
93497cd89204
* frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents:
1514
diff
changeset
|
163 f->async_iconified = 0; |
765 | 164 f->wants_modeline = 1; |
165 f->auto_raise = 0; | |
166 f->auto_lower = 0; | |
167 f->no_split = 0; | |
168 f->garbaged = 0; | |
169 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
|
170 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
|
171 f->explicit_name = 0; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
172 f->can_have_scroll_bars = 0; |
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
173 f->has_vertical_scroll_bars = 0; |
765 | 174 f->param_alist = Qnil; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
175 f->scroll_bars = Qnil; |
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
176 f->condemned_scroll_bars = Qnil; |
2417
8c07933beed9
(make_frame): Init face_alist field.
Richard M. Stallman <rms@gnu.org>
parents:
2298
diff
changeset
|
177 f->face_alist = Qnil; |
6130
d4e5878462cb
(make_frame): Init menu_bar_items field to 0.
Richard M. Stallman <rms@gnu.org>
parents:
6054
diff
changeset
|
178 f->menu_bar_items = Qnil; |
7095
098b87bde5a7
(make_frame): Initialize fields menu_bar_vector and menu_bar_items_used.
Richard M. Stallman <rms@gnu.org>
parents:
7055
diff
changeset
|
179 f->menu_bar_vector = Qnil; |
098b87bde5a7
(make_frame): Initialize fields menu_bar_vector and menu_bar_items_used.
Richard M. Stallman <rms@gnu.org>
parents:
7055
diff
changeset
|
180 f->menu_bar_items_used = 0; |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
181 f->buffer_predicate = Qnil; |
11017
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
182 #ifdef MULTI_KBOARD |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
183 f->kboard = initial_kboard; |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
184 #endif |
286 | 185 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
186 root_window = make_window (); |
286 | 187 if (mini_p) |
188 { | |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
189 mini_window = make_window (); |
286 | 190 XWINDOW (root_window)->next = mini_window; |
191 XWINDOW (mini_window)->prev = root_window; | |
192 XWINDOW (mini_window)->mini_p = Qt; | |
765 | 193 XWINDOW (mini_window)->frame = frame; |
194 f->minibuffer_window = mini_window; | |
286 | 195 } |
196 else | |
197 { | |
198 mini_window = Qnil; | |
199 XWINDOW (root_window)->next = Qnil; | |
765 | 200 f->minibuffer_window = Qnil; |
286 | 201 } |
202 | |
765 | 203 XWINDOW (root_window)->frame = frame; |
286 | 204 |
205 /* 10 is arbitrary, | |
206 just so that there is "something there." | |
765 | 207 Correct size will be set up later with change_frame_size. */ |
286 | 208 |
765 | 209 f->width = 10; |
210 f->height = 10; | |
286 | 211 |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
212 XSETFASTINT (XWINDOW (root_window)->width, 10); |
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
213 XSETFASTINT (XWINDOW (root_window)->height, (mini_p ? 9 : 10)); |
286 | 214 |
215 if (mini_p) | |
216 { | |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
217 XSETFASTINT (XWINDOW (mini_window)->width, 10); |
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
218 XSETFASTINT (XWINDOW (mini_window)->top, 9); |
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
219 XSETFASTINT (XWINDOW (mini_window)->height, 1); |
286 | 220 } |
221 | |
765 | 222 /* Choose a buffer for the frame's root window. */ |
386 | 223 { |
224 Lisp_Object buf; | |
225 | |
226 XWINDOW (root_window)->buffer = Qt; | |
227 buf = Fcurrent_buffer (); | |
228 /* If buf is a 'hidden' buffer (i.e. one whose name starts with | |
229 a space), try to find another one. */ | |
230 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
|
231 buf = Fother_buffer (buf, Qnil); |
386 | 232 Fset_window_buffer (root_window, buf); |
233 } | |
234 | |
286 | 235 if (mini_p) |
236 { | |
237 XWINDOW (mini_window)->buffer = Qt; | |
238 Fset_window_buffer (mini_window, | |
485 | 239 (NILP (Vminibuffer_list) |
286 | 240 ? get_minibuffer (0) |
241 : Fcar (Vminibuffer_list))); | |
242 } | |
243 | |
765 | 244 f->root_window = root_window; |
245 f->selected_window = root_window; | |
363 | 246 /* Make sure this window seems more recently used than |
247 a newly-created, never-selected window. */ | |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
248 XSETFASTINT (XWINDOW (f->selected_window)->use_time, ++window_select_count); |
286 | 249 |
765 | 250 return f; |
286 | 251 } |
252 | |
765 | 253 /* Make a frame using a separate minibuffer window on another frame. |
286 | 254 MINI_WINDOW is the minibuffer window to use. nil means use the |
255 default (the global minibuffer). */ | |
256 | |
765 | 257 struct frame * |
258 make_frame_without_minibuffer (mini_window) | |
286 | 259 register Lisp_Object mini_window; |
260 { | |
765 | 261 register struct frame *f; |
286 | 262 |
263 /* Choose the minibuffer window to use. */ | |
485 | 264 if (NILP (mini_window)) |
286 | 265 { |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
266 if (!FRAMEP (Vdefault_minibuffer_frame)) |
765 | 267 error ("default-minibuffer-frame must be set when creating minibufferless frames"); |
268 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame))) | |
269 error ("default-minibuffer-frame must be a live frame"); | |
270 mini_window = XFRAME (Vdefault_minibuffer_frame)->minibuffer_window; | |
286 | 271 } |
272 else | |
273 { | |
1437
36ef55ecb265
* frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents:
1385
diff
changeset
|
274 CHECK_LIVE_WINDOW (mini_window, 0); |
286 | 275 } |
276 | |
765 | 277 /* Make a frame containing just a root window. */ |
278 f = make_frame (0); | |
286 | 279 |
280 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 281 f->minibuffer_window = mini_window; |
286 | 282 Fset_window_buffer (mini_window, |
485 | 283 (NILP (Vminibuffer_list) |
286 | 284 ? get_minibuffer (0) |
285 : Fcar (Vminibuffer_list))); | |
765 | 286 return f; |
286 | 287 } |
288 | |
765 | 289 /* Make a frame containing only a minibuffer window. */ |
286 | 290 |
765 | 291 struct frame * |
292 make_minibuffer_frame () | |
286 | 293 { |
765 | 294 /* First make a frame containing just a root window, no minibuffer. */ |
286 | 295 |
765 | 296 register struct frame *f = make_frame (0); |
286 | 297 register Lisp_Object mini_window; |
765 | 298 register Lisp_Object frame; |
286 | 299 |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
300 XSETFRAME (frame, f); |
286 | 301 |
1006
a13ee72d74a2
* frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents:
987
diff
changeset
|
302 f->auto_raise = 0; |
765 | 303 f->auto_lower = 0; |
304 f->no_split = 1; | |
305 f->wants_modeline = 0; | |
306 f->has_minibuffer = 1; | |
286 | 307 |
308 /* Now label the root window as also being the minibuffer. | |
309 Avoid infinite looping on the window chain by marking next pointer | |
310 as nil. */ | |
311 | |
765 | 312 mini_window = f->minibuffer_window = f->root_window; |
286 | 313 XWINDOW (mini_window)->mini_p = Qt; |
314 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
|
315 XWINDOW (mini_window)->prev = Qnil; |
765 | 316 XWINDOW (mini_window)->frame = frame; |
286 | 317 |
318 /* Put the proper buffer in that window. */ | |
319 | |
320 Fset_window_buffer (mini_window, | |
485 | 321 (NILP (Vminibuffer_list) |
286 | 322 ? get_minibuffer (0) |
323 : Fcar (Vminibuffer_list))); | |
765 | 324 return f; |
286 | 325 } |
326 | |
765 | 327 /* Construct a frame that refers to the terminal (stdin and stdout). */ |
286 | 328 |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
329 static int terminal_frame_count; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
330 |
765 | 331 struct frame * |
332 make_terminal_frame () | |
286 | 333 { |
765 | 334 register struct frame *f; |
5231
6646271e8d32
(make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents:
5172
diff
changeset
|
335 Lisp_Object frame; |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
336 char name[20]; |
286 | 337 |
11017
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
338 #ifdef MULTI_KBOARD |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
339 if (!initial_kboard) |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
340 { |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
341 initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
342 init_kboard (initial_kboard); |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
343 } |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
344 #endif |
f7c4ece024d5
(make_frame): Initialize kboard member.
Karl Heuer <kwzh@gnu.org>
parents:
10853
diff
changeset
|
345 |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
346 /* The first call must initialize Vframe_list. */ |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
347 if (! (NILP (Vframe_list) || CONSP (Vframe_list))) |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
348 Vframe_list = Qnil; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
349 |
765 | 350 f = make_frame (1); |
5231
6646271e8d32
(make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents:
5172
diff
changeset
|
351 |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
352 XSETFRAME (frame, f); |
5231
6646271e8d32
(make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents:
5172
diff
changeset
|
353 Vframe_list = Fcons (frame, Vframe_list); |
6646271e8d32
(make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents:
5172
diff
changeset
|
354 |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
355 terminal_frame_count++; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
356 sprintf (name, "terminal-%d", terminal_frame_count); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
357 |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
358 f->name = build_string (name); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
359 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
360 f->async_visible = 1; /* Don't let visible be cleared later. */ |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
361 f->display.nothing = 1; /* Nonzero means frame isn't deleted. */ |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
362 XSETFRAME (Vterminal_frame, f); |
765 | 363 return f; |
286 | 364 } |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
365 |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
366 DEFUN ("make-terminal-frame", Fmake_terminal_frame, Smake_terminal_frame, |
10783
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
367 1, 1, 0, "Create an additional terminal frame.\n\ |
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
368 You can create multiple frames on a text-only terminal in this way.\n\ |
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
369 Only the selected terminal frame is actually displayed.\n\ |
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
370 This function takes one argument, an alist specifying frame parameters.\n\ |
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
371 In practice, generally you don't need to specify any parameters.\n\ |
bb2d929daaa3
(Fmake_terminal_frame): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
10768
diff
changeset
|
372 Note that changing the size of one terminal frame automatically affects all.") |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
373 (parms) |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
374 Lisp_Object parms; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
375 { |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
376 struct frame *f; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
377 Lisp_Object frame; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
378 |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
379 if (selected_frame->output_method != output_termcap) |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
380 error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
381 |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
382 f = make_terminal_frame (); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
383 change_frame_size (f, FRAME_HEIGHT (selected_frame), |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
384 FRAME_WIDTH (selected_frame), 0, 0); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
385 remake_frame_glyphs (f); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
386 calculate_costs (f); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
387 XSETFRAME (frame, f); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
388 Fmodify_frame_parameters (frame, parms); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
389 return frame; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
390 } |
286 | 391 |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
392 static Lisp_Object |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
393 do_switch_frame (frame, no_enter, track) |
765 | 394 Lisp_Object frame, no_enter; |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
395 int track; |
286 | 396 { |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
397 /* 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
|
398 switch to. */ |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
399 if (CONSP (frame) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
400 && EQ (XCONS (frame)->car, Qswitch_frame) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
401 && CONSP (XCONS (frame)->cdr)) |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
402 frame = XCONS (XCONS (frame)->cdr)->car; |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
403 |
6352
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
404 /* This used to say CHECK_LIVE_FRAME, but apparently it's possible for |
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
405 a switch-frame event to arrive after a frame is no longer live, |
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
406 especially when deleting the initial frame during startup. */ |
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
407 CHECK_FRAME (frame, 0); |
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
408 if (! FRAME_LIVE_P (XFRAME (frame))) |
6f48bd9145f9
(Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents:
6346
diff
changeset
|
409 return Qnil; |
286 | 410 |
765 | 411 if (selected_frame == XFRAME (frame)) |
412 return frame; | |
286 | 413 |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
414 /* This is too greedy; it causes inappropriate focus redirection |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
415 that's hard to get rid of. */ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
416 #if 0 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
417 /* 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
|
418 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
|
419 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
|
420 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
|
421 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
|
422 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
|
423 around. */ |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
424 if (track) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
425 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
426 Lisp_Object tail; |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
427 |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
428 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
429 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
430 Lisp_Object focus; |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
431 |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
432 if (!FRAMEP (XCONS (tail)->car)) |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
433 abort (); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
434 |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
435 focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car)); |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
436 |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
437 if (FRAMEP (focus) && XFRAME (focus) == selected_frame) |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
438 Fredirect_frame_focus (XCONS (tail)->car, frame); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
439 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
440 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
441 #else /* ! 0 */ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
442 /* Instead, apply it only to the frame we're pointing to. */ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
443 #ifdef HAVE_X_WINDOWS |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
444 if (track) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
445 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
446 Lisp_Object focus, xfocus; |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
447 |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
448 xfocus = x_get_focus_frame (); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
449 if (FRAMEP (xfocus)) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
450 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
451 focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
452 if (FRAMEP (focus) && XFRAME (focus) == selected_frame) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
453 Fredirect_frame_focus (xfocus, frame); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
454 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
455 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
456 #endif /* HAVE_X_WINDOWS */ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
457 #endif /* ! 0 */ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
458 |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
459 if (FRAME_TERMCAP_P (XFRAME (frame))) |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
460 { |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
461 /* Since frames on an ASCII terminal share the same display area, |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
462 switching means we must redisplay the whole thing. */ |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
463 windows_or_buffers_changed++; |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
464 SET_FRAME_GARBAGED (XFRAME (frame)); |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
465 } |
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
466 |
765 | 467 selected_frame = XFRAME (frame); |
468 if (! FRAME_MINIBUF_ONLY_P (selected_frame)) | |
469 last_nonminibuf_frame = selected_frame; | |
363 | 470 |
765 | 471 Fselect_window (XFRAME (frame)->selected_window); |
472 choose_minibuf_frame (); | |
286 | 473 |
1920
ac5e559a819a
* frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents:
1870
diff
changeset
|
474 /* 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
|
475 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
|
476 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
|
477 (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
|
478 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
|
479 the one you're actually typing in. */ |
10853
3db086133785
(do_switch_frame): Undo Feb 6 change.
Karl Heuer <kwzh@gnu.org>
parents:
10851
diff
changeset
|
480 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
|
481 |
765 | 482 return frame; |
286 | 483 } |
484 | |
6486
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
485 DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
486 "Select the frame FRAME.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
487 Subsequent editing commands apply to its selected window.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
488 The selection of FRAME lasts until the next time the user does\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
489 something to select a different frame, or until the next time this\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
490 function is called.") |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
491 (frame, no_enter) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
492 Lisp_Object frame, no_enter; |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
493 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
494 return do_switch_frame (frame, no_enter, 1); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
495 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
496 |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
497 |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
498 DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 2, "e", |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
499 "Handle a switch-frame event EVENT.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
500 Switch-frame events are usually bound to this function.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
501 A switch-frame event tells Emacs that the window manager has requested\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
502 that the user's events be directed to the frame mentioned in the event.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
503 This function selects the selected window of the frame of EVENT.\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
504 \n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
505 If EVENT is frame object, handle it as if it were a switch-frame event\n\ |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
506 to that frame.") |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
507 (frame, no_enter) |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
508 Lisp_Object frame, no_enter; |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
509 { |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
510 return do_switch_frame (frame, no_enter, 0); |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
511 } |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
512 |
5012ae9c6075
(do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents:
6355
diff
changeset
|
513 |
765 | 514 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, |
515 "Return the frame that is now selected.") | |
286 | 516 () |
517 { | |
518 Lisp_Object tem; | |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
519 XSETFRAME (tem, selected_frame); |
286 | 520 return tem; |
521 } | |
7055
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
522 |
765 | 523 DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, |
524 "Return the frame object that window WINDOW is on.") | |
286 | 525 (window) |
526 Lisp_Object window; | |
527 { | |
1437
36ef55ecb265
* frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents:
1385
diff
changeset
|
528 CHECK_LIVE_WINDOW (window, 0); |
765 | 529 return XWINDOW (window)->frame; |
286 | 530 } |
531 | |
6527
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
532 DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
533 "Returns the topmost, leftmost window of FRAME.\n\ |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
534 If omitted, FRAME defaults to the currently selected frame.") |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
535 (frame) |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
536 Lisp_Object frame; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
537 { |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
538 Lisp_Object w; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
539 |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
540 if (NILP (frame)) |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
541 w = selected_frame->root_window; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
542 else |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
543 { |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
544 CHECK_LIVE_FRAME (frame, 0); |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
545 w = XFRAME (frame)->root_window; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
546 } |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
547 while (NILP (XWINDOW (w)->buffer)) |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
548 { |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
549 if (! NILP (XWINDOW (w)->hchild)) |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
550 w = XWINDOW (w)->hchild; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
551 else if (! NILP (XWINDOW (w)->vchild)) |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
552 w = XWINDOW (w)->vchild; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
553 else |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
554 abort (); |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
555 } |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
556 return w; |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
557 } |
ab9f20a3f502
(Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6500
diff
changeset
|
558 |
11169
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
559 DEFUN ("active-minibuffer-window", Factive_minibuffer_window, |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
560 Sactive_minibuffer_window, 0, 0, 0, |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
561 "Return the currently active minibuffer window, or nil if none.") |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
562 () |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
563 { |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
564 return minibuf_level ? minibuf_window : Qnil; |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
565 } |
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
566 |
765 | 567 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
|
568 "Returns the root-window of FRAME.\n\ |
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
569 If omitted, FRAME defaults to the currently selected frame.") |
765 | 570 (frame) |
571 Lisp_Object frame; | |
286 | 572 { |
765 | 573 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
574 XSETFRAME (frame, selected_frame); |
454 | 575 else |
765 | 576 CHECK_LIVE_FRAME (frame, 0); |
286 | 577 |
765 | 578 return XFRAME (frame)->root_window; |
286 | 579 } |
580 | |
765 | 581 DEFUN ("frame-selected-window", Fframe_selected_window, |
582 Sframe_selected_window, 0, 1, 0, | |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
583 "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
|
584 If omitted, FRAME defaults to the currently selected frame.") |
765 | 585 (frame) |
586 Lisp_Object frame; | |
286 | 587 { |
765 | 588 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
589 XSETFRAME (frame, selected_frame); |
454 | 590 else |
765 | 591 CHECK_LIVE_FRAME (frame, 0); |
286 | 592 |
765 | 593 return XFRAME (frame)->selected_window; |
286 | 594 } |
595 | |
7055
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
596 DEFUN ("set-frame-selected-window", Fset_frame_selected_window, |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
597 Sset_frame_selected_window, 2, 2, 0, |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
598 "Set the selected window of frame object FRAME to WINDOW.\n\ |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
599 If FRAME is nil, the selected frame is used.\n\ |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
600 If FRAME is the selected frame, this makes WINDOW the selected window.") |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
601 (frame, window) |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
602 Lisp_Object frame, window; |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
603 { |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
604 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
605 XSETFRAME (frame, selected_frame); |
7055
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
606 else |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
607 CHECK_LIVE_FRAME (frame, 0); |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
608 |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
609 CHECK_LIVE_WINDOW (window, 1); |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
610 |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
611 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window)))) |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
612 error ("In `set-frame-selected-window', WINDOW is not on FRAME"); |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
613 |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
614 if (XFRAME (frame) == selected_frame) |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
615 return Fselect_window (window); |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
616 |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
617 return XFRAME (frame)->selected_window = window; |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
618 } |
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
619 |
765 | 620 DEFUN ("frame-list", Fframe_list, Sframe_list, |
286 | 621 0, 0, 0, |
765 | 622 "Return a list of all frames.") |
286 | 623 () |
624 { | |
765 | 625 return Fcopy_sequence (Vframe_list); |
286 | 626 } |
627 | |
765 | 628 /* Return the next frame in the frame list after FRAME. |
629 If MINIBUF is nil, exclude minibuffer-only frames. | |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
630 If MINIBUF is a window, include only its own frame |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
631 and any frame now using that window as the minibuffer. |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
632 If MINIBUF is `visible', include all visible frames. |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
633 If MINIBUF is 0, include all visible and iconified frames. |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
634 Otherwise, include all frames. */ |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
635 |
286 | 636 Lisp_Object |
765 | 637 next_frame (frame, minibuf) |
638 Lisp_Object frame; | |
454 | 639 Lisp_Object minibuf; |
286 | 640 { |
641 Lisp_Object tail; | |
642 int passed = 0; | |
643 | |
765 | 644 /* There must always be at least one frame in Vframe_list. */ |
645 if (! CONSP (Vframe_list)) | |
454 | 646 abort (); |
647 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
648 /* 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
|
649 forever. Forestall that. */ |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
650 CHECK_LIVE_FRAME (frame, 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
651 |
286 | 652 while (1) |
765 | 653 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 654 { |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
655 Lisp_Object f; |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
656 |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
657 f = XCONS (tail)->car; |
286 | 658 if (passed) |
363 | 659 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
660 /* 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
|
661 |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
662 /* 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
|
663 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
|
664 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
|
665 return f; |
335 | 666 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
667 /* 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
|
668 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
669 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
670 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
|
671 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
672 } |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
673 else if (EQ (minibuf, Qvisible)) |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
674 { |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
675 FRAME_SAMPLE_VISIBILITY (XFRAME (f)); |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
676 if (FRAME_VISIBLE_P (XFRAME (f))) |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
677 return f; |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
678 } |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
679 else if (XFASTINT (minibuf) == 0) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
680 { |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
681 FRAME_SAMPLE_VISIBILITY (XFRAME (f)); |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
682 if (FRAME_VISIBLE_P (XFRAME (f)) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
683 || FRAME_ICONIFIED_P (XFRAME (f))) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
684 return f; |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
685 } |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
686 else if (WINDOWP (minibuf)) |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
687 { |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
688 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
689 /* Check that F either is, or has forwarded its focus to, |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
690 MINIBUF's frame. */ |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
691 && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
692 || EQ (WINDOW_FRAME (XWINDOW (minibuf)), |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
693 FRAME_FOCUS_FRAME (XFRAME (f))))) |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
694 return f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
695 } |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
696 else |
765 | 697 return f; |
363 | 698 } |
286 | 699 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
700 if (EQ (frame, f)) |
286 | 701 passed++; |
702 } | |
703 } | |
704 | |
765 | 705 /* Return the previous frame in the frame list before FRAME. |
706 If MINIBUF is nil, exclude minibuffer-only frames. | |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
707 If MINIBUF is a window, include only its own frame |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
708 and any frame now using that window as the minibuffer. |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
709 If MINIBUF is `visible', include all visible frames. |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
710 If MINIBUF is 0, include all visible and iconified frames. |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
711 Otherwise, include all frames. */ |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
712 |
286 | 713 Lisp_Object |
765 | 714 prev_frame (frame, minibuf) |
715 Lisp_Object frame; | |
454 | 716 Lisp_Object minibuf; |
286 | 717 { |
718 Lisp_Object tail; | |
719 Lisp_Object prev; | |
720 | |
765 | 721 /* There must always be at least one frame in Vframe_list. */ |
722 if (! CONSP (Vframe_list)) | |
454 | 723 abort (); |
724 | |
286 | 725 prev = Qnil; |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
726 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
454 | 727 { |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
728 Lisp_Object f; |
454 | 729 |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
730 f = XCONS (tail)->car; |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
731 if (!FRAMEP (f)) |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
732 abort (); |
454 | 733 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
734 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
|
735 return prev; |
454 | 736 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
737 /* 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
|
738 according to minibuf. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
739 if (NILP (minibuf)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
740 { |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
741 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
|
742 prev = f; |
454 | 743 } |
9032 | 744 else if (WINDOWP (minibuf)) |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
745 { |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
746 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
747 /* Check that F either is, or has forwarded its focus to, |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
748 MINIBUF's frame. */ |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
749 && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
750 || EQ (WINDOW_FRAME (XWINDOW (minibuf)), |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
751 FRAME_FOCUS_FRAME (XFRAME (f))))) |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
752 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
753 } |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
754 else if (EQ (minibuf, Qvisible)) |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
755 { |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
756 FRAME_SAMPLE_VISIBILITY (XFRAME (f)); |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
757 if (FRAME_VISIBLE_P (XFRAME (f))) |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
758 prev = f; |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
759 } |
9032 | 760 else if (XFASTINT (minibuf) == 0) |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
761 { |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
762 FRAME_SAMPLE_VISIBILITY (XFRAME (f)); |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
763 if (FRAME_VISIBLE_P (XFRAME (f)) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
764 || FRAME_ICONIFIED_P (XFRAME (f))) |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
765 prev = f; |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
766 } |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
767 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
768 prev = f; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
769 } |
454 | 770 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
771 /* 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
|
772 if (NILP (prev)) |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
773 /* 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
|
774 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
|
775 return frame; |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
776 else |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
777 /* 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
|
778 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
|
779 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
|
780 return prev; |
286 | 781 } |
782 | |
4424
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
783 |
765 | 784 DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0, |
785 "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
|
786 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
|
787 If omitted, FRAME defaults to the selected frame.\n\ |
4227
b283670201b4
(Fdelete_frame): Allow deletion if there is some other
Richard M. Stallman <rms@gnu.org>
parents:
3970
diff
changeset
|
788 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
789 If MINIBUF is a window, include only its own frame\n\ |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
790 and any frame now using that window as the minibuffer.\n\ |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
791 If MINIFRAME is `visible', include all visible frames.\n\ |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
792 If MINIBUF is 0, include all visible and iconified frames.\n\ |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
793 Otherwise, include all frames.") |
765 | 794 (frame, miniframe) |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
795 Lisp_Object frame, miniframe; |
286 | 796 { |
797 Lisp_Object tail; | |
798 | |
765 | 799 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
800 XSETFRAME (frame, selected_frame); |
454 | 801 else |
765 | 802 CHECK_LIVE_FRAME (frame, 0); |
286 | 803 |
765 | 804 return next_frame (frame, miniframe); |
286 | 805 } |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
806 |
4424
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
807 DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0, |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
808 "Return the previous frame in the frame list before FRAME.\n\ |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
809 By default, skip minibuffer-only frames.\n\ |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
810 If omitted, FRAME defaults to the selected frame.\n\ |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
811 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
812 If MINIBUF is a window, include only its own frame\n\ |
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
813 and any frame now using that window as the minibuffer.\n\ |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
814 If MINIFRAME is `visible', include all visible frames.\n\ |
8168
32fbb27091d4
(next_frame, prev_frame):
Richard M. Stallman <rms@gnu.org>
parents:
8099
diff
changeset
|
815 If MINIBUF is 0, include all visible and iconified frames.\n\ |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
816 Otherwise, include all frames.") |
4424
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
817 (frame, miniframe) |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
818 Lisp_Object frame, miniframe; |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
819 { |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
820 Lisp_Object tail; |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
821 |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
822 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
823 XSETFRAME (frame, selected_frame); |
4424
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
824 else |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
825 CHECK_LIVE_FRAME (frame, 0); |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
826 |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
827 return prev_frame (frame, miniframe); |
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
828 } |
286 | 829 |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
830 /* Return 1 if it is ok to delete frame F; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
831 0 if all frames aside from F are invisible. |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
832 (Exception: if F is the terminal frame, and we are using X, return 1.) */ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
833 |
7646
de2c4334fad4
(other_visible_frames): No longer static.
Richard M. Stallman <rms@gnu.org>
parents:
7570
diff
changeset
|
834 int |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
835 other_visible_frames (f) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
836 FRAME_PTR f; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
837 { |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
838 /* We know the selected frame is visible, |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
839 so if F is some other frame, it can't be the sole visible one. */ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
840 if (f == selected_frame) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
841 { |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
842 Lisp_Object frames; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
843 int count = 0; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
844 |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
845 for (frames = Vframe_list; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
846 CONSP (frames); |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
847 frames = XCONS (frames)->cdr) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
848 { |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
849 Lisp_Object this; |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
850 |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
851 this = XCONS (frames)->car; |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
852 /* Verify that the frame's window still exists |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
853 and we can still talk to it. And note any recent change |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
854 in visibility. */ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
855 #ifdef HAVE_X_WINDOWS |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
856 if (FRAME_X_P (XFRAME (this))) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
857 { |
9648
14b1481b7c6d
(other_visible_frames): Pass a frame ptr to x_sync.
Richard M. Stallman <rms@gnu.org>
parents:
9572
diff
changeset
|
858 x_sync (XFRAME (this)); |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
859 FRAME_SAMPLE_VISIBILITY (XFRAME (this)); |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
860 } |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
861 #endif |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
862 |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
863 if (FRAME_VISIBLE_P (XFRAME (this)) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
864 || FRAME_ICONIFIED_P (XFRAME (this)) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
865 /* Allow deleting the terminal frame when at least |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
866 one X frame exists! */ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
867 || (FRAME_X_P (XFRAME (this)) && !FRAME_X_P (f))) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
868 count++; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
869 } |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
870 return count > 1; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
871 } |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
872 return 1; |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
873 } |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
874 |
4341
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
875 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "", |
765 | 876 "Delete FRAME, permanently eliminating it from use.\n\ |
877 If omitted, FRAME defaults to the selected frame.\n\ | |
4341
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
878 A frame may not be deleted if its minibuffer is used by other frames.\n\ |
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
879 Normally, you may not delete a frame if all other frames are invisible,\n\ |
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
880 but if the second optional argument FORCE is non-nil, you may do so.") |
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
881 (frame, force) |
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
882 Lisp_Object frame, force; |
286 | 883 { |
765 | 884 struct frame *f; |
286 | 885 |
765 | 886 if (EQ (frame, Qnil)) |
286 | 887 { |
765 | 888 f = selected_frame; |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
889 XSETFRAME (frame, f); |
286 | 890 } |
891 else | |
892 { | |
765 | 893 CHECK_FRAME (frame, 0); |
894 f = XFRAME (frame); | |
286 | 895 } |
896 | |
765 | 897 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
|
898 return Qnil; |
454 | 899 |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
900 if (NILP (force) && !other_visible_frames (f)) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
901 error ("Attempt to delete the sole visible or iconified frame"); |
286 | 902 |
765 | 903 /* Does this frame have a minibuffer, and is it the surrogate |
904 minibuffer for any other frame? */ | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
905 if (FRAME_HAS_MINIBUF_P (XFRAME (frame))) |
363 | 906 { |
765 | 907 Lisp_Object frames; |
708 | 908 |
765 | 909 for (frames = Vframe_list; |
910 CONSP (frames); | |
911 frames = XCONS (frames)->cdr) | |
708 | 912 { |
6157
9422e430f067
(Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents:
6130
diff
changeset
|
913 Lisp_Object this; |
9422e430f067
(Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents:
6130
diff
changeset
|
914 this = XCONS (frames)->car; |
363 | 915 |
765 | 916 if (! EQ (this, frame) |
917 && EQ (frame, | |
6157
9422e430f067
(Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents:
6130
diff
changeset
|
918 WINDOW_FRAME (XWINDOW |
9422e430f067
(Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents:
6130
diff
changeset
|
919 (FRAME_MINIBUF_WINDOW (XFRAME (this)))))) |
765 | 920 error ("Attempt to delete a surrogate minibuffer frame"); |
708 | 921 } |
286 | 922 } |
923 | |
765 | 924 /* Don't let the frame remain selected. */ |
925 if (f == selected_frame) | |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
926 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
286 | 927 |
765 | 928 /* Don't allow minibuf_window to remain on a deleted frame. */ |
929 if (EQ (f->minibuffer_window, minibuf_window)) | |
286 | 930 { |
765 | 931 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 932 XWINDOW (minibuf_window)->buffer); |
765 | 933 minibuf_window = selected_frame->minibuffer_window; |
286 | 934 } |
935 | |
8099
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
936 /* Clear any X selections for this frame. */ |
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
937 #ifdef HAVE_X_WINDOWS |
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
938 if (FRAME_X_P (f)) |
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
939 x_clear_frame_selections (f); |
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
940 #endif |
a06382fd175d
(Fdelete_frame): Call x_clear_frame_selections.
Richard M. Stallman <rms@gnu.org>
parents:
8054
diff
changeset
|
941 |
1680
ea9f3949f153
* frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents:
1652
diff
changeset
|
942 /* 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
|
943 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
|
944 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
|
945 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
|
946 |
765 | 947 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
|
948 FRAME_SET_VISIBLE (f, 0); |
286 | 949 |
8666
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
950 if (FRAME_CURRENT_GLYPHS (f)) |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
951 free_frame_glyphs (f, FRAME_CURRENT_GLYPHS (f)); |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
952 if (FRAME_DESIRED_GLYPHS (f)) |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
953 free_frame_glyphs (f, FRAME_DESIRED_GLYPHS (f)); |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
954 if (FRAME_TEMP_GLYPHS (f)) |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
955 free_frame_glyphs (f, FRAME_TEMP_GLYPHS (f)); |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
956 if (FRAME_INSERT_COST (f)) |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
957 free (FRAME_INSERT_COST (f)); |
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
958 if (FRAME_DELETEN_COST (f)) |
8685
5952e691b975
(Fdelete_frame): Fix previous change.
Richard M. Stallman <rms@gnu.org>
parents:
8666
diff
changeset
|
959 free (FRAME_DELETEN_COST (f)); |
8666
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
960 if (FRAME_INSERTN_COST (f)) |
8685
5952e691b975
(Fdelete_frame): Fix previous change.
Richard M. Stallman <rms@gnu.org>
parents:
8666
diff
changeset
|
961 free (FRAME_INSERTN_COST (f)); |
8666
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
962 if (FRAME_DELETE_COST (f)) |
8685
5952e691b975
(Fdelete_frame): Fix previous change.
Richard M. Stallman <rms@gnu.org>
parents:
8666
diff
changeset
|
963 free (FRAME_DELETE_COST (f)); |
8666
844edbc22875
(Fdelete_frame): Free the frame's glyphs arrays.
Richard M. Stallman <rms@gnu.org>
parents:
8586
diff
changeset
|
964 |
1809
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
965 /* 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
|
966 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
|
967 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
|
968 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
|
969 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
|
970 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
971 /* I think this should be done with a hook. */ |
363 | 972 #ifdef HAVE_X_WINDOWS |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
973 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
|
974 x_destroy_window (f); |
363 | 975 #endif |
976 | |
1809
69b3ee873a9b
* frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents:
1784
diff
changeset
|
977 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
|
978 |
765 | 979 /* If we've deleted the last_nonminibuf_frame, then try to find |
363 | 980 another one. */ |
765 | 981 if (f == last_nonminibuf_frame) |
363 | 982 { |
765 | 983 Lisp_Object frames; |
708 | 984 |
765 | 985 last_nonminibuf_frame = 0; |
363 | 986 |
765 | 987 for (frames = Vframe_list; |
988 CONSP (frames); | |
989 frames = XCONS (frames)->cdr) | |
363 | 990 { |
765 | 991 f = XFRAME (XCONS (frames)->car); |
992 if (!FRAME_MINIBUF_ONLY_P (f)) | |
363 | 993 { |
765 | 994 last_nonminibuf_frame = f; |
363 | 995 break; |
996 } | |
997 } | |
998 } | |
286 | 999 |
765 | 1000 /* If we've deleted Vdefault_minibuffer_frame, try to find another |
1001 one. Prefer minibuffer-only frames, but also notice frames | |
708 | 1002 with other windows. */ |
765 | 1003 if (EQ (frame, Vdefault_minibuffer_frame)) |
708 | 1004 { |
765 | 1005 Lisp_Object frames; |
708 | 1006 |
765 | 1007 /* The last frame we saw with a minibuffer, minibuffer-only or not. */ |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
1008 Lisp_Object frame_with_minibuf; |
708 | 1009 |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
1010 frame_with_minibuf = Qnil; |
765 | 1011 for (frames = Vframe_list; |
1012 CONSP (frames); | |
1013 frames = XCONS (frames)->cdr) | |
708 | 1014 { |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
1015 Lisp_Object this; |
708 | 1016 |
6500
551bff5cffde
(next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents:
6486
diff
changeset
|
1017 this = XCONS (frames)->car; |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
1018 if (!FRAMEP (this)) |
708 | 1019 abort (); |
765 | 1020 f = XFRAME (this); |
708 | 1021 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1022 if (FRAME_HAS_MINIBUF_P (f)) |
708 | 1023 { |
765 | 1024 frame_with_minibuf = this; |
1025 if (FRAME_MINIBUF_ONLY_P (f)) | |
708 | 1026 break; |
1027 } | |
1028 } | |
1029 | |
765 | 1030 /* We know that there must be some frame with a minibuffer out |
1031 there. If this were not true, all of the frames present | |
708 | 1032 would have to be minibufferless, which implies that at some |
765 | 1033 point their minibuffer frames must have been deleted, but |
708 | 1034 that is prohibited at the top; you can't delete surrogate |
765 | 1035 minibuffer frames. */ |
1036 if (NILP (frame_with_minibuf)) | |
708 | 1037 abort (); |
1038 | |
765 | 1039 Vdefault_minibuffer_frame = frame_with_minibuf; |
708 | 1040 } |
1041 | |
286 | 1042 return Qnil; |
1043 } | |
1044 | |
1045 /* Return mouse position in character cell units. */ | |
1046 | |
454 | 1047 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, |
765 | 1048 "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
|
1049 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
|
1050 upper-left corner.\n\ |
454 | 1051 If Emacs is running on a mouseless terminal or hasn't been programmed\n\ |
765 | 1052 to read the mouse position, it returns the selected frame for FRAME\n\ |
454 | 1053 and nil for X and Y.") |
1054 () | |
286 | 1055 { |
765 | 1056 FRAME_PTR f; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1057 Lisp_Object lispy_dummy; |
1989
b1c1ab20f810
Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents:
1920
diff
changeset
|
1058 enum scroll_bar_part party_dummy; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1059 Lisp_Object x, y; |
6054
24ffc4bc4067
(Fmouse_position): Convert to glyph units.
Richard M. Stallman <rms@gnu.org>
parents:
6012
diff
changeset
|
1060 int col, row; |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1061 unsigned long long_dummy; |
286 | 1062 |
3658
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1063 f = selected_frame; |
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1064 x = y = Qnil; |
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1065 |
11025
6c5aef697fbe
(Fmouse_position): Do work only if HAVE_MOUSE.
Karl Heuer <kwzh@gnu.org>
parents:
11017
diff
changeset
|
1066 #ifdef HAVE_MOUSE |
3658
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1067 /* It's okay for the hook to refrain from storing anything. */ |
454 | 1068 if (mouse_position_hook) |
11126
786f1c82a38e
(Fmouse_position--both definitions): Pass 0 for `insist'.
Richard M. Stallman <rms@gnu.org>
parents:
11025
diff
changeset
|
1069 (*mouse_position_hook) (&f, 0, |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1070 &lispy_dummy, &party_dummy, |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1071 &x, &y, |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1072 &long_dummy); |
6854
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1073 if (! NILP (x)) |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1074 { |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1075 col = XINT (x); |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1076 row = XINT (y); |
6924 | 1077 pixel_to_glyph_coords (f, col, row, &col, &row, 0, 1); |
6854
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1078 XSETINT (x, col); |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1079 XSETINT (y, row); |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
1080 } |
11025
6c5aef697fbe
(Fmouse_position): Do work only if HAVE_MOUSE.
Karl Heuer <kwzh@gnu.org>
parents:
11017
diff
changeset
|
1081 #endif |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
1082 XSETFRAME (lispy_dummy, f); |
3658
c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents:
3591
diff
changeset
|
1083 return Fcons (lispy_dummy, Fcons (x, y)); |
286 | 1084 } |
1085 | |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1086 DEFUN ("mouse-pixel-position", Fmouse_pixel_position, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1087 Smouse_pixel_position, 0, 0, 0, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1088 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1089 The position is given in pixel units, where (0, 0) is the\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1090 upper-left corner.\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1091 If Emacs is running on a mouseless terminal or hasn't been programmed\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1092 to read the mouse position, it returns the selected frame for FRAME\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1093 and nil for X and Y.") |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1094 () |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1095 { |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1096 FRAME_PTR f; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1097 Lisp_Object lispy_dummy; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1098 enum scroll_bar_part party_dummy; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1099 Lisp_Object x, y; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1100 int col, row; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1101 unsigned long long_dummy; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1102 |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1103 f = selected_frame; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1104 x = y = Qnil; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1105 |
11126
786f1c82a38e
(Fmouse_position--both definitions): Pass 0 for `insist'.
Richard M. Stallman <rms@gnu.org>
parents:
11025
diff
changeset
|
1106 #ifdef HAVE_MOUSE |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1107 /* It's okay for the hook to refrain from storing anything. */ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1108 if (mouse_position_hook) |
11126
786f1c82a38e
(Fmouse_position--both definitions): Pass 0 for `insist'.
Richard M. Stallman <rms@gnu.org>
parents:
11025
diff
changeset
|
1109 (*mouse_position_hook) (&f, 0, |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1110 &lispy_dummy, &party_dummy, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1111 &x, &y, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1112 &long_dummy); |
11126
786f1c82a38e
(Fmouse_position--both definitions): Pass 0 for `insist'.
Richard M. Stallman <rms@gnu.org>
parents:
11025
diff
changeset
|
1113 #endif |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
1114 XSETFRAME (lispy_dummy, f); |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1115 return Fcons (lispy_dummy, Fcons (x, y)); |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1116 } |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1117 |
286 | 1118 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, |
3694 | 1119 "Move the mouse pointer to the center of character cell (X,Y) in FRAME.\n\ |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1120 WARNING: If you use this under X windows,\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1121 you should call `unfocus-frame' afterwards.") |
765 | 1122 (frame, x, y) |
1123 Lisp_Object frame, x, y; | |
286 | 1124 { |
765 | 1125 CHECK_LIVE_FRAME (frame, 0); |
286 | 1126 CHECK_NUMBER (x, 2); |
1127 CHECK_NUMBER (y, 1); | |
1128 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1129 /* I think this should be done with a hook. */ |
286 | 1130 #ifdef HAVE_X_WINDOWS |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1131 if (FRAME_X_P (XFRAME (frame))) |
286 | 1132 /* Warping the mouse will cause enternotify and focus events. */ |
765 | 1133 x_set_mouse_position (XFRAME (frame), x, y); |
286 | 1134 #endif |
1135 | |
1136 return Qnil; | |
1137 } | |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1138 |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1139 DEFUN ("set-mouse-pixel-position", Fset_mouse_pixel_position, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1140 Sset_mouse_pixel_position, 3, 3, 0, |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1141 "Move the mouse pointer to pixel position (X,Y) in FRAME.\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1142 WARNING: If you use this under X windows,\n\ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1143 you should call `unfocus-frame' afterwards.") |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1144 (frame, x, y) |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1145 Lisp_Object frame, x, y; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1146 { |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1147 CHECK_LIVE_FRAME (frame, 0); |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1148 CHECK_NUMBER (x, 2); |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1149 CHECK_NUMBER (y, 1); |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1150 |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1151 /* I think this should be done with a hook. */ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1152 #ifdef HAVE_X_WINDOWS |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1153 if (FRAME_X_P (XFRAME (frame))) |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1154 /* Warping the mouse will cause enternotify and focus events. */ |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1155 x_set_mouse_pixel_position (XFRAME (frame), x, y); |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1156 #endif |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1157 |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1158 return Qnil; |
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1159 } |
286 | 1160 |
765 | 1161 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
|
1162 0, 1, "", |
765 | 1163 "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
|
1164 If omitted, FRAME defaults to the currently selected frame.") |
765 | 1165 (frame) |
1166 Lisp_Object frame; | |
286 | 1167 { |
872 | 1168 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
1169 XSETFRAME (frame, selected_frame); |
872 | 1170 |
765 | 1171 CHECK_LIVE_FRAME (frame, 0); |
286 | 1172 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1173 /* 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
|
1174 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1175 if (FRAME_X_P (XFRAME (frame))) |
5105
9b41ddf1b5f7
(Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4961
diff
changeset
|
1176 { |
9b41ddf1b5f7
(Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4961
diff
changeset
|
1177 FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); |
9b41ddf1b5f7
(Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4961
diff
changeset
|
1178 x_make_frame_visible (XFRAME (frame)); |
9b41ddf1b5f7
(Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4961
diff
changeset
|
1179 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1180 #endif |
286 | 1181 |
7900
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1182 /* Make menu bar update for the Buffers and Frams menus. */ |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1183 windows_or_buffers_changed++; |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1184 |
765 | 1185 return frame; |
286 | 1186 } |
1187 | |
765 | 1188 DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible, |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1189 0, 2, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
1190 "Make the frame FRAME invisible (assuming it is an X-window).\n\ |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1191 If omitted, FRAME defaults to the currently selected frame.\n\ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1192 Normally you may not make FRAME invisible if all other frames are invisible,\n\ |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1193 but if the second optional argument FORCE is non-nil, you may do so.") |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1194 (frame, force) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1195 Lisp_Object frame, force; |
286 | 1196 { |
872 | 1197 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
1198 XSETFRAME (frame, selected_frame); |
872 | 1199 |
765 | 1200 CHECK_LIVE_FRAME (frame, 0); |
286 | 1201 |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1202 if (NILP (force) && !other_visible_frames (XFRAME (frame))) |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1203 error ("Attempt to make invisible the sole visible or iconified frame"); |
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1204 |
8586
c78654909acf
(Fmake_frame_invisible, Ficonify_frame): Don't switch frames.
Karl Heuer <kwzh@gnu.org>
parents:
8264
diff
changeset
|
1205 #if 0 /* This isn't logically necessary, and it can do GC. */ |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1206 /* Don't let the frame remain selected. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1207 if (XFRAME (frame) == selected_frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1208 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
8586
c78654909acf
(Fmake_frame_invisible, Ficonify_frame): Don't switch frames.
Karl Heuer <kwzh@gnu.org>
parents:
8264
diff
changeset
|
1209 #endif |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1210 |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1211 /* 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
|
1212 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1213 { |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1214 Fset_window_buffer (selected_frame->minibuffer_window, |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1215 XWINDOW (minibuf_window)->buffer); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1216 minibuf_window = selected_frame->minibuffer_window; |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1217 } |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1218 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1219 /* 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
|
1220 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1221 if (FRAME_X_P (XFRAME (frame))) |
765 | 1222 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
|
1223 #endif |
286 | 1224 |
7900
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1225 /* Make menu bar update for the Buffers and Frams menus. */ |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1226 windows_or_buffers_changed++; |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1227 |
286 | 1228 return Qnil; |
1229 } | |
1230 | |
765 | 1231 DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, |
872 | 1232 0, 1, "", |
1251
4e556fda7a4d
* frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents:
1118
diff
changeset
|
1233 "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
|
1234 If omitted, FRAME defaults to the currently selected frame.") |
765 | 1235 (frame) |
1236 Lisp_Object frame; | |
286 | 1237 { |
872 | 1238 if (NILP (frame)) |
9268
cb55d0155265
(make_minibuffer_frame, make_terminal_frame, Fselected_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9214
diff
changeset
|
1239 XSETFRAME (frame, selected_frame); |
872 | 1240 |
765 | 1241 CHECK_LIVE_FRAME (frame, 0); |
286 | 1242 |
8586
c78654909acf
(Fmake_frame_invisible, Ficonify_frame): Don't switch frames.
Karl Heuer <kwzh@gnu.org>
parents:
8264
diff
changeset
|
1243 #if 0 /* This isn't logically necessary, and it can do GC. */ |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1244 /* Don't let the frame remain selected. */ |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1245 if (XFRAME (frame) == selected_frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1246 Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
8586
c78654909acf
(Fmake_frame_invisible, Ficonify_frame): Don't switch frames.
Karl Heuer <kwzh@gnu.org>
parents:
8264
diff
changeset
|
1247 #endif |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1248 |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1249 /* 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
|
1250 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1251 { |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1252 Fset_window_buffer (selected_frame->minibuffer_window, |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1253 XWINDOW (minibuf_window)->buffer); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1254 minibuf_window = selected_frame->minibuffer_window; |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1255 } |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1256 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1257 /* 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
|
1258 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1259 if (FRAME_X_P (XFRAME (frame))) |
765 | 1260 x_iconify_frame (XFRAME (frame)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1261 #endif |
286 | 1262 |
7900
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1263 /* Make menu bar update for the Buffers and Frams menus. */ |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1264 windows_or_buffers_changed++; |
60795e826dad
Put stdio.h after config.h.
Richard M. Stallman <rms@gnu.org>
parents:
7646
diff
changeset
|
1265 |
286 | 1266 return Qnil; |
1267 } | |
1268 | |
765 | 1269 DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, |
286 | 1270 1, 1, 0, |
765 | 1271 "Return t if FRAME is now \"visible\" (actually in use for display).\n\ |
1272 A frame that is not \"visible\" is not updated and, if it works through\n\ | |
286 | 1273 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
|
1274 Return the symbol `icon' if frame is visible only as an icon.") |
765 | 1275 (frame) |
1276 Lisp_Object frame; | |
286 | 1277 { |
765 | 1278 CHECK_LIVE_FRAME (frame, 0); |
286 | 1279 |
6012
650c0f231d17
(Fframe_visible_p): Do FRAME_SAMPLE_VISIBILITY first.
Richard M. Stallman <rms@gnu.org>
parents:
5925
diff
changeset
|
1280 FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); |
650c0f231d17
(Fframe_visible_p): Do FRAME_SAMPLE_VISIBILITY first.
Richard M. Stallman <rms@gnu.org>
parents:
5925
diff
changeset
|
1281 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1282 if (FRAME_VISIBLE_P (XFRAME (frame))) |
286 | 1283 return Qt; |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1284 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
|
1285 return Qicon; |
286 | 1286 return Qnil; |
1287 } | |
1288 | |
765 | 1289 DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, |
286 | 1290 0, 0, 0, |
765 | 1291 "Return a list of all frames now \"visible\" (being updated).") |
286 | 1292 () |
1293 { | |
765 | 1294 Lisp_Object tail, frame; |
1295 struct frame *f; | |
286 | 1296 Lisp_Object value; |
1297 | |
1298 value = Qnil; | |
765 | 1299 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
286 | 1300 { |
765 | 1301 frame = XCONS (tail)->car; |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
1302 if (!FRAMEP (frame)) |
286 | 1303 continue; |
765 | 1304 f = XFRAME (frame); |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1305 if (FRAME_VISIBLE_P (f)) |
765 | 1306 value = Fcons (frame, value); |
286 | 1307 } |
1308 return value; | |
1309 } | |
363 | 1310 |
1311 | |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1312 DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 1, 1, "", |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1313 "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
|
1314 If FRAME is invisible, make it visible.\n\ |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1315 If you don't specify a frame, the selected frame is used.\n\ |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1316 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
|
1317 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
|
1318 (frame) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1319 Lisp_Object frame; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1320 { |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1321 if (NILP (frame)) |
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1322 XSETFRAME (frame, selected_frame); |
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1323 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1324 CHECK_LIVE_FRAME (frame, 0); |
4961
dd67510308ae
(Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents:
4798
diff
changeset
|
1325 |
dd67510308ae
(Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents:
4798
diff
changeset
|
1326 /* Do like the documentation says. */ |
dd67510308ae
(Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents:
4798
diff
changeset
|
1327 Fmake_frame_visible (frame); |
dd67510308ae
(Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents:
4798
diff
changeset
|
1328 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1329 if (frame_raise_lower_hook) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1330 (*frame_raise_lower_hook) (XFRAME (frame), 1); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1331 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1332 return Qnil; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1333 } |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1334 |
2282
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
1335 /* Should we have a corresponding function called Flower_Power? */ |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1336 DEFUN ("lower-frame", Flower_frame, Slower_frame, 1, 1, "", |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1337 "Send FRAME to the back, so it is occluded by any frames that overlap it.\n\ |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1338 If you don't specify a frame, the selected frame is used.\n\ |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1339 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
|
1340 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
|
1341 (frame) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1342 Lisp_Object frame; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1343 { |
11211
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1344 if (NILP (frame)) |
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1345 XSETFRAME (frame, selected_frame); |
2f9a24a4c9eb
(Fraise_frame, Flower_frame): Now interactive.
Richard M. Stallman <rms@gnu.org>
parents:
11169
diff
changeset
|
1346 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1347 CHECK_LIVE_FRAME (frame, 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1348 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1349 if (frame_raise_lower_hook) |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1350 (*frame_raise_lower_hook) (XFRAME (frame), 0); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1351 |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1352 return Qnil; |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1353 } |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1354 |
363 | 1355 |
765 | 1356 DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, |
363 | 1357 1, 2, 0, |
765 | 1358 "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
|
1359 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
|
1360 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
|
1361 FOCUS-FRAME after reading an event typed at FRAME.\n\ |
363 | 1362 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1363 If FOCUS-FRAME is omitted or nil, any existing redirection is\n\ |
765 | 1364 cancelled, and the frame again receives its own keystrokes.\n\ |
363 | 1365 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1366 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
|
1367 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
|
1368 minibuffer window.\n\ |
363 | 1369 \n\ |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1370 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
|
1371 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
|
1372 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
|
1373 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
|
1374 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
|
1375 \n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1376 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
|
1377 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
|
1378 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
|
1379 \n\ |
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1380 The redirection lasts until `redirect-frame-focus' is called to change it.") |
765 | 1381 (frame, focus_frame) |
1382 Lisp_Object frame, focus_frame; | |
363 | 1383 { |
3970
020fe391d5c1
* frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents:
3834
diff
changeset
|
1384 /* Note that we don't check for a live frame here. It's reasonable |
020fe391d5c1
* frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents:
3834
diff
changeset
|
1385 to redirect the focus of a frame you're about to delete, if you |
020fe391d5c1
* frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents:
3834
diff
changeset
|
1386 know what other frame should receive those keystrokes. */ |
020fe391d5c1
* frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents:
3834
diff
changeset
|
1387 CHECK_FRAME (frame, 0); |
454 | 1388 |
1709
b86b3237e017
* frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents:
1691
diff
changeset
|
1389 if (! NILP (focus_frame)) |
765 | 1390 CHECK_LIVE_FRAME (focus_frame, 1); |
363 | 1391 |
765 | 1392 XFRAME (frame)->focus_frame = focus_frame; |
363 | 1393 |
3283
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1394 /* 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
|
1395 #ifdef HAVE_X_WINDOWS |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1396 if (!NILP (focus_frame) && ! EQ (focus_frame, frame) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1397 && FRAME_X_P (XFRAME (focus_frame))) |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1398 Ffocus_frame (focus_frame); |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1399 #endif |
e2a40a3baa4b
(Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents:
2961
diff
changeset
|
1400 |
765 | 1401 if (frame_rehighlight_hook) |
1402 (*frame_rehighlight_hook) (); | |
363 | 1403 |
1404 return Qnil; | |
1405 } | |
1406 | |
1407 | |
765 | 1408 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0, |
1409 "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
|
1410 This returns nil if FRAME's focus is not redirected.\n\ |
765 | 1411 See `redirect-frame-focus'.") |
1412 (frame) | |
1413 Lisp_Object frame; | |
363 | 1414 { |
765 | 1415 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
|
1416 |
765 | 1417 return FRAME_FOCUS_FRAME (XFRAME (frame)); |
363 | 1418 } |
1419 | |
1420 | |
286 | 1421 |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1422 /* Return the value of frame parameter PROP in frame FRAME. */ |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1423 |
286 | 1424 Lisp_Object |
765 | 1425 get_frame_param (frame, prop) |
1426 register struct frame *frame; | |
286 | 1427 Lisp_Object prop; |
1428 { | |
1429 register Lisp_Object tem; | |
1430 | |
765 | 1431 tem = Fassq (prop, frame->param_alist); |
286 | 1432 if (EQ (tem, Qnil)) |
1433 return tem; | |
1434 return Fcdr (tem); | |
1435 } | |
1436 | |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1437 /* Return the buffer-predicate of the selected frame. */ |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1438 |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1439 Lisp_Object |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1440 frame_buffer_predicate () |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1441 { |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1442 return selected_frame->buffer_predicate; |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1443 } |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1444 |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1445 /* Modify the alist in *ALISTPTR to associate PROP with VAL. |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1446 If the alist already has an element for PROP, we change it. */ |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1447 |
286 | 1448 void |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1449 store_in_alist (alistptr, prop, val) |
286 | 1450 Lisp_Object *alistptr, val; |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1451 Lisp_Object prop; |
286 | 1452 { |
1453 register Lisp_Object tem; | |
1454 | |
1455 tem = Fassq (prop, *alistptr); | |
1456 if (EQ (tem, Qnil)) | |
1457 *alistptr = Fcons (Fcons (prop, val), *alistptr); | |
1458 else | |
1459 Fsetcdr (tem, val); | |
1460 } | |
1461 | |
1462 void | |
765 | 1463 store_frame_param (f, prop, val) |
1464 struct frame *f; | |
286 | 1465 Lisp_Object prop, val; |
1466 { | |
1467 register Lisp_Object tem; | |
1468 | |
765 | 1469 tem = Fassq (prop, f->param_alist); |
286 | 1470 if (EQ (tem, Qnil)) |
765 | 1471 f->param_alist = Fcons (Fcons (prop, val), f->param_alist); |
286 | 1472 else |
1473 Fsetcdr (tem, val); | |
539 | 1474 |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1475 if (EQ (prop, Qbuffer_predicate)) |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1476 f->buffer_predicate = val; |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1477 |
9127
0b4836daa8e1
(Fframep, make_frame_without_minibuffer, do_switch_frame, prev_frame,
Karl Heuer <kwzh@gnu.org>
parents:
9032
diff
changeset
|
1478 if (EQ (prop, Qminibuffer) && WINDOWP (val)) |
539 | 1479 { |
1480 if (! MINI_WINDOW_P (XWINDOW (val))) | |
1481 error ("Surrogate minibuffer windows must be minibuffer windows."); | |
1482 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1483 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
|
1484 error ("can't change the surrogate minibuffer of a frame with its own minibuffer"); |
539 | 1485 |
1486 /* Install the chosen minibuffer window, with proper buffer. */ | |
765 | 1487 f->minibuffer_window = val; |
539 | 1488 } |
286 | 1489 } |
1490 | |
765 | 1491 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, |
1492 "Return the parameters-alist of frame FRAME.\n\ | |
286 | 1493 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.\n\ |
777 | 1494 The meaningful PARMs depend on the kind of frame.\n\ |
1495 If FRAME is omitted, return information on the currently selected frame.") | |
765 | 1496 (frame) |
1497 Lisp_Object frame; | |
286 | 1498 { |
1499 Lisp_Object alist; | |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1500 FRAME_PTR f; |
286 | 1501 |
765 | 1502 if (EQ (frame, Qnil)) |
1503 f = selected_frame; | |
286 | 1504 else |
1505 { | |
765 | 1506 CHECK_FRAME (frame, 0); |
1507 f = XFRAME (frame); | |
286 | 1508 } |
1509 | |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1510 if (!FRAME_LIVE_P (f)) |
286 | 1511 return Qnil; |
1512 | |
765 | 1513 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
|
1514 store_in_alist (&alist, Qname, f->name); |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1515 store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1516 store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1517 store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1518 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
|
1519 (! FRAME_HAS_MINIBUF_P (f) ? Qnil |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1520 : FRAME_MINIBUF_ONLY_P (f) ? Qonly |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1521 : FRAME_MINIBUF_WINDOW (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1522 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); |
286 | 1523 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1524 /* 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
|
1525 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1526 if (FRAME_X_P (f)) |
765 | 1527 x_report_frame_params (f, &alist); |
8244
15d4c2bd29e6
[MULTI_FRAME] (Fframe_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
8168
diff
changeset
|
1528 else |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1529 #endif |
8904
af3ff2dbaddd
(Fframe_parameters): Fix Lisp_Object vs. int problems.
Karl Heuer <kwzh@gnu.org>
parents:
8685
diff
changeset
|
1530 { |
af3ff2dbaddd
(Fframe_parameters): Fix Lisp_Object vs. int problems.
Karl Heuer <kwzh@gnu.org>
parents:
8685
diff
changeset
|
1531 /* This ought to be correct in f->param_alist for an X frame. */ |
af3ff2dbaddd
(Fframe_parameters): Fix Lisp_Object vs. int problems.
Karl Heuer <kwzh@gnu.org>
parents:
8685
diff
changeset
|
1532 Lisp_Object lines; |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
1533 XSETFASTINT (lines, FRAME_MENU_BAR_LINES (f)); |
8904
af3ff2dbaddd
(Fframe_parameters): Fix Lisp_Object vs. int problems.
Karl Heuer <kwzh@gnu.org>
parents:
8685
diff
changeset
|
1534 store_in_alist (&alist, Qmenu_bar_lines, lines); |
af3ff2dbaddd
(Fframe_parameters): Fix Lisp_Object vs. int problems.
Karl Heuer <kwzh@gnu.org>
parents:
8685
diff
changeset
|
1535 } |
286 | 1536 return alist; |
1537 } | |
1538 | |
765 | 1539 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, |
1540 Smodify_frame_parameters, 2, 2, 0, | |
1541 "Modify the parameters of frame FRAME according to ALIST.\n\ | |
286 | 1542 ALIST is an alist of parameters to change and their new values.\n\ |
1543 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\ | |
765 | 1544 The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.") |
1545 (frame, alist) | |
1546 Lisp_Object frame, alist; | |
286 | 1547 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1548 FRAME_PTR f; |
286 | 1549 register Lisp_Object tail, elt, prop, val; |
1550 | |
765 | 1551 if (EQ (frame, Qnil)) |
1552 f = selected_frame; | |
286 | 1553 else |
1554 { | |
765 | 1555 CHECK_LIVE_FRAME (frame, 0); |
1556 f = XFRAME (frame); | |
286 | 1557 } |
1558 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1559 /* 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
|
1560 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1561 if (FRAME_X_P (f)) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1562 x_set_frame_parameters (f, alist); |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1563 else |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1564 #endif |
286 | 1565 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) |
1566 { | |
1567 elt = Fcar (tail); | |
1568 prop = Fcar (elt); | |
1569 val = Fcdr (elt); | |
765 | 1570 store_frame_param (f, prop, val); |
286 | 1571 } |
1572 | |
1573 return Qnil; | |
1574 } | |
1575 | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1576 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
|
1577 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1578 "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
|
1579 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
|
1580 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
|
1581 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1582 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1583 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1584 struct frame *f; |
286 | 1585 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1586 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1587 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1588 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1589 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1590 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1591 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1592 } |
777 | 1593 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1594 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1595 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1596 return make_number (x_char_height (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1597 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1598 #endif |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1599 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1600 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1601 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1602 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1603 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
|
1604 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1605 "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
|
1606 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
|
1607 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
|
1608 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
|
1609 For a terminal screen, the value is always 1.") |
765 | 1610 (frame) |
1611 Lisp_Object frame; | |
286 | 1612 { |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1613 struct frame *f; |
286 | 1614 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1615 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1616 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1617 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1618 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1619 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1620 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1621 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1622 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1623 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1624 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1625 return make_number (x_char_width (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1626 else |
777 | 1627 #endif |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1628 return make_number (1); |
286 | 1629 } |
1630 | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1631 DEFUN ("frame-pixel-height", Fframe_pixel_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1632 Sframe_pixel_height, 0, 1, 0, |
3676 | 1633 "Return a FRAME's height in pixels.\n\ |
1634 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
|
1635 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
|
1636 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1637 Lisp_Object frame; |
286 | 1638 { |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1639 struct frame *f; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1640 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1641 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1642 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1643 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1644 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1645 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1646 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1647 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1648 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1649 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1650 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1651 return make_number (x_pixel_height (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1652 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1653 #endif |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1654 return make_number (FRAME_HEIGHT (f)); |
286 | 1655 } |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1656 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1657 DEFUN ("frame-pixel-width", Fframe_pixel_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1658 Sframe_pixel_width, 0, 1, 0, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1659 "Return FRAME's width in pixels.\n\ |
3676 | 1660 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
|
1661 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
|
1662 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1663 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1664 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1665 struct frame *f; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1666 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1667 if (NILP (frame)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1668 f = selected_frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1669 else |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1670 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1671 CHECK_FRAME (frame, 0); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1672 f = XFRAME (frame); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1673 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1674 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1675 #ifdef HAVE_X_WINDOWS |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1676 if (FRAME_X_P (f)) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1677 return make_number (x_pixel_width (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1678 else |
777 | 1679 #endif |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1680 return make_number (FRAME_WIDTH (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1681 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1682 |
765 | 1683 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, |
1684 "Specify that the frame FRAME has LINES lines.\n\ | |
286 | 1685 Optional third arg non-nil means that redisplay should use LINES lines\n\ |
765 | 1686 but that the idea of the actual height of the frame should not be changed.") |
1687 (frame, rows, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1688 Lisp_Object frame, rows, pretend; |
286 | 1689 { |
765 | 1690 register struct frame *f; |
286 | 1691 |
1692 CHECK_NUMBER (rows, 0); | |
765 | 1693 if (NILP (frame)) |
1694 f = selected_frame; | |
286 | 1695 else |
1696 { | |
765 | 1697 CHECK_LIVE_FRAME (frame, 0); |
1698 f = XFRAME (frame); | |
286 | 1699 } |
1700 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1701 /* 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
|
1702 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1703 if (FRAME_X_P (f)) |
286 | 1704 { |
9831
b64a82db92a3
(Fset_frame_height): Compare against height, not width.
Karl Heuer <kwzh@gnu.org>
parents:
9730
diff
changeset
|
1705 if (XINT (rows) != f->height) |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1706 x_set_window_size (f, 1, f->width, XINT (rows)); |
286 | 1707 } |
1708 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1709 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1710 change_frame_size (f, XINT (rows), 0, !NILP (pretend), 0); |
286 | 1711 return Qnil; |
1712 } | |
1713 | |
765 | 1714 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, |
1715 "Specify that the frame FRAME has COLS columns.\n\ | |
286 | 1716 Optional third arg non-nil means that redisplay should use COLS columns\n\ |
765 | 1717 but that the idea of the actual width of the frame should not be changed.") |
1718 (frame, cols, pretend) | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1719 Lisp_Object frame, cols, pretend; |
286 | 1720 { |
765 | 1721 register struct frame *f; |
286 | 1722 CHECK_NUMBER (cols, 0); |
765 | 1723 if (NILP (frame)) |
1724 f = selected_frame; | |
286 | 1725 else |
1726 { | |
765 | 1727 CHECK_LIVE_FRAME (frame, 0); |
1728 f = XFRAME (frame); | |
286 | 1729 } |
1730 | |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1731 /* 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
|
1732 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1733 if (FRAME_X_P (f)) |
286 | 1734 { |
765 | 1735 if (XINT (cols) != f->width) |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1736 x_set_window_size (f, 1, XINT (cols), f->height); |
286 | 1737 } |
1738 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1739 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1740 change_frame_size (f, 0, XINT (cols), !NILP (pretend), 0); |
286 | 1741 return Qnil; |
1742 } | |
1743 | |
765 | 1744 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, |
1745 "Sets size of FRAME to COLS by ROWS, measured in characters.") | |
1746 (frame, cols, rows) | |
1747 Lisp_Object frame, cols, rows; | |
286 | 1748 { |
765 | 1749 register struct frame *f; |
286 | 1750 int mask; |
1751 | |
765 | 1752 CHECK_LIVE_FRAME (frame, 0); |
286 | 1753 CHECK_NUMBER (cols, 2); |
1754 CHECK_NUMBER (rows, 1); | |
765 | 1755 f = XFRAME (frame); |
286 | 1756 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1757 /* 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
|
1758 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1759 if (FRAME_X_P (f)) |
286 | 1760 { |
765 | 1761 if (XINT (rows) != f->height || XINT (cols) != f->width) |
5925
806e876cacb4
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents:
5552
diff
changeset
|
1762 x_set_window_size (f, 1, XINT (cols), XINT (rows)); |
286 | 1763 } |
1764 else | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1765 #endif |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1766 change_frame_size (f, XINT (rows), XINT (cols), 0, 0); |
286 | 1767 |
1768 return Qnil; | |
1769 } | |
1770 | |
765 | 1771 DEFUN ("set-frame-position", Fset_frame_position, |
1772 Sset_frame_position, 3, 3, 0, | |
1773 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\ | |
4341
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
1774 This is actually the position of the upper left corner of the frame.\n\ |
d07ef5ea3b58
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents:
4227
diff
changeset
|
1775 Negative values for XOFFSET or YOFFSET are interpreted relative to\n\ |
4412
12c4e5b53463
(Fset_frame_position): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4341
diff
changeset
|
1776 the rightmost or bottommost possible position (that stays within the screen).") |
765 | 1777 (frame, xoffset, yoffset) |
1778 Lisp_Object frame, xoffset, yoffset; | |
286 | 1779 { |
765 | 1780 register struct frame *f; |
286 | 1781 int mask; |
1782 | |
765 | 1783 CHECK_LIVE_FRAME (frame, 0); |
286 | 1784 CHECK_NUMBER (xoffset, 1); |
1785 CHECK_NUMBER (yoffset, 2); | |
765 | 1786 f = XFRAME (frame); |
286 | 1787 |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1788 /* 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
|
1789 #ifdef HAVE_X_WINDOWS |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1790 if (FRAME_X_P (f)) |
6921
50060d486c47
(Fset_frame_position): Pass new arg to x_set_offset.
Richard M. Stallman <rms@gnu.org>
parents:
6854
diff
changeset
|
1791 x_set_offset (f, XINT (xoffset), XINT (yoffset), 1); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1792 #endif |
286 | 1793 |
1794 return Qt; | |
1795 } | |
777 | 1796 |
286 | 1797 |
765 | 1798 choose_minibuf_frame () |
286 | 1799 { |
765 | 1800 /* For lowest-level minibuf, put it on currently selected frame |
1801 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
|
1802 |
286 | 1803 if (minibuf_level == 0 |
765 | 1804 && 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
|
1805 && !EQ (minibuf_window, selected_frame->minibuffer_window)) |
286 | 1806 { |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1807 /* 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
|
1808 window anymore. */ |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1809 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
|
1810 abort (); |
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1811 |
765 | 1812 Fset_window_buffer (selected_frame->minibuffer_window, |
286 | 1813 XWINDOW (minibuf_window)->buffer); |
765 | 1814 minibuf_window = selected_frame->minibuffer_window; |
286 | 1815 } |
1816 } | |
1817 | |
765 | 1818 syms_of_frame () |
286 | 1819 { |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1820 /*&&& init symbols here &&&*/ |
765 | 1821 Qframep = intern ("framep"); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1822 staticpro (&Qframep); |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1823 Qframe_live_p = intern ("frame-live-p"); |
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1824 staticpro (&Qframe_live_p); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1825 Qheight = intern ("height"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1826 staticpro (&Qheight); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1827 Qicon = intern ("icon"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1828 staticpro (&Qicon); |
539 | 1829 Qminibuffer = intern ("minibuffer"); |
1830 staticpro (&Qminibuffer); | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1831 Qmodeline = intern ("modeline"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1832 staticpro (&Qmodeline); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1833 Qname = intern ("name"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1834 staticpro (&Qname); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1835 Qonly = intern ("only"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1836 staticpro (&Qonly); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1837 Qunsplittable = intern ("unsplittable"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1838 staticpro (&Qunsplittable); |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
1839 Qmenu_bar_lines = intern ("menu-bar-lines"); |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
1840 staticpro (&Qmenu_bar_lines); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1841 Qwidth = intern ("width"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1842 staticpro (&Qwidth); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1843 Qx = intern ("x"); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1844 staticpro (&Qx); |
6246
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
1845 Qvisible = intern ("visible"); |
128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents:
6157
diff
changeset
|
1846 staticpro (&Qvisible); |
10207
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1847 Qbuffer_predicate = intern ("buffer-predicate"); |
e6618f52efe9
(Fmodify_frame_parameters): For non-X frames,
Richard M. Stallman <rms@gnu.org>
parents:
9972
diff
changeset
|
1848 staticpro (&Qbuffer_predicate); |
286 | 1849 |
765 | 1850 staticpro (&Vframe_list); |
286 | 1851 |
765 | 1852 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
1853 "The initial frame-object, which represents Emacs's stdout."); | |
286 | 1854 |
1855 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified, | |
765 | 1856 "Non-nil if all of emacs is iconified and frame updates are not needed."); |
286 | 1857 Vemacs_iconified = Qnil; |
1858 | |
765 | 1859 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame, |
1860 "Minibufferless frames use this frame's minibuffer.\n\ | |
454 | 1861 \n\ |
765 | 1862 Emacs cannot create minibufferless frames unless this is set to an\n\ |
454 | 1863 appropriate surrogate.\n\ |
1864 \n\ | |
1865 Emacs consults this variable only when creating minibufferless\n\ | |
765 | 1866 frames; once the frame is created, it sticks with its assigned\n\ |
454 | 1867 minibuffer, no matter what this variable is set to. This means that\n\ |
1868 this variable doesn't necessarily say anything meaningful about the\n\ | |
765 | 1869 current set of frames, or where the minibuffer is currently being\n\ |
454 | 1870 displayed."); |
765 | 1871 Vdefault_minibuffer_frame = Qnil; |
286 | 1872 |
765 | 1873 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist, |
1874 "Alist of default values for frame creation.\n\ | |
386 | 1875 These may be set in your init file, like this:\n\ |
9899
5db59a2f9370
(syms_of_frame): Doc fix for default-frame-alist.
Richard M. Stallman <rms@gnu.org>
parents:
9831
diff
changeset
|
1876 (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))\n\ |
5db59a2f9370
(syms_of_frame): Doc fix for default-frame-alist.
Richard M. Stallman <rms@gnu.org>
parents:
9831
diff
changeset
|
1877 These override values given in window system configuration data,\n\ |
5db59a2f9370
(syms_of_frame): Doc fix for default-frame-alist.
Richard M. Stallman <rms@gnu.org>
parents:
9831
diff
changeset
|
1878 including X Windows' defaults database.\n\ |
765 | 1879 For values specific to the first Emacs frame, see `initial-frame-alist'.\n\ |
1880 For values specific to the separate minibuffer frame, see\n\ | |
9899
5db59a2f9370
(syms_of_frame): Doc fix for default-frame-alist.
Richard M. Stallman <rms@gnu.org>
parents:
9831
diff
changeset
|
1881 `minibuffer-frame-alist'.\n\ |
5db59a2f9370
(syms_of_frame): Doc fix for default-frame-alist.
Richard M. Stallman <rms@gnu.org>
parents:
9831
diff
changeset
|
1882 The `menu-bar-lines' element of the list controls whether new frames\n\ |
9901
9a35aeb4a0db
(syms_of_frame): Fix typo.
Richard M. Stallman <rms@gnu.org>
parents:
9899
diff
changeset
|
1883 have menu bars; `menu-bar-mode' works by altering this element."); |
765 | 1884 Vdefault_frame_alist = Qnil; |
386 | 1885 |
11169
d0550c056e5b
[MULTI_FRAME] (Factive_minibuffer_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
11126
diff
changeset
|
1886 defsubr (&Sactive_minibuffer_window); |
765 | 1887 defsubr (&Sframep); |
1821
04fb1d3d6992
JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents:
1809
diff
changeset
|
1888 defsubr (&Sframe_live_p); |
10768
938451cf1b10
(Fmake_terminal_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10676
diff
changeset
|
1889 defsubr (&Smake_terminal_frame); |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
1890 defsubr (&Shandle_switch_frame); |
765 | 1891 defsubr (&Sselect_frame); |
1892 defsubr (&Sselected_frame); | |
1893 defsubr (&Swindow_frame); | |
1894 defsubr (&Sframe_root_window); | |
7570
20cbb114367b
(syms_of_frame): Set up frame-first-window as Lisp fn.
Richard M. Stallman <rms@gnu.org>
parents:
7307
diff
changeset
|
1895 defsubr (&Sframe_first_window); |
765 | 1896 defsubr (&Sframe_selected_window); |
7055
5e4906d964b8
(Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7025
diff
changeset
|
1897 defsubr (&Sset_frame_selected_window); |
765 | 1898 defsubr (&Sframe_list); |
1899 defsubr (&Snext_frame); | |
4424
027d3affb2f8
(Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents:
4412
diff
changeset
|
1900 defsubr (&Sprevious_frame); |
765 | 1901 defsubr (&Sdelete_frame); |
454 | 1902 defsubr (&Smouse_position); |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1903 defsubr (&Smouse_pixel_position); |
286 | 1904 defsubr (&Sset_mouse_position); |
7025
24e759919770
(Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents:
6986
diff
changeset
|
1905 defsubr (&Sset_mouse_pixel_position); |
286 | 1906 #if 0 |
765 | 1907 defsubr (&Sframe_configuration); |
1908 defsubr (&Srestore_frame_configuration); | |
286 | 1909 #endif |
765 | 1910 defsubr (&Smake_frame_visible); |
1911 defsubr (&Smake_frame_invisible); | |
1912 defsubr (&Siconify_frame); | |
1913 defsubr (&Sframe_visible_p); | |
1914 defsubr (&Svisible_frame_list); | |
2282
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
1915 defsubr (&Sraise_frame); |
f727944c11aa
* frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents:
2207
diff
changeset
|
1916 defsubr (&Slower_frame); |
765 | 1917 defsubr (&Sredirect_frame_focus); |
1918 defsubr (&Sframe_focus); | |
1919 defsubr (&Sframe_parameters); | |
1920 defsubr (&Smodify_frame_parameters); | |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1921 defsubr (&Sframe_char_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1922 defsubr (&Sframe_char_width); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1923 defsubr (&Sframe_pixel_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1924 defsubr (&Sframe_pixel_width); |
765 | 1925 defsubr (&Sset_frame_height); |
1926 defsubr (&Sset_frame_width); | |
1927 defsubr (&Sset_frame_size); | |
1928 defsubr (&Sset_frame_position); | |
286 | 1929 } |
732 | 1930 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1931 keys_of_frame () |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1932 { |
2298
872a3a2c3fed
* frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents:
2282
diff
changeset
|
1933 initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame"); |
9214
a31be7afcc83
(keys_of_frame): Make binding for delete-frame.
Richard M. Stallman <rms@gnu.org>
parents:
9127
diff
changeset
|
1934 initial_define_lispy_key (global_map, "delete-frame", "handle-delete-frame"); |
9730
a7d3e357a3f3
(keys_of_frame): Bind the new events to 'ignore, since the window manager has
Karl Heuer <kwzh@gnu.org>
parents:
9648
diff
changeset
|
1935 initial_define_lispy_key (global_map, "iconify-frame", "ignore"); |
a7d3e357a3f3
(keys_of_frame): Bind the new events to 'ignore, since the window manager has
Karl Heuer <kwzh@gnu.org>
parents:
9648
diff
changeset
|
1936 initial_define_lispy_key (global_map, "make-frame-visible", "ignore"); |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
1937 } |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
1938 |
1118
a43d53261506
* frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents:
1006
diff
changeset
|
1939 #else /* not MULTI_FRAME */ |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
1940 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1941 /* 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
|
1942 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
|
1943 |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1944 Lisp_Object Qheight; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1945 Lisp_Object Qminibuffer; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1946 Lisp_Object Qmodeline; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1947 Lisp_Object Qname; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1948 Lisp_Object Qunsplittable; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1949 Lisp_Object Qmenu_bar_lines; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1950 Lisp_Object Qwidth; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
1951 |
6355
8d624c058f31
(terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents:
6352
diff
changeset
|
1952 Lisp_Object Vterminal_frame; |
8d624c058f31
(terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents:
6352
diff
changeset
|
1953 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1954 /* 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
|
1955 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
|
1956 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
|
1957 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
1958 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
1959 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
1960 0) |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1961 () |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1962 { |
9572 | 1963 /* For your possible information, this code is unfolded into the |
1964 second WINDOW_FRAME in frame.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
|
1965 Lisp_Object tem; |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
1966 XSETFASTINT (tem, 0); |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
1967 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
|
1968 } |
8264
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1969 |
10350
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1970 DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1971 /* Don't confuse make-docfile by having two doc strings for this function. |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1972 make-docfile does not pay attention to #if, for good reason! */ |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1973 0) |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1974 (window) |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1975 Lisp_Object window; |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1976 { |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1977 /* For your possible information, this code is unfolded into the |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1978 second WINDOW_FRAME in frame.h. */ |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1979 Lisp_Object tem; |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1980 XSETFASTINT (tem, 0); |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1981 return tem; |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1982 } |
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
1983 |
8264
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1984 DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1985 0) |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1986 (frame) |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1987 Lisp_Object frame; |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1988 { |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1989 Lisp_Object w; |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1990 |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1991 w = FRAME_ROOT_WINDOW (selected_frame); |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1992 |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1993 while (NILP (XWINDOW (w)->buffer)) |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1994 { |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1995 if (! NILP (XWINDOW (w)->hchild)) |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1996 w = XWINDOW (w)->hchild; |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1997 else if (! NILP (XWINDOW (w)->vchild)) |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1998 w = XWINDOW (w)->vchild; |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
1999 else |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2000 abort (); |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2001 } |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2002 return w; |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2003 } |
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2004 |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2005 DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2006 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2007 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2008 0) |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2009 (object) |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2010 Lisp_Object object; |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2011 { |
9572 | 2012 #ifdef MSDOS |
2013 if (FRAME_X_P (object)) | |
2014 return intern ("pc"); | |
2015 #endif | |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2016 return Qnil; |
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2017 } |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2018 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2019 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2020 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2021 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2022 0) |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2023 (frame, rows, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2024 Lisp_Object frame, rows, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2025 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2026 CHECK_NUMBER (rows, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2027 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2028 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
|
2029 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2030 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2031 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2032 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2033 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2034 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2035 0) |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2036 (frame, cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2037 Lisp_Object frame, cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2038 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2039 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2040 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2041 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
|
2042 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2043 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2044 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2045 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2046 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2047 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2048 0) |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2049 (frame, cols, rows) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2050 Lisp_Object frame, cols, rows; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2051 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2052 CHECK_NUMBER (cols, 2); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2053 CHECK_NUMBER (rows, 1); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2054 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2055 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
|
2056 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2057 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2058 } |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2059 |
2207
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
2060 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
|
2061 "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
|
2062 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
|
2063 (frame) |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
2064 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
|
2065 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
2066 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
|
2067 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
2068 |
2207
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
2069 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
|
2070 "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
|
2071 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
|
2072 (frame) |
d3eca6fffc5c
* frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents:
2131
diff
changeset
|
2073 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
|
2074 { |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
2075 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
|
2076 } |
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
2077 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2078 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
|
2079 0, 1, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2080 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2081 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2082 0) |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2083 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2084 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2085 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2086 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2087 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2088 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2089 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2090 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
|
2091 0, 1, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2092 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2093 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2094 0) |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2095 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2096 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2097 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2098 return make_number (1); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2099 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2100 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2101 DEFUN ("frame-pixel-height", Fframe_pixel_height, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2102 Sframe_pixel_height, 0, 1, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2103 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2104 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2105 0) |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2106 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2107 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2108 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2109 return make_number (FRAME_HEIGHT (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2110 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2111 |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2112 DEFUN ("frame-pixel-width", Fframe_pixel_width, |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2113 Sframe_pixel_width, 0, 1, 0, |
6346
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2114 /* Don't confuse make-docfile by having two doc strings for this function. |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2115 make-docfile does not pay attention to #if, for good reason! */ |
24d32fc223d2
(framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents:
6246
diff
changeset
|
2116 0) |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2117 (frame) |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2118 Lisp_Object frame; |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2119 { |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2120 return make_number (FRAME_WIDTH (f)); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2121 } |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2122 |
987
afb21e974ed2
* frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents:
965
diff
changeset
|
2123 /* 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
|
2124 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2125 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
|
2126 "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
|
2127 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
|
2128 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
|
2129 (lines, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2130 Lisp_Object lines, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2131 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2132 CHECK_NUMBER (lines, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2133 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2134 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
|
2135 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2136 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2137 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2138 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
|
2139 "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
|
2140 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
|
2141 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
|
2142 (cols, pretend) |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2143 Lisp_Object cols, pretend; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2144 { |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2145 CHECK_NUMBER (cols, 0); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2146 |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2147 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
|
2148 return Qnil; |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2149 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2150 |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2151 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, |
6854
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
2152 /* Don't confuse make-docfile by having two doc strings for this function. |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
2153 make-docfile does not pay attention to #if, for good reason! */ |
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
2154 0) |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2155 () |
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2156 { |
9572 | 2157 #ifdef HAVE_MOUSE |
2158 if (mouse_position_hook) | |
2159 { | |
2160 FRAME_PTR f; | |
2161 Lisp_Object lispy_dummy; | |
2162 enum scroll_bar_part party_dummy; | |
2163 Lisp_Object x, y; | |
2164 unsigned long long_dummy; | |
2165 | |
11126
786f1c82a38e
(Fmouse_position--both definitions): Pass 0 for `insist'.
Richard M. Stallman <rms@gnu.org>
parents:
11025
diff
changeset
|
2166 (*mouse_position_hook) (&f, 0, |
9572 | 2167 &lispy_dummy, &party_dummy, |
2168 &x, &y, | |
2169 &long_dummy); | |
2170 return Fcons (Fselected_frame (), Fcons (x, y)); | |
2171 } | |
2172 #endif | |
6854
c976ac5d85ec
(Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents:
6806
diff
changeset
|
2173 return Fcons (Qnil, Fcons (Qnil, Qnil)); |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2174 } |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2175 |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2176 void |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2177 store_in_alist (alistptr, prop, val) |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2178 Lisp_Object *alistptr, val; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2179 Lisp_Object prop; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2180 { |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2181 register Lisp_Object tem; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2182 |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2183 tem = Fassq (prop, *alistptr); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2184 if (EQ (tem, Qnil)) |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2185 *alistptr = Fcons (Fcons (prop, val), *alistptr); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2186 else |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2187 Fsetcdr (tem, val); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2188 } |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2189 |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2190 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, |
7134
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2191 /* Don't confuse make-docfile by having two doc strings for this function. |
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2192 make-docfile does not pay attention to #if, for good reason! */ |
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2193 0) |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2194 (frame) |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2195 Lisp_Object frame; |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2196 { |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2197 Lisp_Object alist; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2198 FRAME_PTR f; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2199 |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2200 if (EQ (frame, Qnil)) |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2201 f = selected_frame; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2202 else |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2203 { |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2204 CHECK_FRAME (frame, 0); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2205 f = XFRAME (frame); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2206 } |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2207 |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2208 if (!FRAME_LIVE_P (f)) |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2209 return Qnil; |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2210 |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2211 alist = Qnil; |
9572 | 2212 #ifdef MSDOS |
2213 if (FRAME_X_P (f)) | |
2214 { | |
2215 static char *colornames[16] = | |
2216 { | |
2217 "black", "blue", "green", "cyan", "red", "magenta", "brown", | |
2218 "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan", | |
2219 "lightred", "lightmagenta", "yellow", "white" | |
2220 }; | |
2221 store_in_alist (&alist, intern ("foreground-color"), | |
2222 build_string (colornames[FRAME_FOREGROUND_PIXEL (f)])); | |
2223 store_in_alist (&alist, intern ("background-color"), | |
2224 build_string (colornames[FRAME_BACKGROUND_PIXEL (f)])); | |
2225 } | |
2226 #endif | |
2227 store_in_alist (&alist, intern ("font"), build_string ("default")); | |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2228 store_in_alist (&alist, Qname, build_string ("emacs")); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2229 store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2230 store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2231 store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2232 store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2233 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2234 store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2235 |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2236 return alist; |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2237 } |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2238 |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2239 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2240 Smodify_frame_parameters, 2, 2, 0, |
7134
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2241 /* Don't confuse make-docfile by having two doc strings for this function. |
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2242 make-docfile does not pay attention to #if, for good reason! */ |
3ad5c55d40b8
(Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents:
7095
diff
changeset
|
2243 0) |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2244 (frame, alist) |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2245 Lisp_Object frame, alist; |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2246 { |
9572 | 2247 #ifdef MSDOS |
2248 if (FRAME_X_P (frame)) | |
2249 IT_set_frame_parameters (XFRAME (frame), alist); | |
2250 #endif | |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2251 return Qnil; |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2252 } |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2253 |
7271
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2254 DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2255 /* Don't confuse make-docfile by having two doc strings for this function. |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2256 make-docfile does not pay attention to #if, for good reason! */ |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2257 0) |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2258 (frame) |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2259 Lisp_Object frame; |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2260 { |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2261 return Qt; |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2262 } |
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2263 |
9572 | 2264 DEFUN ("frame-list", Fframe_list, Sframe_list, 0, 0, 0, |
2265 /* Don't confuse make-docfile by having two doc strings for this function. | |
2266 make-docfile does not pay attention to #if, for good reason! */ | |
2267 0) | |
2268 () | |
2269 { | |
2270 return Fcons (Fselected_frame (), Qnil); | |
2271 } | |
2272 | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2273 syms_of_frame () |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2274 { |
7162
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2275 Qheight = intern ("height"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2276 staticpro (&Qheight); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2277 Qminibuffer = intern ("minibuffer"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2278 staticpro (&Qminibuffer); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2279 Qmodeline = intern ("modeline"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2280 staticpro (&Qmodeline); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2281 Qname = intern ("name"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2282 staticpro (&Qname); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2283 Qunsplittable = intern ("unsplittable"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2284 staticpro (&Qunsplittable); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2285 Qmenu_bar_lines = intern ("menu-bar-lines"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2286 staticpro (&Qmenu_bar_lines); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2287 Qwidth = intern ("width"); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2288 staticpro (&Qwidth); |
06a13bf36a8c
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents:
7134
diff
changeset
|
2289 |
6355
8d624c058f31
(terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents:
6352
diff
changeset
|
2290 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
8d624c058f31
(terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents:
6352
diff
changeset
|
2291 "The initial frame-object, which represents Emacs's stdout."); |
9309
27370f65dfa1
(make_frame, Fframe_parameters, Fselected_frame, syms_of_frame): Don't use
Karl Heuer <kwzh@gnu.org>
parents:
9268
diff
changeset
|
2292 XSETFASTINT (Vterminal_frame, 0); |
6355
8d624c058f31
(terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents:
6352
diff
changeset
|
2293 |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2294 defsubr (&Sselected_frame); |
10350
9ef4bfc9a320
[!MULTI_FRAME] (window_frame): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10207
diff
changeset
|
2295 defsubr (&Swindow_frame); |
8264
8f227ebb7748
[!MULTI_FRAME] (Fframe_first_window): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
8244
diff
changeset
|
2296 defsubr (&Sframe_first_window); |
3482
ff3960b885c9
[!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents:
3283
diff
changeset
|
2297 defsubr (&Sframep); |
2068
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2298 defsubr (&Sframe_char_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2299 defsubr (&Sframe_char_width); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2300 defsubr (&Sframe_pixel_height); |
6357ea40643c
(Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents:
1989
diff
changeset
|
2301 defsubr (&Sframe_pixel_width); |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2302 defsubr (&Sset_frame_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2303 defsubr (&Sset_frame_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2304 defsubr (&Sset_frame_size); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2305 defsubr (&Sset_screen_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2306 defsubr (&Sset_screen_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2307 defsubr (&Sframe_height); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2308 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
|
2309 defsubr (&Sframe_width); |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2310 Ffset (intern ("screen-width"), intern ("frame-width")); |
5392
d8d5844c3ba6
Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents:
5231
diff
changeset
|
2311 defsubr (&Smouse_position); |
6986
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2312 defsubr (&Sframe_parameters); |
a39502978078
(Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents:
6924
diff
changeset
|
2313 defsubr (&Smodify_frame_parameters); |
7271
6a33d4f04dbf
(Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents:
7162
diff
changeset
|
2314 defsubr (&Sframe_live_p); |
9572 | 2315 defsubr (&Sframe_list); |
2316 | |
2317 #ifdef MSDOS | |
2318 /* A comment in dispnew.c says the_only_frame is not protected. */ | |
2319 the_only_frame.face_alist = Qnil; | |
2320 staticpro (&the_only_frame.face_alist); | |
2321 the_only_frame.menu_bar_items = Qnil; | |
2322 staticpro (&the_only_frame.menu_bar_items); | |
2323 the_only_frame.menu_bar_vector = Qnil; | |
2324 staticpro (&the_only_frame.menu_bar_vector); | |
2325 the_only_frame.menu_bar_items = menu_bar_items (Qnil); | |
2326 #endif | |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2327 } |
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2328 |
1385
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
2329 keys_of_frame () |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
2330 { |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
2331 } |
a4a205bdd2c1
* frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents:
1346
diff
changeset
|
2332 |
965
0eb68c6c452a
* frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents:
886
diff
changeset
|
2333 #endif /* not MULTI_FRAME */ |