]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_overlay.3x
ncurses 6.2 - patch 20210323
[ncurses.git] / man / curs_overlay.3x
1 .\"***************************************************************************
2 .\" Copyright 2020 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.19 2020/02/02 23:34:34 tom Exp $
31 .TH curs_overlay 3X ""
32 .na
33 .hy 0
34 .SH NAME
35 \fBoverlay\fR,
36 \fBoverwrite\fR,
37 \fBcopywin\fR \- overlay and manipulate overlapped \fBcurses\fR windows
38 .ad
39 .hy
40 .SH SYNOPSIS
41 \fB#include <curses.h>\fR
42 .sp
43 \fBint overlay(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fR
44 .br
45 \fBint overwrite(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fR
46 .br
47 \fBint copywin(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB, int \fP\fIsminrow\fP\fB,\fR
48       \fBint \fP\fIsmincol\fP\fB, int \fP\fIdminrow\fP\fB, int \fP\fIdmincol\fP\fB, int \fP\fIdmaxrow\fP\fB,\fR
49       \fBint \fP\fIdmaxcol\fP\fB, int \fP\fIoverlay\fP\fB);\fR
50 .SH DESCRIPTION
51 .SS overlay, overwrite
52 The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on
53 top of \fIdstwin\fR.
54 \fIscrwin\fR and \fIdstwin\fR are not required
55 to be the same size; only text where the two windows overlap is copied.
56 The difference is that \fBoverlay\fR is non-destructive
57 (blanks are not copied) whereas \fBoverwrite\fR is destructive.
58 .SS copywin
59 .PP
60 The \fBcopywin\fR routine provides a finer granularity of control over the
61 \fBoverlay\fR and \fBoverwrite\fR routines.
62 As in the \fBprefresh\fR routine,
63 a rectangle is specified in the destination window, (\fIdminrow\fR,
64 \fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner
65 coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR).
66 If the argument \fIoverlay\fR is \fBtrue\fR,
67 then copying is non-destructive,
68 as in \fBoverlay\fR.
69 .SH RETURN VALUE
70 Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR
71 (SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
72 completion.
73 .PP
74 X/Open defines no error conditions.
75 In this implementation,
76 \fBcopywin\fP,
77 \fBoverlay\fP and \fBoverwrite\fP return an error
78 if either of the window pointers are null, or
79 if some part of the window would be placed off-screen.
80 .SH NOTES
81 Note that \fBoverlay\fR and \fBoverwrite\fR may be macros.
82 .SH PORTABILITY
83 The XSI Curses standard, Issue 4 describes these functions (adding the const
84 qualifiers).
85 It further specifies their behavior in the presence of characters
86 with multibyte renditions (not yet supported in this implementation).
87 .SH SEE ALSO
88 \fBcurses\fR(3X), \fBcurs_pad\fR(3X), \fBcurs_refresh\fR(3X)