curses_intro.3x (2010 09)

c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
System Interface Definitions, Issue 4, Version 2 specification . The state of the ISIG
and IXON flags are not changed upon entering this mode.
Raw Mode Raw mode gives the application maximum control over terminal input. The applica-
tion sees each character as it is typed. This achieves the same effect as noncanoni-
cal mode, Case D input processing as specified in the X/Open System Interface
Definitions, Issue 4, Version 2 specification . The ISIG and IXON flags are cleared
upon entering this mode.
The terminal interface settings are recorded when the process calls
initscr() or newterm() to ini-
tialise Curses and restores these settings when
endwin()
is called. The initial input mode for Curses
operations is unspecified unless the implementation supports Enhanced Curses compliance, in which the
initial input mode is cbreak mode.
The behaviour of the BREAK key depends on other bits in the display driver that are not set by Curses.
Delay Mode
Two mutually exclusive delay modes specify how quickly certain Curses functions return to the applica-
tion when there is no terminal input waiting when the function is called:
No Delay The function fails.
Delay The application waits until the implementation passes text through to the applica-
tion. If cbreak or Raw Mode is set, this is after one character. Otherwise, this is
after the first newline character, end-of-line character, or end-of-file character.
The effect of No Delay Mode on function key processing is unspecified.
Echo Processing
Echo mode determines whether Curses echoes typed characters to the screen. The effect of Echo mode is
analogous to the effect of the ECHO flag in the local mode field of the
termios structure associated with
the terminal device connected to the window. However, Curses always clears the ECHO flag while it is
operating, to inhibit the operating system from performing echoing. The method of echoing characters is
not identical to the operating system’s method of echoing characters, because Curses performs additional
processing of terminal input.
If in Echo mode, Curses performs its own echoing: Any visible input character is stored in the current or
specified window by the input function that the application called, at that window’s cursor position, as
though
addch() were called, with all consequent effects such as cursor movement and wrapping.
If not in Echo mode, any echoing of input must be performed by the application. Applications often per-
form their own echoing in a controlled area of the screen, or do not echo at all, so they disable Echo mode.
The Set of Curses Functions
The Curses functions allow: overall screen, window and pad manipulation; output to windows and pads;
reading terminal input; control over terminal and Curses input and output options; environment query
functions; colour manipulation; use of soft label keys; access to the terminfo database of terminal capa-
bilities; and access to low-level functions.
Function Name Conventions
The reference manpages present families of multiple Curses functions. Most function families have
different functions that give the programmer the following options:
A function with the basic name operates on the window stdscr. A function with the same name
plus the w prefix operates on a window specified by the win argument.
When the reference manpage for a function family refers to the current or specified window,it
means
stdscr for the basic functions and the window specified by win for any w function.
Functions whose names have the
p prefix require an argument that is a pad instead of a window.
A function with the basic name operates based on the current cursor position (of the current or
specified window, as described above). A function with the same name plus the
mv prefix moves the
cursor to a position specified by the y and x arguments before performing the specified operation.
When the reference manpage for a function family refers to the current or specified position,it
means the cursor position for the basic functions and the position (y, x) for any
mv function.
The
mvw prefix exists and combines the mv semantics discussed here with the w semantics discussed
above. The window argument is always specified before the coordinates.
HP-UX 11i Version 3: September 2010 11 Hewlett-Packard Company 11