Equalizer 1.0

glXEventHandler.h

00001 
00002 /* Copyright (c) 2006-2011, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQ_GLXEVENTHANDLER_H
00019 #define EQ_GLXEVENTHANDLER_H
00020 
00021 #include <eq/eventHandler.h> // base class
00022 #include <eq/glXTypes.h>     // XEvent type
00023 #include <eq/types.h>        // basic typedefs
00024 
00025 #include <co/base/thread.h> // thread-safety macro
00026 
00027 namespace eq
00028 {
00030     class GLXEventHandler : public EventHandler
00031     {
00032     public:
00040         static void dispatch();
00041 
00043         GLXEventHandler( GLXWindowIF* window );
00044 
00046         virtual ~GLXEventHandler();
00047 
00048     private:
00050         GLXWindowIF* const _window;
00051 
00052         void _dispatch();
00053         void _processEvent( GLXWindowEvent& event );
00054         uint32_t _getButtonState( XEvent& event );
00055         uint32_t _getButtonAction( XEvent& event );
00056         uint32_t _getKey( XEvent& event );
00057 
00058         EQ_TS_VAR( _thread );
00059     };
00060 }
00061 
00062 #endif // EQ_GLXEVENTHANDLER_H
00063 
Generated on Sun May 8 2011 19:11:06 for Equalizer 1.0 by  doxygen 1.7.3