Equalizer  1.13.0
Parallel Rendering Framework
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/eventHandler.h> // base class
22 #include <eq/wgl/types.h>
23 
24 #include <lunchbox/os.h>
25 
26 namespace eq
27 {
28 namespace wgl
29 {
32  {
33  public:
35  EQ_API explicit 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 interface defining the minimum functionality for a WGL window.
Definition: wgl/window.h:33
A Node represents a single computer in the cluster.
Definition: node.h:48
Base class for window system-specific event handlers.
Definition: eventHandler.h:29
The event handler for WGL.
EventHandler()
Construct a new event handler.
Definition: eventHandler.h:33
static void exitMagellan(Node *node)
De-initialize space mouse event handling for this process.
The Equalizer client library.
Definition: eq/agl/types.h:23
static bool initMagellan(Node *node)
Initialize space mouse event handling for this process.
virtual EQ_API ~EventHandler()
Destruct the WGL event handler.