annotate src/frame.c @ 7307:cd81dba38a49

Update copyright.
author Karl Heuer <kwzh@gnu.org>
date Wed, 04 May 1994 02:41:09 +0000
parents 6a33d4f04dbf
children 20cbb114367b
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.
7307
cd81dba38a49 Update copyright.
Karl Heuer <kwzh@gnu.org>
parents: 7271
diff changeset
2 Copyright (C) 1993, 1994 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
4696
1fc792473491 Include <config.h> instead of "config.h".
Roland McGrath <roland@gnu.org>
parents: 4587
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"
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
25 #include "termhooks.h"
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
26 #include "window.h"
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 714
diff changeset
27
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
28 #ifdef MULTI_FRAME
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 714
diff changeset
29
1514
ceaecac6bf2e * frame.c: #include buffer.h.
Jim Blandy <jimb@redhat.com>
parents: 1437
diff changeset
30 #include "buffer.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;
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
77 Lisp_Object Qframe_live_p;
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
78 Lisp_Object Qheight;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
79 Lisp_Object Qicon;
539
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 Qonly;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
84 Lisp_Object Qunsplittable;
2131
468df2d7e371 (x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents: 2068
diff changeset
85 Lisp_Object Qmenu_bar_lines;
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
86 Lisp_Object Qwidth;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
87 Lisp_Object Qx;
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
88 Lisp_Object Qvisible;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 extern Lisp_Object Vminibuffer_list;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 extern Lisp_Object get_minibuffer ();
5172
9aa201005b16 (Fhandle_switch_frame, Fredirect_frame_focus): Declared.
Richard M. Stallman <rms@gnu.org>
parents: 5105
diff changeset
92 extern Lisp_Object Fhandle_switch_frame ();
9aa201005b16 (Fhandle_switch_frame, Fredirect_frame_focus): Declared.
Richard M. Stallman <rms@gnu.org>
parents: 5105
diff changeset
93 extern Lisp_Object Fredirect_frame_focus ();
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
95 DEFUN ("framep", Fframep, Sframep, 1, 1, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
96 "Return non-nil if OBJECT is a frame.\n\
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
97 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
98 `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
99 Also see `live-frame-p'.")
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
100 (object)
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
101 Lisp_Object object;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
103 if (XTYPE (object) != Lisp_Frame)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 return Qnil;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
105 switch (XFRAME (object)->output_method)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 case output_termcap:
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 return Qt;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 case output_x_window:
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
110 return Qx;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 default:
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 abort ();
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
116 DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
117 "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
118 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
119 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
120 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
121 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
122 (object)
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
123 Lisp_Object object;
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
124 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
125 return ((FRAMEP (object)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
126 && FRAME_LIVE_P (XFRAME (object)))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
127 ? Fframep (object)
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
128 : Qnil);
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
129 }
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
130
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
131 struct frame *
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
132 make_frame (mini_p)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 int mini_p;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
135 Lisp_Object frame;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
136 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 register Lisp_Object root_window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 register Lisp_Object mini_window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
140 frame = Fmake_vector (((sizeof (struct frame) - (sizeof (Lisp_Vector)
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
141 - sizeof (Lisp_Object)))
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
142 / sizeof (Lisp_Object)),
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 make_number (0));
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
144 XSETTYPE (frame, Lisp_Frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
145 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
147 f->cursor_x = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
148 f->cursor_y = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
149 f->current_glyphs = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
150 f->desired_glyphs = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
151 f->visible = 0;
1652
93497cd89204 * frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents: 1514
diff changeset
152 f->async_visible = 0;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
153 f->display.nothing = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
154 f->iconified = 0;
1652
93497cd89204 * frame.c (make_frame): Initialize async_visible and
Jim Blandy <jimb@redhat.com>
parents: 1514
diff changeset
155 f->async_iconified = 0;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
156 f->wants_modeline = 1;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
157 f->auto_raise = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
158 f->auto_lower = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
159 f->no_split = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
160 f->garbaged = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
161 f->has_minibuffer = mini_p;
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
162 f->focus_frame = Qnil;
1006
a13ee72d74a2 * frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents: 987
diff changeset
163 f->explicit_name = 0;
1989
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
164 f->can_have_scroll_bars = 0;
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
165 f->has_vertical_scroll_bars = 0;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
166 f->param_alist = Qnil;
1989
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
167 f->scroll_bars = Qnil;
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
168 f->condemned_scroll_bars = Qnil;
2417
8c07933beed9 (make_frame): Init face_alist field.
Richard M. Stallman <rms@gnu.org>
parents: 2298
diff changeset
169 f->face_alist = Qnil;
6130
d4e5878462cb (make_frame): Init menu_bar_items field to 0.
Richard M. Stallman <rms@gnu.org>
parents: 6054
diff changeset
170 f->menu_bar_items = Qnil;
7095
098b87bde5a7 (make_frame): Initialize fields menu_bar_vector and menu_bar_items_used.
Richard M. Stallman <rms@gnu.org>
parents: 7055
diff changeset
171 f->menu_bar_vector = Qnil;
098b87bde5a7 (make_frame): Initialize fields menu_bar_vector and menu_bar_items_used.
Richard M. Stallman <rms@gnu.org>
parents: 7055
diff changeset
172 f->menu_bar_items_used = 0;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
174 root_window = make_window ();
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 if (mini_p)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 {
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
177 mini_window = make_window ();
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 XWINDOW (root_window)->next = mini_window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 XWINDOW (mini_window)->prev = root_window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 XWINDOW (mini_window)->mini_p = Qt;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
181 XWINDOW (mini_window)->frame = frame;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
182 f->minibuffer_window = mini_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 mini_window = Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 XWINDOW (root_window)->next = Qnil;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
188 f->minibuffer_window = Qnil;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
191 XWINDOW (root_window)->frame = frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 /* 10 is arbitrary,
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 just so that there is "something there."
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
195 Correct size will be set up later with change_frame_size. */
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
197 f->width = 10;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
198 f->height = 10;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 XFASTINT (XWINDOW (root_window)->width) = 10;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 XFASTINT (XWINDOW (root_window)->height) = (mini_p ? 9 : 10);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 if (mini_p)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 XFASTINT (XWINDOW (mini_window)->width) = 10;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 XFASTINT (XWINDOW (mini_window)->top) = 9;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 XFASTINT (XWINDOW (mini_window)->height) = 1;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
210 /* Choose a buffer for the frame's root window. */
386
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
211 {
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
212 Lisp_Object buf;
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
213
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
214 XWINDOW (root_window)->buffer = Qt;
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
215 buf = Fcurrent_buffer ();
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
216 /* 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
217 a space), try to find another one. */
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
218 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
219 buf = Fother_buffer (buf, Qnil);
386
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
220 Fset_window_buffer (root_window, buf);
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
221 }
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
222
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 if (mini_p)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 XWINDOW (mini_window)->buffer = Qt;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 Fset_window_buffer (mini_window,
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 454
diff changeset
227 (NILP (Vminibuffer_list)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 ? get_minibuffer (0)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 : Fcar (Vminibuffer_list)));
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
232 f->root_window = root_window;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
233 f->selected_window = root_window;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
234 /* Make sure this window seems more recently used than
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
235 a newly-created, never-selected window. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
236 XFASTINT (XWINDOW (f->selected_window)->use_time) = ++window_select_count;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
238 return f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
241 /* Make a frame using a separate minibuffer window on another frame.
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 MINI_WINDOW is the minibuffer window to use. nil means use the
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 default (the global minibuffer). */
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
245 struct frame *
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
246 make_frame_without_minibuffer (mini_window)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 register Lisp_Object mini_window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
249 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 /* Choose the minibuffer window to use. */
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 454
diff changeset
252 if (NILP (mini_window))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
254 if (XTYPE (Vdefault_minibuffer_frame) != Lisp_Frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
255 error ("default-minibuffer-frame must be set when creating minibufferless frames");
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
256 if (! FRAME_LIVE_P (XFRAME (Vdefault_minibuffer_frame)))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
257 error ("default-minibuffer-frame must be a live frame");
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
258 mini_window = XFRAME (Vdefault_minibuffer_frame)->minibuffer_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 {
1437
36ef55ecb265 * frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents: 1385
diff changeset
262 CHECK_LIVE_WINDOW (mini_window, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
265 /* Make a frame containing just a root window. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
266 f = make_frame (0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 /* Install the chosen minibuffer window, with proper buffer. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
269 f->minibuffer_window = mini_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 Fset_window_buffer (mini_window,
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 454
diff changeset
271 (NILP (Vminibuffer_list)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 ? get_minibuffer (0)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
273 : Fcar (Vminibuffer_list)));
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
274 return f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
277 /* Make a frame containing only a minibuffer window. */
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
279 struct frame *
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
280 make_minibuffer_frame ()
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
282 /* First make a frame containing just a root window, no minibuffer. */
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
283
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
284 register struct frame *f = make_frame (0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
285 register Lisp_Object mini_window;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
286 register Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
287
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
288 XSET (frame, Lisp_Frame, f);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
289
1006
a13ee72d74a2 * frame.c (make_frame): Clear the explicit_name member of the new
Jim Blandy <jimb@redhat.com>
parents: 987
diff changeset
290 f->auto_raise = 0;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
291 f->auto_lower = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
292 f->no_split = 1;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
293 f->wants_modeline = 0;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
294 f->has_minibuffer = 1;
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 /* Now label the root window as also being the minibuffer.
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
297 Avoid infinite looping on the window chain by marking next pointer
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
298 as nil. */
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
299
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
300 mini_window = f->minibuffer_window = f->root_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
301 XWINDOW (mini_window)->mini_p = Qt;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
302 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
303 XWINDOW (mini_window)->prev = Qnil;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
304 XWINDOW (mini_window)->frame = frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
305
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
306 /* Put the proper buffer in that window. */
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
307
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
308 Fset_window_buffer (mini_window,
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 454
diff changeset
309 (NILP (Vminibuffer_list)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
310 ? get_minibuffer (0)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
311 : Fcar (Vminibuffer_list)));
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
312 return f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
314
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
315 /* Construct a frame that refers to the terminal (stdin and stdout). */
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
317 struct frame *
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
318 make_terminal_frame ()
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
319 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
320 register struct frame *f;
5231
6646271e8d32 (make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents: 5172
diff changeset
321 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
323 Vframe_list = Qnil;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
324 f = make_frame (1);
5231
6646271e8d32 (make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents: 5172
diff changeset
325
6646271e8d32 (make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents: 5172
diff changeset
326 XSET (frame, Lisp_Frame, f);
6646271e8d32 (make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents: 5172
diff changeset
327 Vframe_list = Fcons (frame, Vframe_list);
6646271e8d32 (make_terminal_frame): Add frame to Vframe_list.
Richard M. Stallman <rms@gnu.org>
parents: 5172
diff changeset
328
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
329 f->name = build_string ("terminal");
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
330 FRAME_SET_VISIBLE (f, 1);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
331 f->display.nothing = 1; /* Nonzero means frame isn't deleted. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
332 XSET (Vterminal_frame, Lisp_Frame, f);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
333 return f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
336 static Lisp_Object
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
337 do_switch_frame (frame, no_enter, track)
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
338 Lisp_Object frame, no_enter;
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
339 int track;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 {
1385
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
341 /* 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
342 switch to. */
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
343 if (CONSP (frame)
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
344 && EQ (XCONS (frame)->car, Qswitch_frame)
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
345 && CONSP (XCONS (frame)->cdr))
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
346 frame = XCONS (XCONS (frame)->cdr)->car;
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
347
6352
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
348 /* This used to say CHECK_LIVE_FRAME, but apparently it's possible for
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
349 a switch-frame event to arrive after a frame is no longer live,
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
350 especially when deleting the initial frame during startup. */
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
351 CHECK_FRAME (frame, 0);
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
352 if (! FRAME_LIVE_P (XFRAME (frame)))
6f48bd9145f9 (Fhandle_switch_frame): Ignore switch to dead frame.
Karl Heuer <kwzh@gnu.org>
parents: 6346
diff changeset
353 return Qnil;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
355 if (selected_frame == XFRAME (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
356 return frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
358 /* This is too greedy; it causes inappropriate focus redirection
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
359 that's hard to get rid of. */
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
360 #if 0
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
361 /* If a frame's focus has been redirected toward the currently
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
362 selected frame, we should change the redirection to point to the
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
363 newly selected frame. This means that if the focus is redirected
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
364 from a minibufferless frame to a surrogate minibuffer frame, we
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
365 can use `other-window' to switch between all the frames using
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
366 that minibuffer frame, and the focus redirection will follow us
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
367 around. */
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
368 if (track)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
369 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
370 Lisp_Object tail;
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
371
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
372 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
373 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
374 Lisp_Object focus;
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
375
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
376 if (XTYPE (XCONS (tail)->car) != Lisp_Frame)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
377 abort ();
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
378
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
379 focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car));
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
380
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
381 if (XTYPE (focus) == Lisp_Frame
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
382 && XFRAME (focus) == selected_frame)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
383 Fredirect_frame_focus (XCONS (tail)->car, frame);
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
384 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
385 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
386 #else /* ! 0 */
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
387 /* Instead, apply it only to the frame we're pointing to. */
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
388 #ifdef HAVE_X_WINDOWS
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
389 if (track)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
390 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
391 Lisp_Object focus, xfocus;
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
392
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
393 xfocus = x_get_focus_frame ();
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
394 if (FRAMEP (xfocus))
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
395 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
396 focus = FRAME_FOCUS_FRAME (XFRAME (xfocus));
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
397 if (FRAMEP (focus) && XFRAME (focus) == selected_frame)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
398 Fredirect_frame_focus (xfocus, frame);
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
399 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
400 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
401 #endif /* HAVE_X_WINDOWS */
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
402 #endif /* ! 0 */
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
403
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
404 selected_frame = XFRAME (frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
405 if (! FRAME_MINIBUF_ONLY_P (selected_frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
406 last_nonminibuf_frame = selected_frame;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
407
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
408 Fselect_window (XFRAME (frame)->selected_window);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
409 choose_minibuf_frame ();
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
410
1920
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
411 /* We want to make sure that the next event generates a frame-switch
3591
507f64624555 Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents: 3497
diff changeset
412 event to the appropriate frame. This seems kludgy to me, but
1920
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
413 before you take it out, make sure that evaluating something like
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
414 (select-window (frame-root-window (new-frame))) doesn't end up
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
415 with your typing being interpreted in the new frame instead of
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
416 the one you're actually typing in. */
1989
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
417 internal_last_event_frame = Qnil;
1920
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
418
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
419 return frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
420 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421
6486
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
422 DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
423 "Select the frame FRAME.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
424 Subsequent editing commands apply to its selected window.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
425 The selection of FRAME lasts until the next time the user does\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
426 something to select a different frame, or until the next time this\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
427 function is called.")
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
428 (frame, no_enter)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
429 Lisp_Object frame, no_enter;
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
430 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
431 return do_switch_frame (frame, no_enter, 1);
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
432 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
433
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
434
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
435 DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 2, "e",
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
436 "Handle a switch-frame event EVENT.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
437 Switch-frame events are usually bound to this function.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
438 A switch-frame event tells Emacs that the window manager has requested\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
439 that the user's events be directed to the frame mentioned in the event.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
440 This function selects the selected window of the frame of EVENT.\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
441 \n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
442 If EVENT is frame object, handle it as if it were a switch-frame event\n\
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
443 to that frame.")
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
444 (frame, no_enter)
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
445 Lisp_Object frame, no_enter;
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
446 {
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
447 return do_switch_frame (frame, no_enter, 0);
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
448 }
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
449
5012ae9c6075 (do_switch_frame): Common code for Fselect_frame and handle_switch_frame.
Karl Heuer <kwzh@gnu.org>
parents: 6355
diff changeset
450
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
451 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
452 "Return the frame that is now selected.")
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
453 ()
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 Lisp_Object tem;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
456 XSET (tem, Lisp_Frame, selected_frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457 return tem;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 }
7055
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
459
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
460 DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
461 "Return the frame object that window WINDOW is on.")
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
462 (window)
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
463 Lisp_Object window;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
464 {
1437
36ef55ecb265 * frame.c (make_frame_without_minibuffer, Fwindow_frame): Use
Jim Blandy <jimb@redhat.com>
parents: 1385
diff changeset
465 CHECK_LIVE_WINDOW (window, 0);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
466 return XWINDOW (window)->frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
467 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
468
6527
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
469 DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
470 "Returns the topmost, leftmost window of FRAME.\n\
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
471 If omitted, FRAME defaults to the currently selected frame.")
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
472 (frame)
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
473 Lisp_Object frame;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
474 {
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
475 Lisp_Object w;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
476
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
477 if (NILP (frame))
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
478 w = selected_frame->root_window;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
479 else
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
480 {
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
481 CHECK_LIVE_FRAME (frame, 0);
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
482 w = XFRAME (frame)->root_window;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
483 }
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
484 while (NILP (XWINDOW (w)->buffer))
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
485 {
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
486 if (! NILP (XWINDOW (w)->hchild))
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
487 w = XWINDOW (w)->hchild;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
488 else if (! NILP (XWINDOW (w)->vchild))
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
489 w = XWINDOW (w)->vchild;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
490 else
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
491 abort ();
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
492 }
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
493 return w;
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
494 }
ab9f20a3f502 (Fframe_first_window): New function.
Karl Heuer <kwzh@gnu.org>
parents: 6500
diff changeset
495
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
496 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
497 "Returns the root-window of FRAME.\n\
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
498 If omitted, FRAME defaults to the currently selected frame.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
499 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
500 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
501 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
502 if (NILP (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
503 XSET (frame, Lisp_Frame, selected_frame);
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
504 else
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
505 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
506
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
507 return XFRAME (frame)->root_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
508 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
509
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
510 DEFUN ("frame-selected-window", Fframe_selected_window,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
511 Sframe_selected_window, 0, 1, 0,
1251
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
512 "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
513 If omitted, FRAME defaults to the currently selected frame.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
514 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
515 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
516 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
517 if (NILP (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
518 XSET (frame, Lisp_Frame, selected_frame);
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
519 else
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
520 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
521
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
522 return XFRAME (frame)->selected_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
523 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
524
7055
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
525 DEFUN ("set-frame-selected-window", Fset_frame_selected_window,
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
526 Sset_frame_selected_window, 2, 2, 0,
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
527 "Set the selected window of frame object FRAME to WINDOW.\n\
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
528 If FRAME is nil, the selected frame is used.\n\
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
529 If FRAME is the selected frame, this makes WINDOW the selected window.")
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
530 (frame, window)
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
531 Lisp_Object frame, window;
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
532 {
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
533 if (NILP (frame))
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
534 XSET (frame, Lisp_Frame, selected_frame);
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
535 else
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
536 CHECK_LIVE_FRAME (frame, 0);
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
537
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
538 CHECK_LIVE_WINDOW (window, 1);
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
539
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
540 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window))))
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
541 error ("In `set-frame-selected-window', WINDOW is not on FRAME");
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
542
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
543 if (XFRAME (frame) == selected_frame)
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
544 return Fselect_window (window);
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
545
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
546 return XFRAME (frame)->selected_window = window;
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
547 }
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
548
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
549 DEFUN ("frame-list", Fframe_list, Sframe_list,
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
550 0, 0, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
551 "Return a list of all frames.")
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
552 ()
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
553 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
554 return Fcopy_sequence (Vframe_list);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
555 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
556
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
557 /* Return the next frame in the frame list after FRAME.
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
558 If MINIBUF is nil, exclude minibuffer-only frames.
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
559 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
560 their minibuffer.
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
561 If MINIBUF is `visible', include all visible frames.
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
562 Otherwise, include all frames. */
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
563
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
564 Lisp_Object
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
565 next_frame (frame, minibuf)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
566 Lisp_Object frame;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
567 Lisp_Object minibuf;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
568 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
569 Lisp_Object tail;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
570 int passed = 0;
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 /* There must always be at least one frame in Vframe_list. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
573 if (! CONSP (Vframe_list))
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
574 abort ();
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
575
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
576 /* If this frame is dead, it won't be in Vframe_list, and we'll loop
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
577 forever. Forestall that. */
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
578 CHECK_LIVE_FRAME (frame, 0);
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
579
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
580 while (1)
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
581 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
582 {
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
583 Lisp_Object f;
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
584
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
585 f = XCONS (tail)->car;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
586 if (passed)
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
587 {
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
588 /* 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
589
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
590 /* 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
591 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
592 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
593 return f;
335
33aa13a3f279 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 286
diff changeset
594
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
595 /* 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
596 if (NILP (minibuf))
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
597 {
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
598 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
599 return f;
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
600 }
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
601 else if (EQ (minibuf, Qvisible))
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
602 {
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
603 FRAME_SAMPLE_VISIBILITY (XFRAME (f));
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
604 if (FRAME_VISIBLE_P (XFRAME (f)))
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
605 return f;
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
606 }
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
607 else if (WINDOWP (minibuf))
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
608 {
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
609 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
610 return f;
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
611 }
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
612 else
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
613 return f;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
614 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
615
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
616 if (EQ (frame, f))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
617 passed++;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
618 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
619 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
620
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
621 /* Return the previous frame in the frame list before FRAME.
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
622 If MINIBUF is nil, exclude minibuffer-only frames.
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
623 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
624 their minibuffer.
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
625 If MINIBUF is `visible', include all visible frames.
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
626 Otherwise, include all frames. */
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
627
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
628 Lisp_Object
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
629 prev_frame (frame, minibuf)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
630 Lisp_Object frame;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
631 Lisp_Object minibuf;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
632 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
633 Lisp_Object tail;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
634 Lisp_Object prev;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
635
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
636 /* There must always be at least one frame in Vframe_list. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
637 if (! CONSP (Vframe_list))
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
638 abort ();
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
639
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
640 prev = Qnil;
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
641 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
642 {
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
643 Lisp_Object f;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
644
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
645 f = XCONS (tail)->car;
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
646 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
647 abort ();
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
648
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
649 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
650 return prev;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
651
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
652 /* 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
653 according to minibuf. */
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
654 if (NILP (minibuf))
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
655 {
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
656 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
657 prev = f;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
658 }
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
659 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
660 {
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
661 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
662 prev = f;
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
663 }
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
664 else if (EQ (minibuf, Qvisible))
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
665 {
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
666 FRAME_SAMPLE_VISIBILITY (XFRAME (f));
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
667 if (FRAME_VISIBLE_P (XFRAME (f)))
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
668 prev = f;
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
669 }
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
670 else
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
671 prev = f;
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
672 }
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
673
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
674 /* 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
675 if (NILP (prev))
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
676 /* 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
677 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
678 return frame;
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
679 else
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
680 /* 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
681 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
682 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
683 return prev;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
684 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
685
4424
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
686
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
687 DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
688 "Return the next frame in the frame list after FRAME.\n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
689 By default, skip minibuffer-only frames.\n\
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
690 If omitted, FRAME defaults to the selected frame.\n\
4227
b283670201b4 (Fdelete_frame): Allow deletion if there is some other
Richard M. Stallman <rms@gnu.org>
parents: 3970
diff changeset
691 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
1251
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
692 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
693 minibuffer.\n\
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
694 If MINIFRAME is `visible', include all visible frames.\n\
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
695 Otherwise, include all frames.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
696 (frame, miniframe)
1251
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
697 Lisp_Object frame, miniframe;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
698 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
699 Lisp_Object tail;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
700
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
701 if (NILP (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
702 XSET (frame, Lisp_Frame, selected_frame);
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
703 else
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
704 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
705
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
706 return next_frame (frame, miniframe);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
707 }
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
708
4424
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
709 DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0,
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
710 "Return the previous frame in the frame list before FRAME.\n\
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
711 By default, skip minibuffer-only frames.\n\
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
712 If omitted, FRAME defaults to the selected frame.\n\
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
713 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
714 If MINIFRAME is a window, include only frames using that window for their\n\
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
715 minibuffer.\n\
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
716 If MINIFRAME is `visible', include all visible frames.\n\
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
717 Otherwise, include all frames.")
4424
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
718 (frame, miniframe)
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
719 Lisp_Object frame, miniframe;
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
720 {
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
721 Lisp_Object tail;
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
722
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
723 if (NILP (frame))
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
724 XSET (frame, Lisp_Frame, selected_frame);
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
725 else
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
726 CHECK_LIVE_FRAME (frame, 0);
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
727
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
728 return prev_frame (frame, miniframe);
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
729 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
730
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
731 /* Return 1 if it is ok to delete frame F;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
732 0 if all frames aside from F are invisible.
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
733 (Exception: if F is the terminal frame, and we are using X, return 1.) */
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
734
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
735 static int
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
736 other_visible_frames (f)
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
737 FRAME_PTR f;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
738 {
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
739 /* We know the selected frame is visible,
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
740 so if F is some other frame, it can't be the sole visible one. */
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
741 if (f == selected_frame)
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
742 {
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
743 Lisp_Object frames;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
744 int count = 0;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
745
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
746 for (frames = Vframe_list;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
747 CONSP (frames);
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
748 frames = XCONS (frames)->cdr)
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
749 {
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
750 Lisp_Object this;
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
751
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
752 this = XCONS (frames)->car;
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
753 /* Verify that the frame's window still exists
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
754 and we can still talk to it. And note any recent change
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
755 in visibility. */
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
756 #ifdef HAVE_X_WINDOWS
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
757 if (FRAME_X_P (XFRAME (this)))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
758 {
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
759 x_sync (this);
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
760 FRAME_SAMPLE_VISIBILITY (XFRAME (this));
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
761 }
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
762 #endif
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
763
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
764 if (FRAME_VISIBLE_P (XFRAME (this))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
765 || FRAME_ICONIFIED_P (XFRAME (this))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
766 /* Allow deleting the terminal frame when at least
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
767 one X frame exists! */
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
768 || (FRAME_X_P (XFRAME (this)) && !FRAME_X_P (f)))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
769 count++;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
770 }
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
771 return count > 1;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
772 }
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
773 return 1;
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
774 }
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
775
4341
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
776 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
777 "Delete FRAME, permanently eliminating it from use.\n\
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
778 If omitted, FRAME defaults to the selected frame.\n\
4341
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
779 A frame may not be deleted if its minibuffer is used by other frames.\n\
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
780 Normally, you may not delete a frame if all other frames are invisible,\n\
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
781 but if the second optional argument FORCE is non-nil, you may do so.")
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
782 (frame, force)
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
783 Lisp_Object frame, force;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
784 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
785 struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
786
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
787 if (EQ (frame, Qnil))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
788 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
789 f = selected_frame;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
790 XSET (frame, Lisp_Frame, f);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
791 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
792 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
793 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
794 CHECK_FRAME (frame, 0);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
795 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
796 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
797
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
798 if (! FRAME_LIVE_P (f))
1920
ac5e559a819a * frame.c (Fselect_frame): Set Vlast_event_frame to Qnil after
Jim Blandy <jimb@redhat.com>
parents: 1870
diff changeset
799 return Qnil;
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
800
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
801 if (NILP (force) && !other_visible_frames (f))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
802 error ("Attempt to delete the sole visible or iconified frame");
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
803
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
804 /* Does this frame have a minibuffer, and is it the surrogate
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
805 minibuffer for any other frame? */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
806 if (FRAME_HAS_MINIBUF_P (XFRAME (frame)))
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
807 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
808 Lisp_Object frames;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
809
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
810 for (frames = Vframe_list;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
811 CONSP (frames);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
812 frames = XCONS (frames)->cdr)
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
813 {
6157
9422e430f067 (Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents: 6130
diff changeset
814 Lisp_Object this;
9422e430f067 (Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents: 6130
diff changeset
815 this = XCONS (frames)->car;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
816
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
817 if (! EQ (this, frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
818 && EQ (frame,
6157
9422e430f067 (Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents: 6130
diff changeset
819 WINDOW_FRAME (XWINDOW
9422e430f067 (Fdelete_frame): Don't initialize a Lisp_Object.
Richard M. Stallman <rms@gnu.org>
parents: 6130
diff changeset
820 (FRAME_MINIBUF_WINDOW (XFRAME (this))))))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
821 error ("Attempt to delete a surrogate minibuffer frame");
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
822 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
823 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
824
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
825 /* Don't let the frame remain selected. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
826 if (f == selected_frame)
2298
872a3a2c3fed * frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents: 2282
diff changeset
827 Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
828
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
829 /* Don't allow minibuf_window to remain on a deleted frame. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
830 if (EQ (f->minibuffer_window, minibuf_window))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
831 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
832 Fset_window_buffer (selected_frame->minibuffer_window,
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
833 XWINDOW (minibuf_window)->buffer);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
834 minibuf_window = selected_frame->minibuffer_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
835 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
836
1680
ea9f3949f153 * frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents: 1652
diff changeset
837 /* Mark all the windows that used to be on FRAME as deleted, and then
ea9f3949f153 * frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents: 1652
diff changeset
838 remove the reference to them. */
ea9f3949f153 * frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents: 1652
diff changeset
839 delete_all_subwindows (XWINDOW (f->root_window));
ea9f3949f153 * frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents: 1652
diff changeset
840 f->root_window = Qnil;
ea9f3949f153 * frame.c (Fdelete_frame): Delete all the windows in the frame's
Jim Blandy <jimb@redhat.com>
parents: 1652
diff changeset
841
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
842 Vframe_list = Fdelq (frame, Vframe_list);
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
843 FRAME_SET_VISIBLE (f, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
844
1809
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
845 /* Since some events are handled at the interrupt level, we may get
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
846 an event for f at any time; if we zero out the frame's display
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
847 now, then we may trip up the event-handling code. Instead, we'll
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
848 promise that the display of the frame must be valid until we have
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
849 called the window-system-dependent frame destruction routine. */
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
850
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
851 /* I think this should be done with a hook. */
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
852 #ifdef HAVE_X_WINDOWS
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
853 if (FRAME_X_P (f))
1809
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
854 x_destroy_window (f);
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
855 #endif
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
856
1809
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
857 f->display.nothing = 0;
69b3ee873a9b * frame.c (Fdelete_frame): Clear the frame's display after calling
Jim Blandy <jimb@redhat.com>
parents: 1784
diff changeset
858
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
859 /* 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
860 another one. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
861 if (f == last_nonminibuf_frame)
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
862 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
863 Lisp_Object frames;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
864
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
865 last_nonminibuf_frame = 0;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
866
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
867 for (frames = Vframe_list;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
868 CONSP (frames);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
869 frames = XCONS (frames)->cdr)
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
870 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
871 f = XFRAME (XCONS (frames)->car);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
872 if (!FRAME_MINIBUF_ONLY_P (f))
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
873 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
874 last_nonminibuf_frame = f;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
875 break;
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
876 }
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
877 }
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
878 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
879
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
880 /* If we've deleted Vdefault_minibuffer_frame, try to find another
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
881 one. Prefer minibuffer-only frames, but also notice frames
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
882 with other windows. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
883 if (EQ (frame, Vdefault_minibuffer_frame))
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
884 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
885 Lisp_Object frames;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
886
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
887 /* The last frame we saw with a minibuffer, minibuffer-only or not. */
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
888 Lisp_Object frame_with_minibuf;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
889
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
890 frame_with_minibuf = Qnil;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
891 for (frames = Vframe_list;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
892 CONSP (frames);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
893 frames = XCONS (frames)->cdr)
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
894 {
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
895 Lisp_Object this;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
896
6500
551bff5cffde (next_frame, prev_frame, other_visible_frames, Fdelete_frame): Use assignment,
Karl Heuer <kwzh@gnu.org>
parents: 6486
diff changeset
897 this = XCONS (frames)->car;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
898 if (XTYPE (this) != Lisp_Frame)
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
899 abort ();
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
900 f = XFRAME (this);
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
901
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
902 if (FRAME_HAS_MINIBUF_P (f))
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
903 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
904 frame_with_minibuf = this;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
905 if (FRAME_MINIBUF_ONLY_P (f))
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
906 break;
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
907 }
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
908 }
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
909
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
910 /* 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
911 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
912 would have to be minibufferless, which implies that at some
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
913 point their minibuffer frames must have been deleted, but
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
914 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
915 minibuffer frames. */
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
916 if (NILP (frame_with_minibuf))
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
917 abort ();
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
918
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
919 Vdefault_minibuffer_frame = frame_with_minibuf;
708
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
920 }
030fb4635335 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 699
diff changeset
921
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
922 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
923 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
924
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
925 /* Return mouse position in character cell units. */
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
926
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
927 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
928 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\
3693
8e83f20d0e39 * frame.c (Fmouse_position): Doc fix.
Jim Blandy <jimb@redhat.com>
parents: 3676
diff changeset
929 The position is given in character cells, where (0, 0) is the\n\
8e83f20d0e39 * frame.c (Fmouse_position): Doc fix.
Jim Blandy <jimb@redhat.com>
parents: 3676
diff changeset
930 upper-left corner.\n\
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
931 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
932 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
933 and nil for X and Y.")
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
934 ()
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
935 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
936 FRAME_PTR f;
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
937 Lisp_Object lispy_dummy;
1989
b1c1ab20f810 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1920
diff changeset
938 enum scroll_bar_part party_dummy;
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
939 Lisp_Object x, y;
6054
24ffc4bc4067 (Fmouse_position): Convert to glyph units.
Richard M. Stallman <rms@gnu.org>
parents: 6012
diff changeset
940 int col, row;
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
941 unsigned long long_dummy;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
942
3658
c2831d419bec (Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents: 3591
diff changeset
943 f = selected_frame;
c2831d419bec (Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents: 3591
diff changeset
944 x = y = Qnil;
c2831d419bec (Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents: 3591
diff changeset
945
c2831d419bec (Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents: 3591
diff changeset
946 /* It's okay for the hook to refrain from storing anything. */
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
947 if (mouse_position_hook)
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
948 (*mouse_position_hook) (&f,
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
949 &lispy_dummy, &party_dummy,
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
950 &x, &y,
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
951 &long_dummy);
6854
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
952 if (! NILP (x))
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
953 {
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
954 col = XINT (x);
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
955 row = XINT (y);
6924
88c4c40c8bd6 (Fmouse_position): Don't clip.
Karl Heuer <kwzh@gnu.org>
parents: 6921
diff changeset
956 pixel_to_glyph_coords (f, col, row, &col, &row, 0, 1);
6854
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
957 XSETINT (x, col);
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
958 XSETINT (y, row);
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
959 }
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
960 XSET (lispy_dummy, Lisp_Frame, f);
3658
c2831d419bec (Fmouse_position): Set up defaults before calling the hook.
Richard M. Stallman <rms@gnu.org>
parents: 3591
diff changeset
961 return Fcons (lispy_dummy, Fcons (x, y));
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
962 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
963
7025
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
964 DEFUN ("mouse-pixel-position", Fmouse_pixel_position,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
965 Smouse_pixel_position, 0, 0, 0,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
966 "Return a list (FRAME X . Y) giving the current mouse frame and position.\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
967 The position is given in pixel units, where (0, 0) is the\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
968 upper-left corner.\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
969 If Emacs is running on a mouseless terminal or hasn't been programmed\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
970 to read the mouse position, it returns the selected frame for FRAME\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
971 and nil for X and Y.")
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
972 ()
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
973 {
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
974 FRAME_PTR f;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
975 Lisp_Object lispy_dummy;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
976 enum scroll_bar_part party_dummy;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
977 Lisp_Object x, y;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
978 int col, row;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
979 unsigned long long_dummy;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
980
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
981 f = selected_frame;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
982 x = y = Qnil;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
983
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
984 /* It's okay for the hook to refrain from storing anything. */
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
985 if (mouse_position_hook)
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
986 (*mouse_position_hook) (&f,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
987 &lispy_dummy, &party_dummy,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
988 &x, &y,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
989 &long_dummy);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
990 XSET (lispy_dummy, Lisp_Frame, f);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
991 return Fcons (lispy_dummy, Fcons (x, y));
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
992 }
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
993
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
994 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0,
3694
f0e305fceb86 Doc fix.
Jim Blandy <jimb@redhat.com>
parents: 3693
diff changeset
995 "Move the mouse pointer to the center of character cell (X,Y) in FRAME.\n\
7025
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
996 WARNING: If you use this under X windows,\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
997 you should call `unfocus-frame' afterwards.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
998 (frame, x, y)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
999 Lisp_Object frame, x, y;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1000 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1001 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1002 CHECK_NUMBER (x, 2);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1003 CHECK_NUMBER (y, 1);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1004
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1005 /* I think this should be done with a hook. */
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1006 #ifdef HAVE_X_WINDOWS
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1007 if (FRAME_X_P (XFRAME (frame)))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1008 /* Warping the mouse will cause enternotify and focus events. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1009 x_set_mouse_position (XFRAME (frame), x, y);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1010 #endif
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1011
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 }
7025
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1014
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1015 DEFUN ("set-mouse-pixel-position", Fset_mouse_pixel_position,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1016 Sset_mouse_pixel_position, 3, 3, 0,
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1017 "Move the mouse pointer to pixel position (X,Y) in FRAME.\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1018 WARNING: If you use this under X windows,\n\
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1019 you should call `unfocus-frame' afterwards.")
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1020 (frame, x, y)
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1021 Lisp_Object frame, x, y;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1022 {
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1023 CHECK_LIVE_FRAME (frame, 0);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1024 CHECK_NUMBER (x, 2);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1025 CHECK_NUMBER (y, 1);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1026
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1027 /* I think this should be done with a hook. */
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1028 #ifdef HAVE_X_WINDOWS
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1029 if (FRAME_X_P (XFRAME (frame)))
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1030 /* Warping the mouse will cause enternotify and focus events. */
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1031 x_set_mouse_pixel_position (XFRAME (frame), x, y);
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1032 #endif
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1033
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1034 return Qnil;
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1035 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1036
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1037 DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
3834
1b2144b795aa * frame.c (Fmake_frame_visible): Make this interactively callable;
Jim Blandy <jimb@redhat.com>
parents: 3763
diff changeset
1038 0, 1, "",
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1039 "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
1040 If omitted, FRAME defaults to the currently selected frame.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1041 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1042 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1043 {
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1044 if (NILP (frame))
886
cba3f9073641 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 872
diff changeset
1045 XSET (frame, Lisp_Frame, selected_frame);
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1046
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1047 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1048
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1049 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1050 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1051 if (FRAME_X_P (XFRAME (frame)))
5105
9b41ddf1b5f7 (Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 4961
diff changeset
1052 {
9b41ddf1b5f7 (Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 4961
diff changeset
1053 FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
9b41ddf1b5f7 (Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 4961
diff changeset
1054 x_make_frame_visible (XFRAME (frame));
9b41ddf1b5f7 (Fmake_frame_visible): Use FRAME_SAMPLE_VISIBILITY. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 4961
diff changeset
1055 }
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1056 #endif
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1057
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1058 return frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1059 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1060
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1061 DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible,
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1062 0, 2, "",
1251
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
1063 "Make the frame FRAME invisible (assuming it is an X-window).\n\
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1064 If omitted, FRAME defaults to the currently selected frame.\n\
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1065 Normally you may not make FRAME invisible if all other frames are invisible,\n\
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1066 but if the second optional argument FORCE is non-nil, you may do so.")
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1067 (frame, force)
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1068 Lisp_Object frame, force;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1069 {
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1070 if (NILP (frame))
886
cba3f9073641 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 872
diff changeset
1071 XSET (frame, Lisp_Frame, selected_frame);
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1072
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1073 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1074
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1075 if (NILP (force) && !other_visible_frames (XFRAME (frame)))
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1076 error ("Attempt to make invisible the sole visible or iconified frame");
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1077
3283
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1078 /* Don't let the frame remain selected. */
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1079 if (XFRAME (frame) == selected_frame)
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1080 Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1081
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1082 /* Don't allow minibuf_window to remain on a deleted frame. */
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1083 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1084 {
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1085 Fset_window_buffer (selected_frame->minibuffer_window,
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1086 XWINDOW (minibuf_window)->buffer);
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1087 minibuf_window = selected_frame->minibuffer_window;
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1088 }
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1089
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1090 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1091 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1092 if (FRAME_X_P (XFRAME (frame)))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1093 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
1094 #endif
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1095
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1096 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1097 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1098
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1099 DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame,
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1100 0, 1, "",
1251
4e556fda7a4d * frame.c (Fselect_frame, Fframe_root_window,
Jim Blandy <jimb@redhat.com>
parents: 1118
diff changeset
1101 "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
1102 If omitted, FRAME defaults to the currently selected frame.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1103 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1104 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1105 {
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1106 if (NILP (frame))
886
cba3f9073641 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 872
diff changeset
1107 XSET (frame, Lisp_Frame, selected_frame);
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 785
diff changeset
1108
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1109 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1110
3283
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1111 /* Don't let the frame remain selected. */
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1112 if (XFRAME (frame) == selected_frame)
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1113 Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1114
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1115 /* Don't allow minibuf_window to remain on a deleted frame. */
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1116 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1117 {
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1118 Fset_window_buffer (selected_frame->minibuffer_window,
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1119 XWINDOW (minibuf_window)->buffer);
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1120 minibuf_window = selected_frame->minibuffer_window;
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1121 }
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1122
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1123 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1124 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1125 if (FRAME_X_P (XFRAME (frame)))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1126 x_iconify_frame (XFRAME (frame));
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1127 #endif
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 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1130 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1131
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1132 DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p,
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1133 1, 1, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1134 "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
1135 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
1136 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
1137 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
1138 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1139 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1140 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1141 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1142
6012
650c0f231d17 (Fframe_visible_p): Do FRAME_SAMPLE_VISIBILITY first.
Richard M. Stallman <rms@gnu.org>
parents: 5925
diff changeset
1143 FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
650c0f231d17 (Fframe_visible_p): Do FRAME_SAMPLE_VISIBILITY first.
Richard M. Stallman <rms@gnu.org>
parents: 5925
diff changeset
1144
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1145 if (FRAME_VISIBLE_P (XFRAME (frame)))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1146 return Qt;
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1147 if (FRAME_ICONIFIED_P (XFRAME (frame)))
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1148 return Qicon;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1149 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1150 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1151
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1152 DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list,
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1153 0, 0, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1154 "Return a list of all frames now \"visible\" (being updated).")
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1155 ()
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1156 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1157 Lisp_Object tail, frame;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1158 struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1159 Lisp_Object value;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1160
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1161 value = Qnil;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1162 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1163 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1164 frame = XCONS (tail)->car;
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1165 if (XTYPE (frame) != Lisp_Frame)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1166 continue;
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1167 f = XFRAME (frame);
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1168 if (FRAME_VISIBLE_P (f))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1169 value = Fcons (frame, value);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1170 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1171 return value;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1172 }
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1173
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1174
2282
f727944c11aa * frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents: 2207
diff changeset
1175 DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 1, 1, 0,
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1176 "Bring FRAME to the front, so it occludes any frames it overlaps.\n\
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1177 If FRAME is invisible, make it visible.\n\
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1178 If Emacs is displaying on an ordinary terminal or some other device which\n\
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1179 doesn't support multiple overlapping frames, this function does nothing.")
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1180 (frame)
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1181 Lisp_Object frame;
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1182 {
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1183 CHECK_LIVE_FRAME (frame, 0);
4961
dd67510308ae (Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents: 4798
diff changeset
1184
dd67510308ae (Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents: 4798
diff changeset
1185 /* Do like the documentation says. */
dd67510308ae (Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents: 4798
diff changeset
1186 Fmake_frame_visible (frame);
dd67510308ae (Fraise_frame): Do like the documentation says, and make
Richard M. Stallman <rms@gnu.org>
parents: 4798
diff changeset
1187
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1188 if (frame_raise_lower_hook)
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1189 (*frame_raise_lower_hook) (XFRAME (frame), 1);
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1190
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1191 return Qnil;
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1192 }
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1193
2282
f727944c11aa * frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents: 2207
diff changeset
1194 /* Should we have a corresponding function called Flower_Power? */
f727944c11aa * frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents: 2207
diff changeset
1195 DEFUN ("lower-frame", Flower_frame, Slower_frame, 1, 1, 0,
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1196 "Send FRAME to the back, so it is occluded by any frames that overlap it.\n\
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1197 If Emacs is displaying on an ordinary terminal or some other device which\n\
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1198 doesn't support multiple overlapping frames, this function does nothing.")
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1199 (frame)
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1200 Lisp_Object frame;
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1201 {
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1202 CHECK_LIVE_FRAME (frame, 0);
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1203
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1204 if (frame_raise_lower_hook)
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1205 (*frame_raise_lower_hook) (XFRAME (frame), 0);
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1206
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1207 return Qnil;
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1208 }
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1209
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1210
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1211 DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus,
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1212 1, 2, 0,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1213 "Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.\n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1214 In other words, switch-frame events caused by events in FRAME will\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1215 request a switch to FOCUS-FRAME, and `last-event-frame' will be\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1216 FOCUS-FRAME after reading an event typed at FRAME.\n\
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1217 \n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1218 If FOCUS-FRAME is omitted or nil, any existing redirection is\n\
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1219 cancelled, and the frame again receives its own keystrokes.\n\
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1220 \n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1221 Focus redirection is useful for temporarily redirecting keystrokes to\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1222 a surrogate minibuffer frame when a frame doesn't have its own\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1223 minibuffer window.\n\
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1224 \n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1225 A frame's focus redirection can be changed by select-frame. If frame\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1226 FOO is selected, and then a different frame BAR is selected, any\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1227 frames redirecting their focus to FOO are shifted to redirect their\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1228 focus to BAR. This allows focus redirection to work properly when the\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1229 user switches from one frame to another using `select-window'.\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1230 \n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1231 This means that a frame whose focus is redirected to itself is treated\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1232 differently from a frame whose focus is redirected to nil; the former\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1233 is affected by select-frame, while the latter is not.\n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1234 \n\
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1235 The redirection lasts until `redirect-frame-focus' is called to change it.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1236 (frame, focus_frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1237 Lisp_Object frame, focus_frame;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1238 {
3970
020fe391d5c1 * frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents: 3834
diff changeset
1239 /* Note that we don't check for a live frame here. It's reasonable
020fe391d5c1 * frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents: 3834
diff changeset
1240 to redirect the focus of a frame you're about to delete, if you
020fe391d5c1 * frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents: 3834
diff changeset
1241 know what other frame should receive those keystrokes. */
020fe391d5c1 * frame.c (Fredirect_frame_focus): Allow redirection of focus of
Jim Blandy <jimb@redhat.com>
parents: 3834
diff changeset
1242 CHECK_FRAME (frame, 0);
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
1243
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1244 if (! NILP (focus_frame))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1245 CHECK_LIVE_FRAME (focus_frame, 1);
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1246
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1247 XFRAME (frame)->focus_frame = focus_frame;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1248
3283
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1249 /* I think this should be done with a hook. */
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1250 #ifdef HAVE_X_WINDOWS
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1251 if (!NILP (focus_frame) && ! EQ (focus_frame, frame)
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1252 && FRAME_X_P (XFRAME (focus_frame)))
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1253 Ffocus_frame (focus_frame);
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1254 #endif
e2a40a3baa4b (Ficonify_frame, Fmake_frame_invisible):
Richard M. Stallman <rms@gnu.org>
parents: 2961
diff changeset
1255
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1256 if (frame_rehighlight_hook)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1257 (*frame_rehighlight_hook) ();
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1258
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1259 return Qnil;
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1260 }
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1261
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1262
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1263 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1264 "Return the frame to which FRAME's keystrokes are currently being sent.\n\
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1265 This returns nil if FRAME's focus is not redirected.\n\
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1266 See `redirect-frame-focus'.")
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1267 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1268 Lisp_Object frame;
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1269 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1270 CHECK_LIVE_FRAME (frame, 0);
1709
b86b3237e017 * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1691
diff changeset
1271
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1272 return FRAME_FOCUS_FRAME (XFRAME (frame));
363
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1273 }
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1274
f4f9b557d934 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 335
diff changeset
1275
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1276
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1277 Lisp_Object
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1278 get_frame_param (frame, prop)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1279 register struct frame *frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1280 Lisp_Object prop;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1281 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1282 register Lisp_Object tem;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1283
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1284 tem = Fassq (prop, frame->param_alist);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1285 if (EQ (tem, Qnil))
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1286 return tem;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1287 return Fcdr (tem);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1288 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1289
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1290 void
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1291 store_in_alist (alistptr, prop, val)
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1292 Lisp_Object *alistptr, val;
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1293 Lisp_Object prop;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1294 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1295 register Lisp_Object tem;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1296
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1297 tem = Fassq (prop, *alistptr);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1298 if (EQ (tem, Qnil))
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1299 *alistptr = Fcons (Fcons (prop, val), *alistptr);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1300 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1301 Fsetcdr (tem, val);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1302 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1303
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1304 void
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1305 store_frame_param (f, prop, val)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1306 struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1307 Lisp_Object prop, val;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1308 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1309 register Lisp_Object tem;
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 tem = Fassq (prop, f->param_alist);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1312 if (EQ (tem, Qnil))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1313 f->param_alist = Fcons (Fcons (prop, val), f->param_alist);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1314 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1315 Fsetcdr (tem, val);
539
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1316
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1317 if (EQ (prop, Qminibuffer)
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1318 && XTYPE (val) == Lisp_Window)
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1319 {
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1320 if (! MINI_WINDOW_P (XWINDOW (val)))
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1321 error ("Surrogate minibuffer windows must be minibuffer windows.");
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1322
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1323 if (FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f))
3763
c58fb240170d * frame.c (store_frame_param): Fix error message punctuation.
Jim Blandy <jimb@redhat.com>
parents: 3694
diff changeset
1324 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
1325
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1326 /* Install the chosen minibuffer window, with proper buffer. */
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1327 f->minibuffer_window = val;
539
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1328 }
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1329 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1330
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1331 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1332 "Return the parameters-alist of frame FRAME.\n\
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1333 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
1334 The meaningful PARMs depend on the kind of frame.\n\
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 765
diff changeset
1335 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
1336 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1337 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1338 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1339 Lisp_Object alist;
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1340 FRAME_PTR f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1341
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1342 if (EQ (frame, Qnil))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1343 f = selected_frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1344 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1345 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1346 CHECK_FRAME (frame, 0);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1347 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1348 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1349
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1350 if (!FRAME_LIVE_P (f))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1351 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1352
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1353 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
1354 store_in_alist (&alist, Qname, f->name);
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1355 store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1356 store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1357 store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil));
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1358 store_in_alist (&alist, Qminibuffer,
1870
d90e9fecad48 * frame.c (Fframe_parameters): Report the `minibuffer' parameter of
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
1359 (! FRAME_HAS_MINIBUF_P (f) ? Qnil
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1360 : FRAME_MINIBUF_ONLY_P (f) ? Qonly
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1361 : FRAME_MINIBUF_WINDOW (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1362 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
2131
468df2d7e371 (x_frame_parms): Add elts for visibility and menu-bar-lines.
Richard M. Stallman <rms@gnu.org>
parents: 2068
diff changeset
1363 store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f)));
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1364
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1365 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1366 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1367 if (FRAME_X_P (f))
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1368 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
1369 #endif
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1370 return alist;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1371 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1372
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1373 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1374 Smodify_frame_parameters, 2, 2, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1375 "Modify the parameters of frame FRAME according to ALIST.\n\
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1376 ALIST is an alist of parameters to change and their new values.\n\
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1377 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
1378 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
1379 (frame, alist)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1380 Lisp_Object frame, alist;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1381 {
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1382 FRAME_PTR f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1383 register Lisp_Object tail, elt, prop, val;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1384
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1385 if (EQ (frame, Qnil))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1386 f = selected_frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1387 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1388 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1389 CHECK_LIVE_FRAME (frame, 0);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1390 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1391 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1392
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1393 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1394 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1395 if (FRAME_X_P (f))
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1396 #if 1
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1397 x_set_frame_parameters (f, alist);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1398 #else
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1399 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail))
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1400 {
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1401 elt = Fcar (tail);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1402 prop = Fcar (elt);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1403 val = Fcdr (elt);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1404 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
1405 store_frame_param (f, prop, val);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1406 }
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1407 #endif
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1408 #endif
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1409
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1410 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1411 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1412
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1413 DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1414 0, 1, 0,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1415 "Height in pixels of a line in the font in frame FRAME.\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1416 If FRAME is omitted, the selected frame is used.\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1417 For a terminal frame, the value is always 1.")
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1418 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1419 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1420 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1421 struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1422
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1423 if (NILP (frame))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1424 f = selected_frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1425 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1426 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1427 CHECK_FRAME (frame, 0);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1428 f = XFRAME (frame);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1429 }
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 765
diff changeset
1430
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1431 #ifdef HAVE_X_WINDOWS
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1432 if (FRAME_X_P (f))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1433 return make_number (x_char_height (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1434 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1435 #endif
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1436 return make_number (1);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1437 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1438
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1439
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1440 DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1441 0, 1, 0,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1442 "Width in pixels of characters in the font in frame FRAME.\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1443 If FRAME is omitted, the selected frame is used.\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1444 The width is the same for all characters, because\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1445 currently Emacs supports only fixed-width fonts.\n\
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1446 For a terminal screen, the value is always 1.")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1447 (frame)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1448 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1449 {
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1450 struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1451
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1452 if (NILP (frame))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1453 f = selected_frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1454 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1455 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1456 CHECK_FRAME (frame, 0);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1457 f = XFRAME (frame);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1458 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1459
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1460 #ifdef HAVE_X_WINDOWS
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1461 if (FRAME_X_P (f))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1462 return make_number (x_char_width (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1463 else
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 765
diff changeset
1464 #endif
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1465 return make_number (1);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1466 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1467
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1468 DEFUN ("frame-pixel-height", Fframe_pixel_height,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1469 Sframe_pixel_height, 0, 1, 0,
3676
5160a6967f80 Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 3658
diff changeset
1470 "Return a FRAME's height in pixels.\n\
5160a6967f80 Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 3658
diff changeset
1471 For a terminal frame, the result really gives the height in characters.\n\
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1472 If FRAME is omitted, the selected frame is used.")
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1473 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1474 Lisp_Object frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1475 {
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1476 struct frame *f;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1477
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1478 if (NILP (frame))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1479 f = selected_frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1480 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1481 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1482 CHECK_FRAME (frame, 0);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1483 f = XFRAME (frame);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1484 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1485
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1486 #ifdef HAVE_X_WINDOWS
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1487 if (FRAME_X_P (f))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1488 return make_number (x_pixel_height (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1489 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1490 #endif
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1491 return make_number (FRAME_HEIGHT (f));
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1492 }
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1493
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1494 DEFUN ("frame-pixel-width", Fframe_pixel_width,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1495 Sframe_pixel_width, 0, 1, 0,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1496 "Return FRAME's width in pixels.\n\
3676
5160a6967f80 Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 3658
diff changeset
1497 For a terminal frame, the result really gives the width in characters.\n\
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1498 If FRAME is omitted, the selected frame is used.")
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1499 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1500 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1501 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1502 struct frame *f;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1503
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1504 if (NILP (frame))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1505 f = selected_frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1506 else
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1507 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1508 CHECK_FRAME (frame, 0);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1509 f = XFRAME (frame);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1510 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1511
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1512 #ifdef HAVE_X_WINDOWS
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1513 if (FRAME_X_P (f))
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1514 return make_number (x_pixel_width (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1515 else
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 765
diff changeset
1516 #endif
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1517 return make_number (FRAME_WIDTH (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1518 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1519
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1520 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
1521 "Specify that the frame FRAME has LINES lines.\n\
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1522 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
1523 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
1524 (frame, rows, pretend)
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1525 Lisp_Object frame, rows, pretend;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1526 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1527 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1528
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1529 CHECK_NUMBER (rows, 0);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1530 if (NILP (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1531 f = selected_frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1532 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1533 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1534 CHECK_LIVE_FRAME (frame, 0);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1535 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1536 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1537
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1538 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1539 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1540 if (FRAME_X_P (f))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1541 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1542 if (XINT (rows) != f->width)
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1543 x_set_window_size (f, 1, f->width, XINT (rows));
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1544 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1545 else
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1546 #endif
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1547 change_frame_size (f, XINT (rows), 0, !NILP (pretend), 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1548 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1549 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1550
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1551 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
1552 "Specify that the frame FRAME has COLS columns.\n\
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1553 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
1554 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
1555 (frame, cols, pretend)
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1556 Lisp_Object frame, cols, pretend;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1557 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1558 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1559 CHECK_NUMBER (cols, 0);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1560 if (NILP (frame))
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1561 f = selected_frame;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1562 else
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1563 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1564 CHECK_LIVE_FRAME (frame, 0);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1565 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1566 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1567
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1568 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1569 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1570 if (FRAME_X_P (f))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1571 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1572 if (XINT (cols) != f->width)
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1573 x_set_window_size (f, 1, XINT (cols), f->height);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1574 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1575 else
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1576 #endif
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1577 change_frame_size (f, 0, XINT (cols), !NILP (pretend), 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1578 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1579 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1580
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1581 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
1582 "Sets size of FRAME to COLS by ROWS, measured in characters.")
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1583 (frame, cols, rows)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1584 Lisp_Object frame, cols, rows;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1585 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1586 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1587 int mask;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1588
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1589 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1590 CHECK_NUMBER (cols, 2);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1591 CHECK_NUMBER (rows, 1);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1592 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1593
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1594 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1595 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1596 if (FRAME_X_P (f))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1597 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1598 if (XINT (rows) != f->height || XINT (cols) != f->width)
5925
806e876cacb4 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
Richard M. Stallman <rms@gnu.org>
parents: 5552
diff changeset
1599 x_set_window_size (f, 1, XINT (cols), XINT (rows));
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1600 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1601 else
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1602 #endif
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1603 change_frame_size (f, XINT (rows), XINT (cols), 0, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1604
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1605 return Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1606 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1607
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1608 DEFUN ("set-frame-position", Fset_frame_position,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1609 Sset_frame_position, 3, 3, 0,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1610 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\
4341
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
1611 This is actually the position of the upper left corner of the frame.\n\
d07ef5ea3b58 (Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
Richard M. Stallman <rms@gnu.org>
parents: 4227
diff changeset
1612 Negative values for XOFFSET or YOFFSET are interpreted relative to\n\
4412
12c4e5b53463 (Fset_frame_position): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 4341
diff changeset
1613 the rightmost or bottommost possible position (that stays within the screen).")
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1614 (frame, xoffset, yoffset)
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1615 Lisp_Object frame, xoffset, yoffset;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1616 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1617 register struct frame *f;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1618 int mask;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1619
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1620 CHECK_LIVE_FRAME (frame, 0);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1621 CHECK_NUMBER (xoffset, 1);
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1622 CHECK_NUMBER (yoffset, 2);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1623 f = XFRAME (frame);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1624
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1625 /* I think this should be done with a hook. */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1626 #ifdef HAVE_X_WINDOWS
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1627 if (FRAME_X_P (f))
6921
50060d486c47 (Fset_frame_position): Pass new arg to x_set_offset.
Richard M. Stallman <rms@gnu.org>
parents: 6854
diff changeset
1628 x_set_offset (f, XINT (xoffset), XINT (yoffset), 1);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1629 #endif
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1630
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1631 return Qt;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1632 }
777
c99faf9381bb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 765
diff changeset
1633
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1634
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1635 choose_minibuf_frame ()
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1636 {
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1637 /* For lowest-level minibuf, put it on currently selected frame
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1638 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
1639
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1640 if (minibuf_level == 0
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1641 && 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
1642 && !EQ (minibuf_window, selected_frame->minibuffer_window))
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1643 {
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
1644 /* 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
1645 window anymore. */
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
1646 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
1647 abort ();
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
1648
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1649 Fset_window_buffer (selected_frame->minibuffer_window,
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1650 XWINDOW (minibuf_window)->buffer);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1651 minibuf_window = selected_frame->minibuffer_window;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1652 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1653 }
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1654
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1655 syms_of_frame ()
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1656 {
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1657 /*&&& init symbols here &&&*/
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1658 Qframep = intern ("framep");
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1659 staticpro (&Qframep);
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1660 Qframe_live_p = intern ("frame-live-p");
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1661 staticpro (&Qframe_live_p);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1662 Qheight = intern ("height");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1663 staticpro (&Qheight);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1664 Qicon = intern ("icon");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1665 staticpro (&Qicon);
539
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1666 Qminibuffer = intern ("minibuffer");
b99d4eb7ed93 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1667 staticpro (&Qminibuffer);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1668 Qmodeline = intern ("modeline");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1669 staticpro (&Qmodeline);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1670 Qname = intern ("name");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1671 staticpro (&Qname);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1672 Qonly = intern ("only");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1673 staticpro (&Qonly);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1674 Qunsplittable = intern ("unsplittable");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1675 staticpro (&Qunsplittable);
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
1676 Qmenu_bar_lines = intern ("menu-bar-lines");
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
1677 staticpro (&Qmenu_bar_lines);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1678 Qwidth = intern ("width");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1679 staticpro (&Qwidth);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1680 Qx = intern ("x");
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1681 staticpro (&Qx);
6246
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
1682 Qvisible = intern ("visible");
128dc040e121 (next_frame, prev_frame): If MINIBUF is `visible',
Richard M. Stallman <rms@gnu.org>
parents: 6157
diff changeset
1683 staticpro (&Qvisible);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1684
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1685 staticpro (&Vframe_list);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1686
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1687 DEFVAR_LISP ("terminal-frame", &Vterminal_frame,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1688 "The initial frame-object, which represents Emacs's stdout.");
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1689
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1690 DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified,
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1691 "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
1692 Vemacs_iconified = Qnil;
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1693
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1694 DEFVAR_LISP ("default-minibuffer-frame", &Vdefault_minibuffer_frame,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1695 "Minibufferless frames use this frame's minibuffer.\n\
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
1696 \n\
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1697 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
1698 appropriate surrogate.\n\
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
1699 \n\
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
1700 Emacs consults this variable only when creating minibufferless\n\
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1701 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
1702 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
1703 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
1704 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
1705 displayed.");
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1706 Vdefault_minibuffer_frame = Qnil;
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1707
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1708 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1709 "Alist of default values for frame creation.\n\
386
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
1710 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
1711 (setq default-frame-alist '((width . 80) (height . 55)))\n\
386
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
1712 These override values given in window system configuration data, like\n\
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
1713 X Windows' defaults database.\n\
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1714 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
1715 For values specific to the separate minibuffer frame, see\n\
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1716 `minibuffer-frame-alist'.");
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1717 Vdefault_frame_alist = Qnil;
386
6acd2a203aa8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 363
diff changeset
1718
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1719 defsubr (&Sframep);
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1809
diff changeset
1720 defsubr (&Sframe_live_p);
2298
872a3a2c3fed * frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents: 2282
diff changeset
1721 defsubr (&Shandle_switch_frame);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1722 defsubr (&Sselect_frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1723 defsubr (&Sselected_frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1724 defsubr (&Swindow_frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1725 defsubr (&Sframe_root_window);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1726 defsubr (&Sframe_selected_window);
7055
5e4906d964b8 (Fset_frame_selected_window): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7025
diff changeset
1727 defsubr (&Sset_frame_selected_window);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1728 defsubr (&Sframe_list);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1729 defsubr (&Snext_frame);
4424
027d3affb2f8 (Fprevious_frame): New function, for parity with Fnext_frame.
Roland McGrath <roland@gnu.org>
parents: 4412
diff changeset
1730 defsubr (&Sprevious_frame);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1731 defsubr (&Sdelete_frame);
454
ca410e0b4797 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 386
diff changeset
1732 defsubr (&Smouse_position);
7025
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1733 defsubr (&Smouse_pixel_position);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1734 defsubr (&Sset_mouse_position);
7025
24e759919770 (Fmouse_pixel_position, Fset_mouse_pixel_position): New functions.
Richard M. Stallman <rms@gnu.org>
parents: 6986
diff changeset
1735 defsubr (&Sset_mouse_pixel_position);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1736 #if 0
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1737 defsubr (&Sframe_configuration);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1738 defsubr (&Srestore_frame_configuration);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1739 #endif
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1740 defsubr (&Smake_frame_visible);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1741 defsubr (&Smake_frame_invisible);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1742 defsubr (&Siconify_frame);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1743 defsubr (&Sframe_visible_p);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1744 defsubr (&Svisible_frame_list);
2282
f727944c11aa * frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents: 2207
diff changeset
1745 defsubr (&Sraise_frame);
f727944c11aa * frame.c (Fraise_frame, Flower_frame): Renamed from
Jim Blandy <jimb@redhat.com>
parents: 2207
diff changeset
1746 defsubr (&Slower_frame);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1747 defsubr (&Sredirect_frame_focus);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1748 defsubr (&Sframe_focus);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1749 defsubr (&Sframe_parameters);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1750 defsubr (&Smodify_frame_parameters);
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1751 defsubr (&Sframe_char_height);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1752 defsubr (&Sframe_char_width);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1753 defsubr (&Sframe_pixel_height);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1754 defsubr (&Sframe_pixel_width);
765
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1755 defsubr (&Sset_frame_height);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1756 defsubr (&Sset_frame_width);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1757 defsubr (&Sset_frame_size);
e4093444f9f8 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 756
diff changeset
1758 defsubr (&Sset_frame_position);
286
8a40ab4a424f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1759 }
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 714
diff changeset
1760
1385
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
1761 keys_of_frame ()
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
1762 {
2298
872a3a2c3fed * frame.c (Fhandle_switch_frame): Renamed from Fselect_frame.
Jim Blandy <jimb@redhat.com>
parents: 2282
diff changeset
1763 initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame");
1385
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
1764 }
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1765
1118
a43d53261506 * frame.c (choose_minibuf_frame): abort if the selected frame has
Jim Blandy <jimb@redhat.com>
parents: 1006
diff changeset
1766 #else /* not MULTI_FRAME */
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1767
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1768 /* 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
1769 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
1770
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1771 Lisp_Object Qheight;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1772 Lisp_Object Qminibuffer;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1773 Lisp_Object Qmodeline;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1774 Lisp_Object Qname;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1775 Lisp_Object Qunsplittable;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1776 Lisp_Object Qmenu_bar_lines;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1777 Lisp_Object Qwidth;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1778
6355
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
1779 Lisp_Object Vterminal_frame;
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
1780
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1781 /* 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
1782 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
1783 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
1784 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1785 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1786 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1787 0)
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1788 ()
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1789 {
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1790 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
1791 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
1792 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
1793 }
3482
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1794 DEFUN ("framep", Fframep, Sframep, 1, 1, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1795 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1796 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1797 0)
3482
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1798 (object)
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1799 Lisp_Object object;
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1800 {
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1801 return Qnil;
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
1802 }
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1803
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1804 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1805 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1806 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1807 0)
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1808 (frame, rows, pretend)
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1809 Lisp_Object frame, rows, pretend;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1810 {
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1811 CHECK_NUMBER (rows, 0);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1812
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1813 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
1814 return Qnil;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1815 }
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1816
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1817 DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1818 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1819 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1820 0)
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1821 (frame, cols, pretend)
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1822 Lisp_Object frame, cols, pretend;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1823 {
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1824 CHECK_NUMBER (cols, 0);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1825
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1826 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
1827 return Qnil;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1828 }
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1829
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1830 DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1831 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1832 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1833 0)
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1834 (frame, cols, rows)
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1835 Lisp_Object frame, cols, rows;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1836 {
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1837 CHECK_NUMBER (cols, 2);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1838 CHECK_NUMBER (rows, 1);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1839
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1840 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
1841
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1842 return Qnil;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1843 }
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1844
2207
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1845 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0,
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1846 "Return number of lines available for display on FRAME.\n\
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1847 If FRAME is omitted, describe the currently selected frame.")
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1848 (frame)
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1849 Lisp_Object frame;
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1850 {
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1851 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
1852 }
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1853
2207
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1854 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0,
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1855 "Return number of columns available for display on FRAME.\n\
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1856 If FRAME is omitted, describe the currently selected frame.")
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1857 (frame)
d3eca6fffc5c * frame.c (Fframe_height, Fframe_width): Fix doc strings to match
Jim Blandy <jimb@redhat.com>
parents: 2131
diff changeset
1858 Lisp_Object frame;
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1859 {
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1860 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
1861 }
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1862
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1863 DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1864 0, 1, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1865 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1866 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1867 0)
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1868 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1869 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1870 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1871 return make_number (1);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1872 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1873
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1874
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1875 DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1876 0, 1, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1877 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1878 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1879 0)
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1880 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1881 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1882 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1883 return make_number (1);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1884 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1885
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1886 DEFUN ("frame-pixel-height", Fframe_pixel_height,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1887 Sframe_pixel_height, 0, 1, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1888 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1889 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1890 0)
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1891 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1892 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1893 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1894 return make_number (FRAME_HEIGHT (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1895 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1896
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1897 DEFUN ("frame-pixel-width", Fframe_pixel_width,
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1898 Sframe_pixel_width, 0, 1, 0,
6346
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1899 /* Don't confuse make-docfile by having two doc strings for this function.
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1900 make-docfile does not pay attention to #if, for good reason! */
24d32fc223d2 (framep, selected-frame, frame-char-height, frame-char-width,
Karl Heuer <kwzh@gnu.org>
parents: 6246
diff changeset
1901 0)
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1902 (frame)
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1903 Lisp_Object frame;
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1904 {
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1905 return make_number (FRAME_WIDTH (f));
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1906 }
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
1907
987
afb21e974ed2 * frame.c (make_frame): Stop passing zero to make_window; it's not
Jim Blandy <jimb@redhat.com>
parents: 965
diff changeset
1908 /* 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
1909
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1910 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
1911 "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
1912 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
1913 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
1914 (lines, pretend)
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1915 Lisp_Object lines, pretend;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1916 {
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1917 CHECK_NUMBER (lines, 0);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1918
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1919 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
1920 return Qnil;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1921 }
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1922
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1923 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
1924 "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
1925 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
1926 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
1927 (cols, pretend)
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1928 Lisp_Object cols, pretend;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1929 {
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1930 CHECK_NUMBER (cols, 0);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1931
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1932 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
1933 return Qnil;
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1934 }
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
1935
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
1936 DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0,
6854
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
1937 /* Don't confuse make-docfile by having two doc strings for this function.
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
1938 make-docfile does not pay attention to #if, for good reason! */
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
1939 0)
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
1940 ()
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
1941 {
6854
c976ac5d85ec (Fmouse_position) [MULTI_FRAME]: Use pixel_to_glyph, not glyph_to_pixel. Skip
Karl Heuer <kwzh@gnu.org>
parents: 6806
diff changeset
1942 return Fcons (Qnil, Fcons (Qnil, Qnil));
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
1943 }
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1944
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1945 void
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1946 store_in_alist (alistptr, prop, val)
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1947 Lisp_Object *alistptr, val;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1948 Lisp_Object prop;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1949 {
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1950 register Lisp_Object tem;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1951
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1952 tem = Fassq (prop, *alistptr);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1953 if (EQ (tem, Qnil))
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1954 *alistptr = Fcons (Fcons (prop, val), *alistptr);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1955 else
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1956 Fsetcdr (tem, val);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1957 }
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1958
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1959 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0,
7134
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1960 /* Don't confuse make-docfile by having two doc strings for this function.
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1961 make-docfile does not pay attention to #if, for good reason! */
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1962 0)
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1963 (frame)
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1964 Lisp_Object frame;
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1965 {
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1966 Lisp_Object alist;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1967 FRAME_PTR f;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1968
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1969 if (EQ (frame, Qnil))
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1970 f = selected_frame;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1971 else
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1972 {
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1973 CHECK_FRAME (frame, 0);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1974 f = XFRAME (frame);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1975 }
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1976
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1977 if (!FRAME_LIVE_P (f))
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1978 return Qnil;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1979
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1980 alist = Qnil;
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1981 store_in_alist (&alist, Qname, build_string ("emacs"));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1982 store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1983 store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1984 store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1985 store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1986 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1987 store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f)));
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1988
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
1989 return alist;
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1990 }
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1991
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1992 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters,
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1993 Smodify_frame_parameters, 2, 2, 0,
7134
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1994 /* Don't confuse make-docfile by having two doc strings for this function.
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1995 make-docfile does not pay attention to #if, for good reason! */
3ad5c55d40b8 (Fframe_parameters) [!MULTI_FRAME]: Replace with stub.
Karl Heuer <kwzh@gnu.org>
parents: 7095
diff changeset
1996 0)
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1997 (frame, alist)
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1998 Lisp_Object frame, alist;
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
1999 {
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
2000 return Qnil;
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
2001 }
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
2002
7271
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2003 DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0,
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2004 /* Don't confuse make-docfile by having two doc strings for this function.
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2005 make-docfile does not pay attention to #if, for good reason! */
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2006 0)
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2007 (frame)
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2008 Lisp_Object frame;
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2009 {
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2010 return Qt;
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2011 }
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2012
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2013 syms_of_frame ()
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2014 {
7162
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2015 Qheight = intern ("height");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2016 staticpro (&Qheight);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2017 Qminibuffer = intern ("minibuffer");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2018 staticpro (&Qminibuffer);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2019 Qmodeline = intern ("modeline");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2020 staticpro (&Qmodeline);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2021 Qname = intern ("name");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2022 staticpro (&Qname);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2023 Qunsplittable = intern ("unsplittable");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2024 staticpro (&Qunsplittable);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2025 Qmenu_bar_lines = intern ("menu-bar-lines");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2026 staticpro (&Qmenu_bar_lines);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2027 Qwidth = intern ("width");
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2028 staticpro (&Qwidth);
06a13bf36a8c (Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Karl Heuer <kwzh@gnu.org>
parents: 7134
diff changeset
2029
6355
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
2030 DEFVAR_LISP ("terminal-frame", &Vterminal_frame,
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
2031 "The initial frame-object, which represents Emacs's stdout.");
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
2032 XFASTINT (Vterminal_frame) = 0;
8d624c058f31 (terminal-frame) [! MULTI_FRAME]: Create this variable.
Karl Heuer <kwzh@gnu.org>
parents: 6352
diff changeset
2033
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
2034 defsubr (&Sselected_frame);
3482
ff3960b885c9 [!MULTI_FRAME] (Fframep): New dummy definition.
Richard M. Stallman <rms@gnu.org>
parents: 3283
diff changeset
2035 defsubr (&Sframep);
2068
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
2036 defsubr (&Sframe_char_height);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
2037 defsubr (&Sframe_char_width);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
2038 defsubr (&Sframe_pixel_height);
6357ea40643c (Fframe_char_height, Fframe_char_width):
Richard M. Stallman <rms@gnu.org>
parents: 1989
diff changeset
2039 defsubr (&Sframe_pixel_width);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2040 defsubr (&Sset_frame_height);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2041 defsubr (&Sset_frame_width);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2042 defsubr (&Sset_frame_size);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2043 defsubr (&Sset_screen_height);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2044 defsubr (&Sset_screen_width);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2045 defsubr (&Sframe_height);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2046 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
2047 defsubr (&Sframe_width);
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2048 Ffset (intern ("screen-width"), intern ("frame-width"));
5392
d8d5844c3ba6 Always include termhooks.h.
Richard M. Stallman <rms@gnu.org>
parents: 5231
diff changeset
2049 defsubr (&Smouse_position);
6986
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
2050 defsubr (&Sframe_parameters);
a39502978078 (Fmodify_frame_parameters, Fframe_parameters):
Richard M. Stallman <rms@gnu.org>
parents: 6924
diff changeset
2051 defsubr (&Smodify_frame_parameters);
7271
6a33d4f04dbf (Fframe_live_p): Alternative defn for not MULTI_FRAME.
Richard M. Stallman <rms@gnu.org>
parents: 7162
diff changeset
2052 defsubr (&Sframe_live_p);
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2053 }
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2054
1385
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
2055 keys_of_frame ()
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
2056 {
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
2057 }
a4a205bdd2c1 * frame.c: #include "commands.h" and "keyboard.h".
Jim Blandy <jimb@redhat.com>
parents: 1346
diff changeset
2058
965
0eb68c6c452a * frame.c (Qheight, Qicon, Qmodeline, Qname, Qnone, Qonly,
Jim Blandy <jimb@redhat.com>
parents: 886
diff changeset
2059 #endif /* not MULTI_FRAME */