Commit | Line | Data |
---|---|---|
00f9495f EA |
1 | .\" Copyright (c) 1992 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" %sccs.include.redist.roff% | |
5 | .\" | |
5a00022e | 6 | .\" @(#)fns.doc 1.6 (Berkeley) %G% |
00f9495f EA |
7 | .\" |
8 | .Ds | |
531d985f | 9 | .Fn addch "char ch" \(dg |
00f9495f EA |
10 | .De |
11 | Add the character | |
12 | .Vn ch | |
13 | on the window | |
14 | at the current \*y. | |
15 | If the character is a newline | |
16 | (\'\en\') | |
17 | the line will be cleared to the end, | |
18 | and the current \*y will be changed to the | |
19 | beginning off the next line | |
20 | if newline mapping is on, | |
21 | or to the next line at the same x co-ordinate | |
22 | if it is off. | |
23 | A return | |
24 | (\'\er\') | |
25 | will move to the beginning of the line on the window. | |
26 | Tabs | |
27 | (\'\et\') | |
28 | will be expanded into spaces | |
29 | in the normal tabstop positions of | |
30 | every eight characters. | |
31 | \*(Es | |
32 | .Ds | |
531d985f | 33 | .Fn addstr "char *str" \(dg |
00f9495f EA |
34 | .De |
35 | Add the string pointed to by | |
36 | .Vn str | |
37 | on the window at the current \*y. | |
38 | \*(Es | |
39 | In this case, it will put on as much as it can. | |
40 | .Ds | |
531d985f | 41 | .Fn baudrate "" \(dg |
00f9495f EA |
42 | .De |
43 | Returns the output baud rate of the terminal. | |
44 | This is a system dependent constant | |
45 | (defined in | |
46 | .b <sys/tty.h> | |
47 | on BSD systems, | |
48 | which is included by | |
49 | .b <curses.h> ). | |
50 | .Ds | |
531d985f | 51 | .Fn box "WINDOW win" "char vert" "char hor" |
00f9495f EA |
52 | .De |
53 | .Pp | |
54 | Draws a box around the window using | |
55 | .Vn vert | |
56 | as the character for drawing the vertical sides, and | |
57 | .Vn hor | |
58 | for drawing the horizontal lines. | |
59 | If scrolling is not allowed, | |
60 | and the window encompasses the lower right-hand corner of the terminal, | |
61 | the corners are left blank to avoid a scroll. | |
62 | .Ds | |
531d985f | 63 | .Fn cbreak "" \(dg |
00f9495f EA |
64 | .De |
65 | Set or the terminal to cbreak mode. | |
66 | .Ds | |
531d985f | 67 | .Fn clear "" \(dg |
00f9495f EA |
68 | .De |
69 | Resets the entire window to blanks. | |
70 | If | |
71 | .Vn win | |
72 | is a screen, | |
73 | this sets the clear flag, | |
74 | which will cause a clear-screen sequence to be sent | |
75 | on the next | |
76 | .Fn refresh | |
77 | call. | |
78 | This also moves the current \*y | |
79 | to (0\*,0). | |
80 | .Ds | |
531d985f | 81 | .Fn clearok "WINDOW *scr" "int boolf" \(dg |
00f9495f EA |
82 | .De |
83 | Sets the clear flag for the screen | |
84 | .Vn scr . | |
85 | If | |
86 | .Vn boolf | |
2b70b628 | 87 | is non-zero, |
00f9495f EA |
88 | this will force a clear-screen to be printed on the next |
89 | .Fn refresh , | |
90 | or stop it from doing so if | |
91 | .Vn boolf | |
2b70b628 | 92 | is 0. |
00f9495f EA |
93 | This only works on screens, |
94 | and, | |
95 | unlike | |
96 | .Fn clear , | |
97 | does not alter the contents of the screen. | |
98 | If | |
99 | .Vn scr | |
100 | is | |
101 | .Vn curscr , | |
102 | the next | |
103 | .Fn refresh | |
104 | call will cause a clear-screen, | |
105 | even if the window passed to | |
106 | .Fn refresh | |
107 | is not a screen. | |
108 | .Ds | |
531d985f | 109 | .Fn clrtobot "" \(dg |
00f9495f EA |
110 | .De |
111 | Wipes the window clear from the current \*y to the bottom. | |
112 | This does not force a clear-screen sequence on the next refresh | |
113 | under any circumstances. | |
114 | \*(Nm | |
115 | .Ds | |
531d985f | 116 | .Fn clrtoeol "" \(dg |
00f9495f EA |
117 | .De |
118 | Wipes the window clear from the current \*y to the end of the line. | |
119 | \*(Nm | |
120 | .Ds | |
531d985f | 121 | .Fn crmode "" \(dg |
00f9495f EA |
122 | .De |
123 | Identical to | |
124 | .Fn cbreak . | |
125 | The misnamed macro | |
126 | .Fn crmode | |
127 | and | |
128 | .Fn nocrmode | |
129 | is retained for backwards compatibility | |
130 | with ealier versions of the library. | |
131 | .Ds | |
531d985f | 132 | .Fn delch "" |
00f9495f EA |
133 | .De |
134 | Delete the character at the current \*y. | |
135 | Each character after it on the line shifts to the left, | |
136 | and the last character becomes blank. | |
137 | .Ds | |
531d985f | 138 | .Fn deleteln "" |
00f9495f EA |
139 | .De |
140 | Delete the current line. | |
141 | Every line below the current one will move up, | |
142 | and the bottom line will become blank. | |
143 | The current \*y will remain unchanged. | |
144 | .Ds | |
531d985f | 145 | .Fn delwin "WINDOW *win" |
00f9495f EA |
146 | .De |
147 | Deletes the window from existence. | |
148 | All resources are freed for future use by | |
149 | .b calloc (3). | |
150 | If a window has a | |
151 | .Fn subwin | |
152 | allocated window inside of it, | |
153 | deleting the outer window | |
154 | the subwindow is not affected, | |
155 | even though this does invalidate it. | |
156 | Therefore, | |
157 | subwindows should be deleted before their | |
158 | outer windows are. | |
159 | .Ds | |
531d985f | 160 | .Fn echo "" \(dg |
00f9495f EA |
161 | .De |
162 | Sets the terminal to echo characters. | |
163 | .Ds | |
531d985f | 164 | .Fn endwin "" |
00f9495f EA |
165 | .De |
166 | Finish up window routines before exit. | |
167 | This restores the terminal to the state it was before | |
168 | .Fn initscr | |
169 | (or | |
170 | .Fn gettmode | |
171 | and | |
172 | .Fn setterm ) | |
173 | was called. | |
174 | It should always be called before exiting and before the final calls to | |
175 | .Fn delwin . | |
176 | It does not exit. | |
177 | This is especially useful for resetting tty stats | |
178 | when trapping rubouts via | |
179 | .b signal (2). | |
180 | .Ds | |
531d985f | 181 | .Fn erase "" \(dg |
00f9495f EA |
182 | .De |
183 | Erases the window to blanks without setting the clear flag. | |
184 | This is analagous to | |
185 | .Fn clear , | |
186 | except that it never causes a clear-screen sequence to be generated | |
187 | on a | |
188 | .Fn refresh . | |
189 | \*(Nm | |
190 | .Ds | |
531d985f | 191 | .Fn erasechar "" \(dg |
00f9495f EA |
192 | .De |
193 | Returns the erase character | |
194 | for the terminal, | |
195 | .i i.e. , | |
196 | the character used by the user to erase a single character from the input. | |
197 | .Ds | |
531d985f | 198 | .Fn flushok "WINDOW *win" "int boolf" |
00f9495f EA |
199 | .De |
200 | Normally, | |
201 | .Fn refresh | |
202 | .Fn fflush 's | |
203 | .Vn stdout | |
204 | when it is finished. | |
205 | .Fn flushok | |
206 | allows you to control this. | |
207 | if | |
208 | .Vn boolf | |
2b70b628 | 209 | is non-zero |
00f9495f EA |
210 | (\c |
211 | .i i.e. , | |
212 | non-zero) | |
213 | it will do the | |
2b70b628 EA |
214 | .Fn fflush , |
215 | otherwise it will not. | |
00f9495f | 216 | .Ds |
531d985f | 217 | .Fn getch "" \(dg |
00f9495f EA |
218 | .De |
219 | Gets a character from the terminal and (if necessary) | |
220 | echos it on the window. | |
221 | \*(Es | |
222 | Otherwise, the character gotten is returned. | |
223 | If | |
224 | .i noecho | |
225 | has been set, then the window is left unaltered. | |
226 | In order to retain control of the terminal, | |
227 | it is necessary to have one of | |
228 | .i noecho , | |
229 | .i cbreak , | |
230 | or | |
231 | .i rawmode | |
232 | set. | |
233 | If you do not set one, | |
234 | whatever routine you call to read characters will set | |
235 | .i cbreak | |
236 | for you, | |
237 | and then reset to the original mode when finished. | |
238 | .Ds | |
531d985f | 239 | .Fn getstr "char *str" \(dg |
00f9495f EA |
240 | .De |
241 | Get a string through the window | |
242 | and put it in the location pointed to by | |
243 | .Vn str , | |
244 | which is assumed to be large enough to handle it. | |
245 | It sets tty modes if necessary, | |
246 | and then calls | |
247 | .Fn getch | |
248 | (or | |
531d985f | 249 | .Fn wgetch ) |
00f9495f EA |
250 | to get the characters needed to fill in the string |
251 | until a newline or EOF is encountered. | |
252 | The newline stripped off the string. | |
253 | \*(Es | |
254 | .Ds | |
531d985f | 255 | .Fn gettmode "" |
00f9495f EA |
256 | .De |
257 | Get the tty stats. | |
258 | This is normally called by | |
259 | .Fn initscr . | |
260 | .Ds | |
531d985f | 261 | .Fn getyx "WINDOW *win" "int y" "int x" |
00f9495f EA |
262 | .De |
263 | Puts the current \*y of | |
264 | .Vn win | |
265 | in the variables | |
266 | .Vn y | |
267 | and | |
268 | .Vn x . | |
269 | Since it is a macro, | |
270 | not a function, | |
271 | you do not pass the address | |
272 | of | |
273 | .Vn y | |
274 | and | |
275 | .Vn x . | |
276 | .Ds | |
531d985f | 277 | .Fn idlok "WINDOW *win" "int boolf" |
00f9495f EA |
278 | .De |
279 | Reserved for future use. | |
280 | This will eventually signal to | |
281 | .Fn refresh | |
282 | that it is all right to use the insert and delete line sequences | |
283 | when updating the window. | |
284 | .Ds | |
531d985f | 285 | .Fn inch "" \(dg |
00f9495f EA |
286 | .De |
287 | Returns the character at the current position on the given window. | |
288 | This does not make any changes to the window. | |
289 | .Ds | |
531d985f | 290 | .Fn initscr "" |
00f9495f EA |
291 | .De |
292 | Initialize the screen routines. | |
293 | This must be called before any of the screen routines are used. | |
294 | It initializes the terminal-type data and such, | |
295 | and without it none of the routines can operate. | |
296 | If standard input is not a tty, | |
297 | it sets the specifications to the terminal | |
298 | whose name is pointed to by | |
299 | .Vn Def\*_term | |
2b70b628 | 300 | (initially "dumb"). |
00f9495f EA |
301 | If the boolean |
302 | .Vn My\*_term | |
2b70b628 | 303 | is non-zero, |
00f9495f EA |
304 | .Vn Def\*_term |
305 | is always used. | |
306 | If the system supports the | |
307 | .b TIOCGWINSZ | |
2b70b628 | 308 | .i ioctl(2) |
00f9495f EA |
309 | call, |
310 | it is used to get the number of lines and columns for the terminal, | |
311 | otherwise it is taken from the | |
312 | .b termcap | |
313 | description. | |
314 | .Ds | |
531d985f | 315 | .Fn insch "char c" |
00f9495f EA |
316 | .De |
317 | Insert | |
318 | .Vn c | |
319 | at the current \*y | |
320 | Each character after it shifts to the right, | |
321 | and the last character disappears. | |
322 | \*(Es | |
323 | .Ds | |
531d985f | 324 | .Fn insertln "" |
00f9495f EA |
325 | .De |
326 | Insert a line above the current one. | |
327 | Every line below the current line | |
328 | will be shifted down, | |
329 | and the bottom line will disappear. | |
330 | The current line will become blank, | |
331 | and the current \*y will remain unchanged. | |
332 | .Ds | |
531d985f | 333 | .Fn killchar "" \(dg |
00f9495f EA |
334 | .De |
335 | Returns the line kill character | |
336 | for the terminal, | |
337 | .i i.e. , | |
338 | the character used by the user to erase an entire line from the input. | |
339 | .Ds | |
531d985f | 340 | .Fn leaveok "WINDOW *win" "int boolf" \(dg |
00f9495f EA |
341 | .De |
342 | Sets the boolean flag for leaving the cursor after the last change. | |
343 | If | |
344 | .Vn boolf | |
2b70b628 | 345 | is non-zero, |
00f9495f EA |
346 | the cursor will be left after the last update on the terminal, |
347 | and the current \*y for | |
348 | .Vn win | |
349 | will be changed accordingly. | |
2b70b628 EA |
350 | If |
351 | .Vn boolf | |
352 | is 0 the cursor will be moved to the current \*y. | |
00f9495f | 353 | This flag |
2b70b628 | 354 | (initially 0) |
00f9495f EA |
355 | retains its value until changed by the user. |
356 | .Ds | |
531d985f | 357 | .Fn move "int y" "int x" |
00f9495f EA |
358 | .De |
359 | Change the current \*y of the window to | |
360 | .Vn y\*,x ). ( | |
361 | \*(Es | |
362 | .Ds | |
531d985f | 363 | .Fn mvcur "int lasty" "int lastx" "int newy" "int newx" |
00f9495f EA |
364 | .De |
365 | Moves the terminal's cursor from | |
366 | .Vn lasty\*,lastx ) ( | |
367 | to | |
368 | .Vn newy\*,newx ) ( | |
369 | in an approximation of optimal fashion. | |
370 | This routine uses the functions borrowed from | |
371 | .i ex | |
372 | version 2.6. | |
373 | It is possible to use this optimization | |
374 | without the benefit of the screen routines. | |
375 | With the screen routines, this should not be called by the user. | |
376 | .Fn move | |
377 | and | |
378 | .Fn refresh | |
379 | should be used to move the cursor position, | |
380 | so that the routines know what's going on. | |
381 | .Ds | |
cfde7e65 EA |
382 | .Fn mvprintw "int y" "int x" "const char *fmt" "..." |
383 | .De | |
384 | Equivalent to: | |
385 | .(l | |
386 | move(y, x); | |
387 | printw(fmt, ...); | |
388 | .)l | |
389 | .Ds | |
390 | .Fn mvscanw "int y" "int x" "const char *fmt" "..." | |
391 | .De | |
392 | Equivalent to: | |
393 | .(l | |
394 | move(y, x); | |
395 | scanw(fmt, ...); | |
396 | .)l | |
397 | .Ds | |
531d985f | 398 | .Fn mvwin "WINDOW *win" "int y" "int x" |
00f9495f EA |
399 | .De |
400 | Move the home position of the window | |
401 | .Vn win | |
402 | from its current starting coordinates | |
403 | to | |
404 | .Vn y\*,x ). ( | |
405 | If that would put part or all of the window | |
406 | off the edge of the terminal screen, | |
407 | .Fn mvwin | |
408 | returns ERR and does not change anything. | |
409 | For subwindows, | |
410 | .Fn mvwin | |
411 | also returns ERR if you attempt to move it off its main window. | |
412 | If you move a main window, | |
413 | all subwindows are moved along with it. | |
414 | .Ds | |
cfde7e65 EA |
415 | .Fn mvwprintw "WINDOW *win" "int y" "int x" "const char *fmt" "..." |
416 | .De | |
5a00022e | 417 | Equivalent to: |
cfde7e65 EA |
418 | .(l |
419 | wmove(win, y, x); | |
420 | printw(fmt, ...); | |
421 | .)l | |
422 | .Ds | |
423 | .Fn mvwscanw "WINDOW *win" "int y" "int x" "const char *fmt" "..." | |
424 | .De | |
5a00022e | 425 | Equivalent to: |
cfde7e65 EA |
426 | .(l |
427 | wmove(win, y, x); | |
428 | scanw(fmt, ...); | |
429 | .)l | |
430 | .Ds | |
531d985f EA |
431 | .Ft "WINDOW *" |
432 | .Fn newwin "int lines" "int cols" "int begin_y" "int begin_x" | |
00f9495f EA |
433 | .De |
434 | Create a new window with | |
435 | .Vn lines | |
436 | lines and | |
437 | .Vn cols | |
438 | columns starting at position | |
439 | .Vn begin\*_y\*,begin\*_x ). ( | |
440 | If either | |
441 | .Vn lines | |
442 | or | |
443 | .Vn cols | |
444 | is 0 (zero), | |
445 | that dimension will be set to | |
446 | .Vn "LINES \- begin\*_y" ) ( | |
447 | or | |
448 | .Vn "COLS \- begin\*_x" ) ( | |
449 | respectively. | |
450 | Thus, to get a new window of dimensions | |
451 | .Vn LINES | |
452 | \(mu | |
453 | .Vn COLS , | |
454 | use | |
531d985f | 455 | .Fn newwin 0 0 0 0 . |
00f9495f | 456 | .Ds |
531d985f | 457 | .Fn nl "" \(dg |
00f9495f EA |
458 | .De |
459 | Set the terminal to nl mode, | |
460 | .i i.e. , | |
461 | start/stop the system from mapping | |
462 | .b <RETURN> | |
463 | to | |
464 | .b <LINE-FEED> . | |
465 | If the mapping is not done, | |
466 | .Fn refresh | |
467 | can do more optimization, | |
468 | so it is recommended, but not required, to turn it off. | |
469 | .Ds | |
531d985f | 470 | .Fn nocbreak "" \(dg |
00f9495f EA |
471 | .De |
472 | Unset the terminal from cbreak mode. | |
473 | .Ds | |
531d985f | 474 | .Fn nocrmode "" \(dg |
00f9495f EA |
475 | .De |
476 | Identical to | |
477 | .Fn nocbreak . | |
478 | The misnamed macro | |
479 | .Fn nocrmode | |
480 | is retained for backwards compatibility | |
481 | with ealier versions of the library. | |
482 | .Ds | |
531d985f | 483 | .Fn noecho "" \(dg |
00f9495f EA |
484 | .De |
485 | Turn echoing of characters off. | |
486 | .Ds | |
531d985f | 487 | .Fn nonl "" \(dg |
00f9495f EA |
488 | .De |
489 | Unset the terminal to from nl mode. See | |
490 | .Fn nl . | |
491 | .Ds | |
531d985f | 492 | .Fn noraw "" \(dg |
00f9495f EA |
493 | .De |
494 | Unset the terminal from raw mode. See | |
495 | .Fn raw . | |
496 | .Ds | |
531d985f | 497 | .Fn overlay "WINDOW *win1" "WINDOW *win2" |
00f9495f EA |
498 | .De |
499 | Overlay | |
500 | .Vn win1 | |
501 | on | |
502 | .Vn win2 . | |
503 | The contents of | |
504 | .Vn win1 , | |
505 | insofar as they fit, | |
506 | are placed on | |
507 | .Vn win2 | |
508 | at their starting \*y. | |
509 | This is done non-destructively, | |
510 | i.e., blanks on | |
511 | .Vn win1 | |
512 | leave the contents of the space on | |
513 | .Vn win2 | |
2b70b628 EA |
514 | untouched. Note that all non-blank characters are overwritten |
515 | destructively in the overlay. | |
00f9495f | 516 | .Ds |
531d985f | 517 | .Fn overwrite "WINDOW *win1" "WINDOW *win2" |
00f9495f EA |
518 | .De |
519 | Overwrite | |
520 | .Vn win1 | |
521 | on | |
522 | .Vn win2 . | |
523 | The contents of | |
524 | .Vn win1 , | |
525 | insofar as they fit, | |
526 | are placed on | |
527 | .Vn win2 | |
528 | at their starting \*y. | |
529 | This is done destructively, | |
530 | .i i.e. , | |
531 | blanks on | |
532 | .Vn win1 | |
533 | become blank on | |
534 | .Vn win2 . | |
535 | .Ds | |
531d985f | 536 | .Fn printw "char *fmt" "..." |
00f9495f EA |
537 | .De |
538 | Performs a | |
539 | .Fn printf | |
540 | on the window starting at the current \*y. | |
541 | It uses | |
542 | .Fn addstr | |
543 | to add the string on the window. | |
544 | It is often advisable to use the field width options of | |
545 | .Fn printf | |
546 | to avoid leaving things on the window from earlier calls. | |
547 | \*(Es | |
548 | .Ds | |
531d985f | 549 | .Fn raw "" \(dg |
00f9495f EA |
550 | .De |
551 | Set the terminal to raw mode. | |
552 | On version 7 | |
553 | .Un \** | |
554 | .(f | |
555 | \** | |
556 | .Un | |
cfde7e65 | 557 | is a trademark of Unix System Laboratories. |
00f9495f | 558 | .)f |
cfde7e65 | 559 | this also turns off newline mapping |
00f9495f EA |
560 | (see |
561 | .Fn nl ). | |
562 | .Ds | |
531d985f | 563 | .Fn refresh "" \(dg |
00f9495f EA |
564 | .De |
565 | Synchronize the terminal screen with the desired window. | |
566 | If the window is not a screen, | |
567 | only that part covered by it is updated. | |
568 | \*(Es | |
569 | In this case, it will update whatever it can | |
570 | without causing the scroll. | |
571 | .sp | |
572 | As a special case, | |
573 | if | |
574 | .Fn wrefresh | |
575 | is called with the window | |
576 | .Vn curscr | |
577 | the screen is cleared | |
578 | and repainted as it is currently. | |
579 | This is very useful for allowing the redrawing of the screen | |
580 | when the user has garbage dumped on his terminal. | |
581 | .Ds | |
531d985f | 582 | .Fn resetty "" \(dg |
00f9495f EA |
583 | .De |
584 | .Fn resetty | |
585 | restores them to what | |
586 | .Fn savetty | |
587 | stored. | |
588 | These functions are performed automatically by | |
589 | .Fn initscr | |
590 | and | |
cfde7e65 EA |
591 | .Fn endwin . |
592 | This function should not be used by the user. | |
00f9495f | 593 | .Ds |
531d985f | 594 | .Fn savetty "" \(dg |
00f9495f EA |
595 | .De |
596 | .Fn savetty | |
597 | saves the current tty characteristic flags. See | |
598 | .Fn resetty . | |
cfde7e65 | 599 | This function should not be used by the user. |
00f9495f | 600 | .Ds |
531d985f | 601 | .Fn scanw "char *fmt" "..." |
00f9495f EA |
602 | .De |
603 | Perform a | |
604 | .Fn scanf | |
605 | through the window using | |
606 | .Vn fmt . | |
531d985f EA |
607 | It does this using consecutive calls to |
608 | .Fn getch | |
00f9495f | 609 | (or |
531d985f | 610 | .Fn wgetch ). |
00f9495f EA |
611 | \*(Es |
612 | .Ds | |
531d985f | 613 | .Fn scroll "WINDOW *win" |
00f9495f EA |
614 | .De |
615 | Scroll the window upward one line. | |
616 | This is normally not used by the user. | |
617 | .Ds | |
531d985f | 618 | .Fn scrollok "WINDOW *win" "int boolf" \(dg |
00f9495f EA |
619 | .De |
620 | Set the scroll flag for the given window. | |
621 | If | |
622 | .Vn boolf | |
2b70b628 | 623 | is 0, scrolling is not allowed. |
00f9495f EA |
624 | This is its default setting. |
625 | .Ds | |
531d985f | 626 | .Fn standend "" \(dg |
00f9495f EA |
627 | .De |
628 | End standout mode initiated by | |
629 | .Fn standout . | |
630 | .Ds | |
531d985f | 631 | .Fn standout "" \(dg |
00f9495f EA |
632 | .De |
633 | Causes any characters added to the window | |
634 | to be put in standout mode on the terminal | |
635 | (if it has that capability). | |
636 | .Ds | |
531d985f EA |
637 | .Ft "WINDOW *" |
638 | .Fn subwin "WINDOW *win" "int lines" "int cols" "int begin_y" "int begin_x" | |
00f9495f EA |
639 | .De |
640 | Create a new window with | |
641 | .Vn lines | |
642 | lines and | |
643 | .Vn cols | |
644 | columns starting at position | |
645 | .Vn begin\*_y\*,begin\*_x ) ( | |
646 | inside the window | |
647 | .i win . | |
648 | This means that any change made to either window | |
649 | in the area covered | |
650 | by the subwindow will be made on both windows. | |
651 | .Vn begin\*_y\*,begin\*_x | |
652 | are specified relative to the overall screen, | |
653 | not the relative (0\*,0) of | |
654 | .Vn win . | |
655 | If either | |
656 | .Vn lines | |
657 | or | |
658 | .Vn cols | |
659 | is 0 (zero), | |
660 | that dimension will be set to | |
661 | .Vn "LINES \- begin\*_y" ) ( | |
662 | or | |
663 | .Vn "COLS \- begin\*_x" ) ( | |
664 | respectively. | |
665 | .Ds | |
531d985f | 666 | .Fn touchline "WINDOW *win" "int y" "int startx" "int endx" |
00f9495f EA |
667 | .De |
668 | This function performs a function similar to | |
669 | .Fn touchwin | |
670 | on a single line. | |
671 | It marks the first change for the given line | |
672 | to be | |
673 | .Vn startx , | |
674 | if it is before the current first change mark, | |
675 | and | |
676 | the last change mark is set to be | |
677 | .Vn endx | |
678 | if it is currently less than | |
679 | .Vn endx . | |
680 | .Ds | |
531d985f | 681 | .Fn touchoverlap "WINDOW *win1" "WINDOW *win2" |
00f9495f EA |
682 | .De |
683 | Touch the window | |
684 | .Vn win2 | |
685 | in the area which overlaps with | |
686 | .Vn win1 . | |
687 | If they do not overlap, | |
688 | no changes are made. | |
689 | .Ds | |
531d985f | 690 | .Fn touchwin "WINDOW *win" |
00f9495f EA |
691 | .De |
692 | Make it appear that the every location on the window | |
693 | has been changed. | |
694 | This is usually only needed for refreshes with overlapping windows. | |
695 | .Ds | |
531d985f | 696 | .Fn tstp |
00f9495f | 697 | .De |
cfde7e65 | 698 | This function |
00f9495f EA |
699 | will save the current tty state |
700 | and then put the process to sleep. | |
701 | When the process gets restarted, | |
cfde7e65 | 702 | it restores the saved tty state |
00f9495f | 703 | and then calls |
531d985f | 704 | .Fn wrefresh "curscr" |
00f9495f | 705 | to redraw the screen. |
2b70b628 | 706 | .Fn Initscr |
00f9495f EA |
707 | sets the signal |
708 | SIGTSTP | |
709 | to trap to this routine. | |
710 | .Ds | |
cfde7e65 EA |
711 | .Fn unctrl "char *ch" \(dg |
712 | .De | |
713 | Returns a string which is an ASCII representation of | |
714 | .Vn ch . | |
715 | Characters are 8 bits long. | |
716 | .Ds | |
717 | .Fn unctrllen "char *ch" \(dg | |
718 | .De | |
719 | Returns the length of the ASCII representation of | |
720 | .Vn ch . | |
721 | .Ds | |
531d985f | 722 | .Fn vwprintw "WINDOW *win" "const char *fmt" "va_list ap" |
00f9495f EA |
723 | .De |
724 | Identical to | |
725 | .Fn printw | |
726 | except that it takes both a window specification and a pointer to a variable | |
727 | length argument list. | |
728 | .Ds | |
531d985f | 729 | .Fn vwscanw "WINDOW *win" "const char *fmt" "va_list ap" |
00f9495f EA |
730 | .De |
731 | Identical to | |
732 | .Fn scanw | |
733 | except that it takes both a window specification and a pointer to a variable | |
734 | length argument list. | |
cfde7e65 EA |
735 | .Ds |
736 | .Fn waddbytes "WINDOW *win" "char *str" "int len" | |
737 | .De | |
738 | This function is the low level character output function. | |
739 | .Vn Len | |
740 | characters of the string | |
741 | .Vn str | |
742 | are output to the current \*y position of the window specified by | |
743 | .Vn win. | |
00f9495f EA |
744 | .sp 2 |
745 | .pp | |
cfde7e65 | 746 | \fIThe following functions differ from the standard functions only in their |
00f9495f | 747 | specification of a window, rather than the use of the default |
cfde7e65 | 748 | .Vn stdscr.\fP |
00f9495f | 749 | .Ds |
89bacdf2 EA |
750 | .Fn waddch "WINDOW *win" "char ch" |
751 | .Fn waddstr "WINDOW *win" "char *str" | |
752 | .Fn wclear "WINDOW *win" | |
753 | .Fn wclrtobot "WINDOW *win" | |
754 | .Fn wclrtoeol "WINDOW *win" | |
755 | .Fn wdelch "WINDOW *win" | |
756 | .Fn wdeleteln "WINDOW *win" | |
757 | .Fn werase "WINDOW *win" | |
758 | .Fn wgetch "WINDOW *win" | |
759 | .Fn wgetstr "WINDOW *win" "char *str" | |
531d985f | 760 | .Fn winch "WINDOW *win" \(dg |
89bacdf2 EA |
761 | .Fn winsch "WINDOW *win" "char c" |
762 | .Fn winsertln "WINDOW *win" | |
763 | .Fn wmove "WINDOW *win" "int y" int x" | |
764 | .Fn wprintw "WINDOW *win" "char *fmt" "..." | |
765 | .Fn wrefresh "WINDOW *win" | |
766 | .Fn wscanw "WINDOW *win" "char *fmt" "..." | |
767 | .Fn wstandend "WINDOW *win" | |
768 | .Fn wstandout "WINDOW *win" | |
00f9495f | 769 | .Dg |