blob: 0c153c4c67e42facf3a7bc6f2e74cc4de6f9b22b [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
2.\" Copyright (c) 2002,2005 Free Software Foundation, Inc. *
3.\" *
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: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
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. *
22.\" *
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 *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: curs_ins_wstr.3x,v 1.4 2005/05/15 17:02:54 tom Exp $
30.TH curs_ins_wstr 3X ""
31.na
32.hy 0
33.SH NAME
34\fBins_wstr\fR,
35\fBins_nwstr\fR,
36\fBwins_wstr\fR,
37\fBwins_nwstr\fR,
38\fBmvins_wstr\fR,
39\fBmvins_nwstr\fR,
40\fBmvwins_wstr\fR,
41\fBmvwins_nwstr\fR \- insert a wide-character string into a curses window
42.ad
43.hy
44.SH SYNOPSIS
45.nf
46\fB#include <curses.h>\fR
47.sp
48\fBint ins_wstr(const wchar_t *\fR\fIwstr);\fR
49.br
50\fBint ins_nwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
51.br
52\fBint wins_wstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
53.br
54\fBint wins_nwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
55.br
56\fBint mvins_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
57.br
58\fBint mvins_nwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
59.br
60\fBint mvwins_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
61.br
62\fBint mvwins_nwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
63.fi
64.SH DESCRIPTION
65These routines insert a \fBwchar_t\fR character string
66(as many characters as will fit on the line)
67before the character under the cursor.
68All characters to the right of the cursor are shifted right,
69with the possibility of the rightmost characters on the line being lost.
70No wrapping is performed.
71The cursor position does not change
72(after moving to \fIy\fR, \fIx\fR, if specified).
73The four routines with \fIn\fR as the last argument
74insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters.
75If \fIn\fR is less than 1, the entire string is inserted.
76.PP
77If a character in \fIwstr\fR is a tab, newline, carriage return or
78backspace, the cursor is moved appropriately within the window.
79A newline also does a \fBclrtoeol\fR before moving.
80Tabs are considered to be at every eighth column.
81If a character in \fIwstr\fR is another control character,
82it is drawn in the \fB^\fR\fIX\fR notation.
83Calling \fBwin_wch\fR after adding a control character
84(and moving to it, if necessary)
85does not return the control character,
86but instead returns a character in the ^-representation
87of the control character.
88.SH NOTES
89Note that all but wins_nwstr may be macros.
90.PP
91If the first character in the string is a nonspacing character, these
92functions will fail.
93XSI does not define what will happen if a nonspacing character follows
94a control character.
95.SH RETURN VALUES
96Upon successful completion, these functions return OK.
97Otherwise, they return ERR.
98.SH SEE ALSO
99\fBcurses\fR(3X),
100\fBcurs_insstr\fR(3X),
101\fBcurs_in_wch\fR(3X),
102\fBcurs_ins_wch\fR(3X).
103.\"#
104.\"# The following sets edit modes for GNU EMACS
105.\"# Local Variables:
106.\"# mode:nroff
107.\"# fill-column:79
108.\"# End: