Debian Codegraph @

upstream/debian-trixie/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.46 2025/02/02 00:00:59 tom Exp $
31 .TH ins_wch 3NCURSES 2025-02-01 "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 .SH NAME
43 \fB\%ins_wch\fP,
44 \fB\%wins_wch\fP,
45 \fB\%mvins_wch\fP,
46 \fB\%mvwins_wch\fP \-
47 insert a \fIcurses\fR complex character in a window
48 .SH SYNOPSIS
49 .nf
50 \fB#include <curses.h>\fP
51 .PP
52 \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
58 These functions insert the
59 .I curses
60 complex character
61 .I wch
62 at the cursor in the specified window
63 .I win
64 (or
65 .BR \%stdscr ).
66 The character previously at the cursor and any to its right move one
67 cell to the right;
68 the rightmost character on the line is discarded.
69 The cursor does not advance.
70 .SH "RETURN VALUE"
71 These functions return \fBOK\fP on success and \fBERR\fP on failure.
72 .PP
73 Functions taking a
74 .I \%WINDOW
75 pointer argument fail if
76 .I win
77 is a null pointer.
78 .PP
79 Functions prefixed with \*(``mv\*('' first perform cursor movement and
80 fail if the position
81 .RI ( y ,
82 .IR x )
83 is outside the window boundaries.
84 .SH NOTES
85 \fB\%ins_wch\fP,
86 \fB\%mvins_wch\fP,
87 and
88 \fB\%mvwins_wch\fP
89 may be implemented as macros.
90 .PP
91 A terminal's
92 .B \%insert_character
93 .RB ( ich1 )
94 capability
95 is not necessarily employed.
96 .SH PORTABILITY
97 X/Open Curses Issue\ 4 describes these functions.
98 It specifies no error conditions for them.
99 .SH HISTORY
100 X/Open Curses Issue\ 4 (1995) initially specified these functions.
101 The System\ V Interface Definition Version\ 4
102 of the same year
103 specified a function named
104 .I \%winswch
105 (and the usual variants).
106 .\" SVID 4, vol 3., p. 512
107 This was a later addition to
108 .RI SVr4. x ,
109 not appearing in the first SVr4 (1989).
110 It differed from X/Open's later
111 .I \%wins_wch
112 in that it took an argument of type
113 .I \%chtype
114 instead of
115 .IR \%cchar_t "."
116 .SH "SEE ALSO"
117 \fB\%insch\fP(3NCURSES) describes comparable functions in the
118 non-wide-character
119 .I curses
120 configuration.
121 .PP
122 \fB\%ncurses\fP(3NCURSES),
123 \fB\%terminfo\fP(5)