]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_add_wchstr.3x
ncurses 6.3 - patch 20211030
[ncurses.git] / man / curs_add_wchstr.3x
1 .\"***************************************************************************
2 .\" Copyright 2019,2020 Thomas E. Dickey                                     *
3 .\" Copyright 2002-2012,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
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:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
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.                               *
23 .\"                                                                          *
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       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_add_wchstr.3x,v 1.15 2020/12/19 21:39:06 tom Exp $
31 .TH curs_add_wchstr 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .de bP
37 .ie n  .IP \(bu 4
38 .el    .IP \(bu 2
39 ..
40 .na
41 .hy 0
42 .SH NAME
43 \fBadd_wchstr\fR,
44 \fBadd_wchnstr\fR,
45 \fBwadd_wchstr\fR,
46 \fBwadd_wchnstr\fR,
47 \fBmvadd_wchstr\fR,
48 \fBmvadd_wchnstr\fR,
49 \fBmvwadd_wchstr\fR,
50 \fBmvwadd_wchnstr\fR \- add an array of complex characters (and attributes) to a curses window
51 .ad
52 .hy
53 .SH SYNOPSIS
54 .nf
55 \fB#include <curses.h>\fR
56 .PP
57 \fBint add_wchstr(const cchar_t *\fR\fIwchstr\fR\fB);\fR
58 .br
59 \fBint add_wchnstr(const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
60 .br
61 \fBint wadd_wchstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
62 .br
63 \fBint wadd_wchnstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
64 .sp
65 \fBint mvadd_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
66 .br
67 \fBint mvadd_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
68 .br
69 \fBint mvwadd_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
70 .br
71 \fBint mvwadd_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
72 .fi
73 .SH DESCRIPTION
74 These functions copy the (null-terminated)
75 array of complex characters \fIwchstr\fR
76 into the window image structure
77 starting at the current cursor position.
78 The four functions with \fIn\fR as the last
79 argument copy at most \fIn\fR elements,
80 but no more than will fit on the line.
81 If \fBn\fR=\fB\-1\fR then the whole array is copied,
82 to the maximum number of characters that will fit on the line.
83 .PP
84 The window cursor is \fInot\fR advanced.
85 These functions work faster than \fBwaddnstr\fR.
86 On the other hand:
87 .bP
88 they do not perform checking
89 (such as for the newline, backspace, or carriage return characters),
90 .bP
91 they do not advance the current cursor position,
92 .bP
93 they do not expand other control characters to ^-escapes, and
94 .bP
95 they truncate the string if it crosses the right margin,
96 rather than wrapping it around to the new line.
97 .PP
98 These functions end successfully
99 on encountering a null \fIcchar_t\fR, or
100 when they have filled the current line.
101 If a complex character cannot completely fit at the end of the current line,
102 the remaining columns are filled with the background character and rendition.
103 .SH RETURN VALUE
104 All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success.
105 .PP
106 X/Open does not define any error conditions.
107 This implementation returns an error
108 if the window pointer is null.
109 .PP
110 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
111 \fBwmove\fP, and return an error if the position is outside the window,
112 or if the window pointer is null.
113 .SH NOTES
114 All functions except \fBwadd_wchnstr\fR may be macros.
115 .SH PORTABILITY
116 These entry points are described in the XSI Curses standard, Issue 4.
117 .SH SEE ALSO
118 \fBcurses\fR(3X),
119 \fBcurs_addwstr\fR(3X).
120 .PP
121 Comparable functions in the narrow-character (ncurses) library are
122 described in
123 \fBcurs_addchstr\fR(3X).