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 .\" $DragonFly: src/lib/libncurses/man/curs_get_wstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
31 .TH curs_get_wstr 3X ""
40 \fBmvwgetn_wstr\fR \- get an array of wide characters from a curses terminal keyboard
43 \fB#include <curses.h>\fR
45 \fBint get_wstr(wint_t *\fR\fIwstr\fR\fB);\fR
47 \fBint getn_wstr(wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
49 \fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
51 \fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
53 \fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
55 \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
57 \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
59 \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
64 is as though a series of calls
67 were made, until a newline, other end-of-line, or end-of-file condition is processed.
68 An end-of-file condition is represented by \fBWEOF\fR, as defined in \fB<wchar.h>\fR.
69 The newline and end-of-line conditions are represented by the \fB\\n\fR \fBwchar_t\fR value.
70 In all instances, the end of the string is terminated by a null \fBwchar_t\fR.
71 The routine places resulting values in the area pointed to by \fIwstr\fR.
73 The user's erase and kill characters are interpreted. If keypad
74 mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
75 are both considered equivalent to the user's kill character.
77 Characters input are echoed only if \fBecho\fR is currently on. In that case,
78 backspace is echoed as deletion of the previous character (typically a left
83 is as though a series of
90 is as though a call to
92 and then a series of calls to
99 is as though a call to
101 and then a series of calls to
108 \fBmvwgetn_wstr\fR, and
110 functions are identical
114 \fBmvwget_wstr\fR, and
116 functions, respectively,
119 versions read at most
121 characters, letting the application prevent overflow of the
127 \fBmvwget_wstr\fR, or
130 overflows the array pointed to by
137 \fBmvwgetn_wstr\fR, or
138 \fBwgetn_wstr\fR, respectively, is recommended.
140 These functions cannot return \fBKEY_\fR values because there
141 is no way to distinguish a \fBKEY_\fR value from a valid \fBwchar_t\fR value.
143 All of these routines except \fBwgetn_wstr\fR may be macros.
145 All of these functions return \fBOK\fR upon successful completion.
146 Otherwise, they return \fBERR\fR.
148 These functions are described in The Single Unix Specification, Version 2.
149 No error conditions are defined.
150 This implementation returns ERR if the window pointer is null,
151 or if the lower-level \fBwget_wch\fR call returns an ERR.
153 an ERR return without other data is treated as an end-of-file condition,
154 and the returned array contains a \fBWEOF\fR followed by a null \fBwchar_t\fR.
156 X/Open curses documents these functions to pass an array of \fBwchar_t\fR,
157 but all of the vendors implement this using \fBwint_t\fR.
161 \fBcurs_get_wch\fR(3X),
162 \fBcurs_getstr\fR(3X).
164 .\"# The following sets edit modes for GNU EMACS
165 .\"# Local Variables: