4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>newwin</B>, <B>delwin</B>, <B>mvwin</B>, <B>subwin</B>, <B>derwin</B>, <B>mvderwin</B>, <B>dupwin</B>,
9 <B>wsyncup</B>, <B>syncok</B>, <B>wcursyncup</B>, <B>wsyncdown</B> - create <B>curses</B>
14 <H2>SYNOPSIS</H2><PRE>
15 <B>#include</B> <B><curses.h></B>
17 <B>WINDOW</B> <B>*newwin(int</B> <B>nlines,</B> <B>int</B> <B>ncols,</B> <B>int</B> <B>begin_y,</B>
18 <B>int</B> <B>begin_x);</B>
19 <B>int</B> <B>delwin(WINDOW</B> <B>*win);</B>
20 <B>int</B> <B>mvwin(WINDOW</B> <B>*win,</B> <B>int</B> <B>y,</B> <B>int</B> <B>x);</B>
21 <B>WINDOW</B> <B>*subwin(WINDOW</B> <B>*orig,</B> <B>int</B> <B>nlines,</B> <B>int</B> <B>ncols,</B>
22 <B>int</B> <B>begin_y,</B> <B>int</B> <B>begin_x);</B>
23 <B>WINDOW</B> <B>*derwin(WINDOW</B> <B>*orig,</B> <B>int</B> <B>nlines,</B> <B>int</B> <B>ncols,</B>
24 <B>int</B> <B>begin_y,</B> <B>int</B> <B>begin_x);</B>
25 <B>int</B> <B>mvderwin(WINDOW</B> <B>*win,</B> <B>int</B> <B>par_y,</B> <B>int</B> <B>par_x);</B>
26 <B>WINDOW</B> <B>*dupwin(WINDOW</B> <B>*win);</B>
27 <B>void</B> <B>wsyncup(WINDOW</B> <B>*win);</B>
28 <B>int</B> <B>syncok(WINDOW</B> <B>*win,</B> <B>bool</B> <B>bf);</B>
29 <B>void</B> <B>wcursyncup(WINDOW</B> <B>*win);</B>
30 <B>void</B> <B>wsyncdown(WINDOW</B> <B>*win);</B>
34 <H2>DESCRIPTION</H2><PRE>
35 Calling <B>newwin</B> creates and returns a pointer to a new win-
36 dow with the given number of lines and columns. The upper
37 left-hand corner of the window is at line <I>begin</I>_<I>y</I>, column
38 <I>begin</I>_<I>x</I>. If either <I>nlines</I> or <I>ncols</I> is zero, they default
39 to <B>LINES</B> <B>-</B> <I>begin</I>_<I>y</I> and <B>COLS</B> <B>-</B> <I>begin</I>_<I>x</I>. A new full-screen
40 window is created by calling <B>newwin(0,0,0,0)</B>.
42 Calling <B>delwin</B> deletes the named window, freeing all mem-
43 ory associated with it (it does not actually erase the
44 window's screen image). Subwindows must be deleted before
45 the main window can be deleted.
47 Calling <B>mvwin</B> moves the window so that the upper left-hand
48 corner is at position (<I>x</I>, <I>y</I>). If the move would cause the
49 window to be off the screen, it is an error and the window
50 is not moved. Moving subwindows is allowed, but should be
53 Calling <B>subwin</B> creates and returns a pointer to a new win-
54 dow with the given number of lines, <I>nlines</I>, and columns,
55 <I>ncols</I>. The window is at position (<I>begin</I>_<I>y</I>, <I>begin</I>_<I>x</I>) on
56 the screen. (This position is relative to the screen, and
57 not to the window <I>orig</I>.) The window is made in the middle
58 of the window <I>orig</I>, so that changes made to one window
59 will affect both windows. The subwindow shares memory
60 with the window <I>orig</I>. When using this routine, it is nec-
61 essary to call <B>touchwin</B> or <B>touchline</B> on <I>orig</I> before call-
62 ing <B>wrefresh</B> on the subwindow.
64 Calling <B>derwin</B> is the same as calling <B>subwin,</B> except that
65 <I>begin</I>_<I>y</I> and <I>begin</I>_<I>x</I> are relative to the origin of the win-
66 dow <I>orig</I> rather than the screen. There is no difference
67 between the subwindows and the derived windows.
69 Calling <B>mvderwin</B> moves a derived window (or subwindow)
70 inside its parent window. The screen-relative parameters
71 of the window are not changed. This routine is used to
72 display different parts of the parent window at the same
73 physical position on the screen.
75 Calling <B>dupwin</B> creates an exact duplicate of the window
78 Calling <B>wsyncup</B> touches all locations in ancestors of <I>win</I>
79 that are changed in <I>win</I>. If <B>syncok</B> is called with second
80 argument <B>TRUE</B> then <B>wsyncup</B> is called automatically when-
81 ever there is a change in the window.
83 The <B>wsyncdown</B> routine touches each location in <I>win</I> that
84 has been touched in any of its ancestor windows. This
85 routine is called by <B>wrefresh</B>, so it should almost never
86 be necessary to call it manually.
88 The routine <B>wcursyncup</B> updates the current cursor position
89 of all the ancestors of the window to reflect the current
90 cursor position of the window.
94 <H2>RETURN VALUE</H2><PRE>
95 Routines that return an integer return the integer <B>ERR</B>
96 upon failure and <B>OK</B> (SVr4 only specifies "an integer value
97 other than <B>ERR</B>") upon successful completion.
99 <B>delwin</B> returns the integer <B>ERR</B> upon failure and <B>OK</B> upon
100 successful completion.
102 Routines that return pointers return <B>NULL</B> on error.
107 If many small changes are made to the window, the <B>wsyncup</B>
108 option could degrade performance.
110 Note that <B>syncok</B> may be a macro.
115 The subwindow functions (<I>subwin</I>, <I>derwin</I>, <I>mvderwin</I>, <B>wsyn-</B>
116 <B>cup</B>, <B>wsyncdown</B>, <B>wcursyncup</B>, <B>syncok</B>) are flaky, incom-
117 pletely implemented, and not well tested.
119 The System V curses documentation is very unclear about
120 what <B>wsyncup</B> and <B>wsyncdown</B> actually do. It seems to imply
121 that they are only supposed to touch exactly those lines
122 that are affected by ancestor changes. The language here,
123 and the behavior of the <B>curses</B> implementation, is pat-
124 terned on the XPG4 curses standard. The weaker XPG4 spec
125 may result in slower updates.
129 <H2>PORTABILITY</H2><PRE>
130 The XSI Curses standard, Issue 4 describes these func-
135 <H2>SEE ALSO</H2><PRE>
136 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></B>, <B><A HREF="curs_touch.3x.html">curs_touch(3x)</A></B>
186 Man(1) output converted with
187 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>