home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / COSEmulator / COSEmulator- SRC / headers / ApplicationHandler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-21  |  1.3 KB  |  67 lines  |  [TEXT/CWIE]

  1. #ifndef _ApplicationHandler_h_
  2. #define _ApplicationHandler_h_
  3.  
  4. #include "GameTypes.h"
  5. #include "Application.h"
  6. #include "LinkedList.h"
  7.  
  8. #define    kNumApplications    20
  9.  
  10. #define    kFinderApp            0
  11. #define kPhotoshopApp        1
  12. #define    kNetscapeApp        2
  13. #define kSimpleText            3
  14. #define    kMacAmp                4
  15. #define    kQuickTime            5
  16.  
  17.  
  18. class    ApplicationHandler : 
  19.             public LinkListClass< Application >
  20. {
  21. public:
  22.     ApplicationHandler( void );
  23.  
  24.     void    HandleMouseClick( Boolean down, point where );
  25.     void    HandleMouseMove( point where );
  26.     void    CleanUp( rect *where );
  27.     
  28.     void    Maintance( void );
  29.     
  30.     void    LoadApplication( uchar what );
  31.     void    KillApplication( Application which );
  32.     
  33.     Boolean    LoadMultipleApps( Boolean what );    // loadm ore then oneo f the same thing
  34.     
  35.     void    SendEventToCurrentApp( ushort event , void *data );
  36.     
  37.     void    SwitchToAppByNum( uchar num );
  38.     
  39. // hiding - showing apps
  40.     void    HideAllButFront( void );
  41.     void    HideFront( void );
  42.     void    ShowAll( void );
  43.     
  44. private:
  45.     void    MakeFrontApp( Application *app );
  46.     void    RealLoadApp( uchar which );
  47.     
  48.     Application        *NewApp( uchar what );
  49.     Boolean            AlreadyLoaded( uchar what );
  50.     
  51.     Application        *finder;
  52.     
  53.     Boolean            multApps;
  54.     
  55. // maintance stuff
  56.     uchar            action;
  57.     
  58.     uchar            whichLoad;
  59.     Application        *whichSwitch;
  60.  
  61. };
  62.  
  63.  
  64. void    ApplicationHandlerInit( void );
  65. extern    ApplicationHandler    AH;
  66.  
  67. #endif