DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

derwin(3curses)


derwin -- window creation functions

Synopsis

cc [options] file -lcurses
#include <curses.h>

WINDOW *derwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x);

WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x);

WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x);

Description

The derwin(3curses) function is the same as subwin(3curses), except that begin_y and begin_x are relative to the origin of the window orig rather than absolute screen positions.

The newwin(3curses) function creates a new window with nlines lines and ncols columns, positioned so that the origin is (begin_y, begin_x). If nlines is zero, it defaults to LINES - begin_y; if ncols is zero, it defaults to COLS - begin_x.

The subwin(3curses) function creates a new window with nlines lines and ncols columns, positioned so that the origin is at (begin_y, begin_x). (This position is an absolute screen position, not a position relative to 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.

Usage

Before performing the first refresh of a subwindow, portable applications should call touchwin(3curses) or touchline(3curses) 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.

A new full-screen window is created by calling:

   newwin(0, 0, 0, 0);

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

delwin(3curses), is_linetouched(3curses), doupdate(3curses), curses(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004