HP 9000 Series 300 Tutorials Manual page 226

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

Advertisement

Routines supported by mini-curses are marked by asterisks in the complete
list of curses routines at the beginning of the curses Routines section of this
tutorial. They are also similarly marked in the
curses(3X)
entry in the
HP-UX
Reference.
Terminal Initialization Routines
Program entry and exit states must be handled correctly to maintain system
integrity and proper terminal operation.
If
the program interacts with only one
user/terminal, initscr should be the first function call in the program. It sets
up the necessary data structures and makes sure that terminal handling and
screen clearing are properly initialized. The program should call endwin before
terminating, ensuring that the terminal is restored to its original operating
state and the cursor is placed in the lower left corner of the screen. endwin also
dismantles data structures and other program entities that were created by
curses and are no longer needed.
If
the program must interact with multiple terminals during operation,
newterm should be used for each terminal instead of the single call to ini tscr.
newterm returns a variable of type SCREEN
*
which should be saved and used
each time that terminal is referenced. Two file descriptors must be present,
one for input, and one for output. Use endwin for each terminal prior to
program termination to restore previous terminal states and dismantle data
structures that were created by curses and are no longer needed. During
program operation with multiple terminals, set_term is used to switch between
terminals.
Another initialization function is longname which returns a pointer to a static
area containing a verbose description of the current terminal upon completion
of a call to ini tscr, newterm, or setupterm.
Option Setting Routines
These routines set up options within curses. Arguments specify the window to
which the option applies, and the boolean flag which must be TRUE or FALSE
(not 1 or 0) specifies whether the option is enabled or disabled. Default for all
functions in this group is FALSE (disabled) .
• cl earok (
win, boolean_flag),
when set, clears and redraws the entire
screen on the next call to refresh or wrefresh.
1-28
Using Curses and Terminfo

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents