E:/Download/ois-1.0RC1/includes/mac/MacMouse.h

Go to the documentation of this file.
00001 #ifndef OIS_MacMouse_H
00002 #define OIS_MacMouse_H
00003 
00004 #include "OISMouse.h"
00005 #include "mac/MacHelpers.h"
00006 #include "mac/MacPrereqs.h"
00007 
00008 #include <Carbon/Carbon.h>
00009 
00010 namespace OIS
00011 {
00012         class MacMouse : public Mouse
00013     {
00014         public:
00015                 MacMouse( InputManager* creator, bool buffered );
00016                 virtual ~MacMouse();
00017                 
00019                 virtual void setBuffered(bool buffered);
00020 
00022                 virtual void capture();
00023 
00025                 virtual Interface* queryInterface(Interface::IType type) {return 0;}
00026 
00028                 virtual void _initialize();
00029         
00030         public:
00031         void _mouseButtonCallback( EventRef theEvent );
00032         void _mouseMoveCallback( EventRef theEvent );
00033         void _mouseScrollCallback( EventRef theEvent );
00034 
00035         protected:
00036                 MacMouse() {}
00037 
00038         // "universal procedure pointers" - required reference for callbacks
00039         EventHandlerUPP mouseButtonUPP;
00040         EventHandlerUPP mouseMoveUPP;
00041         EventHandlerUPP mouseScrollUPP;
00042         
00043         // so we can delete the handlers on destruction
00044         EventHandlerRef mouseButtonEventRef;
00045         EventHandlerRef mouseMoveEventRef;
00046         EventHandlerRef mouseScrollEventRef;
00047 
00048                 bool mRegainFocus;
00049         };
00050 }
00051 
00052 
00053 #endif // OIS_MacMouse_H

Generated on Sat Dec 1 20:13:51 2007 for OIS by  doxygen 1.5.4