Equalizer  1.6.1
glx/eventHandler.h
1 
2 /* Copyright (c) 2006-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_GLX_EVENTHANDLER_H
19 #define EQ_GLX_EVENTHANDLER_H
20 
21 #include <eq/client/eventHandler.h> // base class
22 #include <eq/client/glXTypes.h> // XEvent type
23 #include <eq/client/types.h> // basic typedefs
24 
25 #include <lunchbox/thread.h> // thread-safety macro
26 
27 namespace eq
28 {
29 namespace glx
30 {
33  {
34  public:
36  EventHandler( WindowIF* window );
37 
39  virtual ~EventHandler();
40 
48  static void dispatch();
49 
50  private:
52  WindowIF* const _window;
53 
54  bool _magellanUsed;
55 
56  void _dispatch();
57  void _processEvent( WindowEvent& event );
58  uint32_t _getButtonState( XEvent& event );
59  uint32_t _getButtonAction( XEvent& event );
60  uint32_t _getKey( XEvent& event );
61 
62  LB_TS_VAR( _thread );
63  };
64 }
65 }
66 #endif // EQ_GLX_EVENTHANDLER_H
67 
EventHandler()
Construct a new event handler.
Definition: eventHandler.h:30
virtual ~EventHandler()
Destruct the glX event handler.
Base class for window system-specific event handlers.
Definition: eventHandler.h:26
The event handler for glX/X11 windows.
The interface defining the minimum functionality for a glX window.
A window-system event for a glx::WindowIF.
static void dispatch()
Dispatch all pending events on the current thread.