HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
Ancestors
The term ancestor refers to a window’s parent, or its parent, or so on.
Derived Windows
Derived windows are subwindows whose position is defined by reference to the parent window rather
than in absolute screen coordinates. Derived windows are otherwise no different from subwindows.
Pads
A pad is a specialised case of subwindow that is not necessarily associated with a viewable part of a
screen. Functions that deal with pads are all discussed in
newpad().
Terminal
A terminal is the logical input and output device through which character-based applications interact
with the user. TERMINAL is an opaque data type associated with a terminal. A TERMINAL data
structure primarily contains information about the capabilities of the terminal, as defined by terminfo.
A TERMINAL also contains information about the terminal modes and current state for input and out-
put operations. Each screen (see above) is associated with a TERMINAL.
Characters
Character Storage Size
Historically, a position on the screen has corresponded to a single stored byte. This correspondence is no
longer true for several reasons:
Some characters may occupy several columns when displayed on the screen (see Multi-column
Characters ).
Some characters may be non-spacing characters, defined only in association with a spacing
character (see Non-spacing Characters (ENHANCED CURSES)).
The number of bytes to hold a character from the extended character sets depends on the
LC_CTYPE locale category.
The internal storage format of characters and renditions is unspecified. There is no implied correspon-
dence between the internal storage format and the external representation of characters and renditions
in objects of type chtype and cchar_t.
Multi-column Characters
Some character sets define multi-column characters that occupy more than one column position when
displayed on the screen.
Writing a character whose width is greater than the width of the destination window is an error.
Attributes
Each character can be displayed with attributes such as underlining, reverse video or colour on terminals
that support such display enhancements. Current attributes of a window are applied to all characters
that are written into the window with
waddch(), wadd_wch(), waddstr(), waddchstr(),
waddwstr(), waddwchstr() and wprintw(). Attributes can be combined.
Attributes can be specified using constants with the A_ prefix specified in
<curses.h>. The A_ con-
stants manipulate attributes in objects of type chtype. Additional attributes can be specified using con-
stants with the WA_ prefix. The WA_ constants manipulate attributes in objects of type attr_t.
Two constants that begin with A_ and WA_ and that represent the same terminal capability refer to the
same attribute in the terminfo database and in the window data structure. The effect on a window does
not differ depending on whether the application specifies A_ or WA_ constants. For example, when an
application updates window attributes using the interfaces that support the A_ values, a query of the win-
dow attribute using the function that returns WA_ values reflects this update. When it updates window
attributes using the interfaces that support the WA_ values, for which corresponding A_ values exist, a
query of the window attribute using the function that returns A_ values reflects this update.
Rendition
The rendition of a character displayed on the screen is its attributes and a colour pair.
The rendition of a character written to the screen becomes a property of the character and moves with the
character through any scrolling and insert/delete line/character operations. To the extent possible on a
particular terminal, a character’s rendition corresponds to the graphic rendition of the character put on
the screen.
HP-UX 11i Version 2: September 2004 5 Hewlett-Packard Company Section 3171