blob: 90b03f64f4d1555a36a2c17fcdd455673dccd90e [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2019-2023,2024 Thomas E. Dickey *
3.\" Copyright 2002-2010,2017 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: curs_ins_wch.3x,v 1.30 2024/04/20 19:18:18 tom Exp $
31.TH curs_ins_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
32.ie \n(.g \{\
33.ds `` \(lq
34.ds '' \(rq
35.\}
36.el \{\
37.ie t .ds `` ``
38.el .ds `` ""
39.ie t .ds '' ''
40.el .ds '' ""
41.\}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053042.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040043\fB\%ins_wch\fP,
44\fB\%mvins_wch\fP,
45\fB\%mvwins_wch\fP,
46\fB\%wins_wch\fP \-
47insert a \fIcurses\fR complex character in a window
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040049.nf
50\fB#include <curses.h>\fP
Steve Kondikae271bc2015-11-15 02:50:53 +010051.PP
micky3879b9f5e72025-07-08 18:04:53 -040052\fBint ins_wch(const cchar_t *\fIwch\fP);
53\fBint wins_wch(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP);
54\fBint mvins_wch(int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP);
55\fBint mvwins_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fP);
56.fi
57.SH DESCRIPTION
58These functions insert the
59.I curses
60complex character
61.I wch
62at the cursor in the specified window
63.I win
64(or
65.BR \%stdscr ).
66The character previously at the cursor and any to its right move one
67cell to the right;
68the rightmost character on the line is discarded.
69The cursor does not advance.
70.SH "RETURN VALUE"
71These functions return \fBOK\fP on success and \fBERR\fP on failure.
72.PP
73Functions taking a
74.I \%WINDOW
75pointer argument fail if the pointer is
76.BR NULL .
77.PP
78Functions prefixed with \*(``mv\*('' first perform cursor movement and
79fail if the position
80.RI ( y ,
81.IR x )
82is outside the window boundaries.
83.SH NOTES
84A terminal's
85.B \%insert_character
86.RB ( ich1 )
87capability
88is not necessarily employed.
89.PP
90\fB\%ins_wch\fP,
91\fB\%mvins_wch\fP,
92and
93\fB\%mvwins_wch\fP
94may be implemented as macros.
95.SH PORTABILITY
96X/Open Curses,
97Issue 4 describes these functions.
98.PP
99SVr4 describes successful return values only as
100\*(``an integer value other than \fBERR\fP\*(''.
101.SH HISTORY
102SVr4 (1989) implemented these functions under the names
103.BR inswch ,
104.BR winswch ,
105.BR mvinswch ,
106and
107.BR mvwinswch .
108.SH "SEE ALSO"
109\fB\%curs_insch\fP(3X) describes comparable functions in the
110non-wide-character
111.I curses
112configuration.
113.PP
114\fB\%curses\fP(3X),
115\fB\%terminfo\fP(5)