home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-20 | 929 b | 38 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #ifndef __APPLICATION_H
- #define __APPLICATION_H
-
- #include <QDOffScreen.h>
- #include "CLEventDispatcher.h"
- #include "CLCleanup.h"
- #include "CLBackgrounder.h"
-
- class TApplication:
- public MEventDispatcher,
- public TDeviceHandler
- {
- private:
- TDeviceHandler *mhKeyboard, *mhMouse, *mhNull;
- static TApplication *shCurApp;
- GWorldPtr mhWorld;
- GDHandle mhDevice;
- protected:
- TList<MBackgrounder*> mBackGrounds;
- virtual void BuildEvent( const EventRecord& );
- public:
- TCleanup mClean;
- TApplication();
- void AddBackgrounder( MBackgrounder* );
- void RemoveBackgrounder( MBackgrounder* );
- virtual void DispatchEvent( const EventRecord &ev );
- virtual void NewDispatcher();
- virtual void OldDispatcher();
- static TApplication *SCurApp() {return( shCurApp );};
- virtual void GetGlobalWorld( GWorldPtr&, GDHandle& );
- virtual GrafPtr GetGlobalPort();
- virtual void Quit();
- };
-
- #endif