HP 9000 Series 300 Tutorials Manual page 205

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Applications Program Operation
During program operation, no data is output to the display terminal until
refresh is called. Instead, program routines such as move and addch place
data in a window data structure called stdscr (standard screen) that is
maintained by curses. curses also maintains a replica of what is on the
current physical screen in curser for updating purposes.
When refresh or an equivalent function is called, curses compares the
curser window with what is presently contained in stdscr (or other specified
window or pad). The results of the comparison are combined with terminal
hardware capabilities to construct character streams that most efficiently
update the physical display to the desired contents. Available terminal
capabilities are considered while comparing stdscr and curser so that the
most efficient means of updating the screen can be determined. This sequence
is referred to as cursor optimization, and is the basis for naming the curses
package. During the update operation, curser is also changed to reflect the
contents of the updated screen.
Keyboard Input
curses capabilities include more than screen writing functions. Several
keyboard input functions are also supported, including special handling of
certain keys that normally generate a sequence of two or more characters
(usually an escape code followed by a single character, but not always). Such
keys can then be treated as ordinary single-character keys for improved
programming versatility.
The most commonly used keyboard input function is getch() which waits for
the terminal user to type a character on the terminal keyboard, then returns
the character to the calling program. getch is similar to getchar, except that
it uses curses instead of other HP-UX facilities. getch is particularly useful
in programs that use cbreakO or noechoO options because getch supports
several terminal- and system-dependent options that are not accessible through
getchar. Available getch options include:
Using Curses and Terminfo
1-7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents