HP 9000 Series 300 Tutorials Manual page 270

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

Advertisement

• attrset(O) and wattrset
(win,O)
set the 32-bit current attributes
variable value to zero which disables all attributes.
A_NORMAL
can be
substituted for zero as an argument.
The preceding scenarios assume that the specified attributes are available
on the current terminal. In every case, the
t
erminf
0
data base is used to
determine whether the selected attribute is present. If it is not, curses
attempts to find a suitable substitute before forming the new attribute set. If
the terminal has no highlighting capabilities, all highlighting commands are
ignored.
Three other constants (defined in <curses. h», in addition to the previously
listed attributes are also available for program use if needed:
• A_NORMAL
has the octal value 000000000000, and can be used as
an attribute argument for attrset to restore normal text display.
attrset(O) is easier to type, but less descriptive. Both are equivalent.
• A_ATTRIBUTES
has the octal value 037740000000. It can be logically
ANDed with a character data word to isolate the attribute bits and
discard the character.
• A_CHARTEXT
has the octal value 000000000377. It can be logically
ANDed with a character data word to isolate the character code and
discard the attributes.
Special Keys
Most terminals have special keys, such as arrow keys, screen/line clearing
keys, insert and delete line or character keys, and keys for user functions. The
character sequences that such keys generate and send to the host computer
vary from terminal to terminal. curses provides a convenient means for
handling such keys through the use of keypad routines. Keypad capabilities are
enabled by the call:
keypad (stdscr ,TRUE)
during program initialization, or
keypad (win ,TRUE)
3-6
Program Operation

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents