]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_window.3x
ncurses 6.4 - patch 20240420
[ncurses.git] / man / curs_window.3x
index 8215a066cd3635f9a9423e82cc4861cd2a99d17c..d3d55c751444f4374467463a135250ddbee449e3 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.32 2023/07/01 15:46:10 tom Exp $
-.TH curs_window 3X 2023-07-01 "ncurses 6.4" "Library calls"
+.\" $Id: curs_window.3x,v 1.48 2024/04/20 21:20:07 tom Exp $
+.TH curs_window 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
 ..
-.na
-.hy 0
 .SH NAME
-\fBnewwin\fP,
-\fBdelwin\fP,
-\fBmvwin\fP,
-\fBsubwin\fP,
-\fBderwin\fP,
-\fBmvderwin\fP,
-\fBdupwin\fP,
-\fBwsyncup\fP,
-\fBsyncok\fP,
-\fBwcursyncup\fP,
-\fBwsyncdown\fP \- create \fBcurses\fP windows
-.ad
-.hy
+\fB\%newwin\fP,
+\fB\%delwin\fP,
+\fB\%mvwin\fP,
+\fB\%subwin\fP,
+\fB\%derwin\fP,
+\fB\%mvderwin\fP,
+\fB\%dupwin\fP,
+\fB\%wsyncup\fP,
+\fB\%syncok\fP,
+\fB\%wcursyncup\fP,
+\fB\%wsyncdown\fP \-
+create and manipulate \fIcurses\fR windows
 .SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBWINDOW *newwin(\fP
+.nf
+\fB#include <curses.h>
+.PP
+\fBWINDOW *newwin(
       \fBint \fInlines\fB, int \fIncols\fB,\fR
       \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR
-.br
 \fBint delwin(WINDOW *\fIwin\fB);\fR
-.br
 \fBint mvwin(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBWINDOW *subwin(WINDOW *\fIorig\fB,\fR
       \fBint \fInlines\fB, int \fIncols\fB,\fR
       \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR
-.br
 \fBWINDOW *derwin(WINDOW *\fIorig\fB,\fR
       \fBint \fInlines\fB, int \fIncols\fB,\fR
       \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR
-.br
 \fBint mvderwin(WINDOW *\fIwin\fB, int \fIpar_y\fB, int \fIpar_x\fB);\fR
-.br
 \fBWINDOW *dupwin(WINDOW *\fIwin\fB);\fR
-.br
 \fBvoid wsyncup(WINDOW *\fIwin\fB);\fR
-.br
 \fBint syncok(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBvoid wcursyncup(WINDOW *\fIwin\fB);\fR
-.br
 \fBvoid wsyncdown(WINDOW *\fIwin\fB);\fR
+.fi
 .SH DESCRIPTION
 .SS newwin
 Calling \fBnewwin\fP creates and returns a pointer to a new window with the
@@ -107,22 +96,20 @@ rather than a duplicate (with \fBdupwin\fP),
 all of the window modes are initialized to the default values.
 These functions set window modes after a window is created:
 .RS
-.na
 .PP
-idcok,
-idlok,
-immedok,
-keypad,
-leaveok,
-nodelay,
-scrollok,
-setscrreg,
-syncok,
-wbkgdset,
-wbkgrndset, and
-wtimeout
+\fB\%idcok\fP
+\fB\%idlok\fP
+\fB\%immedok\fP
+\fB\%keypad\fP
+\fB\%leaveok\fP
+\fB\%nodelay\fP
+\fB\%scrollok\fP
+\fB\%setscrreg\fP
+\fB\%syncok\fP
+\fB\%wbkgdset\fP
+\fB\%wbkgrndset\fP and
+\fB\%wtimeout\fP.
 .RE
-.ad
 .SS delwin
 Calling \fBdelwin\fP deletes the named window, freeing all memory
 associated with it (it does not actually erase the window's screen
@@ -140,6 +127,7 @@ with the given number of lines, \fInlines\fP, and columns, \fIncols\fP.
 The window is at position (\fIbegin\fR_\fIy\fP,
 \fIbegin\fR_\fIx\fP) on the screen.
 The subwindow shares memory with the window \fIorig\fP,
+its \fIancestor\fP,
 so that changes made to one window
 will affect both windows.
 When using this routine, it is necessary to call
@@ -150,7 +138,7 @@ Calling \fBderwin\fP is the same as calling \fBsubwin,\fP except that
 \fIbegin\fR_\fIy\fP and \fIbegin\fR_\fIx\fP are relative to the origin
 of the window \fIorig\fP rather than the screen.
 There is no difference between the subwindows and the derived windows.
-.PP
+.SS mvderwin
 Calling \fBmvderwin\fP moves a derived window (or subwindow)
 inside its parent window.
 The screen-relative parameters of the window are not changed.
@@ -233,20 +221,8 @@ If many small changes are made to the window, the \fBwsyncup\fP option could
 degrade performance.
 .PP
 Note that \fBsyncok\fP may be a macro.
-.SH BUGS
-The subwindow functions (\fBsubwin\fP, \fBderwin\fP, \fBmvderwin\fP,
-\fBwsyncup\fP, \fBwsyncdown\fP, \fBwcursyncup\fP, \fBsyncok\fP) are flaky,
-incompletely implemented, and not well tested.
-.PP
-The System V curses documentation is very unclear about what \fBwsyncup\fP
-and \fBwsyncdown\fP 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\fP implementation,
-is patterned on the XPG4 curses standard.
-The weaker XPG4 spec may result in slower updates.
 .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
@@ -259,15 +235,38 @@ 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,
+Since release 4.0 (1996),
+\fI\%ncurses\fP 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.
+NetBSD copied this feature of \fI\%ncurses\fP 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.
+.PP
+System\ V's \fIcurses\fP documentation is unclear about what
+\fB\%wsyncup\fP and \fB\%wsyncdown\fP 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,
+is patterned on the X/Open Curses standard;
+this approach may result in slower updates.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_touch\fP(3X),
-\fBcurs_variables\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_touch\fP(3X),
+\fB\%curs_variables\fP(3X)