]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_window.3x
ncurses 5.5
[ncurses.git] / man / curs_window.3x
index 9bd3facd818ae74fd987d9cf89a48f4684e9cbad..8c572995e9e439627e815b73e8347d60cb90c12a 100644 (file)
@@ -1,24 +1,64 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
+.\"                                                                          *
+.\" Permission is hereby granted, free of charge, to any person obtaining a  *
+.\" copy of this software and associated documentation files (the            *
+.\" "Software"), to deal in the Software without restriction, including      *
+.\" without limitation the rights to use, copy, modify, merge, publish,      *
+.\" distribute, distribute with modifications, sublicense, and/or sell       *
+.\" copies of the Software, and to permit persons to whom the Software is    *
+.\" furnished to do so, subject to the following conditions:                 *
+.\"                                                                          *
+.\" The above copyright notice and this permission notice shall be included  *
+.\" in all copies or substantial portions of the Software.                   *
+.\"                                                                          *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+.\"                                                                          *
+.\" Except as contained in this notice, the name(s) of the above copyright   *
+.\" holders shall not be used in advertising or otherwise to promote the     *
+.\" sale, use or other dealings in this Software without prior written       *
+.\" authorization.                                                           *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_window.3x,v 1.13 2005/05/15 16:32:02 tom Exp $
 .TH curs_window 3X ""
+.na
+.hy 0
 .SH NAME
-\fBnewwin\fR, \fBdelwin\fR, \fBmvwin\fR,
-\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, \fBdupwin\fR,
-\fBwsyncup\fR, \fBsyncok\fR, \fBwcursyncup\fR, \fBwsyncdown\fR -
-create \fBcurses\fR windows
+\fBnewwin\fR,
+\fBdelwin\fR,
+\fBmvwin\fR,
+\fBsubwin\fR,
+\fBderwin\fR,
+\fBmvderwin\fR,
+\fBdupwin\fR,
+\fBwsyncup\fR,
+\fBsyncok\fR,
+\fBwcursyncup\fR,
+\fBwsyncdown\fR - create \fBcurses\fR windows
+.ad
+.hy
 .SH SYNOPSIS
 \fB#include <curses.h>\fR
 
 \fBWINDOW *newwin(int nlines, int ncols, int begin_y,\fR
-      \fBintbegin_x);\fR
+      \fBint begin_x);\fR
 .br
 \fBint delwin(WINDOW *win);\fR
 .br
 \fBint mvwin(WINDOW *win, int y, int x);\fR
 .br
-\fBWINDOW *subwin(WINDOW *orig, int nlines, int ncols,
-      int begin_y, int begin_x);\fR
+\fBWINDOW *subwin(WINDOW *orig, int nlines, int ncols,\fR
+      \fBint begin_y, int begin_x);\fR
 .br
-\fBWINDOW *derwin(WINDOW *orig, int nlines, int ncols,
-      int begin_y, int begin_x);\fR
+\fBWINDOW *derwin(WINDOW *orig, int nlines, int ncols,\fR
+      \fBint begin_y, int begin_x);\fR
 .br
 \fBint mvderwin(WINDOW *win, int par_y, int par_x);\fR
 .br
@@ -90,11 +130,36 @@ window.
 Routines that return an integer return the integer \fBERR\fR upon failure and
 \fBOK\fR (SVr4 only specifies "an integer value other than \fBERR\fR") upon
 successful completion.
-
-\fBdelwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR
-upon successful completion.
-
+.PP
 Routines that return pointers return \fBNULL\fR on error.
+.PP
+X/Open defines no error conditions.
+In this implementation
+.RS
+.TP 5
+\fBdelwin\fR
+returns an error if the window pointer is null, or
+if the window is the parent of another window.
+.IP
+This implementation also maintains a list of windows,
+and checks that the pointer passed to \fBdelwin\fP is one that
+it created, returning an error if it was not..
+.TP 5
+\fBmvderwin\fP
+returns an error
+if the window pointer is null, or
+if some part of the window would be placed off-screen.
+.TP 5
+\fBmvwin\fP
+returns an error
+if the window pointer is null, or
+if the window is really a pad, or
+if some part of the window would be placed off-screen.
+.TP 5
+\fBsyncok\fP
+returns an error
+if the window pointer is null.
+.RE
 .SH NOTES
 If many small changes are made to the window, the \fBwsyncup\fR option could
 degrade performance.
@@ -106,7 +171,7 @@ The subwindow functions (\fIsubwin\fR, \fIderwin\fR, \fImvderwin\fR,
 incompletely implemented, and not well tested.
 
 The System V curses documentation is very unclear about what \fBwsyncup\fR
-and \fBwsyncdown\fR actually do.  It seems to imply that they are only 
+and \fBwsyncdown\fR actually do.  It seems to imply that they are only
 supposed to touch exactly those lines that are affected by ancestor changes.
 The language here, and the behavior of the \fBcurses\fR implementation,
 is patterned on the XPG4 curses standard.  The weaker XPG4 spec may result