home *** CD-ROM | disk | FTP | other *** search
- /* 88-11-11 Jahns wnd_setupd() update only activ window */
-
-
-
- /* (c) 1985, Phoenix Computer Products Corp. and Novum Organum, Inc. */
- #include "pdefs.h"
-
- static int _upd;
- static int _csrupd;
-
- /***
- * Name: wupdinit -- turns on _upd and _csrupd
- *
- * Synopsis: void wupdinit();
- * wupdinit();
- *
- * Description: set statics
- *
- * Returns: nothing
- *
- * (C) Novum Organum, Inc. 1985
- *
- ***/
- void wupdinit(void)
- {
- _csrupd = YES;
- _upd = YES;
- }
-
- /***
- * Name: wndupdall -- updates all windows
- *
- * Synopsis: void wndupdall();
- * wndupdall();
- *
- * Description: Repaints all windows.
- *
- * Returns: nothing
- *
- * (C) Novum Organum, Inc. 1985
- *
- ***/
-
- void wndupdall(void)
- {
- HDL h_sav, wndsetactv(), wndgetactv();
- HDL h_wnd, _wndtop(), _wndnxt();
-
- if ( _upd )
- {
- h_sav = wndgetactv();
- h_wnd = _wndtop();
- while ( h_wnd )
- {
- wndsetactv(h_wnd);
- _waupd();
- _waupdbdr();
- h_wnd = _wndnxt( h_wnd );
- }
- wndsetactv( h_sav );
- }
- }
-
- /***
- * Name: wndgetupd -- retrieve update flag
- *
- * Synopsis: int upd, wndgetupd();
- * upd = wndgetupd();
- *
- * Description: Get update flag.
- *
- * Returns: Update flag.
- *
- * (C) Novum Organum, Inc. 1985
- *
- ***/
-
- int wndgetupd(void)
- {
- return(_upd);
- }
-
- /***
- * Name: wndsetupd -- sets update flag
- *
- * Synopsis: int oldval, newval, wndsetupd();
- * oldval = wndsetupd( newval );
- *
- * Description: Sets update flag. With the update flag off, no screen
- * activity will take place. When the flag is turned on,
- * the entire screen is repainted.
- *
- * Returns: The previous flag state.
- *
- * (C) Novum Organum, Inc. 1985
- *
- ***/
-
- int wndsetupd(upd)
- int upd;
- {
- int oldupd;
-
- oldupd = _upd;
- _upd = upd;
- if ( _upd )
- wndupdall();
- return ( oldupd );
- }
-
-
- int wnd_setupd(int upd) /* update only activ window */
- {
- int savupd;
-
- savupd = _upd;
- _upd = upd;
-
- if ( _upd ) _waupd();
-
- _upd = savupd;
-
- return ( savupd );
- }
-
-
-
- int wndgetcsrupd(void)
- {
- return(_csrupd);
- }
-
-
-
- int wndsetcsrupd(int newval)
- {
- int oldval;
-
- oldval = _csrupd;
- _csrupd = newval;
- return(oldval);
-
- }
-
-
-
- /* end of WNDUPD.C */
-