home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Snippets / Life Simulator / HandleUpdActEvt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-04  |  553 b   |  32 lines  |  [TEXT/MMCC]

  1. /* Cell Proj 1.0 */
  2.  
  3. #include "Cell_Proto.h"
  4. #include "Cell_Definitions.h"
  5. #include "Cell_Variables.h"
  6.  
  7.  
  8. HandleUpdateEvt()
  9. {
  10.     if ( ( WindowPtr ) gTheEvent.message == gCellWindow )
  11.     {
  12.         BeginUpdate( ( WindowPtr ) gTheEvent.message );
  13.         SetPort( gCellWindow );
  14.         EndUpdate( ( WindowPtr ) gTheEvent.message );
  15.     }
  16. }
  17.  
  18. HandleActivateEvt()
  19. {
  20.     if ( (WindowPtr)gTheEvent.message == gCellWindow )
  21.     {
  22.         if (( gTheEvent.modifiers & activeFlag ) != 0 )
  23.         {
  24.             SetPort( gCellWindow );
  25.             SelectWindow( gCellWindow );
  26.         }
  27.         else
  28.         {
  29.             SetPort( gCellWindow );
  30.         }
  31.     }
  32. }