Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 2 | .\" Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 29 | .\" $Id: curs_ins_wstr.3x,v 1.7 2012/11/03 23:03:59 tom Exp $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 |
| 65 | These routines insert a \fBwchar_t\fR character string |
| 66 | (as many characters as will fit on the line) |
| 67 | before the character under the cursor. |
| 68 | All characters to the right of the cursor are shifted right, |
| 69 | with the possibility of the rightmost characters on the line being lost. |
| 70 | No wrapping is performed. |
| 71 | The cursor position does not change |
| 72 | (after moving to \fIy\fR, \fIx\fR, if specified). |
| 73 | The four routines with \fIn\fR as the last argument |
| 74 | insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters. |
| 75 | If \fIn\fR is less than 1, the entire string is inserted. |
| 76 | .PP |
| 77 | If a character in \fIwstr\fR is a tab, newline, carriage return or |
| 78 | backspace, the cursor is moved appropriately within the window. |
| 79 | A newline also does a \fBclrtoeol\fR before moving. |
| 80 | Tabs are considered to be at every eighth column. |
| 81 | If a character in \fIwstr\fR is another control character, |
| 82 | it is drawn in the \fB^\fR\fIX\fR notation. |
| 83 | Calling \fBwin_wch\fR after adding a control character |
| 84 | (and moving to it, if necessary) |
| 85 | does not return the control character, |
| 86 | but instead returns a character in the ^-representation |
| 87 | of the control character. |
| 88 | .SH NOTES |
| 89 | Note that all but wins_nwstr may be macros. |
| 90 | .PP |
| 91 | If the first character in the string is a nonspacing character, these |
| 92 | functions will fail. |
| 93 | XSI does not define what will happen if a nonspacing character follows |
| 94 | a control character. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 95 | .SH RETURN VALUE |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 96 | Upon successful completion, these functions return OK. |
| 97 | Otherwise, they return ERR. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 98 | .PP |
| 99 | Functions with a "mv" prefix first perform a cursor movement using |
| 100 | \fBwmove\fP, and return an error if the position is outside the window, |
| 101 | or if the window pointer is null. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 102 | .SH SEE ALSO |
| 103 | \fBcurses\fR(3X), |
| 104 | \fBcurs_insstr\fR(3X), |
| 105 | \fBcurs_in_wch\fR(3X), |
| 106 | \fBcurs_ins_wch\fR(3X). |