1curs_add_wch(3X)                                              curs_add_wch(3X)
2
3
4

NAME

6       add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar - add
7       a complex character and rendition to a curses window, then advance  the
8       cursor
9

SYNOPSIS

11       #include <curses.h>
12
13       int add_wch( const cchar_t *wch );
14       int wadd_wch( WINDOW *win, const cchar_t *wch );
15       int mvadd_wch( int y, int x, const cchar_t *wch );
16       int mvwadd_wch( WINDOW *win, int y, int x, const cchar_t *wch );
17       int echo_wchar( const cchar_t *wch );
18       int wecho_wchar( WINDOW *win, const cchar_t *wch );
19

DESCRIPTION

21       The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the com‐
22       plex character wch into the given window at its current position, which
23       is then advanced.  These functions perform wrapping and special-charac‐
24       ter processing as follows:
25
26       -    If wch refers to a spacing character, then any previous  character
27            at  that location is removed.  A new character specified by wch is
28            placed at that location with rendition specified by wch.  The cur‐
29            sor then advances to the next spacing character on the screen.
30
31       -    If  wch refers to a non-spacing character, all previous characters
32            at that location are preserved.  The non-spacing characters of wch
33            are  added  to  the  spacing  complex character, and the rendition
34            specified by wch is ignored.
35
36       -    If the character part of wch is a tab, newline, backspace or other
37            control  character,  the window is updated and the cursor moves as
38            if addch were called.
39
40       The echo_wchar function is functionally equivalent to a call to add_wch
41       followed by a call to refresh.  Similarly, the wecho_wchar is function‐
42       ally equivalent to a call to wadd_wch followed by a call  to  wrefresh.
43       The  knowledge  that  only  a single character is being output is taken
44       into consideration and, for non-control characters, a considerable per‐
45       formance  gain  might  be seen by using the *echo* functions instead of
46       their equivalents.
47

RETURN VALUES

49       All routines return the integer ERR upon failure and OK on success.
50

NOTES

52       Note that add_wch, mvadd_wch, mvwadd_wch, and echo_wchar may be macros.
53

PORTABILITY

55       All these functions are described in the XSI Curses standard, Issue  4.
56       The  defaults specified for forms-drawing characters apply in the POSIX
57       locale.
58
59       XSI documents constants beginning with WACS_ which are used  for  line-
60       drawing.  Those are not currently implemented in ncurses.
61

SEE ALSO

63       curses(3X),  curs_addch(3X),  curs_attr(3X),  curs_clear(3X), curs_out‐
64       opts(3X), curs_refresh(3X), putwc(3)
65
66
67
68                                                              curs_add_wch(3X)
Impressum