Equalizer  2.0.0
Parallel Rendering Framework
agl/eventHandler.h
1 
2 /* Copyright (c) 2007-2016, 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_AGL_EVENTHANDLER_H
19 #define EQ_AGL_EVENTHANDLER_H
20 
21 #include <eq/defines.h>
22 #include <eq/os.h>
23 #ifdef AGL
24 #include <eq/agl/types.h>
25 #include <eq/eventHandler.h> // base class
26 
27 namespace eq
28 {
29 namespace agl
30 {
38 class EventHandler : public eq::EventHandler
39 {
40 public:
45  EventHandler( agl::WindowIF* window );
46 
48  virtual ~EventHandler();
49 
56  static void initMagellan( Node* node );
57 
63  static void exitMagellan( Node* node );
64 
66  agl::WindowIF* getWindow() const { return _window; }
67 
69  bool handleEvent( EventRef event );
70 
71 private:
72  agl::WindowIF* const _window;
73 
74  EventHandlerRef _eventHandler;
75  EventHandlerRef _eventDispatcher;
76 
77  bool _processWindowEvent( const EventRef eventRef );
78  bool _processMouseEvent( const EventRef eventRef );
79  bool _processKeyEvent( const EventRef eventRef );
80 
81  uint32_t _lastDX;
82  uint32_t _lastDY;
83 };
84 }
85 }
86 #endif // AGL
87 #endif // EQ_AGL_EVENTHANDLER_H
Base class for window system-specific event handlers.
Definition: eventHandler.h:29
Includes compile-time defines of Equalizer.
Includes operating system headers for OpenGL and the used window system(s) correctly.
The Equalizer client library.
Definition: eq/agl/types.h:23