Manual Page Result
0
Command: wecho_wchar | Section: 3 | Source: Digital UNIX | File: wecho_wchar.3.gz
curs_add_wch(3) Library Functions Manual curs_add_wch(3)
NAME
curs_add_wch, add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, we-
cho_wchar - Add a complex character and rendition to a Curses window
and advance the cursor
LIBRARY
Curses Library (libcurses.a, libcurses.so)
SYNOPSIS
#include <curses.h>
int add_wch(const cchar_t *wch); int wadd_wch(WINDOW *win, const
cchar_t *wch); int mvadd_wch(int y, int x, const cchar_t *wch); int
mvwadd_wch(WINDOW *win, int y, int x,
const cchar_t *wch); int echo_wchar(const cchar_t *wch); int
wecho_wchar(WINDOW *win, const cchar_t *wch);
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar:
XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
DESCRIPTION
The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the com-
plex character wch into the window at the current or specified cursor
position, of the current or specified window, and advance the position
of the window cursor. These functions perform wrapping and special-
character processing as follows: If wch refers to a spacing character,
then any previous character at that location is removed; a new charac-
ter specified by wch is added at that location with rendition specified
by wch; then the cursor is advanced to the next spacing character on
the screen. If wch refers to a non-spacing character, all previous
characters at that location are preserved; the non-spacing characters
of wch are added to the spacing complex character, and the rendition
specified by wch is ignored. If the character part of wch is a tab,
newline, or backspace, the cursor is moved appropriately within the
window. A newline also does a clrtoeol before moving. Tabs are con-
sidered to be at every eighth column. If the character part of wch is
another control character, it is drawn in the ^X notation. Calling
win_wch after adding a control character does not return the control
character, but instead returns the representation of the control char-
acter. The echo_wchar function is functionally equivalent to a call to
add_wch followed by a call to refresh. Similarly, the wecho_wchar is
functionally equivalent to a call to wadd_wch followed by a call to
wrefresh. The knowledge that only a single character is being output
is taken into consideration and, for non-control characters, a consid-
erable performance gain might be seen by using the *echo* functions in-
stead of their equivalents.
Line Graphics
The following variables may be used to add line-drawing characters to
the screen with functions of the add_wch family. When variables are
defined for the terminal, the WA_ALTCHARSET bit is turned on [see
curs_attr_get(3)]. Otherwise, the default character listed below is
stored in the variable. The names chosen are consistent with the VT100
nomenclature.
tab(@); lfHB cfHB lfHB l c l. _
Name@Default@Glyph Description
_
WACS_ULCORNER@+@upper left-hand corner WACS_LLCORNER@+@lower left-hand
corner WACS_URCORNER@+@upper right-hand corner WACS_LRCORNER@+@lower
right-hand corner WACS_RTEE@+@right tee (-|) WA_S_LTEE@+@left tee (-)
WACS_BTEE@+@bottom tee (|) WACS_TTEE@+@top tee (|) WACS_HLINE@-@hori-
zontal line WACS_VLINE@|@vertical line WACS_PLUS@+@plus WACS_S1@-@scan
line 1 WACS_S9@_@scan line 9 WACS_DIAMOND@+@diamond WACS_CK-
BOARD@:@checker board (stipple) WACS_DEGREE@'@degree symbol WACS_PLMI-
NUS@#@plus/minus WACS_BULLET@o@bullet WACS_LARROW@<@arrow pointing left
WACS_RARROW@>@arrow pointing right WACS_DARROW@v@arrow pointing down
WACS_UARROW@^@arrow pointing up WACS_BOARD@#@board of squares
WACS_LANTERN@#@lantern symbol WACS_BLOCK@#@solid square block
_
NOTES
The header file curses.h automatically includes the header file
stdio.h.
The add_wch, mvadd_wch, mvwadd_wch, and echo_wchar may be macros.
RETURN VALUES
All functions return OK upon successful completion. Otherwise, they re-
turn ERR.
RELATED INFORMATION
Functions: curses(3), curs_attr_get(3), curs_clear(3), curs_outopts(3),
curs_refresh(3), putwc(3)
Others: standards(5) delim off
curs_add_wch(3)