[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

refresh or wrefresh Subroutine

Purpose

Updates the terminal's display and the curscr to reflect changes made to a window.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
refresh( )
wrefresh(Window)
WINDOW *Window;

Description

The refresh or wrefresh subroutines update the terminal and the curscr to reflect changes made to a window. The refresh subroutine updates the stdscr. The wrefresh subroutine refreshes a user-defined window.

Other subroutines manipulate windows but do not update the terminal's physical display to reflect their changes. Use the refresh or wrefresh subroutines to update a terminal's display after internal window representations change. Both subroutines check for possible scroll errors at display time.

Note: The physical terminal cursor remains at the location of the window's cursor during a refresh, unless the leaveok subroutine is enabled.

The refresh and wrefresh subroutines call two other subroutines to perform the refresh operation. First, the wnoutrefresh subroutine copies the designated window structure to the terminal. Then, the doupdate subroutine updates the terminal's display and the cursor.

Parameters

Window Specifies the window to refresh.

Examples

  1. To update the terminal's display and the current screen structure to reflect changes made to the standard screen structure, use:
    refresh();
  2. To update the terminal and the current screen structure to reflect changes made to a user-defined window called my_window , use:
    WINDOW *my_window;
    wrefresh(my_window);
  3. To restore the terminal to its state at the last refresh, use:
    wrefresh(curscr);
    This subroutine is useful if the terminal becomes garbled for any reason.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The doupdate subroutine, leaveok subroutine, wnoutrefresh subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with CursesAIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]