]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_window.3x
ncurses 6.5 - patch 20240525
[ncurses.git] / man / curs_window.3x
index a4cc25242216c53ab5fc7b201e41c5d1cb70f01c..149db81e9396f775455e875eaa172329a0f96412 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2020-2022,2023 Thomas E. Dickey                                *
+.\" Copyright 2020-2023,2024 Thomas E. Dickey                                *
 .\" Copyright 1998-2015,2016 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_window.3x,v 1.43 2023/11/25 14:17:29 tom Exp $
-.TH curs_window 3X 2023-11-25 "ncurses 6.4" "Library calls"
-.de bP
-.ie n  .IP \(bu 4
-.el    .IP \(bu 2
-..
+.\" $Id: curs_window.3x,v 1.50 2024/05/25 20:43:47 tom Exp $
+.TH curs_window 3X 2024-05-25 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
 .SH NAME
 \fB\%newwin\fP,
 \fB\%delwin\fP,
@@ -173,28 +169,36 @@ X/Open defines no error conditions.
 In this implementation
 .TP 5
 \fBdelwin\fP
-returns an error if the window pointer is null, or
+returns
+.B ERR
+if the window pointer is null, or
 if the window is the parent of another window.
 .TP 5
 \fBderwin\fP
-returns an error if the parent window pointer is null, or
+returns
+.B ERR
+if the parent window pointer is null, or
 if any of its ordinates or dimensions is negative, or
 if the resulting window does not fit inside the parent window.
 .TP 5
 \fBdupwin\fP
-returns an error if the window pointer is null.
+returns
+.B ERR
+if the window pointer is null.
 .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
+returns
+.B ERR
 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
+returns
+.B ERR
 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.
@@ -204,11 +208,14 @@ will fail if either of its beginning ordinates is negative, or
 if either the number of lines or columns is negative.
 .TP 5
 \fBsyncok\fP
-returns an error
+returns
+.B ERR
 if the window pointer is null.
 .TP 5
 \fBsubwin\fP
-returns an error if the parent window pointer is null, or
+returns
+.B ERR
+if the parent window pointer is null, or
 if any of its ordinates or dimensions is negative, or
 if the resulting window does not fit inside the parent window.
 .PP
@@ -222,45 +229,55 @@ degrade performance.
 .PP
 Note that \fBsyncok\fP may be a macro.
 .SH PORTABILITY
-The XSI Curses standard, Issue 4 describes these functions.
+X/Open Curses, Issue 4 describes these functions.
 .PP
-X/Open Curses states regarding \fBdelwin\fP:
-.bP
-It must delete subwindows before deleting their parent.
-.bP
-If \fBdelwin\fP is asked to delete a parent window,
-it can only succeed if the curses library keeps a list of the subwindows.
-SVr4 curses kept a count of the number of subwindows rather than a list.
-It simply returned \fBERR\fP when asked to delete a subwindow.
-Solaris X/Open curses does not even make that check,
-and will delete a parent window which still has subwindows.
-.bP
-Since release 4.0 (1996), ncurses maintains a list of windows for each screen,
-to ensure that a window has no subwindows before allowing deletion.
-.bP
-NetBSD copied this feature of ncurses in 2003.
-.br
-PDCurses follows the scheme used in Solaris X/Open curses.
-.SH BUGS
-The subwindow functions
-\fB\%subwin\fP,
-\fB\%derwin\fP,
-\fB\%mvderwin\fP,
-\fB\%wsyncup\fP,
-\fB\%wsyncdown\fP,
-\fB\%wcursyncup\fP,
-and
-\fB\%syncok\fP
-are flaky,
-incompletely implemented,
-and not well tested.
+Regarding
+.IR \%delwin ","
+X/Open Curses states that
+.RS
+.PP
+[t]he application must delete subwindows before deleting the main
+window.
+.RE
+.PP
+If
+.I \%delwin
+is asked to delete a parent window,
+it can succeed only if the
+.I curses
+library keeps a list of its subwindows.
+SVr4
+.I curses
+kept a count of the number of subwindows rather than a list.
+It simply returned
+.B ERR
+when asked to delete a subwindow.
+Solaris X/Open
+.I curses
+.RI ( \%xcurses )
+does not make even that check,
+and will delete a parent window that still has subwindows.
+.I \%PDCurses
+also behaves this way.
 .PP
-System\ V's \fIcurses\fP documentation is unclear about what
-\fB\%wsyncup\fP and \fB\%wsyncdown\fP actually do.
+.I \%ncurses
+4.0 (1996) and later maintains a list of windows for each screen
+to ensure that a window has no subwindows before allowing its deletion.
+NetBSD
+.I curses
+has followed suit since 2003.
+.PP
+SVr4
+.I curses
+documentation is unclear about what
+.I \%wsyncup
+and
+.I \%wsyncdown
+actually do.
 It seems to imply that they are supposed to touch only those lines that
 are affected by changes to a window's ancestors.
-The language here,
-and behavior of \fI\%ncurses\fP,
+The description and behavior of these functions in
+.I \%ncurses
 is patterned on the X/Open Curses standard;
 this approach may result in slower updates.
 .SH SEE ALSO