Debian Codegraph @

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

raw
1 .\"***************************************************************************
2 .\" Copyright 2020-2024,2025 Thomas E. Dickey *
3 .\" Copyright 1998-2013,2015 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_overlay.3x,v 1.55 2025/01/19 00:51:10 tom Exp $
31 .TH overlay 3NCURSES 2025-01-18 "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\%overlay\fP,
49 \fB\%overwrite\fP,
50 \fB\%copywin\fP \-
51 overlay \fIcurses\fR windows and manipulate them
52 .SH SYNOPSIS
53 .nf
54 \fB#include <curses.h>
55 .PP
56 \fBint overlay(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP);
57 \fBint overwrite(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP);
58 \fBint copywin(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP, int \fIsminrow\fP,
59 \fBint \fIsmincol\fB, int \fIdminrow\fB, int \fIdmincol\fB, int \fIdmaxrow\fB,\fR
60 \fBint \fIdmaxcol\fB, int \fIoverlay\fB);\fR
61 .fi
62 .SH DESCRIPTION
63 .SS "overlay, overwrite"
64 The \fBoverlay\fP and \fBoverwrite\fP routines overlay \fIsrcwin\fP on
65 top of \fIdstwin\fP.
66 \fIscrwin\fP and \fIdstwin\fP are not required
67 to be the same size; only text where the two windows overlap is copied.
68 The difference is that \fBoverlay\fP is non-destructive
69 (blanks are not copied) whereas \fBoverwrite\fP is destructive.
70 .SS copywin
71 The \fBcopywin\fP routine provides a finer granularity of control over the
72 \fBoverlay\fP and \fBoverwrite\fP routines.
73 As in the \fBprefresh\fP routine,
74 a rectangle is specified in the destination window, (\fIdminrow\fP,
75 \fIdmincol\fP) and (\fIdmaxrow\fP, \fIdmaxcol\fP), and the upper-left-corner
76 coordinates of the source window, (\fIsminrow\fP, \fIsmincol\fP).
77 If the argument \fIoverlay\fP is \fBtrue\fP,
78 then copying is non-destructive,
79 as in \fBoverlay\fP.
80 .SH RETURN VALUE
81 These functions return
82 .B OK
83 on success and
84 .B ERR
85 on failure.
86 .PP
87 In
88 .IR \%ncurses ,
89 they return
90 .B ERR
91 if
92 .bP
93 either of the window pointers are null,
94 or
95 .bP
96 any part of the window would be placed off-screen.
97 .SH NOTES
98 .B \%overlay
99 and
100 .B \%overwrite
101 may be implemented as macros.
102 .SH PORTABILITY
103 X/Open Curses Issue\ 4 describes these functions.
104 It specifies no error conditions for them.
105 It adds
106 .I \%const
107 qualifiers to the arguments.
108 . \" TODO: migrate to HISTORY section
109 It further specifies their behavior in the presence of characters
110 with multibyte renditions (not yet supported in this implementation).
111 .\" XXX: stale? ncurses is fine with multibyte characters now, no?
112 .PP
113 SVr4 describes a successful return value only as
114 \*(``an integer value other than
115 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 522
116 .SH SEE ALSO
117 \fB\%ncurses\fP(3NCURSES),
118 \fB\%pad\fP(3NCURSES),
119 \fB\%refresh\fP(3NCURSES)