1 .\" $NetBSD: doc.III,v 1.4 1998/01/09 04:12:07 perry Exp $
3 .\" Copyright (c) 1980, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)doc.III 8.1 (Berkeley) 6/4/93
35 Returns the output baud rate of the terminal.
36 This is a system dependent constant
46 Deletes the window from existence.
47 All resources are freed for future use by
51 allocated window inside of it,
52 deleting the outer window
53 the subwindow is not affected,
54 even though this does invalidate it.
56 subwindows should be deleted before their
61 Finish up window routines before exit.
62 This restores the terminal to the state it was before
69 It should always be called before exiting.
71 This is especially useful for resetting tty stats
72 when trapping rubouts via
77 Returns the erase character
80 the character used by the user to erase a single character from the input.
82 .Fd getcap str "" "char *"
85 Return a pointer to the
87 capability described by
93 .Fd getyx win\*,y\*,x \*m
97 Puts the current \*y of
105 you do not pass the address
115 Returns the character at the current \*(y
117 This does not make any changes to the window.
121 Initialize the screen routines.
122 This must be called before any of the screen routines are used.
123 It initializes the terminal-type data and such,
124 and without it none of the routines can operate.
125 If standard input is not a tty,
126 it sets the specifications to the terminal
127 whose name is pointed to by
135 If the system supports the
139 it is used to get the number of lines and columns for the terminal,
140 otherwise it is taken from the
146 Returns the line kill character
149 the character used by the user to erase an entire line from the input.
151 .Fd leaveok win\*,boolf \*m
155 Sets the boolean flag for leaving the cursor after the last change.
159 the cursor will be left after the last update on the terminal,
160 and the current \*y for
162 will be changed accordingly.
164 it will be moved to the current \*y.
167 retains its value until changed by the user.
169 .Fd longname termbuf\*,name
170 char *termbuf\*,*name;
171 .Fd fullname termbuf\*,name
172 char *termbuf\*,*name;
177 with the long name of the terminal described by the
181 It is generally of little use,
182 but is nice for telling the user in a readable format what terminal
184 This is available in the global variable
187 is usually set via the termlib routine
192 except that it gives the fullest name given in the entry,
193 which can be quite verbose.
195 .Fd mvwin win\*,y\*,x
199 Move the home position of the window
201 from its current starting coordinates
204 If that would put part or all of the window
205 off the edge of the terminal screen,
207 returns ERR and does not change anything.
210 also returns ERR if you attempt to move it off its main window.
211 If you move a main window,
212 all subwindows are moved along with it.
214 .Fd newwin lines\*,cols\*,begin\*_y\*,begin\*_x "" "WINDOW *"
215 int lines\*,cols\*,begin\*_y\*,begin\*_x;
217 Create a new window with
221 columns starting at position
222 .Vn begin\*_y\*,begin\*_x ). (
228 that dimension will be set to
229 .Vn "LINES \- begin\*_y" ) (
231 .Vn "COLS \- begin\*_x" ) (
233 Thus, to get a new window of dimensions
238 .Fn newwin . "" 0\*,0\*,0\*,0
243 Set or unset the terminal to/from nl mode,
245 start/stop the system from mapping
249 If the mapping is not done,
251 can do more optimization,
252 so it is recommended, but not required, to turn it off.
254 .Fd scrollok win\*,boolf \*m
258 Set the scroll flag for the given window.
261 is FALSE, scrolling is not allowed.
262 This is its default setting.
264 .Fd touchline win\*,y\*,startx\*,endx
266 int y\*,startx\*,endx;
268 This function performs a function similar to
271 It marks the first change for the given line
274 if it is before the current first change mark,
276 the last change mark is set to be
278 if it is currently less than
281 .Fd touchoverlap win1\*,win2
286 in the area which overlaps with
288 If they do not overlap,
294 Make it appear that the every location on the window
296 This is usually only needed for refreshes with overlapping windows.
298 .Fd subwin win\*,lines\*,cols\*,begin\*_y\*,begin\*_x "" "WINDOW *"
300 int lines\*,cols\*,begin\*_y\*,begin\*_x;
302 Create a new window with
306 columns starting at position
307 .Vn begin\*_y\*,begin\*_x ) (
310 This means that any change made to either window
312 by the subwindow will be made on both windows.
313 .Vn begin\*_y\*,begin\*_x
314 are specified relative to the overall screen,
315 not the relative (0\*,0) of
322 that dimension will be set to
323 .Vn "LINES \- begin\*_y" ) (
325 .Vn "COLS \- begin\*_x" ) (
331 This is actually a debug function for the library,
332 but it is of general usefulness.
333 It returns a string which is a representation of
335 Control characters become their upper-case equivalents preceded by a "^".
336 Other letters stay just as they are.
340 .b #include\ <unctrl.h>