]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_overlay.3x
ncurses 5.9 - patch 20140712
[ncurses.git] / man / curs_overlay.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2010,2013 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_overlay.3x,v 1.17 2013/04/06 23:48:51 tom Exp $
30 .TH curs_overlay 3X ""
31 .na
32 .hy 0
33 .SH NAME
34 \fBoverlay\fR,
35 \fBoverwrite\fR,
36 \fBcopywin\fR \- overlay and manipulate overlapped \fBcurses\fR windows
37 .ad
38 .hy
39 .SH SYNOPSIS
40 \fB#include <curses.h>\fR
41 .sp
42 \fBint overlay(const WINDOW *srcwin, WINDOW *dstwin);\fR
43 .br
44 \fBint overwrite(const WINDOW *srcwin, WINDOW *dstwin);\fR
45 .br
46 \fBint copywin(const WINDOW *srcwin, WINDOW *dstwin, int sminrow,\fR
47       \fBint smincol, int dminrow, int dmincol, int dmaxrow,\fR
48       \fBint dmaxcol, int overlay);\fR
49 .SH DESCRIPTION
50 The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on
51 top of \fIdstwin\fR.
52 \fIscrwin\fR and \fIdstwin\fR are not required
53 to be the same size; only text where the two windows overlap is copied.
54 The difference is that \fBoverlay\fR is non-destructive
55 (blanks are not copied) whereas \fBoverwrite\fR is destructive.
56 .PP
57 The \fBcopywin\fR routine provides a finer granularity of control over the
58 \fBoverlay\fR and \fBoverwrite\fR routines.
59 As in the \fBprefresh\fR routine,
60 a rectangle is specified in the destination window, (\fIdminrow\fR,
61 \fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner
62 coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR).
63 If the argument \fIoverlay\fR is \fBtrue\fR,
64 then copying is non-destructive,
65 as in \fBoverlay\fR.
66 .SH RETURN VALUE
67 Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR
68 (SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
69 completion.
70 .PP
71 X/Open defines no error conditions.
72 In this implementation,
73 \fBcopywin\fP,
74 \fBoverlay\fP and \fBoverwrite\fP return an error
75 if either of the window pointers are null, or
76 if some part of the window would be placed off-screen.
77 .SH NOTES
78 Note that \fBoverlay\fR and \fBoverwrite\fR may be macros.
79 .SH PORTABILITY
80 The XSI Curses standard, Issue 4 describes these functions (adding the const
81 qualifiers).
82 It further specifies their behavior in the presence of characters
83 with multibyte renditions (not yet supported in this implementation).
84 .SH SEE ALSO
85 \fBcurses\fR(3X), \fBcurs_pad\fR(3X), \fBcurs_refresh\fR(3X)