


curs_refresh(3X)                                 curs_refresh(3X)


NNAAMMEE
       ccuurrss__rreeffrreesshh:  rreeffrreesshh,  wwrreeffrreesshh, wwnnoouuttrreeffrreesshh, ddoouuppddaattee,
       rreeddrraawwwwiinn, wwrreeddrraawwllnn - refresh ccuurrsseess windows and lines

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>>

       iinntt rreeffrreesshh((vvooiidd));;
       iinntt wwrreeffrreesshh((WWIINNDDOOWW **wwiinn));;
       iinntt wwnnoouuttrreeffrreesshh((WWIINNDDOOWW **wwiinn));;
       iinntt ddoouuppddaattee((vvooiidd));;
       iinntt rreeddrraawwwwiinn((WWIINNDDOOWW **wwiinn));;
       iinntt wwrreeddrraawwllnn((WWIINNDDOOWW **wwiinn,, iinntt bbeegg__lliinnee,, iinntt nnuumm__lliinneess));;

DDEESSCCRRIIPPTTIIOONN
       The rreeffrreesshh and wwrreeffrreesshh  routines  (or  wwnnoouuttrreeffrreesshh  and
       ddoouuppddaattee)  must be called to get actual output to the ter-
       minal, as other routines  merely  manipulate  data  struc-
       tures.   The  routine  wwrreeffrreesshh copies the named window to
       the physical terminal screen, taking into account what  is
       already  there  in order to do optimizations.  The rreeffrreesshh
       routine is the same, using ssttddssccrr as the  default  window.
       Unless  lleeaavveeookk  has  been enabled, the physical cursor of
       the terminal is left at the location  of  the  cursor  for
       that window.

       The  wwnnoouuttrreeffrreesshh  and  ddoouuppddaattee  routines  allow multiple
       updates with more  efficiency  than  wwrreeffrreesshh  alone.   In
       addition  to  all  the window structures, ccuurrsseess keeps two
       data structures representing the terminal screen: a physi-
       cal screen, describing what is actually on the screen, and
       a virtual screen, describing what the programmer wants  to
       have on the screen.

       The  routine wwrreeffrreesshh works by first calling wwnnoouuttrreeffrreesshh,
       which copies the named window to the virtual  screen,  and
       then  calling  ddoouuppddaattee, which compares the virtual screen
       to the physical screen and does the actual update.  If the
       programmer  wishes  to  output  several windows at once, a
       series of calls to wwrreeffrreesshh results in  alternating  calls
       to  wwnnoouuttrreeffrreesshh  and  ddoouuppddaattee, causing several bursts of
       output to the screen.  By first calling  wwnnoouuttrreeffrreesshh  for
       each  window,  it  is then possible to call ddoouuppddaattee once,
       resulting in only one burst of output,  with  fewer  total
       characters transmitted and less CPU time used.  If the _w_i_n
       argument to wwrreeffrreesshh is the global  variable  ccuurrssccrr,  the
       screen  is immediately cleared and repainted from scratch.

       The rreeddrraawwwwiinn routine indicates to ccuurrsseess that some screen
       lines  are corrupted and should be thrown away before any-
       thing is written over them.  These routines could be  used
       for  programs  such  as  editors,  which want a command to
       redraw some part of the screen or the entire screen.   The
       routine rreeddrraawwllnn is preferred over rreeddrraawwwwiinn where a noisy



                                                                1





curs_refresh(3X)                                 curs_refresh(3X)


       communication line exists and redrawing the entire  window
       could  be  subject to even more communication noise.  Just
       redrawing several lines offers the possibility  that  they
       would show up unblemished.

RREETTUURRNN VVAALLUUEE
       Routines  that  return an integer return 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.

NNOOTTEESS
       Note that rreeffrreesshh and rreeddrraawwwwiinn may be macros.

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__oouuttooppttss(3X)






































                                                                2


