HP 9000 Series 300 Tutorials Manual page 233

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

Advertisement

Terminal Data Input Routines
getch and its related window and move routines are the basic building block
for all program input from the terminal. getch handles individual characters,
one at a time, returning a character as a 16-bit integer value each time it
returns from a call.
If echo is enabled,
getch also places each character at the current cursor
position in the window associated with the function and updates the terminal
screen with a refresh on the window as the character is received and
processed (the cursor is advanced as each character is written to the window).
If
noecho is active instead, input character(s) are not placed in the window.
getstr and its related functions generate a series of calls to getch to read an
entire line, one character at a time, up to the terminating newline character.
The line is stored in the specified string before get str returns to the calling
program.
scanw and its related functions perform formatted processing on the input line
after it has been placed in a special buffer used by getstr. (If echo is enabled,
the string is also placed in the associated window, but only the characters
stored in the buffer are used by scanw. When scanning is complete, the
processed results string results are placed in the specified args variables.
Video Highlighting Attribute Routines
Each character written into a window is stored as a 32-bit word. The lower
eight bits contain the character code; the middle eight bits contain the NLS
attributes; the remaining nine bits control video highlighting. As each word is
stored, the 8-bit character code is combined (through a bit-level logical OR
operation) with the current set of nine video highlighting attributes to obtain
the 32-bit result. Video attribute routines are used to construct the current
attribute set that is used during character storage.
Highlighting attributes can be specified as a complete set by using attrset
or wattrset. Using 0 (or A_NORMAL) as an argument for attrset disables all
highlighting.
Highlighting can be altered from the present state by turning individual
attributes on or off without altering the state of other attributes in the set.
This is done with attron, attroff, wattron, and wattroff.
Using Curses and Terminfo
1-35

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents