home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-19 | 752 b | 32 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #ifndef __EVENTDISPATCHER_H
- #define __EVENTDISPATCHER_H
-
- #include "CLTypes.h"
- #include "CLDeviceHandler.h"
-
- class MEventDispatcher
- {
- private:
- static MEventDispatcher *sCurDispatcher;
- static void DispatchEvent( const EventRecord & );
- static TDeviceHandler *mhHandlers[16];
- Boolean mhDone;
- protected:
- static void SetDeviceHandler( UINT16, TDeviceHandler* );
- virtual BOOLEAN Run();
- virtual BOOLEAN RunSelf()=0;
- virtual BOOLEAN AttemptQuitSelf();
- virtual void QuitSelf();
- public:
- MEventDispatcher();
- static MEventDispatcher *GetDispatcher() {return(sCurDispatcher);};
- virtual ~MEventDispatcher();
- virtual void EventLoop();
- virtual BOOLEAN AttemptQuit();
- virtual void Quit();
- };
-
- #endif