


curs_window(3X)                                   curs_window(3X)


NNAAMMEE
       ccuurrss__wwiinnddooww: nneewwwwiinn, ddeellwwiinn, mmvvwwiinn, ssuubbwwiinn, ddeerrwwiinn, mmvvddeerr--
       wwiinn, dduuppwwiinn, wwssyynnccuupp, ssyynnccookk, wwccuurrssyynnccuupp, wwssyynnccddoowwnn - cre-
       ate ccuurrsseess windows

SSYYNNOOPPSSIISS
       ##iinncclluuddee <<ccuurrsseess..hh>>

       WWIINNDDOOWW **nneewwwwiinn((iinntt nnlliinneess,, iinntt nnccoollss,, iinntt bbeeggiinn__yy,,
             iinnttbbeeggiinn__xx));;
       iinntt ddeellwwiinn((WWIINNDDOOWW **wwiinn));;
       iinntt mmvvwwiinn((WWIINNDDOOWW **wwiinn,, iinntt yy,, iinntt xx));;
       WWIINNDDOOWW **ssuubbwwiinn((WWIINNDDOOWW **oorriigg,, iinntt nnlliinneess,, iinntt nnccoollss,,
             iinntt bbeeggiinn__yy,, iinntt bbeeggiinn__xx));;
       WWIINNDDOOWW **ddeerrwwiinn((WWIINNDDOOWW **oorriigg,, iinntt nnlliinneess,, iinntt nnccoollss,,
             iinntt bbeeggiinn__yy,, iinntt bbeeggiinn__xx));;
       iinntt mmvvddeerrwwiinn((WWIINNDDOOWW **wwiinn,, iinntt ppaarr__yy,, iinntt ppaarr__xx));;
       WWIINNDDOOWW **dduuppwwiinn((WWIINNDDOOWW **wwiinn));;
       vvooiidd wwssyynnccuupp((WWIINNDDOOWW **wwiinn));;
       iinntt ssyynnccookk((WWIINNDDOOWW **wwiinn,, bbooooll bbff));;
       vvooiidd wwccuurrssyynnccuupp((WWIINNDDOOWW **wwiinn));;
       vvooiidd wwssyynnccddoowwnn((WWIINNDDOOWW **wwiinn));;

DDEESSCCRRIIPPTTIIOONN
       Calling nneewwwwiinn creates and returns a pointer to a new win-
       dow with the given number of lines and columns.  The upper
       left-hand  corner of the window is at line _b_e_g_i_n__y, column
       _b_e_g_i_n__x.  If either _n_l_i_n_e_s or _n_c_o_l_s is zero, they  default
       to  LLIINNEESS -- _b_e_g_i_n__y and CCOOLLSS -- _b_e_g_i_n__x.  A new full-screen
       window is created by calling nneewwwwiinn((00,,00,,00,,00)).

       Calling ddeellwwiinn deletes the named window, freeing all  mem-
       ory  associated  with  it  (it does not actually erase the
       window's screen image).  Subwindows must be deleted before
       the main window can be deleted.

       Calling mmvvwwiinn 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 ssuubbwwiinn creates and returns a pointer to a new win-
       dow with the given number of lines, _n_l_i_n_e_s,  and  columns,
       _n_c_o_l_s.   The  window  is at position (_b_e_g_i_n__y, _b_e_g_i_n__x) on
       the screen.  (This position is relative to the screen, and
       not to the window _o_r_i_g.)  The window is made in the middle
       of the window _o_r_i_g, so that changes  made  to  one  window
       will  affect  both  windows.   The subwindow shares memory
       with the window _o_r_i_g.  When using this routine, it is nec-
       essary  to call ttoouucchhwwiinn or ttoouucchhlliinnee on _o_r_i_g before call-
       ing wwrreeffrreesshh on the subwindow.

       Calling ddeerrwwiinn is the same as calling ssuubbwwiinn,, except  that



                                                                1





curs_window(3X)                                   curs_window(3X)


       _b_e_g_i_n__y and _b_e_g_i_n__x are relative to the origin of the win-
       dow _o_r_i_g rather than the screen.  There is  no  difference
       between the subwindows and the derived windows.

       Calling  mmvvddeerrwwiinn  moves  a  derived window (or subwindow)
       inside its parent 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  dduuppwwiinn  creates  an exact duplicate of the window
       _w_i_n.

       Calling wwssyynnccuupp touches all ancestors of _w_i_n.   If  ssyynnccookk
       is called with second argument TTRRUUEE then wwssyynnccuupp is called
       automatically whenever there is a change in the window.

       The wwssyynnccddoowwnn routine touches _w_i_n if any of  its  ancestor
       windows have been touched.  This routine is called by wwrree--
       ffrreesshh, so it should almost never be necessary to  call  it
       manually.

       The routine wwccuurrssyynnccuupp updates the current cursor position
       of all the ancestors of the window to reflect the  current
       cursor position of the window.

RREETTUURRNN VVAALLUUEE
       Routines  that  return  an  integer return the integer EERRRR
       upon failure and OOKK (SVr4 only specifies "an integer value
       other than EERRRR") upon successful completion.

       ddeellwwiinn  returns  the  integer EERRRR upon failure and OOKK upon
       successful completion.

       Routines that return pointers return NNUULLLL on error.

NNOOTTEESS
       If many small changes are made to the window, the  wwssyynnccuupp
       option could degrade performance.

       Note that ssyynnccookk may be a macro.

BBUUGGSS
       The  subwindow  functions (_s_u_b_w_i_n, _d_e_r_w_i_n, _m_v_d_e_r_w_i_n, wwssyynn--
       ccuupp, wwssyynnccddoowwnn,  wwccuurrssyynnccuupp,  ssyynnccookk)  are  flaky,  incom-
       pletely implemented, and not well tested.

       The  System  V  curses documentation is very unclear about
       what wwssyynnccuupp and wwssyynnccddoowwnn 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 ccuurrsseess implementation, is pat-
       terned on the XPG4 curses standard.  The weaker XPG4  spec
       may result in slower updates.



                                                                2





curs_window(3X)                                   curs_window(3X)


PPOORRTTAABBIILLIITTYY
       The  XSI  Curses  standard,  Issue 4 describes these func-
       tions.

SSEEEE AALLSSOO
       ccuurrsseess(3X), ccuurrss__rreeffrreesshh(3X), ccuurrss__ttoouucchh(3X)



















































                                                                3


