2 ****************************************************************************
3 * Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
5 * Permission is hereby granted, free of charge, to any person obtaining a *
6 * copy of this software and associated documentation files (the *
7 * "Software"), to deal in the Software without restriction, including *
8 * without limitation the rights to use, copy, modify, merge, publish, *
9 * distribute, distribute with modifications, sublicense, and/or sell *
10 * copies of the Software, and to permit persons to whom the Software is *
11 * furnished to do so, subject to the following conditions: *
13 * The above copyright notice and this permission notice shall be included *
14 * in all copies or substantial portions of the Software. *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 * Except as contained in this notice, the name(s) of the above copyright *
25 * holders shall not be used in advertising or otherwise to promote the *
26 * sale, use or other dealings in this Software without prior written *
28 ****************************************************************************
29 * @Id: curs_add_wchstr.3x,v 1.10 2012/11/03 22:54:43 tom Exp @
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
34 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
35 <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_add_wchstr 3x</TITLE>
37 <link rev=made href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
41 <H1 class="no-header">curs_add_wchstr 3x</H1>
43 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
49 <H2><a name="h2-NAME">NAME</a></H2><PRE>
50 <STRONG>add_wchstr</STRONG>, <STRONG>add_wchnstr</STRONG>, <STRONG>wadd_wchstr</STRONG>, <STRONG>wadd_wchnstr</STRONG>,
51 <STRONG>mvadd_wchstr</STRONG>, <STRONG>mvadd_wchnstr</STRONG>, <STRONG>mvwadd_wchstr</STRONG>, <STRONG>mvwadd_wchnstr</STRONG>
52 - add an array of complex characters (and attributes) to a
57 <H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
58 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
60 <STRONG>int</STRONG> <STRONG>add_wchstr(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>);</STRONG>
61 <STRONG>int</STRONG> <STRONG>add_wchnstr(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
62 <STRONG>int</STRONG> <STRONG>wadd_wchstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>);</STRONG>
63 <STRONG>int</STRONG> <STRONG>wadd_wchnstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
64 <STRONG>int</STRONG> <STRONG>mvadd_wchstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>);</STRONG>
65 <STRONG>int</STRONG> <STRONG>mvadd_wchnstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
66 <STRONG>int</STRONG> <STRONG>mvwadd_wchstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>);</STRONG>
67 <STRONG>int</STRONG> <STRONG>mvwadd_wchnstr(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
71 <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
72 These functions copy the (null-terminated) array of com-
73 plex characters <EM>wchstr</EM> into the window image structure
74 starting at the current cursor position. The four func-
75 tions with <EM>n</EM> as the last argument copy at most <EM>n</EM> elements,
76 but no more than will fit on the line. If <STRONG>n</STRONG>=<STRONG>-1</STRONG> then the
77 whole array is copied, to the maximum number of characters
78 that will fit on the line.
80 The window cursor is <EM>not</EM> advanced. These functions work
81 faster than <STRONG>waddnstr</STRONG>. On the other hand:
83 <STRONG>o</STRONG> they do not perform checking (such as for the newline,
84 backspace, or carriage return characters),
86 <STRONG>o</STRONG> they do not advance the current cursor position,
88 <STRONG>o</STRONG> they do not expand other control characters to ^-es-
91 <STRONG>o</STRONG> they truncate the string if it crosses the right mar-
92 gin, rather than wrapping it around to the new line.
94 These functions end successfully on encountering a null
95 <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>, or when they have filled the current line. If a
96 complex character cannot completely fit at the end of the
97 current line, the remaining columns are filled with the
98 background character and rendition.
102 <H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
103 All functions return the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG>
106 X/Open does not define any error conditions. This imple-
107 mentation returns an error if the window pointer is null.
109 Functions with a "mv" prefix first perform a cursor move-
110 ment using <STRONG>wmove</STRONG>, and return an error if the position is
111 outside the window, or if the window pointer is null.
115 <H2><a name="h2-NOTES">NOTES</a></H2><PRE>
116 All functions except <STRONG>wadd_wchnstr</STRONG> may be macros.
120 <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
121 These entry points are described in the XSI Curses stan-
126 <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
127 <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
129 Comparable functions in the narrow-character (ncurses) li-
130 brary are described in <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>.
134 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
138 <li><a href="#h2-NAME">NAME</a></li>
139 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
140 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
141 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
142 <li><a href="#h2-NOTES">NOTES</a></li>
143 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
144 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>