1 .\"***************************************************************************
2 .\" Copyright (c) 2002,2003 Free Software Foundation, Inc. *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a *
5 .\" copy of this software and associated documentation files (the *
6 .\" "Software"), to deal in the Software without restriction, including *
7 .\" without limitation the rights to use, copy, modify, merge, publish, *
8 .\" distribute, distribute with modifications, sublicense, and/or sell *
9 .\" copies of the Software, and to permit persons to whom the Software is *
10 .\" furnished to do so, subject to the following conditions: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" Except as contained in this notice, the name(s) of the above copyright *
24 .\" holders shall not be used in advertising or otherwise to promote the *
25 .\" sale, use or other dealings in this Software without prior written *
27 .\"***************************************************************************
29 .\" $Id: curs_get_wstr.3x,v 1.3 2003/07/05 11:15:28 tom Exp $
30 .TH curs_get_wstr 3X ""
39 \fBmvwgetn_wstr\fR \- get an array of wide characters from a curses terminal keyboard
42 \fB#include <curses.h>\fR
44 \fBint get_wstr(wint_t *\fR\fIwstr\fR\fB);\fR
46 \fBint getn_wstr(wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
48 \fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
50 \fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
52 \fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
54 \fBint mvgetn_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
56 \fBint mvwget_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
58 \fBint mvwgetn_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
63 is as though a series of calls
66 were made, until a newline, other end-of-line, or end-of-file condition is processed.
67 An end-of-file condition is represented by \fBWEOF\fR, as defined in \fB<wchar.h>\fR.
68 The newline and end-of-line conditions are represented by the \fB\\n\fR \fBwchar_t\fR value.
69 In all instances, the end of the string is terminated by a null \fBwchar_t\fR.
70 The routine places resulting values in the area pointed to by \fIwstr\fR.
72 The user's erase and kill characters are interpreted. If keypad
73 mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
74 are both considered equivalent to the user's kill character.
76 Characters input are echoed only if \fBecho\fR is currently on. In that case,
77 backspace is echoed as deletion of the previous character (typically a left
82 is as though a series of
89 is as though a call to
91 and then a series of calls to
98 is as though a call to
100 and then a series of calls to
107 \fBmvwgetn_wstr\fR, and
109 functions are identical
113 \fBmvwget_wstr\fR, and
115 functions, respectively,
118 versions read at most
120 characters, letting the application prevent overflow of the
126 \fBmvwget_wstr\fR, or
129 overflows the array pointed to by
136 \fBmvwgetn_wstr\fR, or
137 \fBwgetn_wstr\fR, respectively, is recommended.
139 These functions cannot return \fBKEY_\fR values because there
140 is no way to distinguish a \fBKEY_\fR value from a valid \fBwchar_t\fR value.
142 All of these routines except \fBwgetn_wstr\fR may be macros.
144 All of these functions return \fBOK\fR upon successful completion.
145 Otherwise, they return \fBERR\fR.
147 These functions are described in The Single Unix Specification, Version 2.
148 No error conditions are defined.
149 This implementation returns ERR if the window pointer is null,
150 or if the lower-level \fBwget_wch\fR call returns an ERR.
152 an ERR return without other data is treated as an end-of-file condition,
153 and the returned array contains a \fBWEOF\fR followed by a null \fBwchar_t\fR.
155 X/Open curses documents these functions to pass an array of \fBwchar_t\fR,
156 but all of the vendors implement this using \fBwint_t\fR.
160 \fBcurs_get_wch\fR(3X),
161 \fBcurs_getstr\fR(3X).
163 .\"# The following sets edit modes for GNU EMACS
164 .\"# Local Variables: