NAME
nneewwwwiinn, ddeellwwiinn, mmvvwwiinn, ssuubbwwiinn, ddeerrwwiinn, mmvvddeerrwwiinn, dduuppwwiinn, wwssyynnccuupp,ssyynnccookk, wwccuurrssyynnccuupp, wwssyynnccddoowwnn - create ccuurrsseess windows
SYNOPSIS
##iinncclluuddee <
WWIINNDDOOWW **nneewwwwiinn((iinntt nnlliinneess,, iinntt nnccoollss,, iinntt bbeeggiinnyy,, iinntt bbeeggiinnxx));; iinntt ddeellwwiinn((WWIINNDDOOWW **wwiinn));; iinntt mmvvwwiinn((WWIINNDDOOWW **wwiinn,, iinntt yy,, iinntt xx));; WWIINNDDOOWW **ssuubbwwiinn((WWIINNDDOOWW **oorriigg,, iinntt nnlliinneess,, iinntt nnccoollss,, iinntt bbeeggiinnyy,, iinntt bbeeggiinnxx));; WWIINNDDOOWW **ddeerrwwiinn((WWIINNDDOOWW **oorriigg,, iinntt nnlliinneess,, iinntt nnccoollss,, iinntt bbeeggiinnyy,, iinntt bbeeggiinnxx));; iinntt mmvvddeerrwwiinn((WWIINNDDOOWW **wwiinn,, iinntt ppaarryy,, iinntt ppaarrxx));; WWIINNDDOOWW **dduuppwwiinn((WWIINNDDOOWW **wwiinn));; vvooiidd wwssyynnccuupp((WWIINNDDOOWW **wwiinn));; iinntt ssyynnccookk((WWIINNDDOOWW **wwiinn,, bbooooll bbff));; vvooiidd wwccuurrssyynnccuupp((WWIINNDDOOWW **wwiinn));; vvooiidd wwssyynnccddoowwnn((WWIINNDDOOWW **wwiinn));;> DESCRIPTION
Calling nneewwwwiinn creates and returns a pointer to a new window with thegiven number of lines and columns. The upper left-hand corner of the
window is at line beginy, column beginx. If either nlines or ncolsis zero, they default to LLIINNEESS - beginy and CCOOLLSS - beginx. A new
full-screen window is created by calling nneewwwwiinn((00,,00,,00,,00)).
Calling ddeellwwiinn deletes the named window, freeing all memory associatedwith it (it does not actually erase the window's screen image). Sub-
windows must be deleted before the main window can be deleted.Calling mmvvwwiinn moves the window so that the upper left-hand corner is at
position (x, y). If the move would cause the window to be off the screen, it is an error and the window is not moved. Moving subwindows is allowed, but should be avoided. Calling ssuubbwwiinn creates and returns a pointer to a new window with the given number of lines, nlines, and columns, ncols. The window is at position (beginy, beginx) on the screen. (This position is relative to the screen, and not to the window orig.) The window is made in themiddle of the window orig, so that changes made to one window will af-
fect both windows. The subwindow shares memory with the window orig. When using this routine, it is necessary to call ttoouucchhwwiinn or ttoouucchhlliinnee on orig before calling wwrreeffrreesshh on the subwindow. Calling ddeerrwwiinn is the same as calling ssuubbwwiinn,, except that beginy and beginx are relative to the origin of the window orig rather than the screen. There is no difference between the subwindows and the derived windows.Calling mmvvddeerrwwiinn moves a derived window (or subwindow) inside its par-
ent window. The screen-relative parameters of the window are not
changed. This routine is used to display different parts of the parent window at the same physical position on the screen. Calling dduuppwwiinn creates an exact duplicate of the window win. Calling wwssyynnccuupp touches all locations in ancestors of win that are changed in win. If ssyynnccookk is called with second argument TTRRUUEE thenwwssyynnccuupp is called automatically whenever there is a change in the win-
dow. The wwssyynnccddoowwnn routine touches each location in win that has beentouched in any of its ancestor windows. This routine is called by wwrree-
ffrreesshh, so it should almost never be necessary to call it manually. The routine wwccuurrssyynnccuupp updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. RREETTUURRNN VVAALLUUEE Routines that return an integer return the integer EERRRR upon failure andOOKK (SVr4 only specifies "an integer value other than EERRRR") upon suc-
cessful completion. Routines that return pointers return NNUULLLL on error. X/Open defines no error conditions. In this implementation ddeellwwiinn returns an error if the window pointer is null, or if the window is the parent of another window. This implementation also maintains a list of windows, and checks that the pointer passed to ddeellwwiinn is one that it created, returning an error if it was not.. mmvvddeerrwwiinn returns an error if the window pointer is null, or if somepart of the window would be placed off-screen.
mmvvwwiinn returns an error if the window pointer is null, or if the window is really a pad, or if some part of the window wouldbe placed off-screen.
ssyynnccookk returns an error if the window pointer is null. NNOOTTEESS If many small changes are made to the window, the wwssyynnccuupp option could degrade performance. Note that ssyynnccookk may be a macro.BUGS
The subwindow functions (subwin, derwin, mvderwin, wwssyynnccuupp, wwssyynnccddoowwnn,
wwccuurrssyynnccuupp, ssyynnccookk) are flaky, incompletely implemented, and not well tested. The System V curses documentation is very unclear about what wwssyynnccuuppand wwssyynnccddoowwnn actually do. It seems to imply that they are only sup-
posed to touch exactly those lines that are affected by ancestorchanges. The language here, and the behavior of the ccuurrsseess implementa-
tion, is patterned on the XPG4 curses standard. The weaker XPG4 spec may result in slower updates. PPOORRTTAABBIILLIITTYY The XSI Curses standard, Issue 4 describes these functions.SEE ALSO
ccuurrsseess(3X), ccuurrssrreeffrreesshh(3X), ccuurrssttoouucchh(3X) curswindow(3X)