HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
If a given terminal does not support a rendition that an application program is trying to use, Curses may
substitute a different rendition for it.
Colours are always used in pairs (referred to as colour-pairs). A colour-pair consists of a foreground
colour (for characters) and a background colour (for the field on which the characters are displayed).
Non-spacing Characters
The requirements in this section are in effect only for implementations that claim Enhanced Curses com-
pliance.
Some character sets may contain non-spacing characters. (Non-spacing characters are those for which
wcwidth() returns a width of zero.) The application may write non-spacing characters to a window.
Every non-spacing character in a window is associated with a spacing character and modifies the spacing
character. Non-spacing characters in a window cannot be addressed separately. A non-spacing character
is implicitly addressed whenever a Curses operation affects the spacing character with which the non-
spacing character is associated.
Non-spacing characters do not support attributes. For interfaces that use wide characters and attributes,
the attributes are ignored if the wide character is a non-spacing character. Multi-column characters have
a single set of attributes for all columns. The association of non-spacing characters with spacing charac-
ters can be controlled by the application using the wide character interfaces. The wide character string
functions provide codeset-dependent association.
Two typical effects of a non-spacing character associated with a spacing character called c, are as follows:
• The non-spacing character may modify the appearance of c. (For instance, there may be non-
spacing characters that add diacritical marks to characters. However, there may also be spac-
ing characters with built-in diacritical marks.)
• The non-spacing character may bridge c to the character following c. (Examples of this usage
are the formation of ligatures and the conversion of characters into compound display forms,
words, or ideograms.)
Implementations may limit the number of non-spacing characters that can be associated with a spacing
character, provided any limit is at least 5.
Complex Characters
A complex character is a set of associated characters, which may include a spacing character and may
include any non-spacing characters associated with it. A spacing complex character is a spacing charac-
ter followed by any non-spacing characters associated with it. That is, a spacing complex character is a
complex character that includes one spacing character. An example of a code set that has complex char-
acters is ISO/IEC 10646-1:1993.
A complex character can be written to the screen; if it does not include a spacing character, any non-
spacing characters are associated with the spacing complex character that exists at the specified screen
position. When the application reads information back from the screen, it obtains spacing complex char-
acters.
The cchar_t data type represents a complex character and its rendition. When a cchar_t represents a
non-spacing complex character (that is, when there is no spacing character within the complex character),
then its rendition is not used; when it is written to the screen, it uses the rendition specified by the spac-
ing character already displayed.
An object of type cchar_t can be initialised using
setcchar() and its contents can be extracted using
getcchar(). The behaviour of functions that take a cchar_t input argument is undefined if the appli-
cation provides a cchar_t value that was not initialised in this way or obtained from a Curses function
that has a cchar_t output argument.
Window Properties
Associated with each window are the following properties that affect the placing of characters into the
window (see Rendition of Characters Placed into a Window in curses_intro).
Window Rendition
Each window has a rendition, which is separate from the rendition component of the window’s back-
ground property described below.
Section 3−−172 Hewlett-Packard Company − 6 − HP-UX 11i Version 2: September 2004