1*51ffecc1SBen Gras.\" $NetBSD: curses_refresh.3,v 1.10 2003/04/16 13:35:01 wiz Exp $ 2*51ffecc1SBen Gras.\" 3*51ffecc1SBen Gras.\" Copyright (c) 2002 4*51ffecc1SBen Gras.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 5*51ffecc1SBen Gras.\" 6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author. 7*51ffecc1SBen Gras.\" 8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without 9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions 10*51ffecc1SBen Gras.\" are met: 11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright 12*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer. 13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 14*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer in the 15*51ffecc1SBen Gras.\" documentation and/or other materials provided with the distribution. 16*51ffecc1SBen Gras.\" 3. The name of the Author may not be used to endorse or promote 17*51ffecc1SBen Gras.\" products derived from this software without specific prior written 18*51ffecc1SBen Gras.\" permission. 19*51ffecc1SBen Gras.\" 20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*51ffecc1SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*51ffecc1SBen Gras.\" SUCH DAMAGE. 31*51ffecc1SBen Gras.\" 32*51ffecc1SBen Gras.\" 33*51ffecc1SBen Gras.Dd March 26, 2003 34*51ffecc1SBen Gras.Dt CURSES_REFRESH 3 35*51ffecc1SBen Gras.Os 36*51ffecc1SBen Gras.Sh NAME 37*51ffecc1SBen Gras.Nm curses_refresh , 38*51ffecc1SBen Gras.Nm refresh , 39*51ffecc1SBen Gras.Nm wrefresh , 40*51ffecc1SBen Gras.Nm wnoutrefresh , 41*51ffecc1SBen Gras.Nm doupdate , 42*51ffecc1SBen Gras.Nm leaveok , 43*51ffecc1SBen Gras.Nm flushok 44*51ffecc1SBen Gras.Nd curses terminal update routines 45*51ffecc1SBen Gras.Sh LIBRARY 46*51ffecc1SBen Gras.Lb libcurses 47*51ffecc1SBen Gras.Sh SYNOPSIS 48*51ffecc1SBen Gras.In curses.h 49*51ffecc1SBen Gras.Ft int 50*51ffecc1SBen Gras.Fn refresh "void" 51*51ffecc1SBen Gras.Ft int 52*51ffecc1SBen Gras.Fn wrefresh "WINDOW *win" 53*51ffecc1SBen Gras.Ft int 54*51ffecc1SBen Gras.Fn wnoutrefresh "WINDOW *win" 55*51ffecc1SBen Gras.Ft int 56*51ffecc1SBen Gras.Fn doupdate "void" 57*51ffecc1SBen Gras.Ft int 58*51ffecc1SBen Gras.Fn leaveok "WINDOW *win" "boolf flag" 59*51ffecc1SBen Gras.Ft int 60*51ffecc1SBen Gras.Fn flushok "WINDOW *win" "boolf flag" 61*51ffecc1SBen Gras.Sh DESCRIPTION 62*51ffecc1SBen GrasThese functions update the terminal with the contents of 63*51ffecc1SBen Gras.Dv stdscr 64*51ffecc1SBen Grasor of the specified window(s). 65*51ffecc1SBen Gras.Pp 66*51ffecc1SBen GrasThe 67*51ffecc1SBen Gras.Fn refresh 68*51ffecc1SBen Grasfunction causes curses to propagate changes made to 69*51ffecc1SBen Gras.Dv stdscr 70*51ffecc1SBen Grasto the terminal display. 71*51ffecc1SBen GrasAny changes made to subwindows of 72*51ffecc1SBen Gras.Dv stdscr 73*51ffecc1SBen Grasare also propagated. 74*51ffecc1SBen Gras.Pp 75*51ffecc1SBen GrasThe 76*51ffecc1SBen Gras.Fn wrefresh 77*51ffecc1SBen Grasfunction is the same as the 78*51ffecc1SBen Gras.Fn refresh 79*51ffecc1SBen Grasfunction, excepting that changes are propagated to the terminal from the 80*51ffecc1SBen Graswindow specified by 81*51ffecc1SBen Gras.Fa win . 82*51ffecc1SBen Gras.Pp 83*51ffecc1SBen GrasThe 84*51ffecc1SBen Gras.Fn wnoutrefresh 85*51ffecc1SBen Grasfunction performs the internal processing required by curses to determine 86*51ffecc1SBen Graswhat changes need to be made to synchronise the internal screen buffer 87*51ffecc1SBen Grasand the terminal but does not modify the terminal display. 88*51ffecc1SBen Gras.Pp 89*51ffecc1SBen GrasThe 90*51ffecc1SBen Gras.Fn doupdate 91*51ffecc1SBen Grasfunction updates the terminal display to match the internal curses 92*51ffecc1SBen Grasrepresentation of the display. 93*51ffecc1SBen Gras.Pp 94*51ffecc1SBen GrasThe 95*51ffecc1SBen Gras.Fn wnoutrefresh 96*51ffecc1SBen Grasand 97*51ffecc1SBen Gras.Fn doupdate 98*51ffecc1SBen Grasfunctions can be used together to speed up terminal redraws by 99*51ffecc1SBen Grasdeferring the actual terminal updates until after a batch of updates 100*51ffecc1SBen Grasto multiple windows has been done. 101*51ffecc1SBen Gras.Pp 102*51ffecc1SBen GrasThe 103*51ffecc1SBen Gras.Fn refresh 104*51ffecc1SBen Grasfunction is equivalent to 105*51ffecc1SBen Gras.Fn wnoutrefresh stdscr 106*51ffecc1SBen Grasfollowed by 107*51ffecc1SBen Gras.Fn doupdate . 108*51ffecc1SBen Gras.Pp 109*51ffecc1SBen GrasThe 110*51ffecc1SBen Gras.Fn leaveok 111*51ffecc1SBen Grasfunction determines whether refresh operations may leave the screen cursor 112*51ffecc1SBen Grasin an arbitrary position on the screen. 113*51ffecc1SBen GrasSetting 114*51ffecc1SBen Gras.Fa flag 115*51ffecc1SBen Grasto 116*51ffecc1SBen Gras.Dv FALSE 117*51ffecc1SBen Grasensures that the screen cursor is positioned at the current cursor 118*51ffecc1SBen Grasposition after a refresh operation has taken place. 119*51ffecc1SBen Gras.Pp 120*51ffecc1SBen GrasThe 121*51ffecc1SBen Gras.Fn flushok 122*51ffecc1SBen Grasfunction is used to determine whether or not the screen's output file 123*51ffecc1SBen Grasdescriptor will be flushed on refresh. 124*51ffecc1SBen GrasSetting 125*51ffecc1SBen Gras.Fa flag 126*51ffecc1SBen Grasto 127*51ffecc1SBen Gras.Dv TRUE 128*51ffecc1SBen Graswill cause the output to be flushed. 129*51ffecc1SBen Gras.Sh RETURN VALUES 130*51ffecc1SBen GrasFunctions returning pointers will return 131*51ffecc1SBen Gras.Dv NULL 132*51ffecc1SBen Grasif an error is detected. 133*51ffecc1SBen GrasThe functions that return an int will return one of the following 134*51ffecc1SBen Grasvalues: 135*51ffecc1SBen Gras.Pp 136*51ffecc1SBen Gras.Bl -tag -width ERR -compact 137*51ffecc1SBen Gras.It Er OK 138*51ffecc1SBen GrasThe function completed successfully. 139*51ffecc1SBen Gras.It Er ERR 140*51ffecc1SBen GrasAn error occurred in the function. 141*51ffecc1SBen Gras.El 142*51ffecc1SBen Gras.Sh SEE ALSO 143*51ffecc1SBen Gras.Xr curses_pad 3 , 144*51ffecc1SBen Gras.Xr curses_touch 3 , 145*51ffecc1SBen Gras.Xr getch 3 146*51ffecc1SBen Gras.Sh NOTES 147*51ffecc1SBen GrasCalling 148*51ffecc1SBen Gras.Fn wrefresh 149*51ffecc1SBen Grason a new, unchanged window has no effect. 150*51ffecc1SBen Gras.Sh STANDARDS 151*51ffecc1SBen GrasThe 152*51ffecc1SBen Gras.Nx 153*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the 154*51ffecc1SBen GrasSingle Unix Specification. 155*51ffecc1SBen Gras.Sh HISTORY 156*51ffecc1SBen GrasThe Curses package appeared in 157*51ffecc1SBen Gras.Bx 4.0 . 158