annotate Doc/lib/libcurses.tex @ 21467:4e35fa5d5708 legacy-trunk

Add documentation for the help() built-in; contributed by Ka-Ping Yee. This is part of SF patch #494622.
author Fred Drake <fdrake@acm.org>
date Tue, 18 Dec 2001 16:31:08 +0000
parents bc02c3b09626
children f72244cf85a9
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
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
269 the whole 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
270 \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
271
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
272 \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
273 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
274 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
275 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
276
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
277 \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
278 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
279 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
280 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
281 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
282 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
283 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
284 \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
285
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 \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
287 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
288 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
289 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
290 \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
291
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 \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
293 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
294 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
295 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
296 \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
297 \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
298
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 \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
300 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
301 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
302 \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
303
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
304 \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
305 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
306 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
307 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
308 or one fifth of a second.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
309 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
310
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
311 \begin{funcdesc}{mousemask}{mousemask}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
312 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
313 \code{(\var{availmask}, \var{oldmask})}.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
314 \var{availmask} indicates which of the
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
315 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
316 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
317 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
318 ever reported.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
319 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
320
15576
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
321 \begin{funcdesc}{napms}{ms}
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
322 Sleep for \var{ms} milliseconds.
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
323 \end{funcdesc}
58fe937f734a Document napms()
Andrew M. Kuchling <amk@amk.ca>
parents: 15467
diff changeset
324
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
325 \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
326 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
327 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
328 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
329
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
330 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
331 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
332 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
333 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
334 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
335 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
336 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
337 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
338 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
339 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
340 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
341 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
342 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
343
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
344 \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
345 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
346 \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
347 \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
348
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
349 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
350 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
351 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
352
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
353 \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
354 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
355 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
356 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
357 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
358
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
359 \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
360 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
361 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
362
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
363 \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
364 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
365 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
366
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
367 \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
368 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
369 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
370 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
371 \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
372 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
373 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
374 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
375 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
376
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
377 \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
378 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
379 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
380 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
381 \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
382 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
383 handler exits.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
384 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
385
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
386 \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
387 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
388 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
389
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
390 \begin{funcdesc}{pair_content}{pair_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
391 Returns a tuple \var{(fg,bg)} containing the colors for the requested
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
392 color pair. The value of \var{pair_number} must be between 0 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
393 COLOR_PAIRS-1.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
394 \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
395
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 \begin{funcdesc}{pair_number}{attr}
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 Returns the number of the color-pair set by the attribute value \var{attr}.
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
398 \function{color_pair()} is the counterpart to this 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
399 \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
400
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 \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
402 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
403 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
404 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
405 \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
406
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 \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
408 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
409 \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
410 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
411 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
412 \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
413
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 \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
415 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
416 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
417 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
418 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
419 \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
420
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 \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
422 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
423 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
424 \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
425
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 \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
427 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
428 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
429 \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
430
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 \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
432 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
433 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
434 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
435
15419
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
436 \begin{funcdesc}{setupterm}{\optional{termstr, fd}}
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
437 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
438 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
439 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
440 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
441 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
442 \end{funcdesc}
bd41e6273ed9 Document the new setupterm() function
Andrew M. Kuchling <amk@amk.ca>
parents: 15384
diff changeset
443
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
444 \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
445 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
446 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
447 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
448
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 \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
450 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
451 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
452 \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
453 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
454 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
455 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
456 \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
457
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 \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
459 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
460 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
461 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
462 \end{funcdesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
463
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
464 \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
465 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
466 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
467 \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
468
13716
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
469 \begin{funcdesc}{tigetflag}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
470 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
471 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
472 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
473 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
474 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
475
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
476 \begin{funcdesc}{tigetnum}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
477 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
478 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
479 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
480 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
481 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
482
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
483 \begin{funcdesc}{tigetstr}{capname}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
484 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
485 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
486 \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
487 from the terminal description.
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
488 \end{funcdesc}
6578faf48cd1 Document tiget{flag,num,str}
Andrew M. Kuchling <amk@amk.ca>
parents: 13696
diff changeset
489
15384
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
490 \begin{funcdesc}{tparm}{str\optional{,...}}
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
491 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
492 \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
493 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
494 \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
495 \end{funcdesc}
3cb12e0e7acd Patch #102278: add tparm() function to _curses module
Andrew M. Kuchling <amk@amk.ca>
parents: 15142
diff changeset
496
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
497 \begin{funcdesc}{typeahead}{fd}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
498 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
499 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
500 done.
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
501
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
502 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
503 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
504 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
505 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
506 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
507 file descriptor for typeahead checking.
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
508 \end{funcdesc}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
509
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
510 \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
511 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
512 \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
513 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
514 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
515 \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
516
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 \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
518 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
519 \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
520 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
521 \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
522
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
523 \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
524 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
525 the given state data with it.
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
526 \end{funcdesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
527
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
528 \begin{funcdesc}{use_env}{flag}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
529 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
530 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
531 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
532 used, even if environment variables \envvar{LINES} and
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
533 \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
534 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
535 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
536 \end{funcdesc}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
537
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
538 \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
539
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
540 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
541 \function{newwin()} above, have the
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
542 following methods:
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
543
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
544 \begin{methoddesc}{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
545 \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
546 \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
547 (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
548 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
549
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
550 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
551 \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
552 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
553 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
554 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
555
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
556 \begin{methoddesc}{addnstr}{\optional{y, x,} str, n\optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
557 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
558 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
559 \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
560 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
561
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
562 \begin{methoddesc}{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
563 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
564 \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
565 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
566
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
567 \begin{methoddesc}{attroff}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
568 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
569 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
570 \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
571
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
572 \begin{methoddesc}{attron}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
573 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
574 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
575 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
576
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
577 \begin{methoddesc}{attrset}{attr}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
578 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
579 initially 0 (no attributes).
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
580 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
581
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
582 \begin{methoddesc}{bkgd}{ch\optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
583 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
584 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
585 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
586 \begin{itemize}
13732
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
587 \item
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
588 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
589 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
590 \item
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
591 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
592 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
593 \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
594
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
595 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
596
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
597 \begin{methoddesc}{bkgdset}{ch\optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
598 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
599 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
600 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
601 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
602 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
603 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
604 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
605 operations.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
606 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
607
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
608 \begin{methoddesc}{border}{\optional{ls\optional{, rs\optional{, ts\optional{,
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
609 bs\optional{, tl\optional{, tr\optional{,
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
610 bl\optional{, br}}}}}}}}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
611 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
612 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
613 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
614 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
615
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
616 \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
617 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
618 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
619
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
620 \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
621 \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
622 \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
623 \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
624 \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
625 \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
626 \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
627 \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
628 \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
629 \end{tableiii}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
630 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
631
11041
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
632 \begin{methoddesc}{box}{\optional{vertch, horch}}
27c48df1ceb7 Updates from Moshe, again edited by me. Describe the parameters to
Fred Drake <fdrake@acm.org>
parents: 11025
diff changeset
633 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
634 \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
635 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
636 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
637
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
638 \begin{methoddesc}{clear}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
639 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
640 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
641 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
642
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
643 \begin{methoddesc}{clearok}{yes}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
644 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
645 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
646 \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
647
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
648 \begin{methoddesc}{clrtobot}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
649 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
650 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
651 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
652
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
653 \begin{methoddesc}{clrtoeol}{}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
654 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
655 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
656
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
657 \begin{methoddesc}{cursyncup}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
658 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
659 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
660 \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
661
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 \begin{methoddesc}{delch}{\optional{x, y}}
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 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
664 \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
665
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 \begin{methoddesc}{deleteln}{}
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 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
668 by 1 line.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
669 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
670
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
671 \begin{methoddesc}{derwin}{\optional{nlines, ncols,} begin_y, begin_y}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
672 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
673 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
674 \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
675 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
676 derived window.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
677 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
678
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
679 \begin{methoddesc}{echochar}{ch\optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
680 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
681 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
682 \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
683
13167
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
684 \begin{methoddesc}{enclose}{y, x}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
685 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
686 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
687 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
688 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
689 \end{methoddesc}
f7294246d04f Document recently-added mouse-related functions
Andrew M. Kuchling <amk@amk.ca>
parents: 13099
diff changeset
690
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
691 \begin{methoddesc}{erase}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
692 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
693 \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
694
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 \begin{methoddesc}{getbegyx}{}
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 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
697 corner.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
698 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
699
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
700 \begin{methoddesc}{getch}{\optional{x, y}}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
701 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
702 be in \ASCII{} range: function keys, keypad keys and so on return numbers
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
703 higher than 256. In no-delay mode, an exception is raised if there is
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
704 no input.
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
705 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
706
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
707 \begin{methoddesc}{getkey}{\optional{x, y}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
708 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
709 \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
710 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
711 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
712 \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
713
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 \begin{methoddesc}{getmaxyx}{}
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 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
716 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
717 \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
718
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 \begin{methoddesc}{getparyx}{}
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 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
721 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
722 \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
723 \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
724
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
725 \begin{methoddesc}{getstr}{\optional{x, y}}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
726 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
727 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
728
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
729 \begin{methoddesc}{getyx}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
730 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
731 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
732 \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
733
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 \begin{methoddesc}{hline}{\optional{y, x,} ch, 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
735 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
736 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
737 \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
738
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 \begin{methoddesc}{idcok}{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
740 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
741 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
742 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
743 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
744 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
745 \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
746
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 \begin{methoddesc}{idlok}{yes}
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 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
749 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
750 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
751 \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
752
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 \begin{methoddesc}{immedok}{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
754 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
755 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
756 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
757 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
758 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
759 \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
760
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
761 \begin{methoddesc}{inch}{\optional{x, y}}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
762 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
763 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
764 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
765
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
766 \begin{methoddesc}{insch}{\optional{y, x,} ch\optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
767 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
768 \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
769 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
770 \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
771
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 \begin{methoddesc}{insdelln}{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
773 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
774 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
775 \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
776 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
777 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
778 \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
779
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 \begin{methoddesc}{insertln}{}
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 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
782 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
783 \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
784
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 \begin{methoddesc}{insnstr}{\optional{y, x, } str, n \optional{, attr}}
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 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
787 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
788 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
789 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
790 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
791 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
792 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
793 \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
794 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
795
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
796 \begin{methoddesc}{insstr}{\optional{y, x, } str \optional{, attr}}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
797 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
798 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
799 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
800 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
801 \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
802 \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
803
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 \begin{methoddesc}{instr}{\optional{y, x} \optional{, 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
805 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
806 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
807 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
808 \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
809 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
810 \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
811
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 \begin{methoddesc}{is_linetouched}{\var{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
813 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
814 \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
815 \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
816 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
817 \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
818
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 \begin{methoddesc}{is_wintouched}{}
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 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
821 \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
822 \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
823
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 \begin{methoddesc}{keypad}{yes}
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 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
826 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
827 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
828 stream.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
829 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
830
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
831 \begin{methoddesc}{leaveok}{yes}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
832 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
833 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
834 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
835
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
836 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
837 an update.
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
838 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
839
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
840 \begin{methoddesc}{move}{new_y, new_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
841 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
842 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
843
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
844 \begin{methoddesc}{mvderwin}{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
845 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
846 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
847 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
848 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
849 \end{methoddesc}
11025
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
850
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
851 \begin{methoddesc}{mvwin}{new_y, new_x}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
852 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
853 \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
854 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
855
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
856 \begin{methoddesc}{nodelay}{yes}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
857 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
858 \end{methoddesc}
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
859
31fd4ed73d29 Preliminary documentation for the curses module by Moshe Zadka, with
Fred Drake <fdrake@acm.org>
parents:
diff changeset
860 \begin{methoddesc}{notimeout}{yes}
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
861 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
862
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
863 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
864 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
865 \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
866
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
867 \begin{methoddesc}{noutrefresh}{}
13910
a4259bfca5bf More on noutrefresh.
Eric S. Raymond <esr@thyrsus.com>
parents: 13909
diff changeset
868 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
869 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
870 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
871 \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
872 \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
873
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
874 \begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol,
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
875 dminrow, dmincol, dmaxrow, dmaxcol}}
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
876 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
877 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
878 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
879 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
880
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
881 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
882 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
883 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
884 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
885 \end{methoddesc}
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
886
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
887 \begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol,
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
888 dminrow, dmincol, dmaxrow, dmaxcol}}
15639
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
889 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
890 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
891 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
892 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
893
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
894 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
895 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
896 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
897 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
898 \end{methoddesc}
7fb5099be202 Document the window.overlay() and .overwrite() methods
Andrew M. Kuchling <amk@amk.ca>
parents: 15576
diff changeset
899
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
900 \begin{methoddesc}{putwin}{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
901 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
902 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
903 \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
904
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 \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
906
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 \begin{methoddesc}{redrawln}{beg, num}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
908 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
909 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
910 \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
911 \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
912
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 \begin{methoddesc}{redrawwin}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
914 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
915 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
916 \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
917
15641
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
918 \begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow,
f0cda0d4b53c Fix lots of small markup nits.
Fred Drake <fdrake@acm.org>
parents: 15639
diff changeset
919 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
920 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
921 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
922
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 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
924 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
925 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
926 \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
927 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
928 \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
929 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
930 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
931 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
932 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
933 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
934 \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
935 \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
936
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 \begin{methoddesc}{scroll}{\optional{lines\code{ = 1}}}
16329
4d424d1397b2 More on noutrefresh() and scroll().
Eric S. Raymond <esr@thyrsus.com>
parents: 15730
diff changeset
938 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
939 \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
940
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 \begin{methoddesc}{scrollok}{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
942 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
943 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
944 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
945 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
946 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
947 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
948 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
949 \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
950 \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
951
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 \begin{methoddesc}{setscrreg}{top, bottom}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
953 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
954 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
955 \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
956
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 \begin{methoddesc}{standend}{}
13681
b0e83962f4da First round of curses documentation improvements; correct errors, flesh out
Eric S. Raymond <esr@thyrsus.com>
parents: 13625
diff changeset
958 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
959 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
960 \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
961
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 \begin{methoddesc}{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
963 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
964 \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
965
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 \begin{methoddesc}{subpad}{\optional{nlines, ncols,} begin_y, begin_y}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
967 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
968 \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
969 \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
970 \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
971
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 \begin{methoddesc}{subwin}{\optional{nlines, ncols,} begin_y, begin_y}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
973 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
974 \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
975 \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
976
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 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
978 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
979 \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
980
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 \begin{methoddesc}{syncdown}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
982 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
983 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
984 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
985 \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
986
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 \begin{methoddesc}{syncok}{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
988 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
989 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
990 \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
991
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 \begin{methoddesc}{syncup}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
993 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
994 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
995 \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
996
12975
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
997 \begin{methoddesc}{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
998 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
999 \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
1000 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
1001 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
1002 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
1003 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
1004 input at the end of that time.
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1005 \end{methoddesc}
df627e61916e Document .timeout() method and .typeahead() function
Andrew M. Kuchling <amk@amk.ca>
parents: 12739
diff changeset
1006
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
1007 \begin{methoddesc}{touchline}{start, count}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1008 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
1009 \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
1010 \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
1011
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 \begin{methoddesc}{touchwin}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1013 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
1014 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
1015 \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
1016
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 \begin{methoddesc}{untouchwin}{}
18b0356505a5 Updated docs to list all the new methods and functions. The docs are
Andrew M. Kuchling <amk@amk.ca>
parents: 11463
diff changeset
1018 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
1019 \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
1020 \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
1021
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 \begin{methoddesc}{vline}{\optional{y, x,} ch, 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
1023 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
1024 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
1025 \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
1026
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 \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
1028
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 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
1030
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1031 \begin{datadesc}{ERR}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1032 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
1033 \function{getch()}, return \constant{ERR} upon failure.
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1034 \end{datadesc}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1035
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1036 \begin{datadesc}{OK}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1037 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
1038 \function{napms()}, return \constant{OK} upon success.
15662
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1039 \end{datadesc}
5f3ee5f1b3d7 Document ERR and OK
Andrew M. Kuchling <amk@amk.ca>
parents: 15652
diff changeset
1040
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
1041 \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
1042 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
1043 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
1044 \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
1045
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1046 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
1047
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1048 \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
1049 \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
1050 \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
1051 \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
1052 \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
1053 \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
1054 \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
1055 \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
1056 \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
1057
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 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
1059 \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
1060
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 % 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
1062 % 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
1063
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1064 \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
1065 \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
1066 \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
1067 \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
1068 \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
1069 \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
1070 \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
1071 \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
1072 \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
1073 \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
1074 \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
1075 \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
1076 \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
1077 \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
1078 \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
1079 \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
1080 \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
1081 \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
1082 \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
1083 \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
1084 \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
1085 \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
1086 \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
1087 \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
1088 \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
1089 \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
1090 \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
1091 \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
1092 \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
1093 \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
1094 \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
1095 \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
1096 \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
1097 \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
1098 \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
1099 \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
1100 \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
1101 \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
1102 \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
1103 \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
1104 \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
1105 \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
1106 \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
1107 \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
1108 \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
1109 \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
1110 \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
1111 \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
1112 \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
1113 \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
1114 \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
1115 \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
1116 \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
1117 \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
1118 \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
1119 \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
1120 \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
1121 \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
1122 \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
1123 \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
1124 \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
1125 \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
1126 \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
1127 \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
1128 \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
1129 \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
1130 \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
1131 \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
1132 \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
1133 \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
1134 \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
1135 \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
1136 \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
1137 \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
1138 \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
1139 \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
1140 \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
1141 \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
1142 \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
1143 \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
1144 \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
1145 \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
1146 \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
1147 \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
1148 \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
1149 \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
1150 \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
1151 \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
1152 \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
1153 \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
1154 \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
1155 \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
1156 \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
1157 \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
1158 \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
1159 \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
1160
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1161 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
1162 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
1163 \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
1164 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
1165 \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
1166 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
1167 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
1168 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
1169
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1170 \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
1171 \lineii{Insert}{KEY_IC}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1172 \lineii{Delete}{KEY_DC}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1173 \lineii{Home}{KEY_HOME}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1174 \lineii{End}{KEY_END}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1175 \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
1176 \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
1177 \end{tableii}
9ce3e05b7fdb Second round of curses documentation improvements. Completes and extends
Eric S. Raymond <esr@thyrsus.com>
parents: 13716
diff changeset
1178
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
1179 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
1180 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
1181 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
1182 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
1183 approximation.
20580
376ee174ecd0 Use the \note and \warning macros where appropriate.
Fred Drake <fdrake@acm.org>
parents: 18488
diff changeset
1184 \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
1185 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
1186
14723
c04aac18656a Convert the longest two tables from tableii to longtableii so they do not
Fred Drake <fdrake@acm.org>
parents: 13910
diff changeset
1187 \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
1188 \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
1189 \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
1190 \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
1191 \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
1192 \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
1193 \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
1194 \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
1195 \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
1196 \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
1197 \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
1198 \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
1199 \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
1200 \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
1201 \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
1202 \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
1203 \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
1204 \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
1205 \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
1206 \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
1207 \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
1208 \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
1209 \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
1210 \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
1211 \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
1212 \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
1213 \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
1214 \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
1215 \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
1216 \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
1217 \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
1218 \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
1219 \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
1220 \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
1221 \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
1222 \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
1223 \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
1224 \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
1225 \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
1226 \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
1227 \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
1228 \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
1229 \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
1230 \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
1231 \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
1232
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 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
1234
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1235 \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
1236 \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
1237 \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
1238 \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
1239 \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
1240 \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
1241 \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
1242 \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
1243 \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
1244 \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
1245
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1246 \section{\module{curses.textpad} ---
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1247 Text input widget for curses programs}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1248
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1249 \declaremodule{standard}{curses.textpad}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1250 \sectionauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1251 \moduleauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1252 \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
1253 \versionadded{1.6}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1254
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1255 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
1256 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
1257 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
1258 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
1259 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
1260 text boxes or for other purposes.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1261
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1262 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
1263
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1264 \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
1265 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
1266 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
1267 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
1268 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
1269 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
1270 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
1271 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
1272 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
1273 dashes, vertical bars, and plus signs.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1274 \end{funcdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1275
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1276
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1277 \subsection{Textbox objects \label{curses-textpad-objects}}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1278
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1279 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
1280
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1281 \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
1282 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
1283 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
1284 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
1285 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
1286 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
1287 \end{classdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1288
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1289 \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
1290
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1291 \begin{methoddesc}{edit}{\optional{validator}}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1292 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
1293 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
1294 \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
1295 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
1296 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
1297 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
1298 affected by the \member{stripspaces} member.
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1299 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1300
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1301 \begin{methoddesc}{do_command}{ch}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1302 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
1303 keystrokes:
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1304
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1305 \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
1306 \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
1307 \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
1308 \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
1309 \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
1310 (stripspaces on).}
18488
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1311 \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
1312 \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
1313 \lineii{Control-H}{Delete character backward.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1314 \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
1315 insert newline.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1316 \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
1317 end of line.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1318 \lineii{Control-L}{Refresh screen.}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1319 \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
1320 \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
1321 \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
1322 \end{tableii}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1323
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1324 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
1325 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
1326 possible:
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1327
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1328 \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
1329 \lineii{KEY_LEFT}{\kbd{Control-B}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1330 \lineii{KEY_RIGHT}{\kbd{Control-F}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1331 \lineii{KEY_UP}{\kbd{Control-P}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1332 \lineii{KEY_DOWN}{\kbd{Control-N}}
9977cf206532 Follow the recommended practices for keystroke representation; this
Fred Drake <fdrake@acm.org>
parents: 18411
diff changeset
1333 \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
1334 \end{tableii}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1335
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1336 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
1337 character and move right (with line wrapping).
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1338 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1339
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1340 \begin{methoddesc}{gather}{}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1341 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
1342 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
1343 member.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1344 \end{methoddesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1345
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1346 \begin{memberdesc}{stripspaces}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1347 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
1348 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
1349 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
1350 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
1351 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
1352 \end{memberdesc}
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1353
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1354
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1355 \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
1356 Terminal handler for curses programs}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1357
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1358 \declaremodule{standard}{curses.wrapper}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1359 \sectionauthor{Eric Raymond}{esr@thyrsus.com}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1360 \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
1361 \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
1362 \versionadded{1.6}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1363
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1364 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
1365 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
1366 application. If the application raises an exception,
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1367 \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
1368 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
1369
13900
a0b36598b31d Fix a few markup errors and lots of small consistency issues.
Fred Drake <fdrake@acm.org>
parents: 13851
diff changeset
1370 \begin{funcdesc}{wrapper}{func, \moreargs}
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1371 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
1372 \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
1373 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
1374 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
1375 \function{wrapper()}.
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1376 \end{funcdesc}
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1377
13909
b347fc5daeb7 Tweak curses.wrapper so it initializes colors if they are available.
Eric S. Raymond <esr@thyrsus.com>
parents: 13900
diff changeset
1378 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
1379 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
1380 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
1381 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
1382 the terminal keypad.
13851
b731a206302a Documented curses.wrapper and curses.textpad.
Eric S. Raymond <esr@thyrsus.com>
parents: 13732
diff changeset
1383