annotate src/frame.c @ 14023:1c9beae43583

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