Clears a window.
Curses Library (libcurses.a)
int wclear(WINDOW *win);
int werase(WINDOW *win);
The clear, erase, wclear, and werase subroutines clear every position in the current or specified window.
The clear and wclear subroutines also achieve the same effect as calling the clearok subroutine, so that the window is cleared completely on the next call to the wrefresh subroutine for the window and is redrawn in its entirety.
|*win||Specifies the window to clear.|
Upon successful completion, these subroutines return OK. Otherwise, they return ERR.
For the clear and wclear subroutines:
WINDOW *my_window; wclear(my_window); waddstr (my_window, "This will be cleared."); wrefresh (my_window);
WINDOW *my_window; werase (my_window);
Note: After the wrefresh, the window will be cleared completely. You will not see the string "This will be cleared."
For the erase and werase subroutines:
WINDOW *my_window; werase(my_window);
These subroutines are part of Base Operating System (BOS) Runtime.
The doupdate (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutine, erase (erase or werase Subroutine) and werase (erase or werase Subroutine) subroutines, clearok (clearok, idlok, leaveok, scrollok, setscrreg or wsetscrreg Subroutine) subroutine, refresh (refresh or wrefresh Subroutine) subroutine.
Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.