| 1 | .\" Copyright (c) 1992 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" %sccs.include.redist.roff% |
| 5 | .\" |
| 6 | .\" @(#)fns.doc 1.6 (Berkeley) %G% |
| 7 | .\" |
| 8 | .Ds |
| 9 | .Fn addch "char ch" \(dg |
| 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 |
| 33 | .Fn addstr "char *str" \(dg |
| 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 |
| 41 | .Fn baudrate "" \(dg |
| 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 |
| 51 | .Fn box "WINDOW win" "char vert" "char hor" |
| 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 |
| 63 | .Fn cbreak "" \(dg |
| 64 | .De |
| 65 | Set or the terminal to cbreak mode. |
| 66 | .Ds |
| 67 | .Fn clear "" \(dg |
| 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 |
| 81 | .Fn clearok "WINDOW *scr" "int boolf" \(dg |
| 82 | .De |
| 83 | Sets the clear flag for the screen |
| 84 | .Vn scr . |
| 85 | If |
| 86 | .Vn boolf |
| 87 | is non-zero, |
| 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 |
| 92 | is 0. |
| 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 |
| 109 | .Fn clrtobot "" \(dg |
| 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 |
| 116 | .Fn clrtoeol "" \(dg |
| 117 | .De |
| 118 | Wipes the window clear from the current \*y to the end of the line. |
| 119 | \*(Nm |
| 120 | .Ds |
| 121 | .Fn crmode "" \(dg |
| 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 |
| 132 | .Fn delch "" |
| 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 |
| 138 | .Fn deleteln "" |
| 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 |
| 145 | .Fn delwin "WINDOW *win" |
| 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 |
| 160 | .Fn echo "" \(dg |
| 161 | .De |
| 162 | Sets the terminal to echo characters. |
| 163 | .Ds |
| 164 | .Fn endwin "" |
| 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 |
| 181 | .Fn erase "" \(dg |
| 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 |
| 191 | .Fn erasechar "" \(dg |
| 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 |
| 198 | .Fn flushok "WINDOW *win" "int boolf" |
| 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 |
| 209 | is non-zero |
| 210 | (\c |
| 211 | .i i.e. , |
| 212 | non-zero) |
| 213 | it will do the |
| 214 | .Fn fflush , |
| 215 | otherwise it will not. |
| 216 | .Ds |
| 217 | .Fn getch "" \(dg |
| 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 |
| 239 | .Fn getstr "char *str" \(dg |
| 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 |
| 249 | .Fn wgetch ) |
| 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 |
| 255 | .Fn gettmode "" |
| 256 | .De |
| 257 | Get the tty stats. |
| 258 | This is normally called by |
| 259 | .Fn initscr . |
| 260 | .Ds |
| 261 | .Fn getyx "WINDOW *win" "int y" "int x" |
| 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 |
| 277 | .Fn idlok "WINDOW *win" "int boolf" |
| 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 |
| 285 | .Fn inch "" \(dg |
| 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 |
| 290 | .Fn initscr "" |
| 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 |
| 300 | (initially "dumb"). |
| 301 | If the boolean |
| 302 | .Vn My\*_term |
| 303 | is non-zero, |
| 304 | .Vn Def\*_term |
| 305 | is always used. |
| 306 | If the system supports the |
| 307 | .b TIOCGWINSZ |
| 308 | .i ioctl(2) |
| 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 |
| 315 | .Fn insch "char c" |
| 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 |
| 324 | .Fn insertln "" |
| 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 |
| 333 | .Fn killchar "" \(dg |
| 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 |
| 340 | .Fn leaveok "WINDOW *win" "int boolf" \(dg |
| 341 | .De |
| 342 | Sets the boolean flag for leaving the cursor after the last change. |
| 343 | If |
| 344 | .Vn boolf |
| 345 | is non-zero, |
| 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. |
| 350 | If |
| 351 | .Vn boolf |
| 352 | is 0 the cursor will be moved to the current \*y. |
| 353 | This flag |
| 354 | (initially 0) |
| 355 | retains its value until changed by the user. |
| 356 | .Ds |
| 357 | .Fn move "int y" "int x" |
| 358 | .De |
| 359 | Change the current \*y of the window to |
| 360 | .Vn y\*,x ). ( |
| 361 | \*(Es |
| 362 | .Ds |
| 363 | .Fn mvcur "int lasty" "int lastx" "int newy" "int newx" |
| 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 |
| 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 |
| 398 | .Fn mvwin "WINDOW *win" "int y" "int x" |
| 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 |
| 415 | .Fn mvwprintw "WINDOW *win" "int y" "int x" "const char *fmt" "..." |
| 416 | .De |
| 417 | Equivalent to: |
| 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 |
| 425 | Equivalent to: |
| 426 | .(l |
| 427 | wmove(win, y, x); |
| 428 | scanw(fmt, ...); |
| 429 | .)l |
| 430 | .Ds |
| 431 | .Ft "WINDOW *" |
| 432 | .Fn newwin "int lines" "int cols" "int begin_y" "int begin_x" |
| 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 |
| 455 | .Fn newwin 0 0 0 0 . |
| 456 | .Ds |
| 457 | .Fn nl "" \(dg |
| 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 |
| 470 | .Fn nocbreak "" \(dg |
| 471 | .De |
| 472 | Unset the terminal from cbreak mode. |
| 473 | .Ds |
| 474 | .Fn nocrmode "" \(dg |
| 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 |
| 483 | .Fn noecho "" \(dg |
| 484 | .De |
| 485 | Turn echoing of characters off. |
| 486 | .Ds |
| 487 | .Fn nonl "" \(dg |
| 488 | .De |
| 489 | Unset the terminal to from nl mode. See |
| 490 | .Fn nl . |
| 491 | .Ds |
| 492 | .Fn noraw "" \(dg |
| 493 | .De |
| 494 | Unset the terminal from raw mode. See |
| 495 | .Fn raw . |
| 496 | .Ds |
| 497 | .Fn overlay "WINDOW *win1" "WINDOW *win2" |
| 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 |
| 514 | untouched. Note that all non-blank characters are overwritten |
| 515 | destructively in the overlay. |
| 516 | .Ds |
| 517 | .Fn overwrite "WINDOW *win1" "WINDOW *win2" |
| 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 |
| 536 | .Fn printw "char *fmt" "..." |
| 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 |
| 549 | .Fn raw "" \(dg |
| 550 | .De |
| 551 | Set the terminal to raw mode. |
| 552 | On version 7 |
| 553 | .Un \** |
| 554 | .(f |
| 555 | \** |
| 556 | .Un |
| 557 | is a trademark of Unix System Laboratories. |
| 558 | .)f |
| 559 | this also turns off newline mapping |
| 560 | (see |
| 561 | .Fn nl ). |
| 562 | .Ds |
| 563 | .Fn refresh "" \(dg |
| 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 |
| 582 | .Fn resetty "" \(dg |
| 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 |
| 591 | .Fn endwin . |
| 592 | This function should not be used by the user. |
| 593 | .Ds |
| 594 | .Fn savetty "" \(dg |
| 595 | .De |
| 596 | .Fn savetty |
| 597 | saves the current tty characteristic flags. See |
| 598 | .Fn resetty . |
| 599 | This function should not be used by the user. |
| 600 | .Ds |
| 601 | .Fn scanw "char *fmt" "..." |
| 602 | .De |
| 603 | Perform a |
| 604 | .Fn scanf |
| 605 | through the window using |
| 606 | .Vn fmt . |
| 607 | It does this using consecutive calls to |
| 608 | .Fn getch |
| 609 | (or |
| 610 | .Fn wgetch ). |
| 611 | \*(Es |
| 612 | .Ds |
| 613 | .Fn scroll "WINDOW *win" |
| 614 | .De |
| 615 | Scroll the window upward one line. |
| 616 | This is normally not used by the user. |
| 617 | .Ds |
| 618 | .Fn scrollok "WINDOW *win" "int boolf" \(dg |
| 619 | .De |
| 620 | Set the scroll flag for the given window. |
| 621 | If |
| 622 | .Vn boolf |
| 623 | is 0, scrolling is not allowed. |
| 624 | This is its default setting. |
| 625 | .Ds |
| 626 | .Fn standend "" \(dg |
| 627 | .De |
| 628 | End standout mode initiated by |
| 629 | .Fn standout . |
| 630 | .Ds |
| 631 | .Fn standout "" \(dg |
| 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 |
| 637 | .Ft "WINDOW *" |
| 638 | .Fn subwin "WINDOW *win" "int lines" "int cols" "int begin_y" "int begin_x" |
| 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 |
| 666 | .Fn touchline "WINDOW *win" "int y" "int startx" "int endx" |
| 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 |
| 681 | .Fn touchoverlap "WINDOW *win1" "WINDOW *win2" |
| 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 |
| 690 | .Fn touchwin "WINDOW *win" |
| 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 |
| 696 | .Fn tstp |
| 697 | .De |
| 698 | This function |
| 699 | will save the current tty state |
| 700 | and then put the process to sleep. |
| 701 | When the process gets restarted, |
| 702 | it restores the saved tty state |
| 703 | and then calls |
| 704 | .Fn wrefresh "curscr" |
| 705 | to redraw the screen. |
| 706 | .Fn Initscr |
| 707 | sets the signal |
| 708 | SIGTSTP |
| 709 | to trap to this routine. |
| 710 | .Ds |
| 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 |
| 722 | .Fn vwprintw "WINDOW *win" "const char *fmt" "va_list ap" |
| 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 |
| 729 | .Fn vwscanw "WINDOW *win" "const char *fmt" "va_list ap" |
| 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. |
| 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. |
| 744 | .sp 2 |
| 745 | .pp |
| 746 | \fIThe following functions differ from the standard functions only in their |
| 747 | specification of a window, rather than the use of the default |
| 748 | .Vn stdscr.\fP |
| 749 | .Ds |
| 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" |
| 760 | .Fn winch "WINDOW *win" \(dg |
| 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" |
| 769 | .Dg |