home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-24 | 781 b | 33 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved.
-
- #ifndef __KEYBOARDHANDLER_H
- #define __KEYBOARDHANDLER_H
-
- #include "CLDeviceHandler.h"
- #include "CLKeyboardListener.h"
- #include "CLList.h"
-
- class TKeyboardHandler:
- public TDeviceHandler
- {
- private:
- TList<MKeyboardListener*> mhListeners;
- static TKeyboardHandler *shKeyboard;
- UINT16 mModifiers;
- protected:
- void BuildEvent( const EventRecord& );
- public:
- TKeyboardHandler();
- virtual void NewDispatcher();
- virtual void OldDispatcher();
- virtual void DispatchEvent( const EventRecord& );
- void SetListener( MKeyboardListener* );
- MKeyboardListener *GetListener();
- static TKeyboardHandler *GetKeyboard();
- UINT16 GetModifiers() {return( mModifiers );};
- friend class MEventDispatcher;
- Boolean IsKeyDown( UINT8 );
- };
-
- #endif