#include <curses.h>
int copywin(const WINDOW *scrwin,
WINDOW *dstwin,
int sminrow,
int smincol,
int dminrow,
int dmincol,
int dmaxrow,
int dmaxcol,
int overlay);
The copywin subroutine provides a finer granularity of control over the overlay and overwrite subroutines. As in the prefresh subroutine, a rectangle is specified in the destination window, (dimrow, dimincol) and (dmaxrow, dmaxcol), and the upper-left-corner coordinates of the source window, (sminrow, smincol). If the overlay subroutine is TRUE, then copying is non-destructive, as in the overlay subroutine. If the overlay subroutine is FALSE, then copying is destructive, as in the overwrite subroutine.
Upon successful completion, the copywin subroutine returns OK. Otherwise, it returns ERR.
To copy to an area in the destination window defined by coordinates (30,40), (30,49), (39,40), and (39,49) beginning with coordinates (0,0) in the source window, enter the following:
WINDOW *srcwin, *dstwin; copywin(srcwin, dstwin, 0, 0, 30,40, 39, 49, TRUE);
The example copies ten rows and ten columns from the source window beginning with coordinates (0,0) to the region in the destination window defined by the upper left coordinates (30, 40) and lower right coordinates (39, 49). Because the Overlay parameter is set to TRUE, the copy is nondestructive and blanks from the source window are not copied.
This routine is part of Base Operating System (BOS) Runtime.
The newpad (newpad, pnoutrefresh, prefresh, or subpad Subroutine) and overlay or overwrite (overlay or overwrite Subroutine) subroutines.
Curses Overview for Programming, Manipulating Window Data with Curses Manipulating Characters with Curses, List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs