HP-UX Reference (11i v2 03/08) - 3 Library Functions A-M (vol 6)
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
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 manual pages 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 manual page 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 win-
dow.
• 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 manual page 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.
• A function with the basic name is often provided for historical compatibility and operates only
on single-byte characters. A function with the same name plus the w infix operates on wide
(multi-byte) characters. A function with the same name plus the _w infix operates on complex
characters and their renditions.
• When a function with the basic name operates on a single character, there is sometimes a
function with the same name plus the n infix that operates on multiple characters. An n argu-
ment specifies the number of characters to process. The respective manual page specifies the
outcome if the value of n is inappropriate.
Section 3−−164 Hewlett-Packard Company − 12 − HP-UX 11i Version 2: August 2003