]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_in_wchstr.3x
ncurses 6.2 - patch 20210821
[ncurses.git] / man / curs_in_wchstr.3x
1 .\"***************************************************************************
2 .\" Copyright 2018-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_in_wchstr.3x,v 1.14 2020/10/17 23:19:44 tom Exp $
31 .TH curs_in_wchstr 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .na
37 .hy 0
38 .SH NAME
39 \fBin_wchstr\fR,
40 \fBin_wchnstr\fR,
41 \fBwin_wchstr\fR,
42 \fBwin_wchnstr\fR,
43 \fBmvin_wchstr\fR,
44 \fBmvin_wchnstr\fR,
45 \fBmvwin_wchstr\fR,
46 \fBmvwin_wchnstr\fR \- get an array of complex characters and renditions from a curses window
47 .ad
48 .hy
49 .SH SYNOPSIS
50 .nf
51 \fB#include <curses.h>\fR
52 .sp
53 \fBint in_wchstr(cchar_t *\fR\fIwchstr\fR\fB);\fR
54 .br
55 \fBint in_wchnstr(cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
56 .br
57 \fBint win_wchstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
58 .br
59 \fBint win_wchnstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
60 .sp
61 \fBint mvin_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
62 .br
63 \fBint mvin_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
64 .br
65 \fBint mvwin_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
66 .br
67 \fBint mvwin_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR, int \fIn\fR\fB);\fR
68 .fi
69 .SH DESCRIPTION
70 These functions return an array of complex characters in \fIwchstr\fR,
71 starting at the current cursor position in the named window.
72 Attributes (rendition) are stored with the characters.
73 .PP
74 The
75 \fBin_wchnstr\fR,
76 \fBmvin_wchnstr\fR,
77 \fBmvwin_wchnstr\fR
78 and
79 \fBwin_wchnstr\fR
80 fill the array
81 with at most
82 \fIn\fR
83 \fBcchar_t\fR
84 elements.
85 .br
86 .SH NOTES
87 Note that all routines except
88 \fBwin_wchnstr\fR
89 may be
90 macros.
91 .PP
92 Reading a line that overflows the array pointed to by
93 \fIwchstr\fR
94 with
95 \fBin_wchstr\fR,
96 \fBmvin_wchstr\fR,
97 \fBmvwin_wchstr\fR
98 or
99 \fBwin_wchstr\fR
100 causes undefined results.
101 Therefore, the use of
102 \fBin_wchnstr\fR,
103 \fBmvin_wchnstr\fR,
104 \fBmvwin_wchnstr\fR, or
105 \fBwin_wchnstr\fR
106 is recommended.
107 .SH RETURN VALUE
108 Upon successful completion, these functions return
109 \fBOK\fR.
110 Otherwise, they return
111 \fBERR\fR.
112 .PP
113 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
114 \fBwmove\fP, and return an error if the position is outside the window,
115 or if the window pointer is null.
116 .SH PORTABILITY
117 The XSI Curses defines no error conditions.
118 This implementation checks for null pointers,
119 returning \fBERR\fP in that case.
120 .SH SEE ALSO
121 Functions:
122 \fBcurses\fR(3X),
123 \fBcurs_in_wch\fR(3X),
124 \fBcurs_instr\fR(3X),
125 \fBcurs_inwstr\fR(3X)
126 \fBcurs_inchstr\fR(3X)