Equalizer  1.6.1
wgl/eventHandler.h
1 
2 /* Copyright (c) 2007-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_WGL_EVENTHANDLER_H
19 #define EQ_WGL_EVENTHANDLER_H
20 
21 #include <eq/client/eventHandler.h> // base class
22 #include <eq/client/wgl/types.h>
23 
24 #include <lunchbox/os.h>
25 
26 namespace eq
27 {
28 namespace wgl
29 {
32  {
33  public:
35  EQ_API EventHandler( WindowIF* window );
36 
38  EQ_API virtual ~EventHandler();
39 
46  static bool initMagellan(Node* node);
47 
54  static void exitMagellan( Node* node );
55 
56  private:
57  WindowIF* _window;
58  HWND _hWnd;
59  WNDPROC _prevWndProc;
60  uint32_t _buttonState;
61 
62  int32_t _wheelDeltaPerLine;
63 
64  struct Private;
65  Private* _private; // placeholder for binary-compatible changes
66 
67  static LRESULT CALLBACK wndProc( HWND hWnd, UINT uMsg, WPARAM wParam,
68  LPARAM lParam );
69  LRESULT CALLBACK _wndProc( HWND hWnd, UINT uMsg, WPARAM wParam,
70  LPARAM lParam );
71  void _magellanEventHandler(LPARAM lParam);
72 
73  void _syncButtonState( WPARAM wParam );
74  uint32_t _getKey( LPARAM lParam, WPARAM wParam );
75  int32_t _getWheelDelta( WPARAM wParam ) const;
76  };
77 }
78 }
79 #endif // EQ_WGL_EVENTHANDLER_H
The event handler for WGL.
static bool initMagellan(Node *node)
Initialize space mouse event handling for this process.
static void exitMagellan(Node *node)
De-initialize space mouse event handling for this process.
A Node represents a single computer in the cluster.
EventHandler()
Construct a new event handler.
Definition: eventHandler.h:30
Base class for window system-specific event handlers.
Definition: eventHandler.h:26
virtual ~EventHandler()
Destruct the WGL event handler.
The interface defining the minimum functionality for a WGL window.