aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/frames.texi
diff options
context:
space:
mode:
authorChong Yidong2012-03-04 14:50:18 +0800
committerChong Yidong2012-03-04 14:50:18 +0800
commita08a07e3397edbc6b916e9e87ed67355ab0b2f9e (patch)
treea7a5840534dbbed3ba101ef3fadeccbbf3737e1e /doc/lispref/frames.texi
parentea16568d87f736736a532c0684de951bc382e4a9 (diff)
downloademacs-a08a07e3397edbc6b916e9e87ed67355ab0b2f9e.tar.gz
emacs-a08a07e3397edbc6b916e9e87ed67355ab0b2f9e.zip
Update Frames chapter of Lisp manager. Document clipboard manager.
* doc/emacs/killing.texi (Clipboard): Document clipboard manager. * doc/lispref/windows.texi (Basic Windows, Coordinates and Windows) (Coordinates and Windows): * display.texi (Refresh Screen, Line Height, Face Attributes) (Overlay Arrow, Beeping, Glyphless Chars): Likewise. * doc/lispref/frames.texi (Frames): Remove little-used "terminal frame" and "window frame" terminology. (Frame Parameters, Font and Color Parameters, Initial Parameters) (Size and Position, Visibility of Frames): Callers changed. (Frames): Clarify which terminals in framep are graphical. (Initial Parameters): --geometry is not the only option which adds to initial-frame-alist. (Position Parameters): Note that icon-left and icon-top are for old window managers only. (Size Parameters): Sizes are in characters even on graphical displays. (Management Parameters): Note that window-id and outer-window-id can't really be changed, and that auto-raise isn't always obeyed. (Cursor Parameters): Document cursor-type explicitly. (Size and Position): The aliases set-screen-height and set-screen-width have been deleted. (Visibility of Frames): Mention "minimization". * doc/lispref/os.texi (Startup Summary): Minor clarifications. (Startup Summary, Suspending Emacs): Standardize on "text terminal" terminology.
Diffstat (limited to 'doc/lispref/frames.texi')
-rw-r--r--doc/lispref/frames.texi383
1 files changed, 195 insertions, 188 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 1e4ae6b135a..a01ad051489 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -23,26 +23,25 @@ into smaller windows. @xref{Splitting Windows}.
23more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp 23more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp
24object that represents a terminal. @xref{Terminal Type}. 24object that represents a terminal. @xref{Terminal Type}.
25 25
26@cindex terminal frame 26@cindex text terminal
27@cindex window frame 27@cindex graphical terminal
28 There are two classes of terminals: text-only terminals and 28@cindex graphical display
29graphical terminals. Text-only terminals are non-graphics-capable 29 There are two classes of terminals: @dfn{text terminals} and
30display devices, including ``terminal emulators'' such as xterm. On 30@dfn{graphical terminals}. Text terminals are non-graphics-capable
31text-only terminals, each frame occupies the entire terminal screen; 31displays, including @command{xterm} and other terminal emulators. On
32although you can create additional frames and switch between them, 32a text terminal, each Emacs frame occupies the terminal's entire
33only one frame can be shown at any given time. We refer to frames on 33screen; although you can create additional frames and switch between
34text-only terminals as @dfn{terminal frames}. Graphical terminals, on 34them, the terminal only shows one frame at a time. Graphical
35the other hand, are graphics-capable windowing systems, such as the X 35terminals, on the other hand, are managed by graphical display systems
36Window System. On a graphical terminal, Emacs can display multiple 36such as the X Window System, which allow Emacs to show multiple frames
37frames simultaneously. We refer to such frames as @dfn{window 37simultaneously on the same display.
38frames}.
39 38
40 On GNU and Unix systems, you can create additional frames on any 39 On GNU and Unix systems, you can create additional frames on any
41available terminal, within a single Emacs session, regardless of 40available terminal, within a single Emacs session, regardless of
42whether Emacs was started on a text-only or graphical terminal. Emacs 41whether Emacs was started on a text or graphical terminal. Emacs can
43can display on both graphical and text-only terminals simultaneously. 42display on both graphical and text terminals simultaneously. This
44This comes in handy, for instance, when you connect to the same 43comes in handy, for instance, when you connect to the same session
45session from several remote locations. @xref{Multiple Terminals}. 44from several remote locations. @xref{Multiple Terminals}.
46 45
47@defun framep object 46@defun framep object
48This predicate returns a non-@code{nil} value if @var{object} is a 47This predicate returns a non-@code{nil} value if @var{object} is a
@@ -50,14 +49,15 @@ frame, and @code{nil} otherwise. For a frame, the value indicates which
50kind of display the frame uses: 49kind of display the frame uses:
51 50
52@table @code 51@table @code
53@item x
54The frame is displayed in an X window.
55@item t 52@item t
56A terminal frame on a character display. 53The frame is displayed on a text terminal.
54@item x
55The frame is displayed on an X graphical terminal.
57@item w32 56@item w32
58The frame is displayed on MS-Windows 9X/NT. 57The frame is displayed on a MS-Windows graphical terminal.
59@item ns 58@item ns
60The frame is displayed on a GNUstep or Macintosh Cocoa display. 59The frame is displayed on a GNUstep or Macintosh Cocoa graphical
60terminal.
61@item pc 61@item pc
62The frame is displayed on an MS-DOS terminal. 62The frame is displayed on an MS-DOS terminal.
63@end table 63@end table
@@ -71,10 +71,10 @@ selected frame.
71 71
72@defun terminal-live-p object 72@defun terminal-live-p object
73This predicate returns a non-@code{nil} value if @var{object} is a 73This predicate returns a non-@code{nil} value if @var{object} is a
74terminal that is alive (i.e.@: was not deleted), and @code{nil} 74terminal that is live (i.e.@: not deleted), and @code{nil} otherwise.
75otherwise. For live terminals, the return value indicates what kind 75For live terminals, the return value indicates what kind of frames are
76of frames are displayed on that terminal; the list of possible values 76displayed on that terminal; the list of possible values is the same as
77is the same as for @code{framep} above. 77for @code{framep} above.
78@end defun 78@end defun
79 79
80@menu 80@menu
@@ -99,7 +99,7 @@ is the same as for @code{framep} above.
99* Window System Selections:: Transferring text to and from other X clients. 99* Window System Selections:: Transferring text to and from other X clients.
100* Drag and Drop:: Internals of Drag-and-Drop implementation. 100* Drag and Drop:: Internals of Drag-and-Drop implementation.
101* Color Names:: Getting the definitions of color names. 101* Color Names:: Getting the definitions of color names.
102* Text Terminal Colors:: Defining colors for text-only terminals. 102* Text Terminal Colors:: Defining colors for text terminals.
103* Resources:: Getting resource values from the server. 103* Resources:: Getting resource values from the server.
104* Display Feature Testing:: Determining the features of a terminal. 104* Display Feature Testing:: Determining the features of a terminal.
105@end menu 105@end menu
@@ -118,7 +118,7 @@ for the new frame. @xref{Frame Parameters}. If you specify the
118@code{terminal} parameter in @var{alist}, the new frame is created on 118@code{terminal} parameter in @var{alist}, the new frame is created on
119that terminal. Otherwise, if you specify the @code{window-system} 119that terminal. Otherwise, if you specify the @code{window-system}
120frame parameter in @var{alist}, that determines whether the frame 120frame parameter in @var{alist}, that determines whether the frame
121should be displayed on a text-only or graphical terminal. 121should be displayed on a text terminal or a graphical terminal.
122@xref{Window Systems}. If neither is specified, the new frame is 122@xref{Window Systems}. If neither is specified, the new frame is
123created in the same terminal as the selected frame. 123created in the same terminal as the selected frame.
124 124
@@ -163,15 +163,15 @@ frame.
163@cindex multiple X displays 163@cindex multiple X displays
164@cindex displays, multiple 164@cindex displays, multiple
165 165
166 Emacs represents each terminal, whether graphical or text-only, as a 166 Emacs represents each terminal as a @dfn{terminal object} data type
167@dfn{terminal object} data type (@pxref{Terminal Type}). On GNU and 167(@pxref{Terminal Type}). On GNU and Unix systems, Emacs can use
168Unix systems, Emacs can use multiple terminals simultaneously in each 168multiple terminals simultaneously in each session. On other systems,
169session. On other systems, it can only use a single terminal. Each 169it can only use a single terminal. Each terminal object has the
170terminal object has the following attributes: 170following attributes:
171 171
172@itemize @bullet 172@itemize @bullet
173@item 173@item
174The name of the device used by the terminal (e.g., @samp{:0.0} or 174The name of the device used by the terminal (e.g.@: @samp{:0.0} or
175@file{/dev/tty}). 175@file{/dev/tty}).
176 176
177@item 177@item
@@ -180,7 +180,7 @@ The terminal and keyboard coding systems used on the terminal.
180 180
181@item 181@item
182The kind of display associated with the terminal. This is the symbol 182The kind of display associated with the terminal. This is the symbol
183returned by the function @code{terminal-live-p} (i.e., @code{x}, 183returned by the function @code{terminal-live-p} (i.e.@: @code{x},
184@code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}. 184@code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}.
185 185
186@item 186@item
@@ -189,7 +189,7 @@ A list of terminal parameters. @xref{Terminal Parameters}.
189 189
190 There is no primitive for creating terminal objects. Emacs creates 190 There is no primitive for creating terminal objects. Emacs creates
191them as needed, such as when you call @code{make-frame-on-display} 191them as needed, such as when you call @code{make-frame-on-display}
192(which is described below). 192(described below).
193 193
194@defun terminal-name &optional terminal 194@defun terminal-name &optional terminal
195This function returns the file name of the device used by 195This function returns the file name of the device used by
@@ -199,7 +199,7 @@ a frame, meaning that frame's terminal.
199@end defun 199@end defun
200 200
201@defun terminal-list 201@defun terminal-list
202This function returns a list of all terminal objects currently in use. 202This function returns a list of all live terminal objects.
203@end defun 203@end defun
204 204
205@defun get-device-terminal device 205@defun get-device-terminal device
@@ -248,15 +248,15 @@ never be buffer-local (@pxref{Buffer-Local Variables}).
248 248
249 On GNU and Unix systems, each X display is a separate graphical 249 On GNU and Unix systems, each X display is a separate graphical
250terminal. When Emacs is started from within the X window system, it 250terminal. When Emacs is started from within the X window system, it
251uses the X display chosen with the @code{DISPLAY} environment 251uses the X display specified by the @env{DISPLAY} environment
252variable, or with the @samp{--display} option. @xref{Initial 252variable, or by the @samp{--display} option (@pxref{Initial Options,,,
253Options,,, emacs, The GNU Emacs Manual}. Emacs can connect to other X 253emacs, The GNU Emacs Manual}). Emacs can connect to other X displays
254displays via the command @code{make-frame-on-display}. Each X display 254via the command @code{make-frame-on-display}. Each X display has its
255has its own selected frame and its own minibuffer windows; however, 255own selected frame and its own minibuffer windows; however, only one
256only one of those frames is ``@emph{the} selected frame'' at any given 256of those frames is ``@emph{the} selected frame'' at any given moment
257moment (@pxref{Input Focus}). Emacs can even connect to other 257(@pxref{Input Focus}). Emacs can even connect to other text
258text-only terminals, by interacting with the @command{emacsclient} 258terminals, by interacting with the @command{emacsclient} program.
259program. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. 259@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
260 260
261 A single X server can handle more than one display. Each X display 261 A single X server can handle more than one display. Each X display
262has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. 262has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}.
@@ -267,8 +267,8 @@ server, Emacs knows by the similarity in their names that they share a
267single keyboard. 267single keyboard.
268 268
269 On some ``multi-monitor'' setups, a single X display outputs to more 269 On some ``multi-monitor'' setups, a single X display outputs to more
270than one monitor. Currently, there is no way for Emacs to distinguish 270than one physical monitor. Currently, there is no way for Emacs to
271between the different physical monitors. 271distinguish between the different physical monitors.
272 272
273@deffn Command make-frame-on-display display &optional parameters 273@deffn Command make-frame-on-display display &optional parameters
274This function creates and returns a new frame on @var{display}, taking 274This function creates and returns a new frame on @var{display}, taking
@@ -277,8 +277,8 @@ the other frame parameters from the alist @var{parameters}.
277 277
278Before creating the frame, this function ensures that Emacs is ``set 278Before creating the frame, this function ensures that Emacs is ``set
279up'' to display graphics. For instance, if Emacs has not processed X 279up'' to display graphics. For instance, if Emacs has not processed X
280resources (e.g., if it was started on a text-only terminal), it does 280resources (e.g.@: if it was started on a text terminal), it does so at
281so at this time. In all other respects, this function behaves like 281this time. In all other respects, this function behaves like
282@code{make-frame} (@pxref{Creating Frames}). 282@code{make-frame} (@pxref{Creating Frames}).
283@end deffn 283@end deffn
284 284
@@ -324,15 +324,15 @@ on that display (@pxref{Deleting Frames}).
324Just what parameters a frame has depends on what display mechanism it 324Just what parameters a frame has depends on what display mechanism it
325uses. 325uses.
326 326
327 Frame parameters exist mostly for the sake of window systems. A 327 Frame parameters exist mostly for the sake of graphical displays.
328terminal frame has a few parameters, mostly for compatibility's sake; 328Most frame parameters have no effect when applied to a frame on a text
329only the @code{height}, @code{width}, @code{name}, @code{title}, 329terminal; only the @code{height}, @code{width}, @code{name},
330@code{menu-bar-lines}, @code{buffer-list} and @code{buffer-predicate} 330@code{title}, @code{menu-bar-lines}, @code{buffer-list} and
331parameters do something special. If the terminal supports colors, the 331@code{buffer-predicate} parameters do something special. If the
332parameters @code{foreground-color}, @code{background-color}, 332terminal supports colors, the parameters @code{foreground-color},
333@code{background-mode} and @code{display-type} are also meaningful. 333@code{background-color}, @code{background-mode} and
334If the terminal supports frame transparency, the parameter 334@code{display-type} are also meaningful. If the terminal supports
335@code{alpha} is also meaningful. 335frame transparency, the parameter @code{alpha} is also meaningful.
336 336
337@menu 337@menu
338* Parameter Access:: How to change a frame's parameters. 338* Parameter Access:: How to change a frame's parameters.
@@ -386,12 +386,13 @@ parameter values to frames that will be created henceforth.
386@node Initial Parameters 386@node Initial Parameters
387@subsection Initial Frame Parameters 387@subsection Initial Frame Parameters
388 388
389You can specify the parameters for the initial startup frame 389You can specify the parameters for the initial startup frame by
390by setting @code{initial-frame-alist} in your init file (@pxref{Init File}). 390setting @code{initial-frame-alist} in your init file (@pxref{Init
391File}).
391 392
392@defopt initial-frame-alist 393@defopt initial-frame-alist
393This variable's value is an alist of parameter values used when creating 394This variable's value is an alist of parameter values used when
394the initial window frame. You can set this variable to specify the 395creating the initial frame. You can set this variable to specify the
395appearance of the initial frame without altering subsequent frames. 396appearance of the initial frame without altering subsequent frames.
396Each element has the form: 397Each element has the form:
397 398
@@ -443,11 +444,13 @@ Functions that display a buffer in a separate frame can override the
443default parameters by supplying their own parameters. @xref{Definition 444default parameters by supplying their own parameters. @xref{Definition
444of special-display-frame-alist}. 445of special-display-frame-alist}.
445 446
446If you use options that specify window appearance when you invoke Emacs, 447If you invoke Emacs with command-line options that specify frame
447they take effect by adding elements to @code{default-frame-alist}. One 448appearance, those options take effect by adding elements to either
448exception is @samp{-geometry}, which adds the specified position to 449@code{initial-frame-alist} or @code{default-frame-alist}. Options
449@code{initial-frame-alist} instead. @xref{Emacs Invocation,, Command 450which affect just the initial frame, such as @samp{-geometry} and
450Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}. 451@samp{--maximized}, add to @code{initial-frame-alist}; the others add
452to @code{default-frame-alist}. @pxref{Emacs Invocation,, Command Line
453Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}.
451 454
452@node Window Frame Parameters 455@node Window Frame Parameters
453@subsection Window Frame Parameters 456@subsection Window Frame Parameters
@@ -458,8 +461,8 @@ it uses. This section describes the parameters that have special
458meanings on some or all kinds of terminals. Of these, @code{name}, 461meanings on some or all kinds of terminals. Of these, @code{name},
459@code{title}, @code{height}, @code{width}, @code{buffer-list} and 462@code{title}, @code{height}, @code{width}, @code{buffer-list} and
460@code{buffer-predicate} provide meaningful information in terminal 463@code{buffer-predicate} provide meaningful information in terminal
461frames, and @code{tty-color-mode} is meaningful @emph{only} in 464frames, and @code{tty-color-mode} is meaningful only for frames on
462terminal frames. 465text terminals.
463 466
464@menu 467@menu
465* Basic Parameters:: Parameters that are fundamental. 468* Basic Parameters:: Parameters that are fundamental.
@@ -523,7 +526,7 @@ named, this parameter will be @code{nil}.
523@cindex window position on display 526@cindex window position on display
524 527
525 Position parameters' values are normally measured in pixels, but on 528 Position parameters' values are normally measured in pixels, but on
526text-only terminals they count characters or lines instead. 529text terminals they count characters or lines instead.
527 530
528@table @code 531@table @code
529@vindex left, a frame parameter 532@vindex left, a frame parameter
@@ -560,19 +563,17 @@ to the top (or bottom) edge of the screen. It works just like
560 563
561@vindex icon-left, a frame parameter 564@vindex icon-left, a frame parameter
562@item icon-left 565@item icon-left
563The screen position of the left edge @emph{of the frame's icon}, in 566The screen position of the left edge of the frame's icon, in pixels,
564pixels, counting from the left edge of the screen. This takes effect if 567counting from the left edge of the screen. This takes effect when the
565and when the frame is iconified. 568frame is iconified, if the window manager supports this feature. If
566 569you specify a value for this parameter, then you must also specify a
567If you specify a value for this parameter, then you must also specify 570value for @code{icon-top} and vice versa.
568a value for @code{icon-top} and vice versa. The window manager may
569ignore these two parameters.
570 571
571@vindex icon-top, a frame parameter 572@vindex icon-top, a frame parameter
572@item icon-top 573@item icon-top
573The screen position of the top edge @emph{of the frame's icon}, in 574The screen position of the top edge of the frame's icon, in pixels,
574pixels, counting from the top edge of the screen. This takes effect if 575counting from the top edge of the screen. This takes effect when the
575and when the frame is iconified. 576frame is iconified, if the window manager supports this feature.
576 577
577@vindex user-position, a frame parameter 578@vindex user-position, a frame parameter
578@item user-position 579@item user-position
@@ -600,8 +601,9 @@ parameters represent the user's stated preference; otherwise, use
600@subsubsection Size Parameters 601@subsubsection Size Parameters
601@cindex window size on display 602@cindex window size on display
602 603
603 Size parameters' values are normally measured in pixels, but on 604 Frame parameters specify frame sizes in character units. On
604text-only terminals they count characters or lines instead. 605graphical displays, the @code{default} face determines the actual
606pixel sizes of these character units (@pxref{Face Attributes}).
605 607
606@table @code 608@table @code
607@vindex height, a frame parameter 609@vindex height, a frame parameter
@@ -756,8 +758,9 @@ If non-@code{nil}, this frame's window is never split automatically.
756@subsubsection Window Management Parameters 758@subsubsection Window Management Parameters
757@cindex window manager interaction, and frame parameters 759@cindex window manager interaction, and frame parameters
758 760
759 These frame parameters, meaningful only on window system displays, 761 The following frame parameters control various aspects of the
760interact with the window manager. 762frame's interaction with the window manager. They have no effect on
763text terminals.
761 764
762@table @code 765@table @code
763@vindex visibility, a frame parameter 766@vindex visibility, a frame parameter
@@ -768,11 +771,13 @@ iconified. @xref{Visibility of Frames}.
768 771
769@vindex auto-raise, a frame parameter 772@vindex auto-raise, a frame parameter
770@item auto-raise 773@item auto-raise
771Whether selecting the frame raises it (non-@code{nil} means yes). 774If non-@code{nil}, Emacs automatically raises the frame when it is
775selected. Some window managers do not allow this.
772 776
773@vindex auto-lower, a frame parameter 777@vindex auto-lower, a frame parameter
774@item auto-lower 778@item auto-lower
775Whether deselecting the frame lowers it (non-@code{nil} means yes). 779If non-@code{nil}, Emacs automatically lowers the frame when it is
780deselected. Some window managers do not allow this.
776 781
777@vindex icon-type, a frame parameter 782@vindex icon-type, a frame parameter
778@item icon-type 783@item icon-type
@@ -788,12 +793,15 @@ appears. If this is @code{nil}, the frame's title is used.
788 793
789@vindex window-id, a frame parameter 794@vindex window-id, a frame parameter
790@item window-id 795@item window-id
791The number of the window-system window used by the frame 796The ID number which the graphical display uses for this frame. Emacs
792to contain the actual Emacs windows. 797assigns this parameter when the frame is created; changing the
798parameter has no effect on the actual ID number.
793 799
794@vindex outer-window-id, a frame parameter 800@vindex outer-window-id, a frame parameter
795@item outer-window-id 801@item outer-window-id
796The number of the outermost window-system window used for the whole frame. 802The ID number of the outermost window-system window in which the frame
803exists. As with @code{window-id}, changing this parameter has no
804actual effect.
797 805
798@vindex wait-for-wm, a frame parameter 806@vindex wait-for-wm, a frame parameter
799@item wait-for-wm 807@item wait-for-wm
@@ -848,9 +856,26 @@ Display a horizontal bar @var{height} pixels high.
848@end table 856@end table
849 857
850@vindex cursor-type 858@vindex cursor-type
851The buffer-local variable @code{cursor-type} overrides the value of 859The @code{cursor-type} frame parameter may be overridden by the
852the @code{cursor-type} frame parameter, but if it is @code{t}, that 860variables @code{cursor-type} and
853means to use the cursor specified for the frame. 861@code{cursor-in-non-selected-windows}:
862
863@defvar cursor-type
864This buffer-local variable controls how the cursor looks in a selected
865window showing the buffer. If its value is @code{t}, that means to
866use the cursor specified by the @code{cursor-type} frame parameter.
867Otherwise, the value should be one of the cursor types listed above,
868and it overrides the @code{cursor-type} frame parameter.
869@end defvar
870
871@defopt cursor-in-non-selected-windows
872This buffer-local variable controls how the cursor looks in a window
873that is not selected. It supports the same values as the
874@code{cursor-type} frame parameter; also, @code{nil} means don't
875display a cursor in nonselected windows, and @code{t} (the default)
876means use a standard modification of the usual cursor type (solid box
877becomes hollow box, and bar becomes a narrower bar).
878@end defopt
854 879
855@defopt blink-cursor-alist 880@defopt blink-cursor-alist
856This variable specifies how to blink the cursor. Each element has the 881This variable specifies how to blink the cursor. Each element has the
@@ -866,15 +891,6 @@ variable do not take effect immediately, only when you specify the
866@code{cursor-type} frame parameter. 891@code{cursor-type} frame parameter.
867@end defopt 892@end defopt
868 893
869@defopt cursor-in-non-selected-windows
870This variable controls how the cursor looks in a window that is not
871selected. It supports the same values as the @code{cursor-type} frame
872parameter; also, @code{nil} means don't display a cursor in
873nonselected windows, and @code{t} (the default) means use a standard
874modification of the usual cursor type (solid box becomes hollow box,
875and bar becomes a narrower bar).
876@end defopt
877
878@node Font and Color Parameters 894@node Font and Color Parameters
879@subsubsection Font and Color Parameters 895@subsubsection Font and Color Parameters
880@cindex font and color, frame parameters 896@cindex font and color, frame parameters
@@ -903,7 +919,7 @@ to whether the background color is a light one or a dark one.
903@cindex standard colors for character terminals 919@cindex standard colors for character terminals
904This parameter overrides the terminal's color support as given by the 920This parameter overrides the terminal's color support as given by the
905system's terminal capabilities database in that this parameter's value 921system's terminal capabilities database in that this parameter's value
906specifies the color mode to use in terminal frames. The value can be 922specifies the color mode to use on a text terminal. The value can be
907either a symbol or a number. A number specifies the number of colors 923either a symbol or a number. A number specifies the number of colors
908to use (and, indirectly, what commands to issue to produce each 924to use (and, indirectly, what commands to issue to produce each
909color). For example, @code{(tty-color-mode . 8)} specifies use of the 925color). For example, @code{(tty-color-mode . 8)} specifies use of the
@@ -1047,17 +1063,17 @@ selected frame.
1047@defunx frame-pixel-width &optional frame 1063@defunx frame-pixel-width &optional frame
1048These functions return the height and width of the main display area 1064These functions return the height and width of the main display area
1049of @var{frame}, measured in pixels. If you don't supply @var{frame}, 1065of @var{frame}, measured in pixels. If you don't supply @var{frame},
1050they use the selected frame. For a text-only terminal, the results are 1066they use the selected frame. For a text terminal, the results are in
1051in characters rather than pixels. 1067characters rather than pixels.
1052 1068
1053These values include the internal borders, and windows' scroll bars and 1069These values include the internal borders, and windows' scroll bars
1054fringes (which belong to individual windows, not to the frame itself). 1070and fringes (which belong to individual windows, not to the frame
1055The exact value of the heights depends on the window-system and toolkit 1071itself). The exact value of the heights depends on the window-system
1056in use. With Gtk+, the height does not include any tool bar or menu 1072and toolkit in use. With Gtk+, the height does not include any tool
1057bar. With the Motif or Lucid toolkits, it includes the tool bar but 1073bar or menu bar. With the Motif or Lucid toolkits, it includes the
1058not the menu bar. In a graphical version with no toolkit, it includes 1074tool bar but not the menu bar. In a graphical version with no
1059both the tool bar and menu bar. For a text-only terminal, the result 1075toolkit, it includes both the tool bar and menu bar. For a text
1060includes the menu bar. 1076terminal, the result includes the menu bar.
1061@end defun 1077@end defun
1062 1078
1063@defun frame-char-height &optional frame 1079@defun frame-char-height &optional frame
@@ -1084,13 +1100,13 @@ fit.
1084 1100
1085If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines} 1101If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines}
1086lines of output in @var{frame}, but does not change its value for the 1102lines of output in @var{frame}, but does not change its value for the
1087actual height of the frame. This is only useful for a terminal frame. 1103actual height of the frame. This is only useful on text terminals.
1088Using a smaller height than the terminal actually implements may be 1104Using a smaller height than the terminal actually implements may be
1089useful to reproduce behavior observed on a smaller screen, or if the 1105useful to reproduce behavior observed on a smaller screen, or if the
1090terminal malfunctions when using its whole screen. Setting the frame 1106terminal malfunctions when using its whole screen. Setting the frame
1091height ``for real'' does not always work, because knowing the correct 1107height ``for real'' does not always work, because knowing the correct
1092actual size may be necessary for correct cursor positioning on a 1108actual size may be necessary for correct cursor positioning on
1093terminal frame. 1109text terminals.
1094@end defun 1110@end defun
1095 1111
1096@defun set-frame-width frame width &optional pretend 1112@defun set-frame-width frame width &optional pretend
@@ -1099,13 +1115,6 @@ The argument @var{pretend} has the same meaning as in
1099@code{set-frame-height}. 1115@code{set-frame-height}.
1100@end defun 1116@end defun
1101 1117
1102@findex set-screen-height
1103@findex set-screen-width
1104 The older functions @code{set-screen-height} and
1105@code{set-screen-width} were used to specify the height and width of the
1106screen, in Emacs versions that did not support multiple frames. They
1107are semi-obsolete, but still work; they apply to the selected frame.
1108
1109@node Geometry 1118@node Geometry
1110@subsection Geometry 1119@subsection Geometry
1111 1120
@@ -1230,9 +1239,10 @@ while processing @code{frame-title-format} or
1230@section Deleting Frames 1239@section Deleting Frames
1231@cindex deleting frames 1240@cindex deleting frames
1232 1241
1233Frames remain potentially visible until you explicitly @dfn{delete} 1242 A @dfn{live frame} is one that has not been deleted. When a frame
1234them. A deleted frame cannot appear on the screen, but continues to 1243is deleted, it is removed from its terminal display, although it may
1235exist as a Lisp object until there are no references to it. 1244continue to exist as a Lisp object until there are no more references
1245to it.
1236 1246
1237@deffn Command delete-frame &optional frame force 1247@deffn Command delete-frame &optional frame force
1238@vindex delete-frame-functions 1248@vindex delete-frame-functions
@@ -1263,25 +1273,25 @@ calls the function @code{delete-frame}. @xref{Misc Events}.
1263@cindex frames, scanning all 1273@cindex frames, scanning all
1264 1274
1265@defun frame-list 1275@defun frame-list
1266The function @code{frame-list} returns a list of all the live frames, 1276This function returns a list of all the live frames, i.e.@: those that
1267i.e.@: those that have not been deleted. It is analogous to 1277have not been deleted. It is analogous to @code{buffer-list} for
1268@code{buffer-list} for buffers, and includes frames on all terminals. 1278buffers, and includes frames on all terminals. The list that you get
1269The list that you get is newly created, so modifying the list doesn't 1279is newly created, so modifying the list doesn't have any effect on the
1270have any effect on the internals of Emacs. 1280internals of Emacs.
1271@end defun 1281@end defun
1272 1282
1273@defun visible-frame-list 1283@defun visible-frame-list
1274This function returns a list of just the currently visible frames. 1284This function returns a list of just the currently visible frames.
1275@xref{Visibility of Frames}. (Terminal frames always count as 1285@xref{Visibility of Frames}. Frames on text terminals always count as
1276``visible,'' even though only the selected one is actually displayed.) 1286``visible'', even though only the selected one is actually displayed.
1277@end defun 1287@end defun
1278 1288
1279@defun next-frame &optional frame minibuf 1289@defun next-frame &optional frame minibuf
1280The function @code{next-frame} lets you cycle conveniently through all 1290This function lets you cycle conveniently through all the frames on
1281the frames on the current display from an arbitrary starting point. It 1291the current display from an arbitrary starting point. It returns the
1282returns the ``next'' frame after @var{frame} in the cycle. If 1292``next'' frame after @var{frame} in the cycle. If @var{frame} is
1283@var{frame} is omitted or @code{nil}, it defaults to the selected frame 1293omitted or @code{nil}, it defaults to the selected frame (@pxref{Input
1284(@pxref{Input Focus}). 1294Focus}).
1285 1295
1286The second argument, @var{minibuf}, says which frames to consider: 1296The second argument, @var{minibuf}, says which frames to consider:
1287 1297
@@ -1369,20 +1379,20 @@ function @code{select-frame}. This does not alter the window system's
1369concept of focus; rather, it escapes from the window manager's control 1379concept of focus; rather, it escapes from the window manager's control
1370until that control is somehow reasserted. 1380until that control is somehow reasserted.
1371 1381
1372When using a text-only terminal, only one frame can be displayed at a 1382When using a text terminal, only one frame can be displayed at a time
1373time on the terminal, so after a call to @code{select-frame}, the next 1383on the terminal, so after a call to @code{select-frame}, the next
1374redisplay actually displays the newly selected frame. This frame 1384redisplay actually displays the newly selected frame. This frame
1375remains selected until a subsequent call to @code{select-frame}. Each 1385remains selected until a subsequent call to @code{select-frame}. Each
1376terminal frame has a number which appears in the mode line before the 1386frame on a text terminal has a number which appears in the mode line
1377buffer name (@pxref{Mode Line Variables}). 1387before the buffer name (@pxref{Mode Line Variables}).
1378 1388
1379@defun select-frame-set-input-focus frame &optional norecord 1389@defun select-frame-set-input-focus frame &optional norecord
1380This function selects @var{frame}, raises it (should it happen to be 1390This function selects @var{frame}, raises it (should it happen to be
1381obscured by other frames) and tries to give it the X server's focus. 1391obscured by other frames) and tries to give it the X server's focus.
1382On a text-only terminal, the next redisplay displays the new frame on 1392On a text terminal, the next redisplay displays the new frame on the
1383the entire terminal screen. The optional argument @var{norecord} has 1393entire terminal screen. The optional argument @var{norecord} has the
1384the same meaning as for @code{select-frame} (see below). The return 1394same meaning as for @code{select-frame} (see below). The return value
1385value of this function is not significant. 1395of this function is not significant.
1386@end defun 1396@end defun
1387 1397
1388@defun select-frame frame &optional norecord 1398@defun select-frame frame &optional norecord
@@ -1466,20 +1476,34 @@ position consistent with the new selected frame.
1466@cindex visible frame 1476@cindex visible frame
1467@cindex invisible frame 1477@cindex invisible frame
1468@cindex iconified frame 1478@cindex iconified frame
1479@cindex minimized frame
1469@cindex frame visibility 1480@cindex frame visibility
1470 1481
1471A window frame may be @dfn{visible}, @dfn{invisible}, or 1482A frame on a graphical display may be @dfn{visible}, @dfn{invisible},
1472@dfn{iconified}. If it is visible, you can see its contents, unless 1483or @dfn{iconified}. If it is visible, its contents are displayed in
1473other windows cover it. If it is iconified, the frame's contents do 1484the usual manner. If it is iconified, its contents are not displayed,
1474not appear on the screen, but an icon does. (Note: because of the 1485but there is a little icon somewhere to bring the frame back into view
1475way in which some window managers implement the concept of multiple 1486(some window managers refer to this state as @dfn{minimized} rather
1476workspaces, or desktops, all frames on other workspaces may appear to 1487than @dfn{iconified}, but from Emacs' point of view they are the same
1477Emacs to be iconified.) If the frame is invisible, it doesn't show on 1488thing). If a frame is invisible, it is not displayed at all.
1478the screen, not even as an icon.
1479 1489
1480Visibility is meaningless for terminal frames, since only the selected 1490 Visibility is meaningless on text terminals, since only the selected
1481one is actually displayed in any case. 1491one is actually displayed in any case.
1482 1492
1493@defun frame-visible-p frame
1494This function returns the visibility status of frame @var{frame}. The
1495value is @code{t} if @var{frame} is visible, @code{nil} if it is
1496invisible, and @code{icon} if it is iconified.
1497
1498On a text terminal, all frames are considered visible, whether they
1499are currently being displayed or not.
1500@end defun
1501
1502@deffn Command iconify-frame &optional frame
1503This function iconifies frame @var{frame}. If you omit @var{frame}, it
1504iconifies the selected frame.
1505@end deffn
1506
1483@deffn Command make-frame-visible &optional frame 1507@deffn Command make-frame-visible &optional frame
1484This function makes frame @var{frame} visible. If you omit 1508This function makes frame @var{frame} visible. If you omit
1485@var{frame}, it makes the selected frame visible. This does not raise 1509@var{frame}, it makes the selected frame visible. This does not raise
@@ -1495,29 +1519,12 @@ Unless @var{force} is non-@code{nil}, this function refuses to make
1495@var{frame} invisible if all other frames are invisible.. 1519@var{frame} invisible if all other frames are invisible..
1496@end deffn 1520@end deffn
1497 1521
1498@deffn Command iconify-frame &optional frame
1499This function iconifies frame @var{frame}. If you omit @var{frame}, it
1500iconifies the selected frame.
1501@end deffn
1502
1503@defun frame-visible-p frame
1504This returns the visibility status of frame @var{frame}. The value is
1505@code{t} if @var{frame} is visible, @code{nil} if it is invisible, and
1506@code{icon} if it is iconified.
1507
1508On a text-only terminal, all frames are considered visible, whether
1509they are currently being displayed or not, and this function returns
1510@code{t} for all frames.
1511@end defun
1512
1513 The visibility status of a frame is also available as a frame 1522 The visibility status of a frame is also available as a frame
1514parameter. You can read or change it as such. @xref{Management 1523parameter. You can read or change it as such. @xref{Management
1515Parameters}. 1524Parameters}. The user can also iconify and deiconify frames with the
1516 1525window manager. This happens below the level at which Emacs can exert
1517 The user can iconify and deiconify frames with the window manager. 1526any control, but Emacs does provide events that you can use to keep
1518This happens below the level at which Emacs can exert any control, but 1527track of such changes. @xref{Misc Events}.
1519Emacs does provide events that you can use to keep track of such
1520changes. @xref{Misc Events}.
1521 1528
1522@node Raising and Lowering 1529@node Raising and Lowering
1523@section Raising and Lowering Frames 1530@section Raising and Lowering Frames
@@ -2110,10 +2117,10 @@ and that name is still supported as an alias.
2110 2117
2111@node Text Terminal Colors 2118@node Text Terminal Colors
2112@section Text Terminal Colors 2119@section Text Terminal Colors
2113@cindex colors on text-only terminals 2120@cindex colors on text terminals
2114 2121
2115 Text-only terminals usually support only a small number of colors, 2122 Text terminals usually support only a small number of colors, and
2116and the computer uses small integers to select colors on the terminal. 2123the computer uses small integers to select colors on the terminal.
2117This means that the computer cannot reliably tell what the selected 2124This means that the computer cannot reliably tell what the selected
2118color looks like; instead, you have to inform your application which 2125color looks like; instead, you have to inform your application which
2119small integers correspond to which colors. However, Emacs does know 2126small integers correspond to which colors. However, Emacs does know
@@ -2127,10 +2134,10 @@ in @ref{Color Names}.
2127 2134
2128 These functions accept a display (either a frame or the name of a 2135 These functions accept a display (either a frame or the name of a
2129terminal) as an optional argument. We hope in the future to make 2136terminal) as an optional argument. We hope in the future to make
2130Emacs support different colors on different text-only terminals; then 2137Emacs support different colors on different text terminals; then this
2131this argument will specify which terminal to operate on (the default 2138argument will specify which terminal to operate on (the default being
2132being the selected frame's terminal; @pxref{Input Focus}). At 2139the selected frame's terminal; @pxref{Input Focus}). At present,
2133present, though, the @var{frame} argument has no effect. 2140though, the @var{frame} argument has no effect.
2134 2141
2135@defun tty-color-define name number &optional rgb frame 2142@defun tty-color-define name number &optional rgb frame
2136This function associates the color name @var{name} with 2143This function associates the color name @var{name} with
@@ -2144,12 +2151,12 @@ Emacs will not know what it looks like.
2144@end defun 2151@end defun
2145 2152
2146@defun tty-color-clear &optional frame 2153@defun tty-color-clear &optional frame
2147This function clears the table of defined colors for a text-only terminal. 2154This function clears the table of defined colors for a text terminal.
2148@end defun 2155@end defun
2149 2156
2150@defun tty-color-alist &optional frame 2157@defun tty-color-alist &optional frame
2151This function returns an alist recording the known colors supported by a 2158This function returns an alist recording the known colors supported by
2152text-only terminal. 2159a text terminal.
2153 2160
2154Each element has the form @code{(@var{name} @var{number} . @var{rgb})} 2161Each element has the form @code{(@var{name} @var{number} . @var{rgb})}
2155or @code{(@var{name} @var{number})}. Here, @var{name} is the color 2162or @code{(@var{name} @var{number})}. Here, @var{name} is the color
@@ -2265,8 +2272,8 @@ a mouse.
2265@defun display-graphic-p &optional display 2272@defun display-graphic-p &optional display
2266This function returns @code{t} if @var{display} is a graphic display 2273This function returns @code{t} if @var{display} is a graphic display
2267capable of displaying several frames and several different fonts at 2274capable of displaying several frames and several different fonts at
2268once. This is true for displays that use a window system such as X, and 2275once. This is true for displays that use a window system such as X,
2269false for text-only terminals. 2276and false for text terminals.
2270@end defun 2277@end defun
2271 2278
2272@defun display-mouse-p &optional display 2279@defun display-mouse-p &optional display