Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2020-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 1998-2013,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 43 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 44 | \fB\%overlay\fP, |
| 45 | \fB\%overwrite\fP, |
| 46 | \fB\%copywin\fP \- |
| 47 | overlay \fIcurses\fR windows and manipulate them |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 48 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 49 | .nf |
| 50 | \fB#include <curses.h> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 51 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 52 | \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" |
| 60 | The \fBoverlay\fP and \fBoverwrite\fP routines overlay \fIsrcwin\fP on |
| 61 | top of \fIdstwin\fP. |
| 62 | \fIscrwin\fP and \fIdstwin\fP are not required |
| 63 | to be the same size; only text where the two windows overlap is copied. |
| 64 | The difference is that \fBoverlay\fP is non-destructive |
| 65 | (blanks are not copied) whereas \fBoverwrite\fP is destructive. |
| 66 | .SS copywin |
| 67 | The \fBcopywin\fP routine provides a finer granularity of control over the |
| 68 | \fBoverlay\fP and \fBoverwrite\fP routines. |
| 69 | As in the \fBprefresh\fP routine, |
| 70 | a rectangle is specified in the destination window, (\fIdminrow\fP, |
| 71 | \fIdmincol\fP) and (\fIdmaxrow\fP, \fIdmaxcol\fP), and the upper-left-corner |
| 72 | coordinates of the source window, (\fIsminrow\fP, \fIsmincol\fP). |
| 73 | If the argument \fIoverlay\fP is \fBtrue\fP, |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 74 | then copying is non-destructive, |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 75 | as in \fBoverlay\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 76 | .SH RETURN VALUE |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 77 | These routines return the integer \fBERR\fP upon failure and an \fBOK\fP |
| 78 | (SVr4 specifies only |
| 79 | \*(``an integer value other than \fBERR\fP\*('') |
| 80 | upon successful completion. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | .PP |
| 82 | X/Open defines no error conditions. |
| 83 | In this implementation, |
| 84 | \fBcopywin\fP, |
| 85 | \fBoverlay\fP and \fBoverwrite\fP return an error |
| 86 | if either of the window pointers are null, or |
| 87 | if some part of the window would be placed off-screen. |
| 88 | .SH NOTES |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 89 | Note that \fBoverlay\fP and \fBoverwrite\fP may be macros. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 90 | .SH PORTABILITY |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 91 | These functions are described in X/Open Curses, Issue 4, |
| 92 | which adds \fI\%const\fP qualifiers to the arguments. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 93 | It further specifies their behavior in the presence of characters |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 94 | with multibyte renditions (not yet supported in this implementation). |
| 95 | .SH SEE ALSO |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 96 | \fB\%curses\fP(3X), |
| 97 | \fB\%curs_pad\fP(3X), |
| 98 | \fB\%curs_refresh\fP(3X) |