home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_02 / wopen.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  705b  |  52 lines

  1. /*! wopen
  2.  *
  3.  *
  4.  *  open a window, save previous contents, draw borders
  5.  *
  6.  *
  7.  *
  8.  */
  9. #include  "wscreen.h"
  10. #include  "wsys.h"
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. WINDOW *wopen   (int x, int y,  int xmax,  int ymax,
  18.         unsigned char color, int boxtype, unsigned char box_color,
  19.         unsigned char save2)
  20.     {
  21.  
  22.  
  23.     wdefine (x, y, xmax, ymax, color, boxtype, box_color);
  24.  
  25.  
  26.  
  27.  
  28.     /* save contents of old screen underlying new window
  29.      * to restore when wclose
  30.      */
  31.     if (save2 == WSAVE2RAM)
  32.         {
  33.         wsave();
  34.         }
  35.  
  36.  
  37.     /* store and paint new borders surrounding window.
  38.      */
  39.     if (boxtype)
  40.         {
  41.  
  42.         wframe (x-1, y-1, x+xmax, y+ymax, boxtype, box_color);
  43.         wclear();
  44.         }
  45.  
  46.  
  47.     return(w0);
  48.     }  /*end of wopen*/
  49.  
  50.  
  51.  
  52.