summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/curs_refresh.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libncurses/curs_refresh.3')
-rw-r--r--lib/libncurses/curs_refresh.369
1 files changed, 69 insertions, 0 deletions
diff --git a/lib/libncurses/curs_refresh.3 b/lib/libncurses/curs_refresh.3
new file mode 100644
index 0000000..3c204e2
--- /dev/null
+++ b/lib/libncurses/curs_refresh.3
@@ -0,0 +1,69 @@
+.TH curs_refresh 3 ""
+.SH NAME
+\fBrefresh\fR, \fBwrefresh\fR, \fBwnoutrefresh\fR,
+\fBdoupdate\fR, \fBredrawwin\fR,
+\fBwredrawln\fR - refresh \fBncurses\fR windows and lines
+.SH SYNOPSIS
+\fB#include <ncurses.h>\fR
+
+\fBint refresh(void);\fR
+.br
+\fBint wrefresh(WINDOW *win);\fR
+.br
+\fBint wnoutrefresh(WINDOW *win);\fR
+.br
+\fBint doupdate(void);\fR
+.br
+\fBint redrawwin(WINDOW *win);\fR
+.br
+\fBint wredrawln(WINDOW *win, int beg_line, int num_lines);\fR
+.br
+.SH DESCRIPTION
+The \fBrefresh\fR and \fBwrefresh\fR routines (or \fBwnoutrefresh\fR and
+\fBdoupdate\fR) must be called to get actual output to the terminal, as other
+routines merely manipulate data structures. The routine \fBwrefresh\fR copies
+the named window to the physical terminal screen, taking into account what is
+already there in order to do optimizations. The \fBrefresh\fR routine is the
+same, using \fBstdscr\fR as the default window. Unless \fBleaveok\fR has been
+enabled, the physical cursor of the terminal is left at the location of the
+cursor for that window.
+
+The \fBwnoutrefresh\fR and \fBdoupdate\fR routines allow multiple updates with
+more efficiency than \fBwrefresh\fR alone. In addition to all the window
+structures, \fBncurses\fR keeps two data structures representing the terminal
+screen: a physical screen, describing what is actually on the screen, and a
+virtual screen, describing what the programmer wants to have on the screen.
+
+The routine \fBwrefresh\fR works by first calling \fBwnoutrefresh\fR, which
+copies the named window to the virtual screen, and then calling \fBdoupdate\fR,
+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 \fBwrefresh\fR results in alternating calls to \fBwnoutrefresh\fR
+and \fBdoupdate\fR, causing several bursts of output to the screen. By first
+calling \fBwnoutrefresh\fR for each window, it is then possible to call
+\fBdoupdate\fR once, resulting in only one burst of output, with fewer total
+characters transmitted and less CPU time used. If the \fIwin\fR argument to
+\fBwrefresh\fR is the global variable \fBcurscr\fR, the screen is immediately
+cleared and repainted from scratch.
+
+The \fBredrawwin\fR routine indicates to \fBncurses\fR that some screen lines
+are corrupted and should be thrown away before anything 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
+\fBredrawln\fR is preferred over \fBredrawwin\fR where a noisy 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.
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an integer value
+other than \fBERR\fR upon successful completion.
+.SH NOTES
+Note that \fBrefresh\fR and \fBredrawwin\fR may be macros.
+.SH SEE ALSO
+\fBncurses\fR(3), \fBcurs_outopts\fR(3)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
OpenPOWER on IntegriCloud