annotate src/frame.c @ 1652:93497cd89204

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