annotate man/lispref/frames.texi @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children ac2d302a0011
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 @c Copyright (C) 1995, 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 @c See the file lispref.texi for copying conditions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 @setfilename ../../info/frames.info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 @node Frames, Consoles and Devices, Windows, Top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 @chapter Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 @cindex frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 A @var{frame} is a rectangle on the screen that contains one or more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 Emacs windows. A frame initially contains a single main window (plus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 perhaps a minibuffer window), which you can subdivide vertically or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 horizontally into smaller windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 @cindex terminal frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 @cindex X window frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 When XEmacs runs on a text-only terminal, it starts with one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 @dfn{TTY frame}. If you create additional ones, XEmacs displays
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 one and only one at any given time---on the terminal screen, of course.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 When XEmacs communicates directly with an X server, it does not have a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 TTY frame; instead, it starts with a single @dfn{X window frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 It can display multiple X window frames at the same time, each in its
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 own X window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 @defun framep object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 This predicate returns @code{t} if @var{object} is a frame, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 @code{nil} otherwise.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 * Creating Frames:: Creating additional frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 * Frame Parameters:: Controlling frame size, position, font, etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 * Frame Titles:: Automatic updating of frame titles.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 * Deleting Frames:: Frames last until explicitly deleted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 * Finding All Frames:: How to examine all existing frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 * Frames and Windows:: A frame contains windows;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 display of text always works through windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 * Minibuffers and Frames:: How a frame finds the minibuffer to use.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 * Input Focus:: Specifying the selected frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 * Visibility of Frames:: Frames may be visible or invisible, or icons.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 * Raising and Lowering:: Raising a frame makes it hide other X windows;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 lowering it makes the others hide them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 * Frame Configurations:: Saving the state of all frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 * Frame Hooks:: Hooks for customizing frame behavior.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 @xref{Display}, for related information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 @node Creating Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 @section Creating Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 To create a new frame, call the function @code{make-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 @defun make-frame &optional alist device
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 This function creates a new frame on @var{device}, if @var{device}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 permits creation of frames. (An X server does; an ordinary terminal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 does not.) @var{device} defaults to the selected device if omitted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 @xref{Consoles and Devices}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 The argument is an alist specifying frame parameters. Any parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 not mentioned in @var{alist} default according to the value of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 variable @code{default-frame-alist}. For X devices, parameters not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 specified in @code{default-frame-alist} default in turn from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 @code{default-x-frame-alist} and, if not specified there, from the X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 resources. For TTY devices, @code{default-tty-frame-alist} is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 consulted as well as @code{default-frame-alist}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 The set of possible parameters depends in principle on what kind of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 window system XEmacs uses to display its frames. @xref{X Frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 Parameters}, for documentation of individual parameters you can specify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 when creating an X window frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 @node Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 @section Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 A frame has many parameters that control its appearance and behavior.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 Just what parameters a frame has depends on what display mechanism it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 uses.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 Frame parameters exist for the sake of window systems. A terminal frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 has a few parameters, mostly for compatibility's sake; only the height,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 width and @code{buffer-predicate} parameters really do something.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 * Parameter Access:: How to change a frame's parameters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 * Initial Parameters:: Specifying frame parameters when you make a frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 * X Frame Parameters:: List of frame parameters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 * Size and Position:: Changing the size and position of a frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 * Frame Name:: The name of a frame (as opposed to its title).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 @node Parameter Access
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 @subsection Access to Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 These functions let you read and change the parameter values of a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 @defun frame-parameters frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 The function @code{frame-parameters} returns an alist listing all the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 parameters of @var{frame} and their values.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 @defun modify-frame-parameters frame alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 This function alters the parameters of frame @var{frame} based on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 elements of @var{alist}. Each element of @var{alist} has the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 @code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 parameter. If you don't mention a parameter in @var{alist}, its value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 doesn't change.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 @node Initial Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 @subsection Initial Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 You can specify the parameters for the initial startup frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 by setting @code{initial-frame-alist} in your @file{.emacs} file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 @defvar initial-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 This variable's value is an alist of parameter values used when creating
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 the initial X window frame. Each element has the form:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 @example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (@var{parameter} . @var{value})
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 @end example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 Emacs creates the initial frame before it reads your @file{~/.emacs}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 file. After reading that file, Emacs checks @code{initial-frame-alist},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 and applies the parameter settings in the altered value to the already
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 created initial frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 If these settings affect the frame geometry and appearance, you'll see
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 the frame appear with the wrong ones and then change to the specified
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 ones. If that bothers you, you can specify the same geometry and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 appearance with X resources; those do take affect before the frame is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 created. @xref{Resources X,, X Resources, emacs, The XEmacs User's Manual}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 X resource settings typically apply to all frames. If you want to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 specify some X resources solely for the sake of the initial frame, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 you don't want them to apply to subsequent frames, here's how to achieve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 this. Specify parameters in @code{default-frame-alist} to override the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 X resources for subsequent frames; then, to prevent these from affecting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 the initial frame, specify the same parameters in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 @code{initial-frame-alist} with values that match the X resources.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 If these parameters specify a separate minibuffer-only frame with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 @code{(minibuffer . nil)}, and you have not created one, Emacs creates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 one for you.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 @defvar minibuffer-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 This variable's value is an alist of parameter values used when creating
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 an initial minibuffer-only frame---if such a frame is needed, according
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 to the parameters for the main initial frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 @defvar default-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 This is an alist specifying default values of frame parameters for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 subsequent Emacs frames (not the initial ones).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 See also @code{special-display-frame-alist}, in @ref{Choosing Window}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 If you use options that specify window appearance when you invoke Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 they take effect by adding elements to @code{default-frame-alist}. One
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 exception is @samp{-geometry}, which adds the specified position to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 @code{initial-frame-alist} instead. @xref{Command Arguments,,, emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 The XEmacs User's Manual}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 @node X Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 @subsection X Window Frame Parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 Just what parameters a frame has depends on what display mechanism it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 uses. Here is a table of the parameters of an X window frame; of these,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 @code{name}, @code{height}, @code{width}, and @code{buffer-predicate}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 provide meaningful information in non-X frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 @table @code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 @item name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 The name of the frame. Most window managers display the frame's name in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 the frame's border, at the top of the frame. If you don't specify a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 name, and you have more than one frame, Emacs sets the frame name based
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 on the buffer displayed in the frame's selected window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 If you specify the frame name explicitly when you create the frame, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 name is also used (instead of the name of the Emacs executable) when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 looking up X resources for the frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 @item display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 The display on which to open this frame. It should be a string of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 @code{DISPLAY} environment variable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 @item left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 The screen position of the left edge, in pixels, with respect to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 left edge of the screen. The value may be a positive number @var{pos},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 or a list of the form @code{(+ @var{pos})} which permits specifying a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 negative @var{pos} value.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 A negative number @minus{}@var{pos}, or a list of the form @code{(-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 @var{pos})}, actually specifies the position of the right edge of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 window with respect to the right edge of the screen. A positive value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 of @var{pos} counts toward the left. If the parameter is a negative
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 integer @minus{}@var{pos} then @var{pos} is positive!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 @item top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 The screen position of the top edge, in pixels, with respect to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 top edge of the screen. The value may be a positive number @var{pos},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 or a list of the form @code{(+ @var{pos})} which permits specifying a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 negative @var{pos} value.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 A negative number @minus{}@var{pos}, or a list of the form @code{(-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 @var{pos})}, actually specifies the position of the bottom edge of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 window with respect to the bottom edge of the screen. A positive value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 of @var{pos} counts toward the top. If the parameter is a negative
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 integer @minus{}@var{pos} then @var{pos} is positive!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 @item icon-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 The screen position of the left edge @emph{of the frame's icon}, in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 pixels, counting from the left edge of the screen. This takes effect if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 and when the frame is iconified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 @item icon-top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 The screen position of the top edge @emph{of the frame's icon}, in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 pixels, counting from the top edge of the screen. This takes effect if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 and when the frame is iconified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 @item user-position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 Non-@code{nil} if the screen position of the frame was explicitly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 requested by the user (for example, with the @samp{-geometry} option).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 Nothing automatically makes this parameter non-@code{nil}; it is up to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 Lisp programs that call @code{make-frame} to specify this parameter as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 well as specifying the @code{left} and @code{top} parameters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 @item height
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 The height of the frame contents, in characters. (To get the height in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 @item width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 The width of the frame contents, in characters. (To get the height in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 @item window-id
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 The number of the X window for the frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 @item minibuffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 Whether this frame has its own minibuffer. The value @code{t} means
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 yes, @code{nil} means no, @code{only} means this frame is just a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 minibuffer. If the value is a minibuffer window (in some other frame),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 the new frame uses that minibuffer. (Minibuffer-only and minibuffer-less
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 frames are not yet implemented in XEmacs.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 @item buffer-predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 The buffer-predicate function for this frame. The function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 @code{other-buffer} uses this predicate (from the selected frame) to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 decide which buffers it should consider, if the predicate is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 @code{nil}. It calls the predicate with one arg, a buffer, once for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 each buffer; if the predicate returns a non-@code{nil} value, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 considers that buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 @item scroll-bar-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 The width of the vertical scroll bar, in pixels.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 @ignore Not in XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 @item icon-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 The type of icon to use for this frame when it is iconified. If the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 value is a string, that specifies a file containing a bitmap to use.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 Any other non-@code{nil} value specifies the default bitmap icon (a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 picture of a gnu); @code{nil} specifies a text icon.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 @item icon-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 The name to use in the icon for this frame, when and if the icon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 appears. If this is @code{nil}, the frame's title is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 @item cursor-color
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 The color for the cursor that shows point.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 @item border-color
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 The color for the border of the frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 @ignore Not in XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 @item cursor-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 The way to display the cursor. The legitimate values are @code{bar},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 @code{box}, and @code{(bar . @var{width})}. The symbol @code{box}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 specifies an ordinary black box overlaying the character after point;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 that is the default. The symbol @code{bar} specifies a vertical bar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 between characters as the cursor. @code{(bar . @var{width})} specifies
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 a bar @var{width} pixels wide.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 @item border-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 The width in pixels of the window border.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 @item internal-border-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 The distance in pixels between text and border.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 @item unsplittable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 If non-@code{nil}, this frame's window is never split automatically.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 @item inter-line-space
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 The space in pixels between adjacent lines of text. (Not currently
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 implemented.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 @item modeline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 Whether the frame has a modeline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 @node Size and Position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 @subsection Frame Size And Position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 @cindex size of frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 @cindex frame size
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 @cindex display lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 @cindex display columns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 @cindex resize redisplay
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 @cindex frame position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 @cindex position of frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 You can read or change the size and position of a frame using the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 frame parameters @code{left}, @code{top}, @code{height}, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 @code{width}. Whatever geometry parameters you don't specify are chosen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 by the window manager in its usual fashion.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 Here are some special features for working with sizes and positions:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 @defun set-frame-position frame left top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 This function sets the position of the top left corner of @var{frame} to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 @var{left} and @var{top}. These arguments are measured in pixels, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 count from the top left corner of the screen. Negative parameter values
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 count up or rightward from the top left corner of the screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 @defun frame-height &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 @defunx frame-width &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 These functions return the height and width of @var{frame}, measured in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 lines and columns. If you don't supply @var{frame}, they use the selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 @defun frame-pixel-height &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 @defunx frame-pixel-width &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 These functions return the height and width of @var{frame}, measured in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 pixels. If you don't supply @var{frame}, they use the selected frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 @defun set-frame-size frame cols rows &optional pretend
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 This function sets the size of @var{frame}, measured in characters;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 @var{cols} and @var{rows} specify the new width and height. (If
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 @var{pretend} is non-nil, it means that redisplay should act as if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 the frame's size is @var{cols} by @var{rows}, but the actual size
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 of the frame should not be changed. You should not normally use
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 this option.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 You can also use the functions @code{set-frame-height} and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 @code{set-frame-width} to set the height and width individually.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 The frame is the first argument and the size (in rows or columns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 is the second. (There is an optional third argument, @var{pretend},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 which has the same purpose as the corresponding argument in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 @code{set-frame-size}.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 @ignore @c Not in XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 @defun x-parse-geometry geom
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 @cindex geometry specification
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 The function @code{x-parse-geometry} converts a standard X windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 geometry string to an alist that you can use as part of the argument to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 @code{make-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 The alist describes which parameters were specified in @var{geom}, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 gives the values specified for them. Each element looks like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 @code{(@var{parameter} . @var{value})}. The possible @var{parameter}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 values are @code{left}, @code{top}, @code{width}, and @code{height}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 For the size parameters, the value must be an integer. The position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 parameter names @code{left} and @code{top} are not totally accurate,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 because some values indicate the position of the right or bottom edges
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 instead. These are the @var{value} possibilities for the position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 parameters:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 @table @asis
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 @item an integer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 A positive integer relates the left edge or top edge of the window to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 the left or top edge of the screen. A negative integer relates the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 right or bottom edge of the window to the right or bottom edge of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 @item @code{(+ @var{position})}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 This specifies the position of the left or top edge of the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 relative to the left or top edge of the screen. The integer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 @var{position} may be positive or negative; a negative value specifies a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 position outside the screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 @item @code{(- @var{position})}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 This specifies the position of the right or bottom edge of the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 relative to the right or bottom edge of the screen. The integer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 @var{position} may be positive or negative; a negative value specifies a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 position outside the screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 Here is an example:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 @example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 (x-parse-geometry "35x70+0-0")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 @result{} ((width . 35) (height . 70)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 (left . 0) (top - 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 @end example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 @node Frame Name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 @subsection The Name of a Frame (As Opposed to Its Title)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 @cindex frame name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 Under X, every frame has a name, which is not the same as the title of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 the frame. A frame's name is used to look up its resources and does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 not normally change over the lifetime of a frame. It is perfectly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 allowable, and quite common, for multiple frames to have the same
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 @defun frame-name &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 This function returns the name of @var{frame}, which defaults to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 selected frame if not specified. The name of a frame can also be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 obtained from the frame's parameters. @xref{Frame Parameters}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 @defvar default-frame-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 This variable holds the default name to assign to newly-created frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 This can be overridden by arguments to @code{make-frame}. This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 must be a string.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 @node Frame Titles
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 @section Frame Titles
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 Every frame has a title; most window managers display the frame title at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 the top of the frame. You can specify an explicit title with the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 @code{name} frame property. But normally you don't specify this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 explicitly, and Emacs computes the title automatically.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 Emacs computes the frame title based on a template stored in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 variable @code{frame-title-format}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 @defvar frame-title-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 This variable specifies how to compute a title for a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 when you have not explicitly specified one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 The variable's value is actually a modeline construct, just like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 @code{modeline-format}. @xref{Modeline Data}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 @defvar frame-icon-title-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 This variable specifies how to compute the title for an iconified frame,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 when you have not explicitly specified the frame title. This title
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 appears in the icon itself.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 @defun x-set-frame-icon-pixmap frame pixmap &optional mask
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 This function sets the icon of the given frame to the given image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 instance, which should be an image instance object (as returned by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 @code{make-image-instance}), a glyph object (as returned by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 @code{make-glyph}), or @code{nil}. If a glyph object is given, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 glyph will be instantiated on the frame to produce an image instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 object.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 If the given image instance has a mask, that will be used as the icon mask;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 however, not all window managers support this.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 The window manager is also not required to support color pixmaps,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 only bitmaps (one plane deep).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 If the image instance does not have a mask, then the optional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 third argument may be the image instance to use as the mask (it must be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 one plane deep).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 @xref{Glyphs}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 @node Deleting Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 @section Deleting Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 @cindex deletion of frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 Frames remain potentially visible until you explicitly @dfn{delete}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 them. A deleted frame cannot appear on the screen, but continues to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 exist as a Lisp object until there are no references to it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 @deffn Command delete-frame &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 This function deletes the frame @var{frame}. By default, @var{frame} is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 the selected frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 @defun frame-live-p frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 The function @code{frame-live-p} returns non-@code{nil} if the frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 @var{frame} has not been deleted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 @ignore Not in XEmacs currently
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 Some window managers provide a command to delete a window. These work
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 by sending a special message to the program that operates the window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 When Emacs gets one of these commands, it generates a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 @code{delete-frame} event, whose normal definition is a command that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 calls the function @code{delete-frame}. @xref{Misc Events}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 @node Finding All Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 @section Finding All Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 @defun frame-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 The function @code{frame-list} returns a list of all the frames that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 have not been deleted. It is analogous to @code{buffer-list} for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 buffers. The list that you get is newly created, so modifying the list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 doesn't have any effect on the internals of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 @defun device-frame-list &optional device
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 This function returns a list of all frames on @var{device}. If
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 @var{device} is @code{nil}, the selected device will be used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 @defun visible-frame-list &optional device
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 This function returns a list of just the currently visible frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 If @var{device} is specified only frames on that device will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 @xref{Visibility of Frames}. (TTY frames always count as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 ``visible'', even though only the selected one is actually displayed.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 @defun next-frame &optional frame minibuf
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 The function @code{next-frame} lets you cycle conveniently through all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 the frames from an arbitrary starting point. It returns the ``next''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 frame after @var{frame} in the cycle. If @var{frame} is omitted or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 @code{nil}, it defaults to the selected frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 The second argument, @var{minibuf}, says which frames to consider:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 @table @asis
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 @item @code{nil}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 Exclude minibuffer-only frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 @item @code{visible}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 Consider all visible frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 @item 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 Consider all visible or iconified frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 @item a window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 Consider only the frames using that particular window as their
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 @item the symbol @code{visible}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 Include all visible frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 @item @code{0}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 Include all visible and iconified frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 @item anything else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 Consider all frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 @defun previous-frame &optional frame minibuf
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 Like @code{next-frame}, but cycles through all frames in the opposite
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 See also @code{next-window} and @code{previous-window}, in @ref{Cyclic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 Window Ordering}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 @node Frames and Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 @section Frames and Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 Each window is part of one and only one frame; you can get the frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 with @code{window-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 @defun frame-root-window &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 This returns the root window of frame @var{frame}. @var{frame}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 defaults to the selected frame if not specified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 @defun window-frame &optional window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 This function returns the frame that @var{window} is on. @var{window}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 defaults to the selected window if omitted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 All the non-minibuffer windows in a frame are arranged in a cyclic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 order. The order runs from the frame's top window, which is at the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 upper left corner, down and to the right, until it reaches the window at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 the lower right corner (always the minibuffer window, if the frame has
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 one), and then it moves back to the top.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 @defun frame-top-window frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 This returns the topmost, leftmost window of frame @var{frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 At any time, exactly one window on any frame is @dfn{selected within the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 frame}. The significance of this designation is that selecting the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 frame also selects this window. You can get the frame's current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 selected window with @code{frame-selected-window}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 @defun frame-selected-window &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 This function returns the window on @var{frame} that is selected within
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 @var{frame}. @var{frame} defaults to the selected frame if not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 specified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598 Conversely, selecting a window for XEmacs with @code{select-window} also
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599 makes that window selected within its frame. @xref{Selecting Windows}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 Another function that (usually) returns one of the windows in a frame is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 @code{minibuffer-window}. @xref{Minibuffer Misc}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 @node Minibuffers and Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 @section Minibuffers and Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 Normally, each frame has its own minibuffer window at the bottom, which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 is used whenever that frame is selected. If the frame has a minibuffer,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 you can get it with @code{minibuffer-window} (@pxref{Minibuffer Misc}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 However, you can also create a frame with no minibuffer (this is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 implemented as of 19.13, but will be in 19.14). Such a frame must use
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613 the minibuffer window of some other frame. When you create the frame,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 you can specify explicitly the minibuffer window to use (in some other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615 frame). If you don't, then the minibuffer is found in the frame which is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 the value of the variable @code{default-minibuffer-frame}. Its value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 should be a frame which does have a minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 @ignore Not yet in XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 If you use a minibuffer-only frame, you might want that frame to raise
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 when you enter the minibuffer. If so, set the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 @code{minibuffer-auto-raise} to @code{t}. @xref{Raising and Lowering}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 @defvar default-minibuffer-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 This variable specifies the frame to use for the minibuffer window, by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627 default.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 @node Input Focus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631 @section Input Focus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 @cindex input focus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633 @cindex selected frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635 At any time, one frame in XEmacs is the @dfn{selected frame}. The selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 window always resides on the selected frame. As the focus moves from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 device to device, the selected frame on each device is remembered and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 restored when the focus moves back to that device.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 @defun selected-frame &optional device
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 This function returns the selected frame on @var{device}. If
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 @var{device} is not specified, the selected device will be used. If no
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 frames exist on the device, @code{nil} is returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646 The X server normally directs keyboard input to the X window that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647 mouse is in. Some window managers use mouse clicks or keyboard events
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 to @dfn{shift the focus} to various X windows, overriding the normal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 behavior of the server.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 Lisp programs can switch frames ``temporarily'' by calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 the function @code{select-frame}. This does not override the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 manager; rather, it escapes from the window manager's control until
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654 that control is somehow reasserted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 When using a text-only terminal, there is no window manager; therefore,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 @code{select-frame} is the only way to switch frames, and the effect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 lasts until overridden by a subsequent call to @code{select-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659 Only the selected terminal frame is actually displayed on the terminal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 Each terminal screen except for the initial one has a number, and the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661 number of the selected frame appears in the mode line after the word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 @samp{Emacs} (@pxref{Modeline Variables}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 @defun select-frame frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 This function selects frame @var{frame}, temporarily disregarding the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 focus of the X server if any. The selection of @var{frame} lasts until
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 the next time the user does something to select a different frame, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
668 until the next time this function is called.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 Note that this does not actually cause the window-system focus to be set
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 to this frame, or the @code{select-frame-hook} or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673 @code{deselect-frame-hook} to be run, until the next time that XEmacs is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 waiting for an event.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 @ignore (FSF Emacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 Emacs cooperates with the X server and the window managers by arranging
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 to select frames according to what the server and window manager ask
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 for. It does so by generating a special kind of input event, called a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 @dfn{focus} event. The command loop handles a focus event by calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 @code{handle-select-frame}. @xref{Focus Events}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 @deffn Command handle-switch-frame frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 This function handles a focus event by selecting frame @var{frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 Focus events normally do their job by invoking this command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687 Don't call it for any other reason.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 @defun redirect-frame-focus frame focus-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691 This function redirects focus from @var{frame} to @var{focus-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 This means that @var{focus-frame} will receive subsequent keystrokes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693 intended for @var{frame}. After such an event, the value of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 @code{last-event-frame} will be @var{focus-frame}. Also, switch-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695 events specifying @var{frame} will instead select @var{focus-frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 If @var{focus-frame} is @code{nil}, that cancels any existing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 redirection for @var{frame}, which therefore once again receives its own
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699 events.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 One use of focus redirection is for frames that don't have minibuffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
702 These frames use minibuffers on other frames. Activating a minibuffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 on another frame redirects focus to that frame. This puts the focus on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
704 the minibuffer's frame, where it belongs, even though the mouse remains
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705 in the frame that activated the minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 Selecting a frame can also change focus redirections. Selecting frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708 @code{bar}, when @code{foo} had been selected, changes any redirections
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
709 pointing to @code{foo} so that they point to @code{bar} instead. This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 allows focus redirection to work properly when the user switches from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 one frame to another using @code{select-window}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 This means that a frame whose focus is redirected to itself is treated
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 differently from a frame whose focus is not redirected.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 @code{select-frame} affects the former but not the latter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717 The redirection lasts until @code{redirect-frame-focus} is called to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 change it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722 @node Visibility of Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 @section Visibility of Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 @cindex visible frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 @cindex invisible frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 @cindex iconified frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727 @cindex frame visibility
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 An X window frame may be @dfn{visible}, @dfn{invisible}, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 @dfn{iconified}. If it is visible, you can see its contents. If it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
731 iconified, the frame's contents do not appear on the screen, but an icon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
732 does. If the frame is invisible, it doesn't show on the screen, not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733 even as an icon.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735 Visibility is meaningless for TTY frames, since only the selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
736 one is actually displayed in any case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
737
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
738 @deffn Command make-frame-visible &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739 This function makes frame @var{frame} visible. If you omit @var{frame},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
740 it makes the selected frame visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
741 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
742
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
743 @deffn Command make-frame-invisible &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744 This function makes frame @var{frame} invisible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 @deffn Command iconify-frame &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748 This function iconifies frame @var{frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 @deffn Command deiconify-frame &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752 This function de-iconifies frame @var{frame}. Under X, this is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753 equivalent to @code{make-frame-visible}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756 @defun frame-visible-p frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 This returns whether @var{frame} is currently ``visible'' (actually in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 use for display). A frame that is not visible is not updated, and, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 it works through a window system, may not show at all.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762 @defun frame-iconified-p frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763 This returns whether @var{frame} is iconified. Not all window managers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 use icons; some merely unmap the window, so this function is not the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 inverse of @code{frame-visible-p}. It is possible for a frame to not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 be visible and not be iconified either. However, if the frame is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767 iconified, it will not be visible. (Under FSF Emacs, the functionality
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768 of this function is obtained through @code{frame-visible-p}.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771 @defun frame-totally-visible-p frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772 This returns whether @var{frame} is not obscured by any other X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 windows. On TTY frames, this is the same as @code{frame-visible-p}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 @ignore @c Not in XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 The visibility status of a frame is also available as a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 parameter. You can read or change it as such. @xref{X Frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 Parameters}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781 The user can iconify and deiconify frames with the window manager.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 This happens below the level at which Emacs can exert any control, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 Emacs does provide events that you can use to keep track of such
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 changes. @xref{Misc Events}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 @node Raising and Lowering
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 @section Raising and Lowering Frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 The X Window System uses a desktop metaphor. Part of this metaphor is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791 the idea that windows are stacked in a notional third dimension
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 perpendicular to the screen surface, and thus ordered from ``highest''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 to ``lowest''. Where two windows overlap, the one higher up covers the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 one underneath. Even a window at the bottom of the stack can be seen if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 no other window overlaps it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 @cindex raising a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 @cindex lowering a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799 A window's place in this ordering is not fixed; in fact, users tend to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800 change the order frequently. @dfn{Raising} a window means moving it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801 ``up'', to the top of the stack. @dfn{Lowering} a window means moving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802 it to the bottom of the stack. This motion is in the notional third
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 dimension only, and does not change the position of the window on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806 You can raise and lower XEmacs's X windows with these functions:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808 @deffn Command raise-frame &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 This function raises frame @var{frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 @deffn Command lower-frame &optional frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 This function lowers frame @var{frame}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 @end deffn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 You can also specify auto-raise (raising automatically when a frame is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817 selected) or auto-lower (lowering automatically when it is deselected).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 Under X, most ICCCM-compliant window managers will have an option to do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 this for you, but the following variables are provided in case you're
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 using a broken WM. (Under FSF Emacs, the same functionality is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 provided through the @code{auto-raise} and @code{auto-lower}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822 frame parameters.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 @defvar auto-raise-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825 This variable's value is @code{t} if frames will be raised to the top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 when selected.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 @ignore Not in XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 @defopt minibuffer-auto-raise
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831 If this is non-@code{nil}, activation of the minibuffer raises the frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
832 that the minibuffer window is in.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833 @end defopt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834 @end ignore
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836 @defvar auto-lower-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 This variable's value is @code{t} if frames will be lowered to the bottom
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838 when no longer selected.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 Auto-raising and auto-lowering is implemented through functions attached
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 to @code{select-frame-hook} and @code{deselect-frame-hook}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843 (@pxref{Frame Hooks}). Under normal circumstances, you should not call
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844 these functions directly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 @defun default-select-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 This hook function implements the @code{auto-raise-frame} variable; it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
848 for use as the value of @code{select-frame-hook}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 @defun default-deselect-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852 This hook function implements the @code{auto-lower-frame} variable; it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853 for use as the value of @code{deselect-frame-hook}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856 @node Frame Configurations
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 @section Frame Configurations
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 @cindex frame configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 A @dfn{frame configuration} records the current arrangement of frames,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861 all their properties, and the window configuration of each one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 @defun current-frame-configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 This function returns a frame configuration list that describes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 the current arrangement of frames and their contents.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 @defun set-frame-configuration configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 This function restores the state of frames described in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 @var{configuration}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 @node Frame Hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874 @section Hooks for Customizing Frame Behavior
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 @cindex frame hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877 XEmacs provides many hooks that are called at various times during a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 frame's lifetime. @xref{Hooks}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880 @defvar create-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 This hook is called each time a frame is created. The functions are called
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 with one argument, the newly-created frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 @defvar delete-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 This hook is called each time a frame is deleted. The functions are called
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 with one argument, the about-to-be-deleted frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 @defvar select-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 This is a normal hook that is run just after a frame is selected. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 function @code{default-select-frame-hook}, which implements auto-raising
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 (@pxref{Raising and Lowering}), is normally attached to this hook.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 Note that calling @code{select-frame} does not necessarily set the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 focus: The actual window-system focus will not be changed until the next
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 time that XEmacs is waiting for an event, and even then, the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 manager may refuse the focus-change request.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 @defvar deselect-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 This is a normal hook that is run just before a frame is deselected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 (and another frame is selected). The function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 @code{default-deselect-frame-hook}, which implements auto-lowering
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 (@pxref{Raising and Lowering}), is normally attached to this hook.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 @defvar map-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 This hook is called each time a frame is mapped (i.e. made visible).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 The functions are called with one argument, the newly mapped frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 @defvar unmap-frame-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 This hook is called each time a frame is unmapped (i.e. made invisible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915 or iconified). The functions are called with one argument, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916 newly unmapped frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 @end defvar