home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / DISPCLR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-23  |  1.7 KB  |  70 lines

  1. /*
  2.     dispclr.c
  3.  
  4.     % Display clear.
  5.  
  6.      3/24/89  by Ted.
  7.     Extracted from wmgr.c as wmgr_Clear
  8.  
  9.     OWL 1.2
  10.     Copyright (c) 1988, 1989 by Oakland Group, Inc.
  11.     ALL RIGHTS RESERVED.
  12.  
  13.     Revision History:
  14.     -----------------
  15.      3/28/90 jmd    ansi-fied
  16.      6/22/90 ted    added "void" to no-parameter function per ansii.
  17.      9/26/90 pmcm    added cls() in disp_Repaint for non-DOS systems
  18.     10/22/90 ted    added O_FORCE_REPAINT flag to fix apollo repaint bug.
  19. */
  20.  
  21. #include "oakhead.h"
  22. #include "disppriv.h"
  23.  
  24. /* -------------------------------------------------------------------------- */
  25.  
  26. void disp_Clear(opixval color)
  27. /*
  28.     Clear the whole display flat out, regardless of what windows are present,
  29.     and sending no messages to any windows.
  30. */
  31. {
  32.     opbox box;
  33.     ptd_struct ptds;
  34.  
  35.     owl_Assert(disp_Ok(), OE_DC_DISP);
  36.  
  37.     ptds.win = disp_GetDispWin();
  38.     ptds.emsgdata = NULL;
  39.     ptds.relboxp = &box;
  40.     box.ymin = 0;
  41.     box.xmin = 0;
  42.     box.ymax = disp_GetPixHeight();
  43.     box.xmax = disp_GetPixWidth();
  44.  
  45.     disp_Cache();
  46.     ptd_Clear(&ptds, color);
  47.     disp_Flush();
  48. }
  49. /* -------------------------------------------------------------------------- */
  50.  
  51. void disp_Repaint(void)
  52. {
  53.     owl_Assert(disp_Ok(), OE_DR_DISP);
  54.  
  55. #ifdef O_FORCE_REPAINT
  56.     /*     clear the display on non-DOS systems.  
  57.         E.g., UNIX curses and VAX/VMS SMG require this in order to 
  58.         refresh the    display in the case that the display have changed 
  59.         as a result    of output that did not go thru curses or SMG--i.e., 
  60.         the display has been alatered but their internal representations 
  61.         show no change.
  62.     */
  63.     cls();
  64. #endif
  65.  
  66.     wmgr_PaintPixBox(wmgr_botsyswin(), win_pixboxp(disp_GetDispWin()));
  67. }
  68. /* -------------------------------------------------------------------------- */
  69.  
  70.