1add_wch(3XCURSES)       X/Open Curses Library Functions      add_wch(3XCURSES)
2
3
4

NAME

6       add_wch,  mvadd_wch,  mvwadd_wch,  wadd_wch  -  add a complex character
7       (with   rendition) to a window
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library ... ]
14
15       #include <curses.h>
16
17       int add_wch(const cchar_t *wch);
18
19
20       int wadd_wch(WINDOW *win, const cchar_t *wch);
21
22
23       int mvadd_wch(int y, int x, const cchar_t *wch);
24
25
26       int mvwadd_wch(WINDOW *win, int y, int x, const cchar_t *wch);
27
28

DESCRIPTION

30       The add_wch() function writes a complex character to the stdscr  window
31       at the current cursor position.  The mvadd_wch() and mvwadd_wch() func‐
32       tions write the character  to the position indicated by the x  (column)
33       and  y  (row) parameters. The mvadd_wch() function writes the character
34       to the stdscr window, while mvwadd_wch() writes the  character  to  the
35       window  specified   by  win.   The  wadd_wch() function is identical to
36       add_wch(), but writes the  character to the window  specified  by  win.
37       These functions advance the cursor after writing the character.
38
39
40       If  wch is a spacing complex character, X/Open Curses replaces any pre‐
41       vious  character at the specified location with  wch  (and  its  rendi‐
42       tion).  If  wch  is a non-spacing complex character, X/Open Curses pre‐
43       serves all existing characters at the specified location and  adds  the
44       non-spacing   characters  of  wch  to the spacing complex character. It
45       ignores the  rendition associated with wch.
46
47
48       Characters that do not fit on the end of the current line  are  wrapped
49       to  the  beginning of the next line unless the current line is the last
50       line of the window and scrolling is disabled. In that situation, X/Open
51       Curses discards characters which extend beyond the end  of the line.
52
53
54       When  wch  is  a  backspace,  carriage  return, newline, or tab, X/Open
55       Curses  moves  the   cursor   appropriately   as   described   in   the
56       curses(3XCURSES)  man  page. Each tab character moves the cursor to the
57       next tab stop. By default, tab stops occur every  eight  columns.  When
58       wch  is  a  control  character other than a backspace, carriage return,
59       newline, or tab, it is written using ^x notation, where x is  a  print‐
60       able  character.  When  X/Open  Curses writes wch to the last character
61       position on a line, it automatically generates a newline. When  wch  is
62       written to the last character position of a scrolling region and scrol‐
63       lok() is enabled, X/Open Curses scrolls the  scrolling  region  up  one
64       line (see clearok(3XCURSES)).
65

PARAMETERS

67       wch    Is the character/attribute pair (rendition) to be written to the
68              window.
69
70
71       win    Is a pointer to the window in which the character is to be writ‐
72              ten.
73
74
75       y      Is  the  y  (row)  coordinate of the character's position in the
76              window.
77
78
79       x      Is the x (column) coordinate of the character's position in  the
80              window.
81
82

RETURN VALUES

84       On success, these functions return OK. Otherwise, they return ERR.
85

ERRORS

87       None.
88

ATTRIBUTES

90       See attributes(5) for descriptions of the following attributes:
91
92
93
94
95       ┌─────────────────────────────┬─────────────────────────────┐
96       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
97       ├─────────────────────────────┼─────────────────────────────┤
98       │Interface Stability          │Standard                     │
99       ├─────────────────────────────┼─────────────────────────────┤
100       │MT-Level                     │Unsafe                       │
101       └─────────────────────────────┴─────────────────────────────┘
102

SEE ALSO

104       attr_off(3XCURSES),    bkgrndset(3XCURSES),   curses(3XCURSES),   doup‐
105       date(3XCURSES),          in_wch(3XCURSES),           ins_wch(3XCURSES),
106       libcurses(3XCURSES),     nl(3XCURSES),     printw(3XCURSES),     scrol‐
107       lok(3XCURSES),   scrl(3XCURSES),   setscrreg(3XCURSES),    terminfo(4),
108       attributes(5), standards(5)
109
110
111
112SunOS 5.11                        5 Jun 2002                 add_wch(3XCURSES)
Impressum