Debian Codegraph @

upstream/mageia-cauldron/man3/curs_ins_wch.3x

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.50 2025/03/08 23:10:02 tom Exp $
31 .TH curs_ins_wch 3X 2025-03-08 "ncurses 6.5" "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,
61 const cchar_t * \fIwch\fP);
62 .fi
63 .SH DESCRIPTION
64 .B \%wins_wch
65 inserts the
66 .I curses
67 complex character
68 .I wch
69 at the cursor position in the window
70 .IR win "."
71 The character previously at the cursor and any to its right move one
72 cell to the right;
73 the formerly rightmost character on the line is discarded.
74 Unlike \fB\%add_wch\fP(3X),
75 .B \%wins_wch
76 does not advance the cursor.
77 \fB\%ncurses\fP(3X) describes the variants of this function.
78 .SH "RETURN VALUE"
79 These functions return
80 .B OK
81 on success and
82 .B ERR
83 on failure.
84 .PP
85 In
86 .IR \%ncurses ,
87 they return
88 .B ERR
89 if
90 .bP
91 the
92 .I curses
93 screen has not been initialized,
94 or
95 .bP
96 (for functions taking a
97 .I \%WINDOW
98 pointer argument)
99 .I win
100 is a null pointer.
101 .PP
102 Functions prefixed with \*(``mv\*('' first perform cursor movement and
103 fail if the position
104 .RI ( y ,
105 .IR x )
106 is outside the window boundaries.
107 .SH NOTES
108 .BR \%ins_wch ","
109 .BR \%mvins_wch ","
110 and
111 .B \%mvwins_wch
112 may be implemented as macros.
113 .PP
114 .I curses
115 does not necessarily employ the terminal's
116 .B \%insert_character
117 .RB ( ich1 )
118 capability to achieve insertion.
119 .SH PORTABILITY
120 X/Open Curses Issue\ 4 describes these functions.
121 It specifies no error conditions for them.
122 .SH HISTORY
123 X/Open Curses Issue\ 4 (1995) initially specified these functions.
124 The System\ V Interface Definition Version\ 4
125 of the same year
126 specified a function named
127 .I \%winswch
128 (and the usual variants).
129 .\" SVID 4, vol 3., p. 512
130 This was a later addition to
131 .RI SVr4. x ,
132 not appearing in the first SVr4 (1989).
133 It differed from X/Open's later
134 .I \%wins_wch
135 in that it took an argument of type
136 .I \%chtype
137 instead of
138 .IR \%cchar_t "."
139 .SH "SEE ALSO"
140 \fB\%curs_insch\fP(3X) describes comparable functions in the
141 non-wide-character
142 .I curses
143 configuration.
144 .PP
145 \fB\%curses\fP(3X),
146 \fB\%terminfo\fP(5)