aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2009-01-17 16:31:21 +0000
committerEli Zaretskii2009-01-17 16:31:21 +0000
commit20cb6c9b3298942cf769c5aab9db1f978db5f464 (patch)
tree528ec332efac21a117e5c571486a2e5cc13b9d29 /doc
parent200811d63a98220af25d4c2ddfa50e3f81edfd29 (diff)
downloademacs-20cb6c9b3298942cf769c5aab9db1f978db5f464.tar.gz
emacs-20cb6c9b3298942cf769c5aab9db1f978db5f464.zip
(Frames): Document `frame-terminal' and `terminal-live-p'.
(Multiple Displays): Document `make-frame-on-tty'. (Multiple Terminals): Document `terminal-list', `delete-terminal', `terminal-name', and `get-device-terminal'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/frames.texi230
1 files changed, 126 insertions, 104 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index dd4e987a2de..ae2eac87e51 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -13,12 +13,20 @@ or more Emacs windows, see @ref{Windows}. It's the kind of object that
13is called a ``window'' in the terminology of graphical environments; but 13is called a ``window'' in the terminology of graphical environments; but
14we can't call it a ``window'' here, because Emacs uses that word in a 14we can't call it a ``window'' here, because Emacs uses that word in a
15different way. In Emacs Lisp, a @dfn{frame object} is a Lisp object 15different way. In Emacs Lisp, a @dfn{frame object} is a Lisp object
16that represents a frame on the screen. 16that represents a frame on the screen. @xref{Frame Type}.
17 17
18 A frame initially contains a single main window and/or a minibuffer 18 A frame initially contains a single main window and/or a minibuffer
19window; you can subdivide the main window vertically or horizontally 19window; you can subdivide the main window vertically or horizontally
20into smaller windows. @xref{Splitting Windows}. 20into smaller windows. @xref{Splitting Windows}.
21 21
22 A @dfn{terminal} is a display device capable of displaying one or
23more Emacs frames. On GNU and Unix systems, Emacs supports any number
24of different terminals in one session, and can mix GUI and text-only
25frames in the same session.
26
27 Emacs represents each terminal on which it displays frames as a
28special @dfn{terminal object} data type, see @ref{Terminal Type}.
29
22@cindex terminal frame 30@cindex terminal frame
23 When Emacs runs on a text-only terminal, it starts with one 31 When Emacs runs on a text-only terminal, it starts with one
24@dfn{terminal frame}. If you create additional frames on the same 32@dfn{terminal frame}. If you create additional frames on the same
@@ -51,10 +59,26 @@ The frame is displayed on an MS-DOS terminal.
51@end table 59@end table
52@end defun 60@end defun
53 61
62@defun frame-terminal &optional frame
63This function returns the terminal object (@pxref{Terminal Type}) that
64displays @var{frame}. If @var{frame} is @code{nil} or unspecified, it
65defaults to the selected frame.
66@end defun
67
68@defun terminal-live-p object
69This predicate returns a non-@code{nil} value if @var{object} is a
70terminal that is alive (i.e.@: was not deleted), and @code{nil}
71otherwise. For live terminals, the return value indicates what kind
72of frames are displayed on that terminal; the list of possible values
73is the same as for @code{framep} above.
74@end defun
75
54@menu 76@menu
55* Creating Frames:: Creating additional frames. 77* Creating Frames:: Creating additional frames.
56* Multiple Displays:: Creating frames on other displays. 78* Multiple Displays:: Creating frames on other displays.
79* Multiple Terminals:: Displaying on several different devices.
57* Frame Parameters:: Controlling frame size, position, font, etc. 80* Frame Parameters:: Controlling frame size, position, font, etc.
81* Terminal Parameters:: Parameters common for all frames on terminal.
58* Frame Titles:: Automatic updating of frame titles. 82* Frame Titles:: Automatic updating of frame titles.
59* Deleting Frames:: Frames last until explicitly deleted. 83* Deleting Frames:: Frames last until explicitly deleted.
60* Finding All Frames:: How to examine all existing frames. 84* Finding All Frames:: How to examine all existing frames.
@@ -77,7 +101,6 @@ The frame is displayed on an MS-DOS terminal.
77* Text Terminal Colors:: Defining colors for text-only terminals. 101* Text Terminal Colors:: Defining colors for text-only terminals.
78* Resources:: Getting resource values from the server. 102* Resources:: Getting resource values from the server.
79* Display Feature Testing:: Determining the features of a terminal. 103* Display Feature Testing:: Determining the features of a terminal.
80* Multiple Terminals:: Displaying on several different devices.
81@end menu 104@end menu
82 105
83 @xref{Display}, for information about the related topic of 106 @xref{Display}, for information about the related topic of
@@ -182,6 +205,16 @@ the other frame parameters from @var{parameters}. Aside from the
182Frames}). 205Frames}).
183@end deffn 206@end deffn
184 207
208@deffn Command make-frame-on-tty tty type &optional parameters
209This command creates a text-only frame on another text terminal. The
210argument @var{tty} identifies the terminal device by its file name,
211e.g., @file{/dev/ttys2}, and @var{type} gives the device type as a
212string, e.g., @code{"vt100"}, to use for searching the
213termcap/terminfo database for the entry describing capabilities of the
214device. Optional argument @var{parameters} specifies additional
215parameters for the frame.
216@end deffn
217
185@defun x-display-list 218@defun x-display-list
186This returns a list that indicates which X displays Emacs has a 219This returns a list that indicates which X displays Emacs has a
187connection to. The elements of the list are strings, and each one is 220connection to. The elements of the list are strings, and each one is
@@ -216,6 +249,71 @@ you can do this, you must first delete all the frames that were open on
216that display (@pxref{Deleting Frames}). 249that display (@pxref{Deleting Frames}).
217@end defun 250@end defun
218 251
252@node Multiple Terminals
253@section Multiple Terminals
254@cindex multiple terminals
255@cindex multi-tty
256
257 Emacs represents each terminal on which it displays frames as a
258special @dfn{terminal object} data type, see @ref{Terminal Type}. The
259terminal object has the following attributes:
260
261@itemize @bullet
262@item
263The name of the device used by the terminal (e.g., @file{/dev/tty}).
264
265@item
266The terminal and keyboard coding systems (@pxref{Terminal I/O
267Encoding}) used on the terminal.
268
269@item
270The kind of frames (@pxref{Frames}) the terminal is displaying.
271
272@item
273A list of the terminal parameters (@pxref{Terminal Parameters}).
274@end itemize
275
276 There's no primitive for creating terminal objects; Emacs creates
277them as needed when you call one of the primitives, such as
278@code{make-frame-on-tty} (@pxref{Multiple Displays}), that start
279displaying on a new terminal.
280
281@defun terminal-list
282This function return the list of all the terminal objects used by
283Emacs to display frames in this session.
284@end defun
285
286@defun delete-terminal &optional terminal force
287This function deletes all frames on @var{terminal} and frees the
288resources used by it. @var{terminal} can be a terminal object, a
289frame (meaning that frame's terminal), or @code{nil} (meaning the
290selected frame's terminal). Normally, the function signals an error
291if you attempt to delete the sole active terminal, but if @var{force}
292is non-@code{nil}, you are allowed to do so. This function runs the
293hook @code{delete-terminal-functions}, passing each function a single
294argument, @var{terminal}.
295@end defun
296
297@defun terminal-name &optional terminal
298This function returns the file name of the device used by
299@var{terminal}. If @var{terminal} is omitted or @code{nil}, it
300defaults to the selected frame's terminal. @var{terminal} can also be
301a frame, meaning that frame's terminal.
302@end defun
303
304@defun get-device-terminal device
305This function is in a sense the opposite of @code{terminal-name}: it
306returns a terminal whose device name is given by @var{device}. If
307@var{device} is a string, it can be either the file name of a terminal
308device or the name of an X display of the form
309@samp{@var{host}:@var{server}.@var{screen}} (@pxref{Multiple
310Displays}). If @var{device} is a frame, this function returns that
311frame's terminal; @code{nil} means the selected frame. Finally, if
312@var{device} is a terminal object that represents a live terminal,
313that terminal is returned. The function signals an error if its
314argument is none of the above.
315@end defun
316
219@node Frame Parameters 317@node Frame Parameters
220@section Frame Parameters 318@section Frame Parameters
221@cindex frame parameters 319@cindex frame parameters
@@ -951,6 +1049,22 @@ Here is an example:
951@end example 1049@end example
952@end defun 1050@end defun
953 1051
1052@node Terminal Parameters
1053@section Terminal Parameters
1054@cindex terminal parameters
1055
1056 This subsection describes how to read and change the parameter
1057values of a terminal.
1058
1059@defun terminal-parameters &optional terminal
1060@end defun
1061
1062@defun terminal-parameter terminal parameter
1063@end defun
1064
1065@defun set-terminal-parameter terminal parameter value
1066@end defun
1067
954@node Frame Titles 1068@node Frame Titles
955@section Frame Titles 1069@section Frame Titles
956@cindex frame title 1070@cindex frame title
@@ -1326,6 +1440,16 @@ This happens below the level at which Emacs can exert any control, but
1326Emacs does provide events that you can use to keep track of such 1440Emacs does provide events that you can use to keep track of such
1327changes. @xref{Misc Events}. 1441changes. @xref{Misc Events}.
1328 1442
1443@defun suspend-frame
1444@end defun
1445
1446@c FIXME: xref to suspend-emacs, and xref there.
1447@defun suspend-tty &optional tty
1448@end defun
1449
1450@defun resume-tty &optional tty
1451@end defun
1452
1329@node Raising and Lowering 1453@node Raising and Lowering
1330@section Raising and Lowering Frames 1454@section Raising and Lowering Frames
1331 1455
@@ -2242,108 +2366,6 @@ The functions @code{x-pixel-width} and @code{x-pixel-height} return the
2242width and height of an X Window frame, measured in pixels. 2366width and height of an X Window frame, measured in pixels.
2243@end ignore 2367@end ignore
2244 2368
2245@node Multiple Terminals
2246@section Multiple Terminals
2247@cindex multiple terminals
2248@cindex multi-tty
2249
2250 A @dfn{terminal} is a display device capable of displaying one or
2251more Emacs frames. On GNU and Unix systems, Emacs supports any number
2252of different terminals in one session, and can mix GUI and text-only
2253frames in the same session.
2254
2255 Emacs represents each terminal on which it displays frames as a
2256special @dfn{terminal object} data type, see @ref{Terminal Type}. The
2257terminal object has a unique integer identifier and the following
2258attributes:
2259
2260@itemize @bullet
2261@item
2262The name of the device used by the terminal (e.g., @file{/dev/tty}).
2263
2264@item
2265The terminal and keyboard coding systems (@pxref{Terminal I/O
2266Encoding}) used on the terminal.
2267
2268@item
2269The type of frames (@pxref{Frames}) the terminal is displaying.
2270
2271@item
2272A list of the terminal parameters (@pxref{Terminal Parameters}).
2273@end itemize
2274
2275@c This is still under construction.
2276
2277@defun frame-terminal
2278@end defun
2279
2280@defun get-device-terminal device
2281@end defun
2282
2283@defun terminal-list
2284@end defun
2285
2286@menu
2287* Low-level Terminal:: Low-level manipulation of terminal objects.
2288* Terminal Parameters:: Parameters common for all frames on terminal.
2289* Frames on Other TTY devices:: Creating frames on other terminal devices.
2290@end menu
2291
2292@node Low-level Terminal
2293@subsection Low-level Access to Terminals
2294
2295 This subsection describes low-level primitives for accessing and
2296manipulating Emacs terminal objects. There's no primitive for
2297creating terminal objects; Emacs creates them as needed when you call
2298one of the primitives, such as @code{make-frame-on-tty} (@pxref{Frames
2299on Other TTY devices}), that start displaying on a new terminal.
2300
2301@defun suspend-tty &optional tty
2302@end defun
2303
2304@defun resume-tty &optional tty
2305@end defun
2306
2307@defun terminal-live-p object
2308@end defun
2309
2310@defun terminal-name &optional terminal
2311@end defun
2312
2313@defun delete-terminal &optional terminal force
2314@end defun
2315
2316@node Terminal Parameters
2317@subsection Terminal Parameters
2318@cindex terminal parameters
2319
2320 This subsection describes how to read and change the parameter
2321values of a terminal.
2322
2323@defun terminal-parameters &optional terminal
2324@end defun
2325
2326@defun terminal-parameter terminal parameter
2327@end defun
2328
2329@defun set-terminal-parameter terminal parameter value
2330@end defun
2331
2332@defun environment &optional frame
2333@end defun
2334
2335@defvar initial-environment
2336@end defvar
2337
2338@node Frames on Other TTY devices
2339@subsection Frames on Other TTY devices
2340
2341 This subsection documents functions related to displaying Emacs
2342frames on a terminal device other than the current one.
2343
2344@defun make-frame-on-tty tty type &optional parameters
2345@end defun
2346
2347 2369
2348@ignore 2370@ignore
2349 arch-tag: 94977df6-3dca-4730-b57b-c6329e9282ba 2371 arch-tag: 94977df6-3dca-4730-b57b-c6329e9282ba