Forcing an Update of the Window on the Video Screen

To force an update of the contents of a window, set WNECHO to ON and call the window update function, wn_upd():

int wn_upd(wnp)

WINDOWPTR wnp;        /* Window to update            */

The following code fragment updates a window:

sw_opt(WNECHO, ON, wnp);

wn_upd(wnp);

To force an update of only a portion of the window, call the window region update function, wn_updrgn():

int wn_updrgn(wn_rb, wn_cb, wn_re, wn_ce, wnp)
 
int wn_rb;
/* Row of window to begin update
*/
int wn_cb;
/* Window column to begin update
*/
int wn_re;
/* Window row to end update
*/
int wn_ce;
/* Window column to end update
*/
WINDOWPTR wnp;
/* Window to update on screen
*/

For example, the following code sets a window on the screen and writes "Hello, world" to the window. The string is displayed in the window on the video screen. Next, the echo option is turned OFF and a string written to the window. To have the string appear in the window, turn virtual window echoing back on and update the window with wn_upd().

wn_up(wnp);

v_st("Hello, world/n", wnp);

sw_opt(WNECHO, OFF, wnp);

v_st("How do you do?", wnp);

...

...

sw_opt(WNECHO, ON, wnp);

wn_upd(wnp);


Home Contents Previous Next