blob: 2d4eb729bc22bfcaf199c2fc433a1cbc486d041d [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2020-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2013,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
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.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: curs_overlay.3x,v 1.43 2024/04/20 21:20:07 tom Exp $
31.TH curs_overlay 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "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.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053043.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040044\fB\%overlay\fP,
45\fB\%overwrite\fP,
46\fB\%copywin\fP \-
47overlay \fIcurses\fR windows and manipulate them
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040049.nf
50\fB#include <curses.h>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053051.PP
micky3879b9f5e72025-07-08 18:04:53 -040052\fBint overlay(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP);
53\fBint overwrite(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP);
54\fBint copywin(const WINDOW *\fIsrcwin\fP, WINDOW *\fIdstwin\fP, int \fIsminrow\fP,
55 \fBint \fIsmincol\fB, int \fIdminrow\fB, int \fIdmincol\fB, int \fIdmaxrow\fB,\fR
56 \fBint \fIdmaxcol\fB, int \fIoverlay\fB);\fR
57.fi
58.SH DESCRIPTION
59.SS "overlay, overwrite"
60The \fBoverlay\fP and \fBoverwrite\fP routines overlay \fIsrcwin\fP on
61top of \fIdstwin\fP.
62\fIscrwin\fP and \fIdstwin\fP are not required
63to be the same size; only text where the two windows overlap is copied.
64The difference is that \fBoverlay\fP is non-destructive
65(blanks are not copied) whereas \fBoverwrite\fP is destructive.
66.SS copywin
67The \fBcopywin\fP routine provides a finer granularity of control over the
68\fBoverlay\fP and \fBoverwrite\fP routines.
69As in the \fBprefresh\fP routine,
70a rectangle is specified in the destination window, (\fIdminrow\fP,
71\fIdmincol\fP) and (\fIdmaxrow\fP, \fIdmaxcol\fP), and the upper-left-corner
72coordinates of the source window, (\fIsminrow\fP, \fIsmincol\fP).
73If the argument \fIoverlay\fP is \fBtrue\fP,
Steve Kondikae271bc2015-11-15 02:50:53 +010074then copying is non-destructive,
micky3879b9f5e72025-07-08 18:04:53 -040075as in \fBoverlay\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053076.SH RETURN VALUE
micky3879b9f5e72025-07-08 18:04:53 -040077These routines return the integer \fBERR\fP upon failure and an \fBOK\fP
78(SVr4 specifies only
79\*(``an integer value other than \fBERR\fP\*('')
80upon successful completion.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081.PP
82X/Open defines no error conditions.
83In this implementation,
84\fBcopywin\fP,
85\fBoverlay\fP and \fBoverwrite\fP return an error
86if either of the window pointers are null, or
87if some part of the window would be placed off-screen.
88.SH NOTES
micky3879b9f5e72025-07-08 18:04:53 -040089Note that \fBoverlay\fP and \fBoverwrite\fP may be macros.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053090.SH PORTABILITY
micky3879b9f5e72025-07-08 18:04:53 -040091These functions are described in X/Open Curses, Issue 4,
92which adds \fI\%const\fP qualifiers to the arguments.
Steve Kondikae271bc2015-11-15 02:50:53 +010093It further specifies their behavior in the presence of characters
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053094with multibyte renditions (not yet supported in this implementation).
95.SH SEE ALSO
micky3879b9f5e72025-07-08 18:04:53 -040096\fB\%curses\fP(3X),
97\fB\%curs_pad\fP(3X),
98\fB\%curs_refresh\fP(3X)