annotate src/frame.c @ 1536:0877009e6324

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