HP-UX Reference (11i v2 03/08) - 3 Library Functions A-M (vol 6)
d
derwin(3X) derwin(3X)
(CURSES)
NAME
derwin - relative window creation function
SYNOPSIS
#include <curses.h>
WINDOW *derwin(WINDOW *orig, int nlines, int ncols, int begin_y,
int begin_x);
DESCRIPTION
The derwin() function creates a new window with nlines lines and ncols columns, positioned so that
the origin is at (begin_y, begin_x) relative to the origin of the window orig. If any part of the new window
is outside orig, the function fails and the window is not created.
RETURN VALUE
Upon successful completion, these functions return a pointer to the new window. Otherwise, they return
a null pointer.
ERRORS
No errors are defined.
APPLICATION USAGE
Before performing the first refresh of a subwindow, portable applications should call
touchwin() or
touchline() on the parent window.
Each window maintains internal descriptions of the screen image and status. The screen image is shared
among all windows in the window hierarchy. Refresh operations rely on information on what has
changed within a window, which is private to each window. Refreshing a window, when updates were
made to a different window, may fail to perform needed updates because the windows do not share this
information.
SEE ALSO
delwin(3X), newwin(3X), is_linetouched(3X), doupdate(3X), <curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 4.
HP-UX 11i Version 2: August 2003 − 1 − Hewlett-Packard Company Section 3−−181