00001
00002
00003
00004 #ifndef EQ_AGLEVENTHANDLER_H
00005 #define EQ_AGLEVENTHANDLER_H
00006
00007 #include <eq/client/eventHandler.h>
00008
00009 #include <eq/client/event.h>
00010 #include <eq/net/command.h>
00011 #include <eq/net/connectionSet.h>
00012
00013 namespace eq
00014 {
00015 class AGLWindowIF;
00016 class X11Connection;
00017
00021 class AGLEventHandler : public EventHandler
00022 {
00023 public:
00024 static AGLEventHandler* get();
00025
00027 virtual void deregisterPipe( Pipe* pipe ) { };
00028
00030 void registerWindow( AGLWindowIF* window );
00031
00033 virtual void deregisterWindow( AGLWindowIF* window ) ;
00034
00035 private:
00036 static AGLEventHandler _handler;
00037
00039 AGLEventHandler();
00040
00042 virtual ~AGLEventHandler(){}
00043
00044 static pascal OSStatus _handleEventUPP( EventHandlerCallRef nextHandler,
00045 EventRef event, void* userData);
00046 bool _handleEvent( EventRef event, AGLWindowIF* window );
00047 bool _handleWindowEvent( EventRef event, AGLWindowIF* window );
00048 bool _handleMouseEvent( EventRef event, AGLWindowIF* window );
00049 bool _handleKeyEvent( EventRef event, AGLWindowIF* window );
00050
00051 uint32_t _getButtonAction( EventRef event );
00052 uint32_t _getKey( EventRef event );
00053
00054 uint32_t _lastDX;
00055 uint32_t _lastDY;
00056 };
00057 }
00058
00059 #endif // EQ_AGLEVENTHANDLER_H
00060