aboutsummaryrefslogtreecommitdiff
path: root/man/curs_inwstr.3x
blob: b3899c4b94f2eafbf53f35c91bf6828709e3bb1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.\"***************************************************************************
.\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
.\" Copyright 2002-2012,2017 Free Software Foundation, Inc.                  *
.\"                                                                          *
.\" Permission is hereby granted, free of charge, to any person obtaining a  *
.\" copy of this software and associated documentation files (the            *
.\" "Software"), to deal in the Software without restriction, including      *
.\" without limitation the rights to use, copy, modify, merge, publish,      *
.\" distribute, distribute with modifications, sublicense, and/or sell       *
.\" copies of the Software, and to permit persons to whom the Software is    *
.\" furnished to do so, subject to the following conditions:                 *
.\"                                                                          *
.\" The above copyright notice and this permission notice shall be included  *
.\" in all copies or substantial portions of the Software.                   *
.\"                                                                          *
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
.\"                                                                          *
.\" Except as contained in this notice, the name(s) of the above copyright   *
.\" holders shall not be used in advertising or otherwise to promote the     *
.\" sale, use or other dealings in this Software without prior written       *
.\" authorization.                                                           *
.\"***************************************************************************
.\"
.\" $Id: curs_inwstr.3x,v 1.14 2020/10/17 23:22:11 tom Exp $
.TH curs_inwstr 3X ""
.ie \n(.g .ds `` \(lq
.el       .ds `` ``
.ie \n(.g .ds '' \(rq
.el       .ds '' ''
.SH NAME
\fBinwstr\fR,
\fBinnwstr\fR,
\fBwinwstr\fR,
\fBwinnwstr\fR,
\fBmvinwstr\fR,
\fBmvinnwstr\fR,
\fBmvwinwstr\fR,
\fBmvwinnwstr\fR \- get a string of \fBwchar_t\fR characters from a curses window
.SH SYNOPSIS
.nf
\fB#include <curses.h> \fR
.sp
\fBint inwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint innwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.sp
\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.fi
.SH DESCRIPTION
.PP
These routines return a string of \fBwchar_t\fR wide characters in \fIwstr\fR,
extracted starting at the current cursor position in the named window.
.PP
The four functions with \fIn\fR as the last argument return
a leading substring at most \fIn\fR characters long
(exclusive of the trailing NUL).
Transfer stops at the end of the current line, or when \fIn\fR characters have
been stored at the location referenced by \fIwstr\fR.
.PP
If the size \fIn\fR is not large enough to store a complete complex character,
an error is generated.
.SH NOTES
.PP
All routines except
\fBwinnwstr\fR
may be macros.
.PP
Each cell in the window holds a complex character (i.e., base-
and combining-characters) together with attributes and color.
These functions store only the wide characters,
ignoring attributes and color.
Use \fBin_wchstr\fP to return the complex characters from a window.
.SH RETURN VALUE
All routines return
\fBERR\fR
upon failure.
Upon
successful completion, the *\fBinwstr\fR
routines return
\fBOK\fR, and the *\fBinnwstr\fR
routines return the
number of characters read into the string.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_instr\fR(3X),
\fBcurs_in_wchstr\fR(3X)