1addnwstr(3XCURSES) X/Open Curses Library Functions addnwstr(3XCURSES)
2
3
4
6 addnwstr, addwstr, mvaddnwstr, mvaddwstr, mvwaddnwstr, mvwaddwstr,
7 waddnwstr, waddwstr - add a wide-character string to a window
8
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 addnwstr(const wchar_t *wstr, int n);
18
19
20 int addwstr(const wchar_t *wstr);
21
22
23 int mvaddnwstr(int y, int x, const wchar_t *wstr, int n);
24
25
26 int mvaddwstr(int y, int x, const wchar_t *wstr);
27
28
29 int mvwaddnwstr(WINDOW*win, int y, int x, const wchar_t *wstr, int n);
30
31
32 int mvwaddwstr(WINDOW*win, int y, int x, const wchar_t *wstr);
33
34
35 int waddnwstr(WINDOW*win, const wchar_t *wstr, int n);
36
37
38 int waddwstr(WINDOW*win, const wchar_t *wstr);
39
40
42 The addwstr() function writes a null-terminated wide-character string
43 to the stdscr window at the current cursor position. The waddwstr()
44 function performs an identical action, but writes the string to the
45 window specified by win. The mvaddwstr() and mvwaddwstr() functions
46 write the string to the position indicated by the x (column) and y
47 (row) parameters (the former to the stdscr window; the latter to win‐
48 dow win).
49
50
51 The addnwstr(), waddnwstr(), mvaddnwstr(), and mvwaddnwstr() functions
52 write at most n characters to the window. If n is less than 0, the
53 entire string is written. The former two functions place the characters
54 at the current cursor position; the latter two commands use the posi‐
55 tion specified by the x and y parameters.
56
57
58 All of these functions advance the cursor after writing the string.
59
60
61 These functions are functionally equivalent to building a cchar_t from
62 the wchar_t and the window rendition (or background character and ren‐
63 dition) and calling the wadd_wch(3XCURSES) function once for each
64 wchar_t in the string. Refer to the curses(3XCURSES) man page for a
65 complete description of special character handling and of the interac‐
66 tion between the window rendition (or background character and rendi‐
67 tion) and the character written.
68
69
70 Note that these functions differ from the add_wchnstr(3XCURSES) set of
71 functions in that the latter copy the string as is (without combining
72 each character with the foreground and background attributes of the
73 window).
74
76 wstr Is a pointer to the wide-character string that is to be written
77 to the window.
78
79
80 n Is the maximum number of characters to be copied from wstr. If
81 n is less than 0, the entire string is written or as much of it
82 as fits on the line.
83
84
85 y Is the y (row) coordinate of the starting position of wstr in
86 the window.
87
88
89 x Is the x (column) coordinate of the starting position of wstr
90 in the window.
91
92
93 win Is a pointer to the window in which the string is to be writ‐
94 ten.
95
96
98 On success, these functions return OK. Otherwise, they return ERR.
99
101 None.
102
104 See attributes(5) for descriptions of the following attributes:
105
106
107
108
109 ┌─────────────────────────────┬─────────────────────────────┐
110 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
111 ├─────────────────────────────┼─────────────────────────────┤
112 │Interface Stability │Standard │
113 ├─────────────────────────────┼─────────────────────────────┤
114 │MT-Level │Unsafe │
115 └─────────────────────────────┴─────────────────────────────┘
116
118 add_wch(3XCURSES), add_wchnstr(3XCURSES), curses(3XCURSES),
119 libcurses(3XCURSES), attributes(5), standards(5)
120
121
122
123SunOS 5.11 5 Jun 2002 addnwstr(3XCURSES)