Debian Codegraph @

upstream/debian-unstable/man3/ins_wch.3ncurses

raw
1 .\"***************************************************************************
2 .\" Copyright 2019-2024,2025 Thomas E. Dickey *
3 .\" Copyright 2002-2010,2017 Free Software Foundation, Inc. *
4 .\" *
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 .\"
30 .\" $Id: curs_ins_wch.3x,v 1.52 2025/10/21 00:09:49 tom Exp $
31 .TH ins_wch 3NCURSES 2025-10-20 "ncurses 6.6" "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 .\}
42 .
43 .de bP
44 .ie n .IP \(bu 4
45 .el .IP \(bu 2
46 ..
47 .SH NAME
48 \fB\%ins_wch\fP,
49 \fB\%wins_wch\fP,
50 \fB\%mvins_wch\fP,
51 \fB\%mvwins_wch\fP \-
52 insert a \fIcurses\fR complex character in a window
53 .SH SYNOPSIS
54 .nf
55 \fB#include <curses.h>\fP
56 .PP
57 \fBint ins_wch(const cchar_t * \fIwch\fP);
58 \fBint wins_wch(WINDOW * \fIwin\fP, const cchar_t * \fIwch\fP);
59 \fBint mvins_wch(int \fIy\fP, int \fIx\fP, const cchar_t * \fIwch\fP);
60 \fBint mvwins_wch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t * \fIwch\fP);
61 .fi
62 .SH DESCRIPTION
63 .B \%wins_wch
64 inserts the
65 .I curses
66 complex character
67 .I wch
68 at the cursor position in the window
69 .IR win "."
70 The character previously at the cursor and any to its right move one
71 cell to the right;
72 the formerly rightmost character on the line is discarded.
73 Unlike \fB\%add_wch\fP(3NCURSES),
74 .B \%wins_wch
75 does not advance the cursor.
76 \fB\%ncurses\fP(3NCURSES) describes the variants of this function.
77 .SH "RETURN VALUE"
78 These functions return
79 .B OK
80 on success and
81 .B ERR
82 on failure.
83 .PP
84 In
85 .IR \%ncurses ,
86 they return
87 .B ERR
88 if
89 .bP
90 the
91 .I curses
92 screen has not been initialized,
93 or
94 .bP
95 (for functions taking a
96 .I \%WINDOW
97 pointer argument)
98 .I win
99 is a null pointer.
100 .PP
101 Functions prefixed with \*(``mv\*('' first perform cursor movement and
102 fail if the position
103 .RI ( y ,
104 .IR x )
105 is outside the window boundaries.
106 .SH NOTES
107 .BR \%ins_wch ","
108 .BR \%mvins_wch ","
109 and
110 .B \%mvwins_wch
111 may be implemented as macros.
112 .PP
113 .I curses
114 does not necessarily employ the terminal's
115 .B \%insert_character
116 .RB ( ich1 )
117 capability to achieve insertion.
118 .SH PORTABILITY
119 X/Open Curses Issue\ 4 describes these functions.
120 It specifies no error conditions for them.
121 .SH HISTORY
122 X/Open Curses Issue\ 4 (1995) initially specified these functions.
123 The System\ V Interface Definition Version\ 4
124 of the same year
125 specified a function named
126 .I \%winswch
127 (and the usual variants).
128 .\" SVID 4, vol 3., p. 512
129 This was a later addition to
130 .RI SVr4. x ,
131 not appearing in the first SVr4 (1989).
132 It differed from X/Open's later
133 .I \%wins_wch
134 in that it took an argument of type
135 .I \%chtype
136 instead of
137 .IR \%cchar_t "."
138 .SH "SEE ALSO"
139 \fB\%insch\fP(3NCURSES) describes comparable functions in the
140 non-wide-character
141 .I curses
142 configuration.
143 .PP
144 \fB\%ncurses\fP(3NCURSES),
145 \fB\%terminfo\fP(5)