home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / Examples / p3-007 < prev    next >
Encoding:
Text File  |  1994-03-25  |  597 b   |  33 lines

  1. #include "os.h"
  2. #include "wimp.h"
  3.  
  4. int main (void)
  5.  
  6. {  bool finished = FALSE;
  7.    wimp_block blk; /*get the block for wimp_poll()*/
  8.    int event;
  9.    
  10.    wimp_initialise (...);
  11.       /*tell the wimp about the task*/
  12.    
  13.    while (!finished)
  14.    {  wimp_poll (... &blk ... &event);
  15.    
  16.       switch (event)
  17.       {  case wimp_NULL_REASON_CODE:
  18.             /*... do Wimp_NullReasonCode ...*/
  19.          break;
  20.    
  21.          case wimp_REDRAW_WINDOW_REQUEST:
  22.             /*... do Wimp_RedrawWindowRequest ...*/
  23.          break;
  24.    
  25.          /*etc*/
  26.       }
  27.    }
  28.    
  29.    wimp_close_down (...);
  30.  
  31.    return 0;
  32. }
  33.