#include <MacKeyboard.h>
Public Member Functions | |
| MacKeyboard (InputManager *creator, bool buffered, bool repeat) | |
| virtual | ~MacKeyboard () |
| virtual void | setBuffered (bool buffered) |
| virtual bool | isKeyDown (KeyCode key) |
| virtual void | capture () |
| virtual void | copyKeyStates (char keys[256]) |
| virtual std::string & | getAsString (KeyCode key) |
| virtual Interface * | queryInterface (Interface::IType type) |
| virtual void | _initialize () |
| void | _keyDownCallback (EventRef theEvent) |
| void | _keyUpCallback (EventRef theEvent) |
| void | _modChangeCallback (EventRef theEvent) |
Protected Types | |
| typedef std::map< UInt32, KeyCode > | VirtualtoOIS_KeyMap |
| typedef std::list < MacKeyStackEvent > | eventStack |
Protected Member Functions | |
| void | populateKeyConversion () |
| void | injectEvent (KeyCode kc, unsigned int time, MacEventType type, unsigned int txt=0) |
Protected Attributes | |
| VirtualtoOIS_KeyMap | keyConversion |
| std::string | getString |
| char | KeyBuffer [256] |
| UInt32 | prevModMask |
| EventHandlerUPP | keyDownUPP |
| EventHandlerUPP | keyUpUPP |
| EventHandlerUPP | keyModUPP |
| EventHandlerRef | keyDownEventRef |
| EventHandlerRef | keyUpEventRef |
| EventHandlerRef | keyModEventRef |
| eventStack | pendingEvents |
| bool | useRepeat |
Definition at line 35 of file MacKeyboard.h.
typedef std::map<UInt32, KeyCode> OIS::MacKeyboard::VirtualtoOIS_KeyMap [protected] |
Definition at line 75 of file MacKeyboard.h.
typedef std::list<MacKeyStackEvent> OIS::MacKeyboard::eventStack [protected] |
Definition at line 95 of file MacKeyboard.h.
| MacKeyboard::MacKeyboard | ( | InputManager * | creator, | |
| bool | buffered, | |||
| bool | repeat | |||
| ) |
Definition at line 41 of file MacKeyboard.cpp.
References keyDownEventRef, keyDownUPP, KeyDownWrapper(), keyModEventRef, keyModUPP, KeyModWrapper(), keyUpEventRef, keyUpUPP, KeyUpWrapper(), OIS::Object::mBuffered, OIS::Object::mCreator, populateKeyConversion(), and useRepeat.
| MacKeyboard::~MacKeyboard | ( | ) | [virtual] |
Definition at line 62 of file MacKeyboard.cpp.
References keyDownEventRef, keyDownUPP, keyModEventRef, keyModUPP, keyUpEventRef, and keyUpUPP.
| void MacKeyboard::setBuffered | ( | bool | buffered | ) | [virtual] |
Implements OIS::Object.
Definition at line 172 of file MacKeyboard.cpp.
References OIS::Object::mBuffered.
| bool MacKeyboard::isKeyDown | ( | KeyCode | key | ) | [virtual] |
| key | A KeyCode to check |
Implements OIS::Keyboard.
Definition at line 134 of file MacKeyboard.cpp.
References KeyBuffer.
| void MacKeyboard::capture | ( | ) | [virtual] |
Implements OIS::Object.
Definition at line 141 of file MacKeyboard.cpp.
References OIS::KeyListener::keyPressed(), OIS::KeyListener::keyReleased(), OIS::Keyboard::listener, OIS::MAC_KEYDOWN, OIS::MAC_KEYREPEAT, OIS::MAC_KEYUP, OIS::Object::mBuffered, and pendingEvents.
| void MacKeyboard::copyKeyStates | ( | char | keys[256] | ) | [virtual] |
Implements OIS::Keyboard.
Definition at line 324 of file MacKeyboard.cpp.
References KeyBuffer.
| std::string & MacKeyboard::getAsString | ( | KeyCode | kc | ) | [virtual] |
| kc | KeyCode to convert |
Implements OIS::Keyboard.
Definition at line 164 of file MacKeyboard.cpp.
References getString.
| virtual Interface* OIS::MacKeyboard::queryInterface | ( | Interface::IType | type | ) | [inline, virtual] |
| type | The type of interface you are looking for |
Implements OIS::Object.
Definition at line 58 of file MacKeyboard.h.
| void MacKeyboard::_initialize | ( | ) | [virtual] |
Implements OIS::Object.
Definition at line 77 of file MacKeyboard.cpp.
References KeyBuffer, keyDownEventRef, keyDownUPP, keyModEventRef, keyModUPP, keyUpEventRef, keyUpUPP, OIS::Object::mCreator, OIS::Keyboard::mModifiers, OIS_EXCEPT, prevModMask, and useRepeat.
| void MacKeyboard::_keyDownCallback | ( | EventRef | theEvent | ) |
Definition at line 179 of file MacKeyboard.cpp.
References OIS::Keyboard::Ascii, injectEvent(), keyConversion, OIS::MAC_KEYDOWN, OIS::Keyboard::mTextMode, and OIS::Keyboard::Unicode.
| void MacKeyboard::_keyUpCallback | ( | EventRef | theEvent | ) |
Definition at line 238 of file MacKeyboard.cpp.
References injectEvent(), keyConversion, and OIS::MAC_KEYUP.
| void MacKeyboard::_modChangeCallback | ( | EventRef | theEvent | ) |
Definition at line 252 of file MacKeyboard.cpp.
References OIS::Keyboard::Alt, OIS::Keyboard::Ctrl, injectEvent(), OIS::KC_APPS, OIS::KC_CAPITAL, OIS::KC_LCONTROL, OIS::KC_LMENU, OIS::KC_LSHIFT, OIS::KC_LWIN, OIS::KC_NUMLOCK, OIS::MAC_KEYDOWN, OIS::MAC_KEYUP, OIS::Keyboard::mModifiers, prevModMask, and OIS::Keyboard::Shift.
| void MacKeyboard::populateKeyConversion | ( | ) | [protected] |
Definition at line 332 of file MacKeyboard.cpp.
References OIS::KC_0, OIS::KC_1, OIS::KC_2, OIS::KC_3, OIS::KC_4, OIS::KC_5, OIS::KC_6, OIS::KC_7, OIS::KC_8, OIS::KC_9, OIS::KC_A, OIS::KC_ADD, OIS::KC_APOSTROPHE, OIS::KC_B, OIS::KC_BACK, OIS::KC_BACKSLASH, OIS::KC_C, OIS::KC_CAPITAL, OIS::KC_COMMA, OIS::KC_D, OIS::KC_DECIMAL, OIS::KC_DELETE, OIS::KC_DIVIDE, OIS::KC_DOWN, OIS::KC_E, OIS::KC_END, OIS::KC_EQUALS, OIS::KC_ESCAPE, OIS::KC_F, OIS::KC_F1, OIS::KC_F10, OIS::KC_F11, OIS::KC_F12, OIS::KC_F13, OIS::KC_F14, OIS::KC_F15, OIS::KC_F2, OIS::KC_F3, OIS::KC_F4, OIS::KC_F5, OIS::KC_F6, OIS::KC_F7, OIS::KC_F8, OIS::KC_F9, OIS::KC_G, OIS::KC_GRAVE, OIS::KC_H, OIS::KC_HOME, OIS::KC_I, OIS::KC_J, OIS::KC_K, OIS::KC_L, OIS::KC_LBRACKET, OIS::KC_LEFT, OIS::KC_M, OIS::KC_MINUS, OIS::KC_MULTIPLY, OIS::KC_N, OIS::KC_NUMPAD0, OIS::KC_NUMPAD1, OIS::KC_NUMPAD2, OIS::KC_NUMPAD3, OIS::KC_NUMPAD4, OIS::KC_NUMPAD5, OIS::KC_NUMPAD6, OIS::KC_NUMPAD7, OIS::KC_NUMPAD8, OIS::KC_NUMPAD9, OIS::KC_NUMPADENTER, OIS::KC_NUMPADEQUALS, OIS::KC_O, OIS::KC_P, OIS::KC_PERIOD, OIS::KC_PGDOWN, OIS::KC_PGUP, OIS::KC_Q, OIS::KC_R, OIS::KC_RBRACKET, OIS::KC_RETURN, OIS::KC_RIGHT, OIS::KC_S, OIS::KC_SEMICOLON, OIS::KC_SLASH, OIS::KC_SPACE, OIS::KC_SUBTRACT, OIS::KC_T, OIS::KC_TAB, OIS::KC_U, OIS::KC_UP, OIS::KC_V, OIS::KC_W, OIS::KC_X, OIS::KC_Y, OIS::KC_Z, and keyConversion.
Referenced by MacKeyboard().
| void MacKeyboard::injectEvent | ( | KeyCode | kc, | |
| unsigned int | time, | |||
| MacEventType | type, | |||
| unsigned int | txt = 0 | |||
| ) | [protected] |
Definition at line 312 of file MacKeyboard.cpp.
References KeyBuffer, OIS::Keyboard::listener, OIS::MAC_KEYUP, OIS::Object::mBuffered, and pendingEvents.
Referenced by _keyDownCallback(), _keyUpCallback(), and _modChangeCallback().
VirtualtoOIS_KeyMap OIS::MacKeyboard::keyConversion [protected] |
Definition at line 76 of file MacKeyboard.h.
Referenced by _keyDownCallback(), _keyUpCallback(), and populateKeyConversion().
std::string OIS::MacKeyboard::getString [protected] |
char OIS::MacKeyboard::KeyBuffer[256] [protected] |
Definition at line 80 of file MacKeyboard.h.
Referenced by _initialize(), copyKeyStates(), injectEvent(), and isKeyDown().
UInt32 OIS::MacKeyboard::prevModMask [protected] |
EventHandlerUPP OIS::MacKeyboard::keyDownUPP [protected] |
Definition at line 85 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
EventHandlerUPP OIS::MacKeyboard::keyUpUPP [protected] |
Definition at line 86 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
EventHandlerUPP OIS::MacKeyboard::keyModUPP [protected] |
Definition at line 87 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
EventHandlerRef OIS::MacKeyboard::keyDownEventRef [protected] |
Definition at line 90 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
EventHandlerRef OIS::MacKeyboard::keyUpEventRef [protected] |
Definition at line 91 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
EventHandlerRef OIS::MacKeyboard::keyModEventRef [protected] |
Definition at line 92 of file MacKeyboard.h.
Referenced by _initialize(), MacKeyboard(), and ~MacKeyboard().
eventStack OIS::MacKeyboard::pendingEvents [protected] |
bool OIS::MacKeyboard::useRepeat [protected] |
1.5.4