annotate Doc/lib/libcurses.tex @ 27998:e27f58a50737 legacy-trunk

SF bug #690377: Dud footnote reference in distutils docs
author Raymond Hettinger <python@rcn.com>
date Fri, 21 Feb 2003 02:47:09 +0000
parents 1119d582609a
children cd0bcaa0bd81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1 \section{\module{curses} ---
15142
563dee598d3a Fixed lots of small nits caught by Ka-Ping Yee <ping@lfw.org>.
Fred Drake <fdrake@acm.org>
parents: 15064
diff changeset
2 Terminal handling for character-cell displays}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
3
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
4 \declaremodule{standard}{curses}
15467
d7864345b1c8 Update Moshe Zadka's email address to one works and might last a while.
Fred Drake <fdrake@acm.org>
parents: 15419
diff changeset
5 \sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
6 \sectionauthor{Eric Raymond}{esr@thyrsus.com}
15142
563dee598d3a Fixed lots of small nits caught by Ka-Ping Yee <ping@lfw.org>.
Fred Drake <fdrake@acm.org>
parents: 15064
diff changeset
7 \modulesynopsis{An interface to the curses library, providing portable
563dee598d3a Fixed lots of small nits caught by Ka-Ping Yee <ping@lfw.org>.
Fred Drake <fdrake@acm.org>
parents: 15064
diff changeset
8 terminal handling.}
15064
c058bc35640f Revise the versioning information to say that this was revised in 1.6,
Fred Drake <fdrake@acm.org>
parents: 14838
diff changeset
9
c058bc35640f Revise the versioning information to say that this was revised in 1.6,
Fred Drake <fdrake@acm.org>
parents: 14838
diff changeset
10 \versionchanged[Added support for the \code{ncurses} library and
c058bc35640f Revise the versioning information to say that this was revised in 1.6,
Fred Drake <fdrake@acm.org>
parents: 14838
diff changeset
11 converted to a package]{1.6}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
12
14838
76aad5b06543 Minor cleanups, wrap long lines.
Fred Drake <fdrake@acm.org>
parents: 14723
diff changeset
13 The \module{curses} module provides an interface to the curses
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
14 library, the de-facto standard for portable advanced terminal
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
15 handling.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
16
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
17 While curses is most widely used in the \UNIX{} environment, versions
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
18 are available for DOS, OS/2, and possibly other systems as well. This
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
19 extension module is designed to match the API of ncurses, an
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
20 open-source curses library hosted on Linux and the BSD variants of
14838
76aad5b06543 Minor cleanups, wrap long lines.
Fred Drake <fdrake@acm.org>
parents: 14723
diff changeset
21 \UNIX.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
22
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
23 \begin{seealso}
13099
99cee0c87f6a Add a "See also:" link to the curses.ascii module.
Fred Drake <fdrake@acm.org>
parents: 12975
diff changeset
24 \seemodule{curses.ascii}{Utilities for working with \ASCII{}
99cee0c87f6a Add a "See also:" link to the curses.ascii module.
Fred Drake <fdrake@acm.org>
parents: 12975
diff changeset
25 characters, regardless of your locale
99cee0c87f6a Add a "See also:" link to the curses.ascii module.
Fred Drake <fdrake@acm.org>
parents: 12975
diff changeset
26 settings.}
15652
3e254f56eef1 Add 'see also' link to curses.panel
Andrew M. Kuchling <amk@amk.ca>
parents: 15641
diff changeset
27 \seemodule{curses.panel}{A panel stack extension that adds depth to
3e254f56eef1 Add 'see also' link to curses.panel
Andrew M. Kuchling <amk@amk.ca>
parents: 15641
diff changeset
28 curses windows.}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
29 \seemodule{curses.textpad}{Editable text widget for curses supporting
17383
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
30 \program{Emacs}-like bindings.}
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
31 \seemodule{curses.wrapper}{Convenience function to ensure proper
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
32 terminal setup and resetting on
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
33 application entry and exit.}
14838
76aad5b06543 Minor cleanups, wrap long lines.
Fred Drake <fdrake@acm.org>
parents: 14723
diff changeset
34 \seetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses
76aad5b06543 Minor cleanups, wrap long lines.
Fred Drake <fdrake@acm.org>
parents: 14723
diff changeset
35 Programming with Python}{Tutorial material on using curses
17383
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
36 with Python, by Andrew Kuchling and Eric Raymond, is
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
37 available on the Python Web site.}
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
38 \seetext{The \file{Demo/curses/} directory in the Python source
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
39 distribution contains some example programs using the
7c4bac2f7b3a Normalize tabs to spaces.
Fred Drake <fdrake@acm.org>
parents: 16329
diff changeset
40 curses bindings provided by this module.}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
41 \end{seealso}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
42
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
43
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
44 \subsection{Functions \label{curses-functions}}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
45
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
46 The module \module{curses} defines the following exception:
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
47
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
48 \begin{excdesc}{error}
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
49 Exception raised when a curses library function returns an error.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
50 \end{excdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
51
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
52 \note{Whenever \var{x} or \var{y} arguments to a function
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
53 or a method are optional, they default to the current cursor location.
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
54 Whenever \var{attr} is optional, it defaults to \constant{A_NORMAL}.}
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
55
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
56 The module \module{curses} defines the following functions:
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
57
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
58 \begin{funcdesc}{baudrate}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
59 Returns the output speed of the terminal in bits per second. On
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
60 software terminal emulators it will have a fixed high value.
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
61 Included for historical reasons; in former times, it was used to
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
62 write output loops for time delays and occasionally to change
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
63 interfaces depending on the line speed.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
64 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
65
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
66 \begin{funcdesc}{beep}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
67 Emit a short attention sound.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
68 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
69
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
70 \begin{funcdesc}{can_change_color}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
71 Returns true or false, depending on whether the programmer can change
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
72 the colors displayed by the terminal.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
73 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
74
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
75 \begin{funcdesc}{cbreak}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
76 Enter cbreak mode. In cbreak mode (sometimes called ``rare'' mode)
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
77 normal tty line buffering is turned off and characters are available
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
78 to be read one by one. However, unlike raw mode, special characters
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
79 (interrupt, quit, suspend, and flow control) retain their effects on
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
80 the tty driver and calling program. Calling first \function{raw()}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
81 then \function{cbreak()} leaves the terminal in cbreak mode.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
82 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
83
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
84 \begin{funcdesc}{color_content}{color_number}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
85 Returns the intensity of the red, green, and blue (RGB) components in
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
86 the color \var{color_number}, which must be between \code{0} and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
87 \constant{COLORS}. A 3-tuple is returned, containing the R,G,B values
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
88 for the given color, which will be between \code{0} (no component) and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
89 \code{1000} (maximum amount of component).
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
90 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
91
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
92 \begin{funcdesc}{color_pair}{color_number}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
93 Returns the attribute value for displaying text in the specified
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
94 color. This attribute value can be combined with
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
95 \constant{A_STANDOUT}, \constant{A_REVERSE}, and the other
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
96 \constant{A_*} attributes. \function{pair_number()} is the
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
97 counterpart to this function.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
98 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
99
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
100 \begin{funcdesc}{curs_set}{visibility}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
101 Sets the cursor state. \var{visibility} can be set to 0, 1, or 2, for
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
102 invisible, normal, or very visible. If the terminal supports the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
103 visibility requested, the previous cursor state is returned;
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
104 otherwise, an exception is raised. On many terminals, the ``visible''
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
105 mode is an underline cursor and the ``very visible'' mode is a block cursor.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
106 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
107
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
108 \begin{funcdesc}{def_prog_mode}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
109 Saves the current terminal mode as the ``program'' mode, the mode when
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
110 the running program is using curses. (Its counterpart is the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
111 ``shell'' mode, for when the program is not in curses.) Subsequent calls
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
112 to \function{reset_prog_mode()} will restore this mode.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
113 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
114
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
115 \begin{funcdesc}{def_shell_mode}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
116 Saves the current terminal mode as the ``shell'' mode, the mode when
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
117 the running program is not using curses. (Its counterpart is the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
118 ``program'' mode, when the program is using curses capabilities.)
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
119 Subsequent calls
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
120 to \function{reset_shell_mode()} will restore this mode.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
121 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
122
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
123 \begin{funcdesc}{delay_output}{ms}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
124 Inserts an \var{ms} millisecond pause in output.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
125 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
126
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
127 \begin{funcdesc}{doupdate}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
128 Update the physical screen. The curses library keeps two data
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
129 structures, one representing the current physical screen contents
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
130 and a virtual screen representing the desired next state. The
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
131 \function{doupdate()} ground updates the physical screen to match the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
132 virtual screen.
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
133
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
134 The virtual screen may be updated by a \method{noutrefresh()} call
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
135 after write operations such as \method{addstr()} have been performed
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
136 on a window. The normal \method{refresh()} call is simply
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
137 \method{noutrefresh()} followed by \function{doupdate()}; if you have
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
138 to update multiple windows, you can speed performance and perhaps
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
139 reduce screen flicker by issuing \method{noutrefresh()} calls on
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
140 all windows, followed by a single \function{doupdate()}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
141 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
142
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
143 \begin{funcdesc}{echo}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
144 Enter echo mode. In echo mode, each character input is echoed to the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
145 screen as it is entered.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
146 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
147
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
148 \begin{funcdesc}{endwin}{}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
149 De-initialize the library, and return terminal to normal status.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
150 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
151
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
152 \begin{funcdesc}{erasechar}{}
21062
bc02c3b09626 Clean up some markup cruft. A number of the macros that take no
Fred Drake <fdrake@acm.org>
parents: 20584
diff changeset
153 Returns the user's current erase character. Under \UNIX{} operating
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
154 systems this is a property of the controlling tty of the curses
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
155 program, and is not set by the curses library itself.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
156 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
157
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
158 \begin{funcdesc}{filter}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
159 The \function{filter()} routine, if used, must be called before
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
160 \function{initscr()} is called. The effect is that, during those
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
161 calls, LINES is set to 1; the capabilities clear, cup, cud, cud1,
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
162 cuu1, cuu, vpa are disabled; and the home string is set to the value of cr.
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
163 The effect is that the cursor is confined to the current line, and so
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
164 are screen updates. This may be used for enabling cgaracter-at-a-time
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
165 line editing without touching the rest of the screen.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
166 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
167
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
168 \begin{funcdesc}{flash}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
169 Flash the screen. That is, change it to reverse-video and then change
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
170 it back in a short interval. Some people prefer such as `visible bell'
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
171 to the audible attention signal produced by \function{beep()}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
172 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
173
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
174 \begin{funcdesc}{flushinp}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
175 Flush all input buffers. This throws away any typeahead that has
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
176 been typed by the user and has not yet been processed by the program.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
177 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
178
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
179 \begin{funcdesc}{getmouse}{}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
180 After \method{getch()} returns \constant{KEY_MOUSE} to signal a mouse
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
181 event, this method should be call to retrieve the queued mouse event,
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
182 represented as a 5-tuple
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
183 \code{(\var{id}, \var{x}, \var{y}, \var{z}, \var{bstate})}.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
184 \var{id} is an ID value used to distinguish multiple devices,
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
185 and \var{x}, \var{y}, \var{z} are the event's coordinates. (\var{z}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
186 is currently unused.). \var{bstate} is an integer value whose bits
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
187 will be set to indicate the type of event, and will be the bitwise OR
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
188 of one or more of the following constants, where \var{n} is the button
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
189 number from 1 to 4:
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
190 \constant{BUTTON\var{n}_PRESSED},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
191 \constant{BUTTON\var{n}_RELEASED},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
192 \constant{BUTTON\var{n}_CLICKED},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
193 \constant{BUTTON\var{n}_DOUBLE_CLICKED},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
194 \constant{BUTTON\var{n}_TRIPLE_CLICKED},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
195 \constant{BUTTON_SHIFT},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
196 \constant{BUTTON_CTRL},
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
197 \constant{BUTTON_ALT}.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
198 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
199
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
200 \begin{funcdesc}{getsyx}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
201 Returns the current coordinates of the virtual screen cursor in y and
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
202 x. If leaveok is currently true, then -1,-1 is returned.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
203 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
204
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
205 \begin{funcdesc}{getwin}{file}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
206 Reads window related data stored in the file by an earlier
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
207 \function{putwin()} call. The routine then creates and initializes a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
208 new window using that data, returning the new window object.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
209 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
210
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
211 \begin{funcdesc}{has_colors}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
212 Returns true if the terminal can display colors; otherwise, it
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
213 returns false.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
214 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
215
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
216 \begin{funcdesc}{has_ic}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
217 Returns true if the terminal has insert- and delete- character
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
218 capabilities. This function is included for historical reasons only,
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
219 as all modern software terminal emulators have such capabilities.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
220 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
221
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
222 \begin{funcdesc}{has_il}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
223 Returns true if the terminal has insert- and
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
224 delete-line capabilities, or can simulate them using
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
225 scrolling regions. This function is included for historical reasons only,
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
226 as all modern software terminal emulators have such capabilities.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
227 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
228
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
229 \begin{funcdesc}{has_key}{ch}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
230 Takes a key value \var{ch}, and returns true if the current terminal
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
231 type recognizes a key with that value.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
232 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
233
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
234 \begin{funcdesc}{halfdelay}{tenths}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
235 Used for half-delay mode, which is similar to cbreak mode in that
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
236 characters typed by the user are immediately available to the program.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
237 However, after blocking for \var{tenths} tenths of seconds, an
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
238 exception is raised if nothing has been typed. The value of
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
239 \var{tenths} must be a number between 1 and 255. Use
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
240 \function{nocbreak()} to leave half-delay mode.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
241 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
242
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
243 \begin{funcdesc}{init_color}{color_number, r, g, b}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
244 Changes the definition of a color, taking the number of the color to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
245 be changed followed by three RGB values (for the amounts of red,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
246 green, and blue components). The value of \var{color_number} must be
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
247 between \code{0} and \constant{COLORS}. Each of \var{r}, \var{g},
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
248 \var{b}, must be a value between \code{0} and \code{1000}. When
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
249 \function{init_color()} is used, all occurrences of that color on the
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
250 screen immediately change to the new definition. This function is a
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
251 no-op on most terminals; it is active only if
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
252 \function{can_change_color()} returns \code{1}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
253 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
254
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
255 \begin{funcdesc}{init_pair}{pair_number, fg, bg}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
256 Changes the definition of a color-pair. It takes three arguments: the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
257 number of the color-pair to be changed, the foreground color number,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
258 and the background color number. The value of \var{pair_number} must
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
259 be between \code{1} and \code{COLOR_PAIRS - 1} (the \code{0} color
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
260 pair is wired to white on black and cannot be changed). The value of
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
261 \var{fg} and \var{bg} arguments must be between \code{0} and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
262 \constant{COLORS}. If the color-pair was previously initialized, the
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
263 screen is refreshed and all occurrences of that color-pair are changed
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
264 to the new definition.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
265 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
266
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
267 \begin{funcdesc}{initscr}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
268 Initialize the library. Returns a \class{WindowObject} which represents
27221
1119d582609a SF #665570, curses causes interpreter crash
Neal Norwitz <nnorwitz@gmail.com>
parents: 26076
diff changeset
269 the whole screen. \note{If there is an error opening the terminal,
1119d582609a SF #665570, curses causes interpreter crash
Neal Norwitz <nnorwitz@gmail.com>
parents: 26076
diff changeset
270 the underlying curses library may cause the interpreter to exit.}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
271 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
272
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
273 \begin{funcdesc}{isendwin}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
274 Returns true if \function{endwin()} has been called (that is, the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
275 curses library has been deinitialized).
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
276 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
277
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
278 \begin{funcdesc}{keyname}{k}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
279 Return the name of the key numbered \var{k}. The name of a key
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
280 generating printable ASCII character is the key's character. The name
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
281 of a control-key combination is a two-character string consisting of a
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
282 caret followed by the corresponding printable ASCII character. The
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
283 name of an alt-key combination (128-255) is a string consisting of the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
284 prefix `M-' followed by the name of the corresponding ASCII character.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
285 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
286
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
287 \begin{funcdesc}{killchar}{}
21062
bc02c3b09626 Clean up some markup cruft. A number of the macros that take no
Fred Drake <fdrake@acm.org>
parents: 20584
diff changeset
288 Returns the user's current line kill character. Under \UNIX{} operating
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
289 systems this is a property of the controlling tty of the curses
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
290 program, and is not set by the curses library itself.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
291 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
292
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
293 \begin{funcdesc}{longname}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
294 Returns a string containing the terminfo long name field describing the current
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
295 terminal. The maximum length of a verbose description is 128
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
296 characters. It is defined only after the call to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
297 \function{initscr()}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
298 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
299
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
300 \begin{funcdesc}{meta}{yes}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
301 If \var{yes} is 1, allow 8-bit characters to be input. If \var{yes} is 0,
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
302 allow only 7-bit chars.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
303 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
304
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
305 \begin{funcdesc}{mouseinterval}{interval}
13625
fdfd1049f36e Rob W. W. Hooft's spelling fixes for the Library Reference. I hope
Thomas Wouters <thomas@python.org>
parents: 13167
diff changeset
306 Sets the maximum time in milliseconds that can elapse between press and
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
307 release events in order for them to be recognized as a click, and
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
308 returns the previous interval value. The default value is 200 msec,
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
309 or one fifth of a second.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
310 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
311
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
312 \begin{funcdesc}{mousemask}{mousemask}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
313 Sets the mouse events to be reported, and returns a tuple
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
314 \code{(\var{availmask}, \var{oldmask})}.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
315 \var{availmask} indicates which of the
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
316 specified mouse events can be reported; on complete failure it returns
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
317 0. \var{oldmask} is the previous value of the given window's mouse
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
318 event mask. If this function is never called, no mouse events are
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
319 ever reported.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
320 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
321
15576
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
322 \begin{funcdesc}{napms}{ms}
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
323 Sleep for \var{ms} milliseconds.
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
324 \end{funcdesc}
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
325
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
326 \begin{funcdesc}{newpad}{nlines, ncols}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
327 Creates and returns a pointer to a new pad data structure with the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
328 given number of lines and columns. A pad is returned as a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
329 window object.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
330
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
331 A pad is like a window, except that it is not restricted by the screen
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
332 size, and is not necessarily associated with a particular part of the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
333 screen. Pads can be used when a large window is needed, and only a
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
334 part of the window will be on the screen at one time. Automatic
18411
eeb2e77c5bad Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake <fdrake@acm.org>
parents: 17603
diff changeset
335 refreshes of pads (such as from scrolling or echoing of input) do not
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
336 occur. The \method{refresh()} and \method{noutrefresh()} methods of a
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
337 pad require 6 arguments to specify the part of the pad to be
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
338 displayed and the location on the screen to be used for the display.
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
339 The arguments are pminrow, pmincol, sminrow, smincol, smaxrow,
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
340 smaxcol; the p arguments refer to the upper left corner of the the pad
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
341 region to be displayed and the s arguments define a clipping box on
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
342 the screen within which the pad region is to be displayed.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
343 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
344
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
345 \begin{funcdesc}{newwin}{\optional{nlines, ncols,} begin_y, begin_x}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
346 Return a new window, whose left-upper corner is at
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
347 \code{(\var{begin_y}, \var{begin_x})}, and whose height/width is
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
348 \var{nlines}/\var{ncols}.
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
349
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
350 By default, the window will extend from the
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
351 specified position to the lower right corner of the screen.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
352 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
353
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
354 \begin{funcdesc}{nl}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
355 Enter newline mode. This mode translates the return key into newline
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
356 on input, and translates newline into return and line-feed on output.
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
357 Newline mode is initially on.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
358 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
359
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
360 \begin{funcdesc}{nocbreak}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
361 Leave cbreak mode. Return to normal ``cooked'' mode with line buffering.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
362 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
363
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
364 \begin{funcdesc}{noecho}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
365 Leave echo mode. Echoing of input characters is turned off,
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
366 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
367
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
368 \begin{funcdesc}{nonl}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
369 Leave newline mode. Disable translation of return into newline on
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
370 input, and disable low-level translation of newline into
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
371 newline/return on output (but this does not change the behavior of
13696
bb364d6f9f69 Fix small typos and markup consistency nits.
Fred Drake <fdrake@acm.org>
parents: 13681
diff changeset
372 \code{addch('\e n')}, which always does the equivalent of return and
bb364d6f9f69 Fix small typos and markup consistency nits.
Fred Drake <fdrake@acm.org>
parents: 13681
diff changeset
373 line feed on the virtual screen). With translation off, curses can
bb364d6f9f69 Fix small typos and markup consistency nits.
Fred Drake <fdrake@acm.org>
parents: 13681
diff changeset
374 sometimes speed up vertical motion a little; also, it will be able to
bb364d6f9f69 Fix small typos and markup consistency nits.
Fred Drake <fdrake@acm.org>
parents: 13681
diff changeset
375 detect the return key on input.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
376 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
377
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
378 \begin{funcdesc}{noqiflush}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
379 When the noqiflush routine is used, normal flush of input and
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
380 output queues associated with the INTR, QUIT and SUSP
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
381 characters will not be done. You may want to call
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
382 \function{noqiflush()} in a signal handler if you want output
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
383 to continue as though the interrupt had not occurred, after the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
384 handler exits.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
385 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
386
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
387 \begin{funcdesc}{noraw}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
388 Leave raw mode. Return to normal ``cooked'' mode with line buffering.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
389 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
390
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
391 \begin{funcdesc}{pair_content}{pair_number}
24025
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
392 Returns a tuple \code{(\var{fg}, \var{bg})} containing the colors for
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
393 the requested color pair. The value of \var{pair_number} must be
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
394 between \code{0} and \code{\constant{COLOR_PAIRS} - 1}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
395 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
396
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
397 \begin{funcdesc}{pair_number}{attr}
24025
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
398 Returns the number of the color-pair set by the attribute value
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
399 \var{attr}. \function{color_pair()} is the counterpart to this
74368987f7f0 Clean up some markup.
Fred Drake <fdrake@acm.org>
parents: 21546
diff changeset
400 function.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
401 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
402
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
403 \begin{funcdesc}{putp}{string}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
404 Equivalent to \code{tputs(str, 1, putchar)}; emits the value of a
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
405 specified terminfo capability for the current terminal. Note that the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
406 output of putp always goes to standard output.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
407 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
408
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
409 \begin{funcdesc}{qiflush}{ \optional{flag} }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
410 If \var{flag} is false, the effect is the same as calling
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
411 \function{noqiflush()}. If \var{flag} is true, or no argument is
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
412 provided, the queues will be flushed when these control characters are
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
413 read.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
414 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
415
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
416 \begin{funcdesc}{raw}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
417 Enter raw mode. In raw mode, normal line buffering and
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
418 processing of interrupt, quit, suspend, and flow control keys are
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
419 turned off; characters are presented to curses input functions one
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
420 by one.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
421 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
422
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
423 \begin{funcdesc}{reset_prog_mode}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
424 Restores the terminal to ``program'' mode, as previously saved
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
425 by \function{def_prog_mode()}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
426 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
427
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
428 \begin{funcdesc}{reset_shell_mode}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
429 Restores the terminal to ``shell'' mode, as previously saved
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
430 by \function{def_shell_mode()}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
431 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
432
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
433 \begin{funcdesc}{setsyx}{y, x}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
434 Sets the virtual screen cursor to \var{y}, \var{x}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
435 If \var{y} and \var{x} are both -1, then leaveok is set.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
436 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
437
15419
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
438 \begin{funcdesc}{setupterm}{\optional{termstr, fd}}
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
439 Initializes the terminal. \var{termstr} is a string giving the
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
440 terminal name; if omitted, the value of the TERM environment variable
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
441 will be used. \var{fd} is the file descriptor to which any
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
442 initialization sequences will be sent; if not supplied, the file
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
443 descriptor for \code{sys.stdout} will be used.
15419
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
444 \end{funcdesc}
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
445
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
446 \begin{funcdesc}{start_color}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
447 Must be called if the programmer wants to use colors, and before any
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
448 other color manipulation routine is called. It is good
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
449 practice to call this routine right after \function{initscr()}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
450
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
451 \function{start_color()} initializes eight basic colors (black, red,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
452 green, yellow, blue, magenta, cyan, and white), and two global
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
453 variables in the \module{curses} module, \constant{COLORS} and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
454 \constant{COLOR_PAIRS}, containing the maximum number of colors and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
455 color-pairs the terminal can support. It also restores the colors on
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
456 the terminal to the values they had when the terminal was just turned
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
457 on.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
458 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
459
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
460 \begin{funcdesc}{termattrs}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
461 Returns a logical OR of all video attributes supported by the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
462 terminal. This information is useful when a curses program needs
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
463 complete control over the appearance of the screen.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
464 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
465
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
466 \begin{funcdesc}{termname}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
467 Returns the value of the environment variable TERM, truncated to 14
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
468 characters.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
469 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
470
13716
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
471 \begin{funcdesc}{tigetflag}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
472 Returns the value of the Boolean capability corresponding to the
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
473 terminfo capability name \var{capname}. The value \code{-1} is
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
474 returned if \var{capname} is not a Boolean capability, or \code{0} if
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
475 it is canceled or absent from the terminal description.
13716
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
476 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
477
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
478 \begin{funcdesc}{tigetnum}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
479 Returns the value of the numeric capability corresponding to the
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
480 terminfo capability name \var{capname}. The value \code{-2} is
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
481 returned if \var{capname} is not a numeric capability, or \code{-1} if
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
482 it is canceled or absent from the terminal description.
13716
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
483 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
484
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
485 \begin{funcdesc}{tigetstr}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
486 Returns the value of the string capability corresponding to the
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
487 terminfo capability name \var{capname}. \code{None} is returned if
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
488 \var{capname} is not a string capability, or is canceled or absent
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
489 from the terminal description.
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
490 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
491
15384
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
492 \begin{funcdesc}{tparm}{str\optional{,...}}
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
493 Instantiates the string \var{str} with the supplied parameters, where
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
494 \var{str} should be a parameterized string obtained from the terminfo
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
495 database. E.g. \code{tparm(tigetstr("cup"), 5, 3)} could result in
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
496 \code{'\e{}033[6;4H'}, the exact result depending on terminal type.
15384
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
497 \end{funcdesc}
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
498
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
499 \begin{funcdesc}{typeahead}{fd}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
500 Specifies that the file descriptor \var{fd} be used for typeahead
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
501 checking. If \var{fd} is \code{-1}, then no typeahead checking is
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
502 done.
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
503
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
504 The curses library does ``line-breakout optimization'' by looking for
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
505 typeahead periodically while updating the screen. If input is found,
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
506 and it is coming from a tty, the current update is postponed until
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
507 refresh or doupdate is called again, allowing faster response to
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
508 commands typed in advance. This function allows specifying a different
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
509 file descriptor for typeahead checking.
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
510 \end{funcdesc}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
511
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
512 \begin{funcdesc}{unctrl}{ch}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
513 Returns a string which is a printable representation of the character
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
514 \var{ch}. Control characters are displayed as a caret followed by the
17603
d638e419c304 Fix a number of minor markup errors.
Fred Drake <fdrake@acm.org>
parents: 17383
diff changeset
515 character, for example as \code{\textasciicircum C}. Printing
d638e419c304 Fix a number of minor markup errors.
Fred Drake <fdrake@acm.org>
parents: 17383
diff changeset
516 characters are left as they are.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
517 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
518
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
519 \begin{funcdesc}{ungetch}{ch}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
520 Push \var{ch} so the next \method{getch()} will return it.
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
521 \note{Only one \var{ch} can be pushed before \method{getch()}
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
522 is called.}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
523 \end{funcdesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
524
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
525 \begin{funcdesc}{ungetmouse}{id, x, y, z, bstate}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
526 Push a \constant{KEY_MOUSE} event onto the input queue, associating
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
527 the given state data with it.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
528 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
529
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
530 \begin{funcdesc}{use_env}{flag}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
531 If used, this function should be called before \function{initscr()} or
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
532 newterm are called. When \var{flag} is false, the values of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
533 lines and columns specified in the terminfo database will be
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
534 used, even if environment variables \envvar{LINES} and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
535 \envvar{COLUMNS} (used by default) are set, or if curses is running in
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
536 a window (in which case default behavior would be to use the window
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
537 size if \envvar{LINES} and \envvar{COLUMNS} are not set).
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
538 \end{funcdesc}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
539
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
540 \subsection{Window Objects \label{curses-window-objects}}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
541
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
542 Window objects, as returned by \function{initscr()} and
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
543 \function{newwin()} above, have the
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
544 following methods:
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
545
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
546 \begin{methoddesc}[window]{addch}{\optional{y, x,} ch\optional{, attr}}
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
547 \note{A \emph{character} means a C character (an
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
548 \ASCII{} code), rather then a Python character (a string of length 1).
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
549 (This note is true whenever the documentation mentions a character.)
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
550 The builtin \function{ord()} is handy for conveying strings to codes.}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
551
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
552 Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
553 \var{attr}, overwriting any character previously painter at that
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
554 location. By default, the character position and attributes are the
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
555 current settings for the window object.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
556 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
557
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
558 \begin{methoddesc}[window]{addnstr}{\optional{y, x,} str, n\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
559 Paint at most \var{n} characters of the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
560 string \var{str} at \code{(\var{y}, \var{x})} with attributes
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
561 \var{attr}, overwriting anything previously on the display.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
562 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
563
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
564 \begin{methoddesc}[window]{addstr}{\optional{y, x,} str\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
565 Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
566 \var{attr}, overwriting anything previously on the display.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
567 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
568
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
569 \begin{methoddesc}[window]{attroff}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
570 Remove attribute \var{attr} from the ``background'' set applied to all
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
571 writes to the current window.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
572 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
573
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
574 \begin{methoddesc}[window]{attron}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
575 Add attribute \var{attr} from the ``background'' set applied to all
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
576 writes to the current window.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
577 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
578
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
579 \begin{methoddesc}[window]{attrset}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
580 Set the ``background'' set of attributes to \var{attr}. This set is
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
581 initially 0 (no attributes).
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
582 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
583
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
584 \begin{methoddesc}[window]{bkgd}{ch\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
585 Sets the background property of the window to the character \var{ch},
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
586 with attributes \var{attr}. The change is then applied to every
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
587 character position in that window:
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
588 \begin{itemize}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
589 \item
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
590 The attribute of every character in the window is
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
591 changed to the new background attribute.
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
592 \item
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
593 Wherever the former background character appears,
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
594 it is changed to the new background character.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
595 \end{itemize}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
596
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
597 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
598
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
599 \begin{methoddesc}[window]{bkgdset}{ch\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
600 Sets the window's background. A window's background consists of a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
601 character and any combination of attributes. The attribute part of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
602 the background is combined (OR'ed) with all non-blank characters that
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
603 are written into the window. Both the character and attribute parts
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
604 of the background are combined with the blank characters. The
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
605 background becomes a property of the character and moves with the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
606 character through any scrolling and insert/delete line/character
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
607 operations.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
608 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
609
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
610 \begin{methoddesc}[window]{border}{\optional{ls\optional{, rs\optional{,
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
611 ts\optional{, bs\optional{, tl\optional{,
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
612 tr\optional{, bl\optional{, br}}}}}}}}}
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
613 Draw a border around the edges of the window. Each parameter specifies
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
614 the character to use for a specific part of the border; see the table
20584
887a93f9d5d5 Update description of border()
Andrew M. Kuchling <amk@amk.ca>
parents: 20580
diff changeset
615 below for more details. The characters can be specified as integers
887a93f9d5d5 Update description of border()
Andrew M. Kuchling <amk@amk.ca>
parents: 20580
diff changeset
616 or as one-character strings.
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
617
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
618 \note{A \code{0} value for any parameter will cause the
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
619 default character to be used for that parameter. Keyword parameters
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
620 can \emph{not} be used. The defaults are listed in this table:}
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
621
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
622 \begin{tableiii}{l|l|l}{var}{Parameter}{Description}{Default value}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
623 \lineiii{ls}{Left side}{\constant{ACS_VLINE}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
624 \lineiii{rs}{Right side}{\constant{ACS_VLINE}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
625 \lineiii{ts}{Top}{\constant{ACS_HLINE}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
626 \lineiii{bs}{Bottom}{\constant{ACS_HLINE}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
627 \lineiii{tl}{Upper-left corner}{\constant{ACS_ULCORNER}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
628 \lineiii{tr}{Upper-right corner}{\constant{ACS_URCORNER}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
629 \lineiii{bl}{Bottom-left corner}{\constant{ACS_BLCORNER}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
630 \lineiii{br}{Bottom-right corner}{\constant{ACS_BRCORNER}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
631 \end{tableiii}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
632 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
633
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
634 \begin{methoddesc}[window]{box}{\optional{vertch, horch}}
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
635 Similar to \method{border()}, but both \var{ls} and \var{rs} are
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
636 \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
637 corner characters are always used by this function.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
638 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
639
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
640 \begin{methoddesc}[window]{clear}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
641 Like \method{erase()}, but also causes the whole window to be repainted
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
642 upon next call to \method{refresh()}.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
643 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
644
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
645 \begin{methoddesc}[window]{clearok}{yes}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
646 If \var{yes} is 1, the next call to \method{refresh()}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
647 will clear the window completely.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
648 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
649
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
650 \begin{methoddesc}[window]{clrtobot}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
651 Erase from cursor to the end of the window: all lines below the cursor
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
652 are deleted, and then the equivalent of \method{clrtoeol()} is performed.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
653 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
654
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
655 \begin{methoddesc}[window]{clrtoeol}{}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
656 Erase from cursor to the end of the line.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
657 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
658
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
659 \begin{methoddesc}[window]{cursyncup}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
660 Updates the current cursor position of all the ancestors of the window
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
661 to reflect the current cursor position of the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
662 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
663
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
664 \begin{methoddesc}[window]{delch}{\optional{x, y}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
665 Delete any character at \code{(\var{y}, \var{x})}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
666 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
667
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
668 \begin{methoddesc}[window]{deleteln}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
669 Delete the line under the cursor. All following lines are moved up
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
670 by 1 line.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
671 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
672
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
673 \begin{methoddesc}[window]{derwin}{\optional{nlines, ncols,} begin_y, begin_x}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
674 An abbreviation for ``derive window'', \method{derwin()} is the same
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
675 as calling \method{subwin()}, except that \var{begin_y} and
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
676 \var{begin_x} are relative to the origin of the window, rather than
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
677 relative to the entire screen. Returns a window object for the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
678 derived window.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
679 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
680
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
681 \begin{methoddesc}[window]{echochar}{ch\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
682 Add character \var{ch} with attribute \var{attr}, and immediately
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
683 call \method{refresh()} on the window.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
684 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
685
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
686 \begin{methoddesc}[window]{enclose}{y, x}
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
687 Tests whether the given pair of screen-relative character-cell
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
688 coordinates are enclosed by the given window, returning true or
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
689 false. It is useful for determining what subset of the screen
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
690 windows enclose the location of a mouse event.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
691 \end{methoddesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
692
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
693 \begin{methoddesc}[window]{erase}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
694 Clear the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
695 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
696
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
697 \begin{methoddesc}[window]{getbegyx}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
698 Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
699 corner.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
700 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
701
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
702 \begin{methoddesc}[window]{getch}{\optional{x, y}}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
703 Get a character. Note that the integer returned does \emph{not} have to
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
704 be in \ASCII{} range: function keys, keypad keys and so on return numbers
26076
f3d44926a1be [Patch #633635 from David M. Cooke]
Andrew M. Kuchling <amk@amk.ca>
parents: 24025
diff changeset
705 higher than 256. In no-delay mode, -1 is returned if there is
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
706 no input.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
707 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
708
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
709 \begin{methoddesc}[window]{getkey}{\optional{x, y}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
710 Get a character, returning a string instead of an integer, as
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
711 \method{getch()} does. Function keys, keypad keys and so on return a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
712 multibyte string containing the key name. In no-delay mode, an
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
713 exception is raised if there is no input.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
714 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
715
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
716 \begin{methoddesc}[window]{getmaxyx}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
717 Return a tuple \code{(\var{y}, \var{x})} of the height and width of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
718 the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
719 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
720
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
721 \begin{methoddesc}[window]{getparyx}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
722 Returns the beginning coordinates of this window relative to its
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
723 parent window into two integer variables y and x. Returns
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
724 \code{-1,-1} if this window has no parent.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
725 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
726
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
727 \begin{methoddesc}[window]{getstr}{\optional{x, y}}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
728 Read a string from the user, with primitive line editing capacity.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
729 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
730
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
731 \begin{methoddesc}[window]{getyx}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
732 Return a tuple \code{(\var{y}, \var{x})} of current cursor position
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
733 relative to the window's upper-left corner.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
734 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
735
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
736 \begin{methoddesc}[window]{hline}{\optional{y, x,} ch, n}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
737 Display a horizontal line starting at \code{(\var{y}, \var{x})} with
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
738 length \var{n} consisting of the character \var{ch}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
739 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
740
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
741 \begin{methoddesc}[window]{idcok}{flag}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
742 If \var{flag} is false, curses no longer considers using the hardware
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
743 insert/delete character feature of the terminal; if \var{flag} is
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
744 true, use of character insertion and deletion is enabled. When curses
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
745 is first initialized, use of character insert/delete is enabled by
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
746 default.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
747 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
748
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
749 \begin{methoddesc}[window]{idlok}{yes}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
750 If called with \var{yes} equal to 1, \module{curses} will try and use
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
751 hardware line editing facilities. Otherwise, line insertion/deletion
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
752 are disabled.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
753 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
754
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
755 \begin{methoddesc}[window]{immedok}{flag}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
756 If \var{flag} is true, any change in the window image
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
757 automatically causes the window to be refreshed; you no longer
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
758 have to call \method{refresh()} yourself. However, it may
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
759 degrade performance considerably, due to repeated calls to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
760 wrefresh. This option is disabled by default.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
761 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
762
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
763 \begin{methoddesc}[window]{inch}{\optional{x, y}}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
764 Return the character at the given position in the window. The bottom
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
765 8 bits are the character proper, and upper bits are the attributes.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
766 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
767
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
768 \begin{methoddesc}[window]{insch}{\optional{y, x,} ch\optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
769 Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
770 \var{attr}, moving the line from position \var{x} right by one
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
771 character.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
772 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
773
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
774 \begin{methoddesc}[window]{insdelln}{nlines}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
775 Inserts \var{nlines} lines into the specified window above the current
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
776 line. The \var{nlines} bottom lines are lost. For negative
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
777 \var{nlines}, delete \var{nlines} lines starting with the one under
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
778 the cursor, and move the remaining lines up. The bottom \var{nlines}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
779 lines are cleared. The current cursor position remains the same.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
780 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
781
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
782 \begin{methoddesc}[window]{insertln}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
783 Insert a blank line under the cursor. All following lines are moved
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
784 down by 1 line.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
785 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
786
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
787 \begin{methoddesc}[window]{insnstr}{\optional{y, x,} str, n \optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
788 Insert a character string (as many characters as will fit on the line)
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
789 before the character under the cursor, up to \var{n} characters.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
790 If \var{n} is zero or negative,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
791 the entire string is inserted.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
792 All characters to the right of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
793 the cursor are shifted right, with the the rightmost characters on the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
794 line being lost. The cursor position does not change (after moving to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
795 \var{y}, \var{x}, if specified).
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
796 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
797
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
798 \begin{methoddesc}[window]{insstr}{\optional{y, x, } str \optional{, attr}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
799 Insert a character string (as many characters as will fit on the line)
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
800 before the character under the cursor. All characters to the right of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
801 the cursor are shifted right, with the the rightmost characters on the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
802 line being lost. The cursor position does not change (after moving to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
803 \var{y}, \var{x}, if specified).
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
804 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
805
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
806 \begin{methoddesc}[window]{instr}{\optional{y, x} \optional{, n}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
807 Returns a string of characters, extracted from the window starting at
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
808 the current cursor position, or at \var{y}, \var{x} if specified.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
809 Attributes are stripped from the characters. If \var{n} is specified,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
810 \method{instr()} returns return a string at most \var{n} characters
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
811 long (exclusive of the trailing NUL).
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
812 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
813
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
814 \begin{methoddesc}[window]{is_linetouched}{\var{line}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
815 Returns true if the specified line was modified since the last call to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
816 \method{refresh()}; otherwise returns false. Raises a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
817 \exception{curses.error} exception if \var{line} is not valid
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
818 for the given window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
819 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
820
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
821 \begin{methoddesc}[window]{is_wintouched}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
822 Returns true if the specified window was modified since the last call to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
823 \method{refresh()}; otherwise returns false.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
824 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
825
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
826 \begin{methoddesc}[window]{keypad}{yes}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
827 If \var{yes} is 1, escape sequences generated by some keys (keypad,
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
828 function keys) will be interpreted by \module{curses}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
829 If \var{yes} is 0, escape sequences will be left as is in the input
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
830 stream.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
831 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
832
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
833 \begin{methoddesc}[window]{leaveok}{yes}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
834 If \var{yes} is 1, cursor is left where it is on update, instead of
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
835 being at ``cursor position.'' This reduces cursor movement where
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
836 possible. If possible the cursor will be made invisible.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
837
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
838 If \var{yes} is 0, cursor will always be at ``cursor position'' after
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
839 an update.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
840 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
841
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
842 \begin{methoddesc}[window]{move}{new_y, new_x}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
843 Move cursor to \code{(\var{new_y}, \var{new_x})}.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
844 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
845
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
846 \begin{methoddesc}[window]{mvderwin}{y, x}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
847 Moves the window inside its parent window. The screen-relative
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
848 parameters of the window are not changed. This routine is used to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
849 display different parts of the parent window at the same physical
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
850 position on the screen.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
851 \end{methoddesc}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
852
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
853 \begin{methoddesc}[window]{mvwin}{new_y, new_x}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
854 Move the window so its upper-left corner is at
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
855 \code{(\var{new_y}, \var{new_x})}.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
856 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
857
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
858 \begin{methoddesc}[window]{nodelay}{yes}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
859 If \var{yes} is \code{1}, \method{getch()} will be non-blocking.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
860 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
861
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
862 \begin{methoddesc}[window]{notimeout}{yes}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
863 If \var{yes} is \code{1}, escape sequences will not be timed out.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
864
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
865 If \var{yes} is \code{0}, after a few milliseconds, an escape sequence
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
866 will not be interpreted, and will be left in the input stream as is.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
867 \end{methoddesc}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
868
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
869 \begin{methoddesc}[window]{noutrefresh}{}
13910
a4259bfca5bf More on noutrefresh.
Eric S. Raymond <esr@thyrsus.com>
parents: 13909
diff changeset
870 Mark for refresh but wait. This function updates the data structure
a4259bfca5bf More on noutrefresh.
Eric S. Raymond <esr@thyrsus.com>
parents: 13909
diff changeset
871 representing the desired state of the window, but does not force
16329
4d424d1397b2 More on noutrefresh() and scroll().
Eric S. Raymond <esr@thyrsus.com>
parents: 15730
diff changeset
872 an update of the physical screen. To accomplish that, call
4d424d1397b2 More on noutrefresh() and scroll().
Eric S. Raymond <esr@thyrsus.com>
parents: 15730
diff changeset
873 \function{doupdate()}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
874 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
875
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
876 \begin{methoddesc}[window]{overlay}{destwin\optional{, sminrow, smincol,
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
877 dminrow, dmincol, dmaxrow, dmaxcol}}
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
878 Overlay the window on top of \var{destwin}. The windows need not be
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
879 the same size, only the overlapping region is copied. This copy is
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
880 non-destructive, which means that the current background character
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
881 does not overwrite the old contents of \var{destwin}.
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
882
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
883 To get fine-grained control over the copied region, the second form
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
884 of \method{overlay()} can be used. \var{sminrow} and \var{smincol} are
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
885 the upper-left coordinates of the source window, and the other variables
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
886 mark a rectangle in the destination window.
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
887 \end{methoddesc}
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
888
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
889 \begin{methoddesc}[window]{overwrite}{destwin\optional{, sminrow, smincol,
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
890 dminrow, dmincol, dmaxrow, dmaxcol}}
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
891 Overwrite the window on top of \var{destwin}. The windows need not be
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
892 the same size, in which case only the overlapping region is
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
893 copied. This copy is destructive, which means that the current
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
894 background character overwrites the old contents of \var{destwin}.
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
895
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
896 To get fine-grained control over the copied region, the second form
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
897 of \method{overwrite()} can be used. \var{sminrow} and \var{smincol} are
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
898 the upper-left coordinates of the source window, the other variables
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
899 mark a rectangle in the destination window.
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
900 \end{methoddesc}
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
901
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
902 \begin{methoddesc}[window]{putwin}{file}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
903 Writes all data associated with the window into the provided file
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
904 object. This information can be later retrieved using the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
905 \function{getwin()} function.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
906 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
907
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
908 \begin{methoddesc}[window]{redrawln}{beg, num}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
909 Indicates that the \var{num} screen lines, starting at line \var{beg},
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
910 are corrupted and should be completely redrawn on the next
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
911 \method{refresh()} call.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
912 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
913
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
914 \begin{methoddesc}[window]{redrawwin}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
915 Touches the entire window, causing it to be completely redrawn on the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
916 next \method{refresh()} call.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
917 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
918
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
919 \begin{methoddesc}[window]{refresh}{\optional{pminrow, pmincol, sminrow,
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
920 smincol, smaxrow, smaxcol}}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
921 Update the display immediately (sync actual screen with previous
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
922 drawing/deleting methods).
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
923
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
924 The 6 optional arguments can only be specified when the window is a
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
925 pad created with \function{newpad()}. The additional parameters are
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
926 needed to indicate what part of the pad and screen are involved.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
927 \var{pminrow} and \var{pmincol} specify the upper left-hand corner of the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
928 rectangle to be displayed in the pad. \var{sminrow}, \var{smincol},
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
929 \var{smaxrow}, and \var{smaxcol} specify the edges of the rectangle to
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
930 be displayed on the screen. The lower right-hand corner of the
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
931 rectangle to be displayed in the pad is calculated from the screen
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
932 coordinates, since the rectangles must be the same size. Both
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
933 rectangles must be entirely contained within their respective
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
934 structures. Negative values of \var{pminrow}, \var{pmincol},
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
935 \var{sminrow}, or \var{smincol} are treated as if they were zero.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
936 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
937
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
938 \begin{methoddesc}[window]{scroll}{\optional{lines\code{ = 1}}}
16329
4d424d1397b2 More on noutrefresh() and scroll().
Eric S. Raymond <esr@thyrsus.com>
parents: 15730
diff changeset
939 Scroll the screen or scrolling region upward by \var{lines} lines.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
940 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
941
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
942 \begin{methoddesc}[window]{scrollok}{flag}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
943 Controls what happens when the cursor of a window is moved off the
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
944 edge of the window or scrolling region, either as a result of a
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
945 newline action on the bottom line, or typing the last character
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
946 of the last line. If \var{flag} is false, the cursor is left
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
947 on the bottom line. If \var{flag} is true, the window is
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
948 scrolled up one line. Note that in order to get the physical
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
949 scrolling effect on the terminal, it is also necessary to call
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
950 \method{idlok()}.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
951 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
952
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
953 \begin{methoddesc}[window]{setscrreg}{top, bottom}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
954 Set the scrolling region from line \var{top} to line \var{bottom}. All
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
955 scrolling actions will take place in this region.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
956 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
957
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
958 \begin{methoddesc}[window]{standend}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
959 Turn off the standout attribute. On some terminals this has the
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
960 side effect of turning off all attributes.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
961 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
962
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
963 \begin{methoddesc}[window]{standout}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
964 Turn on attribute \var{A_STANDOUT}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
965 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
966
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
967 \begin{methoddesc}[window]{subpad}{\optional{nlines, ncols,} begin_y, begin_x}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
968 Return a sub-window, whose upper-left corner is at
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
969 \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
970 \var{ncols}/\var{nlines}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
971 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
972
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
973 \begin{methoddesc}[window]{subwin}{\optional{nlines, ncols,} begin_y, begin_x}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
974 Return a sub-window, whose upper-left corner is at
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
975 \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
976 \var{ncols}/\var{nlines}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
977
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
978 By default, the sub-window will extend from the
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
979 specified position to the lower right corner of the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
980 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
981
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
982 \begin{methoddesc}[window]{syncdown}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
983 Touches each location in the window that has been touched in any of
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
984 its ancestor windows. This routine is called by \method{refresh()},
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
985 so it should almost never be necessary to call it manually.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
986 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
987
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
988 \begin{methoddesc}[window]{syncok}{flag}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
989 If called with \var{flag} set to true, then \method{syncup()} is
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
990 called automatically whenever there is a change in the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
991 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
992
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
993 \begin{methoddesc}[window]{syncup}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
994 Touches all locations in ancestors of the window that have been changed in
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
995 the window.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
996 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
997
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
998 \begin{methoddesc}[window]{timeout}{delay}
13625
fdfd1049f36e Rob W. W. Hooft's spelling fixes for the Library Reference. I hope
Thomas Wouters <thomas@python.org>
parents: 13167
diff changeset
999 Sets blocking or non-blocking read behavior for the window. If
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1000 \var{delay} is negative, blocking read is used, which will wait
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1001 indefinitely for input). If \var{delay} is zero, then non-blocking
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1002 read is used, and -1 will be returned by \method{getch()} if no input
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1003 is waiting. If \var{delay} is positive, then \method{getch()} will
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1004 block for \var{delay} milliseconds, and return -1 if there is still no
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1005 input at the end of that time.
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1006 \end{methoddesc}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1007
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
1008 \begin{methoddesc}[window]{touchline}{start, count}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1009 Pretend \var{count} lines have been changed, starting with line
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1010 \var{start}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1011 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1012
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
1013 \begin{methoddesc}[window]{touchwin}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1014 Pretend the whole window has been changed, for purposes of drawing
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1015 optimizations.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1016 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1017
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
1018 \begin{methoddesc}[window]{untouchwin}{}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1019 Marks all lines in the window as unchanged since the last call to
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1020 \method{refresh()}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1021 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1022
21546
f72244cf85a9 Fix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake <fdrake@acm.org>
parents: 21062
diff changeset
1023 \begin{methoddesc}[window]{vline}{\optional{y, x,} ch, n}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1024 Display a vertical line starting at \code{(\var{y}, \var{x})} with
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1025 length \var{n} consisting of the character \var{ch}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1026 \end{methoddesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1027
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1028 \subsection{Constants}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1029
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1030 The \module{curses} module defines the following data members:
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1031
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1032 \begin{datadesc}{ERR}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1033 Some curses routines that return an integer, such as
15730
d3c7ed15ce25 Markup nit: OK and ERR should be marked \constant in running text.
Fred Drake <fdrake@acm.org>
parents: 15662
diff changeset
1034 \function{getch()}, return \constant{ERR} upon failure.
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1035 \end{datadesc}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1036
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1037 \begin{datadesc}{OK}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1038 Some curses routines that return an integer, such as
15730
d3c7ed15ce25 Markup nit: OK and ERR should be marked \constant in running text.
Fred Drake <fdrake@acm.org>
parents: 15662
diff changeset
1039 \function{napms()}, return \constant{OK} upon success.
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1040 \end{datadesc}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1041
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1042 \begin{datadesc}{version}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1043 A string representing the current version of the module.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1044 Also available as \constant{__version__}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1045 \end{datadesc}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1046
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1047 Several constants are available to specify character cell attributes:
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1048
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1049 \begin{tableii}{l|l}{code}{Attribute}{Meaning}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1050 \lineii{A_ALTCHARSET}{Alternate character set mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1051 \lineii{A_BLINK}{Blink mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1052 \lineii{A_BOLD}{Bold mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1053 \lineii{A_DIM}{Dim mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1054 \lineii{A_NORMAL}{Normal attribute.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1055 \lineii{A_STANDOUT}{Standout mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1056 \lineii{A_UNDERLINE}{Underline mode.}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1057 \end{tableii}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1058
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1059 Keys are referred to by integer constants with names starting with
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1060 \samp{KEY_}. The exact keycaps available are system dependent.
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1061
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1062 % XXX this table is far too large!
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1063 % XXX should this table be alphabetized?
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1064
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1065 \begin{longtableii}{l|l}{code}{Key constant}{Key}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1066 \lineii{KEY_MIN}{Minimum key value}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1067 \lineii{KEY_BREAK}{ Break key (unreliable) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1068 \lineii{KEY_DOWN}{ Down-arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1069 \lineii{KEY_UP}{ Up-arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1070 \lineii{KEY_LEFT}{ Left-arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1071 \lineii{KEY_RIGHT}{ Right-arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1072 \lineii{KEY_HOME}{ Home key (upward+left arrow) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1073 \lineii{KEY_BACKSPACE}{ Backspace (unreliable) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1074 \lineii{KEY_F0}{ Function keys. Up to 64 function keys are supported. }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1075 \lineii{KEY_F\var{n}}{ Value of function key \var{n} }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1076 \lineii{KEY_DL}{ Delete line }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1077 \lineii{KEY_IL}{ Insert line }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1078 \lineii{KEY_DC}{ Delete character }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1079 \lineii{KEY_IC}{ Insert char or enter insert mode }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1080 \lineii{KEY_EIC}{ Exit insert char mode }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1081 \lineii{KEY_CLEAR}{ Clear screen }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1082 \lineii{KEY_EOS}{ Clear to end of screen }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1083 \lineii{KEY_EOL}{ Clear to end of line }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1084 \lineii{KEY_SF}{ Scroll 1 line forward }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1085 \lineii{KEY_SR}{ Scroll 1 line backward (reverse) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1086 \lineii{KEY_NPAGE}{ Next page }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1087 \lineii{KEY_PPAGE}{ Previous page }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1088 \lineii{KEY_STAB}{ Set tab }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1089 \lineii{KEY_CTAB}{ Clear tab }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1090 \lineii{KEY_CATAB}{ Clear all tabs }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1091 \lineii{KEY_ENTER}{ Enter or send (unreliable) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1092 \lineii{KEY_SRESET}{ Soft (partial) reset (unreliable) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1093 \lineii{KEY_RESET}{ Reset or hard reset (unreliable) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1094 \lineii{KEY_PRINT}{ Print }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1095 \lineii{KEY_LL}{ Home down or bottom (lower left) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1096 \lineii{KEY_A1}{ Upper left of keypad }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1097 \lineii{KEY_A3}{ Upper right of keypad }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1098 \lineii{KEY_B2}{ Center of keypad }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1099 \lineii{KEY_C1}{ Lower left of keypad }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1100 \lineii{KEY_C3}{ Lower right of keypad }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1101 \lineii{KEY_BTAB}{ Back tab }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1102 \lineii{KEY_BEG}{ Beg (beginning) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1103 \lineii{KEY_CANCEL}{ Cancel }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1104 \lineii{KEY_CLOSE}{ Close }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1105 \lineii{KEY_COMMAND}{ Cmd (command) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1106 \lineii{KEY_COPY}{ Copy }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1107 \lineii{KEY_CREATE}{ Create }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1108 \lineii{KEY_END}{ End }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1109 \lineii{KEY_EXIT}{ Exit }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1110 \lineii{KEY_FIND}{ Find }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1111 \lineii{KEY_HELP}{ Help }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1112 \lineii{KEY_MARK}{ Mark }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1113 \lineii{KEY_MESSAGE}{ Message }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1114 \lineii{KEY_MOVE}{ Move }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1115 \lineii{KEY_NEXT}{ Next }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1116 \lineii{KEY_OPEN}{ Open }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1117 \lineii{KEY_OPTIONS}{ Options }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1118 \lineii{KEY_PREVIOUS}{ Prev (previous) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1119 \lineii{KEY_REDO}{ Redo }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1120 \lineii{KEY_REFERENCE}{ Ref (reference) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1121 \lineii{KEY_REFRESH}{ Refresh }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1122 \lineii{KEY_REPLACE}{ Replace }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1123 \lineii{KEY_RESTART}{ Restart }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1124 \lineii{KEY_RESUME}{ Resume }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1125 \lineii{KEY_SAVE}{ Save }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1126 \lineii{KEY_SBEG}{ Shifted Beg (beginning) }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1127 \lineii{KEY_SCANCEL}{ Shifted Cancel }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1128 \lineii{KEY_SCOMMAND}{ Shifted Command }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1129 \lineii{KEY_SCOPY}{ Shifted Copy }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1130 \lineii{KEY_SCREATE}{ Shifted Create }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1131 \lineii{KEY_SDC}{ Shifted Delete char }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1132 \lineii{KEY_SDL}{ Shifted Delete line }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1133 \lineii{KEY_SELECT}{ Select }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1134 \lineii{KEY_SEND}{ Shifted End }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1135 \lineii{KEY_SEOL}{ Shifted Clear line }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1136 \lineii{KEY_SEXIT}{ Shifted Dxit }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1137 \lineii{KEY_SFIND}{ Shifted Find }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1138 \lineii{KEY_SHELP}{ Shifted Help }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1139 \lineii{KEY_SHOME}{ Shifted Home }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1140 \lineii{KEY_SIC}{ Shifted Input }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1141 \lineii{KEY_SLEFT}{ Shifted Left arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1142 \lineii{KEY_SMESSAGE}{ Shifted Message }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1143 \lineii{KEY_SMOVE}{ Shifted Move }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1144 \lineii{KEY_SNEXT}{ Shifted Next }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1145 \lineii{KEY_SOPTIONS}{ Shifted Options }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1146 \lineii{KEY_SPREVIOUS}{ Shifted Prev }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1147 \lineii{KEY_SPRINT}{ Shifted Print }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1148 \lineii{KEY_SREDO}{ Shifted Redo }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1149 \lineii{KEY_SREPLACE}{ Shifted Replace }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1150 \lineii{KEY_SRIGHT}{ Shifted Right arrow }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1151 \lineii{KEY_SRSUME}{ Shifted Resume }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1152 \lineii{KEY_SSAVE}{ Shifted Save }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1153 \lineii{KEY_SSUSPEND}{ Shifted Suspend }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1154 \lineii{KEY_SUNDO}{ Shifted Undo }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1155 \lineii{KEY_SUSPEND}{ Suspend }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1156 \lineii{KEY_UNDO}{ Undo }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1157 \lineii{KEY_MOUSE}{ Mouse event has occurred }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1158 \lineii{KEY_RESIZE}{ Terminal resize event }
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1159 \lineii{KEY_MAX}{Maximum key value}
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1160 \end{longtableii}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1161
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1162 On VT100s and their software emulations, such as X terminal emulators,
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1163 there are normally at least four function keys (\constant{KEY_F1},
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1164 \constant{KEY_F2}, \constant{KEY_F3}, \constant{KEY_F4}) available,
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1165 and the arrow keys mapped to \constant{KEY_UP}, \constant{KEY_DOWN},
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1166 \constant{KEY_LEFT} and \constant{KEY_RIGHT} in the obvious way. If
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1167 your machine has a PC keybboard, it is safe to expect arrow keys and
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1168 twelve function keys (older PC keyboards may have only ten function
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1169 keys); also, the following keypad mappings are standard:
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1170
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1171 \begin{tableii}{l|l}{kbd}{Keycap}{Constant}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1172 \lineii{Insert}{KEY_IC}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1173 \lineii{Delete}{KEY_DC}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1174 \lineii{Home}{KEY_HOME}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1175 \lineii{End}{KEY_END}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1176 \lineii{Page Up}{KEY_NPAGE}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1177 \lineii{Page Down}{KEY_PPAGE}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1178 \end{tableii}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1179
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1180 The following table lists characters from the alternate character set.
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1181 These are inherited from the VT100 terminal, and will generally be
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1182 available on software emulations such as X terminals. When there
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1183 is no graphic available, curses falls back on a crude printable ASCII
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1184 approximation.
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
1185 \note{These are available only after \function{initscr()} has
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
1186 been called.}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1187
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1188 \begin{longtableii}{l|l}{code}{ACS code}{Meaning}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1189 \lineii{ACS_BBSS}{alternate name for upper right corner}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1190 \lineii{ACS_BLOCK}{solid square block}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1191 \lineii{ACS_BOARD}{board of squares}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1192 \lineii{ACS_BSBS}{alternate name for horizontal line}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1193 \lineii{ACS_BSSB}{alternate name for upper left corner}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1194 \lineii{ACS_BSSS}{alternate name for top tee}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1195 \lineii{ACS_BTEE}{bottom tee}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1196 \lineii{ACS_BULLET}{bullet}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1197 \lineii{ACS_CKBOARD}{checker board (stipple)}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1198 \lineii{ACS_DARROW}{arrow pointing down}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1199 \lineii{ACS_DEGREE}{degree symbol}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1200 \lineii{ACS_DIAMOND}{diamond}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1201 \lineii{ACS_GEQUAL}{greater-than-or-equal-to}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1202 \lineii{ACS_HLINE}{horizontal line}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1203 \lineii{ACS_LANTERN}{lantern symbol}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1204 \lineii{ACS_LARROW}{left arrow}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1205 \lineii{ACS_LEQUAL}{less-than-or-equal-to}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1206 \lineii{ACS_LLCORNER}{lower left-hand corner}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1207 \lineii{ACS_LRCORNER}{lower right-hand corner}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1208 \lineii{ACS_LTEE}{left tee}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1209 \lineii{ACS_NEQUAL}{not-equal sign}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1210 \lineii{ACS_PI}{letter pi}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1211 \lineii{ACS_PLMINUS}{plus-or-minus sign}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1212 \lineii{ACS_PLUS}{big plus sign}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1213 \lineii{ACS_RARROW}{right arrow}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1214 \lineii{ACS_RTEE}{right tee}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1215 \lineii{ACS_S1}{scan line 1}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1216 \lineii{ACS_S3}{scan line 3}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1217 \lineii{ACS_S7}{scan line 7}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1218 \lineii{ACS_S9}{scan line 9}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1219 \lineii{ACS_SBBS}{alternate name for lower right corner}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1220 \lineii{ACS_SBSB}{alternate name for vertical line}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1221 \lineii{ACS_SBSS}{alternate name for right tee}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1222 \lineii{ACS_SSBB}{alternate name for lower left corner}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1223 \lineii{ACS_SSBS}{alternate name for bottom tee}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1224 \lineii{ACS_SSSB}{alternate name for left tee}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1225 \lineii{ACS_SSSS}{alternate name for crossover or big plus}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1226 \lineii{ACS_STERLING}{pound sterling}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1227 \lineii{ACS_TTEE}{top tee}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1228 \lineii{ACS_UARROW}{up arrow}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1229 \lineii{ACS_ULCORNER}{upper left corner}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1230 \lineii{ACS_URCORNER}{upper right corner}
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
1231 \lineii{ACS_VLINE}{vertical line}
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1232 \end{longtableii}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1233
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1234 The following table lists the predefined colors:
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1235
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1236 \begin{tableii}{l|l}{code}{Constant}{Color}
12739
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1237 \lineii{COLOR_BLACK}{Black}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1238 \lineii{COLOR_BLUE}{Blue}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1239 \lineii{COLOR_CYAN}{Cyan (light greenish blue)}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1240 \lineii{COLOR_GREEN}{Green}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1241 \lineii{COLOR_MAGENTA}{Magenta (purplish red)}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1242 \lineii{COLOR_RED}{Red}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1243 \lineii{COLOR_WHITE}{White}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1244 \lineii{COLOR_YELLOW}{Yellow}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1245 \end{tableii}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1246
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1247 \section{\module{curses.textpad} ---
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1248 Text input widget for curses programs}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1249
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1250 \declaremodule{standard}{curses.textpad}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1251 \sectionauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1252 \moduleauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1253 \modulesynopsis{Emacs-like input editing in a curses window.}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1254 \versionadded{1.6}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1255
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1256 The \module{curses.textpad} module provides a \class{Textbox} class
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1257 that handles elementary text editing in a curses window, supporting a
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1258 set of keybindings resembling those of Emacs (thus, also of Netscape
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1259 Navigator, BBedit 6.x, FrameMaker, and many other programs). The
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1260 module also provides a rectangle-drawing function useful for framing
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1261 text boxes or for other purposes.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1262
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1263 The module \module{curses.textpad} defines the following function:
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1264
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1265 \begin{funcdesc}{rectangle}{win, uly, ulx, lry, lrx}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1266 Draw a rectangle. The first argument must be a window object; the
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1267 remaining arguments are coordinates relative to that window. The
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1268 second and third arguments are the y and x coordinates of the upper
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1269 left hand corner of the rectangle To be drawn; the fourth and fifth
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1270 arguments are the y and x coordinates of the lower right hand corner.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1271 The rectangle will be drawn using VT100/IBM PC forms characters on
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1272 terminals that make this possible (including xterm and most other
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1273 software terminal emulators). Otherwise it will be drawn with ASCII
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1274 dashes, vertical bars, and plus signs.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1275 \end{funcdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1276
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1277
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1278 \subsection{Textbox objects \label{curses-textpad-objects}}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1279
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1280 You can instantiate a \class{Textbox} object as follows:
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1281
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1282 \begin{classdesc}{Textbox}{win}
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1283 Return a textbox widget object. The \var{win} argument should be a
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1284 curses \class{WindowObject} in which the textbox is to be contained.
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1285 The edit cursor of the textbox is initially located at the upper left
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1286 hand corner of the containin window, with coordinates \code{(0, 0)}.
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1287 The instance's \member{stripspaces} flag is initially on.
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1288 \end{classdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1289
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1290 \class{Textbox} objects have the following methods:
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1291
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1292 \begin{methoddesc}{edit}{\optional{validator}}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1293 This is the entry point you will normally use. It accepts editing
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1294 keystrokes until one of the termination keystrokes is entered. If
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1295 \var{validator} is supplied, it must be a function. It will be called
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1296 for each keystroke entered with the keystroke as a parameter; command
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1297 dispatch is done on the result. This method returns the window
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1298 contents as a string; whether blanks in the window are included is
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1299 affected by the \member{stripspaces} member.
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1300 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1301
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1302 \begin{methoddesc}{do_command}{ch}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1303 Process a single command keystroke. Here are the supported special
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1304 keystrokes:
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1305
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1306 \begin{tableii}{l|l}{kbd}{Keystroke}{Action}
18488
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1307 \lineii{Control-A}{Go to left edge of window.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1308 \lineii{Control-B}{Cursor left, wrapping to previous line if appropriate.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1309 \lineii{Control-D}{Delete character under cursor.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1310 \lineii{Control-E}{Go to right edge (stripspaces off) or end of line
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
1311 (stripspaces on).}
18488
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1312 \lineii{Control-F}{Cursor right, wrapping to next line when appropriate.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1313 \lineii{Control-G}{Terminate, returning the window contents.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1314 \lineii{Control-H}{Delete character backward.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1315 \lineii{Control-J}{Terminate if the window is 1 line, otherwise
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1316 insert newline.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1317 \lineii{Control-K}{If line is blank, delete it, otherwise clear to
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1318 end of line.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1319 \lineii{Control-L}{Refresh screen.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1320 \lineii{Control-N}{Cursor down; move down one line.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1321 \lineii{Control-O}{Insert a blank line at cursor location.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1322 \lineii{Control-P}{Cursor up; move up one line.}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1323 \end{tableii}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1324
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1325 Move operations do nothing if the cursor is at an edge where the
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1326 movement is not possible. The following synonyms are supported where
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1327 possible:
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1328
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1329 \begin{tableii}{l|l}{constant}{Constant}{Keystroke}
18488
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1330 \lineii{KEY_LEFT}{\kbd{Control-B}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1331 \lineii{KEY_RIGHT}{\kbd{Control-F}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1332 \lineii{KEY_UP}{\kbd{Control-P}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1333 \lineii{KEY_DOWN}{\kbd{Control-N}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1334 \lineii{KEY_BACKSPACE}{\kbd{Control-h}}
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1335 \end{tableii}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1336
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1337 All other keystrokes are treated as a command to insert the given
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1338 character and move right (with line wrapping).
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1339 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1340
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1341 \begin{methoddesc}{gather}{}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1342 This method returns the window contents as a string; whether blanks in
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1343 the window are included is affected by the \member{stripspaces}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1344 member.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1345 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1346
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1347 \begin{memberdesc}{stripspaces}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1348 This data member is a flag which controls the interpretation of blanks in
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1349 the window. When it is on, trailing blanks on each line are ignored;
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1350 any cursor motion that would land the cursor on a trailing blank goes
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1351 to the end of that line instead, and trailing blanks are stripped when
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1352 the window contents is gathered.
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1353 \end{memberdesc}
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1354
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1355
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1356 \section{\module{curses.wrapper} ---
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1357 Terminal handler for curses programs}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1358
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1359 \declaremodule{standard}{curses.wrapper}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1360 \sectionauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1361 \moduleauthor{Eric Raymond}{esr@thyrsus.com}
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1362 \modulesynopsis{Terminal configuration wrapper for curses programs.}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1363 \versionadded{1.6}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1364
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1365 This module supplies one function, \function{wrapper()}, which runs
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1366 another function which should be the rest of your curses-using
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1367 application. If the application raises an exception,
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1368 \function{wrapper()} will restore the terminal to a sane state before
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1369 passing it further up the stack and generating a traceback.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1370
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1371 \begin{funcdesc}{wrapper}{func, \moreargs}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1372 Wrapper function that initializes curses and calls another function,
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1373 \var{func}, restoring normal keyboard/screen behavior on error.
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1374 The callable object \var{func} is then passed the main window 'stdscr'
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1375 as its first argument, followed by any other arguments passed to
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1376 \function{wrapper()}.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1377 \end{funcdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1378
13909
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1379 Before calling the hook function, \function{wrapper()} turns on cbreak
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1380 mode, turns off echo, enables the terminal keypad, and initializes
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1381 colors if the terminal has color support. On exit (whether normally
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1382 or by exception) it restores cooked mode, turns on echo, and disables
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1383 the terminal keypad.
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1384