Orxonox  0.0.5 Codename: Arcturus
MacMouse.h
Go to the documentation of this file.
1 #ifndef OIS_MacMouse_H
2 #define OIS_MacMouse_H
3 
4 #include "OISMouse.h"
5 #include "mac/MacHelpers.h"
6 #include "mac/MacPrereqs.h"
7 
8 #include <Carbon/Carbon.h>
9 
10 namespace OIS
11 {
12  class MacMouse : public Mouse
13  {
14  public:
15  MacMouse( InputManager* creator, bool buffered );
16  virtual ~MacMouse();
17 
19  virtual void setBuffered(bool buffered);
20 
22  virtual void capture();
23 
26 
28  virtual void _initialize();
29 
30  public:
31  void _mouseCallback( EventRef theEvent );
32 
33  protected:
34  static OSStatus WindowFocusChanged(EventHandlerCallRef nextHandler, EventRef event, void* macMouse);
35 
36  // "universal procedure pointers" - required reference for callbacks
37  EventHandlerUPP mouseUPP;
38  EventHandlerRef mouseEventRef;
39 
40  EventHandlerUPP mWindowFocusListener;
41  EventHandlerRef mWindowFocusHandler;
42 
45 
47  };
48 }
49 
50 
51 #endif // OIS_MacMouse_H
virtual Interface * queryInterface(Interface::IType type)
Definition: MacMouse.h:25
EventHandlerUPP mWindowFocusListener
Definition: MacMouse.h:40
EventHandlerRef mouseEventRef
Definition: MacMouse.h:38
virtual void setBuffered(bool buffered)
Definition: MacMouse.cpp:122
virtual ~MacMouse()
Definition: MacMouse.cpp:40
static OSStatus WindowFocusChanged(EventHandlerCallRef nextHandler, EventRef event, void *macMouse)
Definition: MacMouse.cpp:105
EventHandlerRef mWindowFocusHandler
Definition: MacMouse.h:41
An Object&#39;s interface is a way to gain write access to devices which support it.
Definition: OISInterface.h:34
IType
Type of Interface.
Definition: OISInterface.h:40
virtual void capture()
Definition: MacMouse.cpp:127
Represents the state of the mouse All members are valid for both buffered and non buffered mode...
Definition: OISMouse.h:41
EventHandlerUPP mouseUPP
Definition: MacMouse.h:37
Mouse base class.
Definition: OISMouse.h:107
bool mMouseWarped
Definition: MacMouse.h:44
void _mouseCallback(EventRef theEvent)
Definition: MacMouse.cpp:166
virtual bool buffered() const
Definition: OISObject.h:44
MacMouse(InputManager *creator, bool buffered)
Definition: MacMouse.cpp:27
Base Manager class.
Definition: OISInputManager.h:38
Definition: EventHelpers.h:31
bool mNeedsToRegainFocus
Definition: MacMouse.h:43
virtual void _initialize()
Definition: MacMouse.cpp:58
Type type() const
Definition: OISObject.h:38
MouseState mTempState
Definition: MacMouse.h:46
Definition: MacMouse.h:12