OIS::MacKeyboard Class Reference

#include <src/ois/mac/MacKeyboard.h>

Inheritance diagram for OIS::MacKeyboard:

OIS::Keyboard OIS::Object

List of all members.

Public Member Functions

virtual void _initialize ()
void _keyDownCallback (EventRef theEvent)
void _keyUpCallback (EventRef theEvent)
void _modChangeCallback (EventRef theEvent)
virtual void capture ()
virtual void copyKeyStates (char keys[256]) const
virtual std::stringgetAsString (KeyCode key)
virtual bool isKeyDown (KeyCode key) const
 MacKeyboard (InputManager *creator, bool buffered, bool repeat)
virtual InterfacequeryInterface (Interface::IType type)
virtual void setBuffered (bool buffered)
virtual ~MacKeyboard ()

Protected Types

typedef std::list
< MacKeyStackEvent
eventStack
typedef std::map< UInt32, KeyCodeVirtualtoOIS_KeyMap

Protected Member Functions

void injectEvent (KeyCode kc, unsigned int time, MacEventType type, unsigned int txt=0)
void populateKeyConversion ()

Protected Attributes

std::string getString
char KeyBuffer [256]
VirtualtoOIS_KeyMap keyConversion
EventHandlerRef keyDownEventRef
EventHandlerUPP keyDownUPP
EventHandlerRef keyModEventRef
EventHandlerUPP keyModUPP
EventHandlerRef keyUpEventRef
EventHandlerUPP keyUpUPP
eventStack pendingEvents
UInt32 prevModMask
bool useRepeat


Member Typedef Documentation

typedef std::list<MacKeyStackEvent> OIS::MacKeyboard::eventStack [protected]

typedef std::map<UInt32, KeyCode> OIS::MacKeyboard::VirtualtoOIS_KeyMap [protected]


Constructor & Destructor Documentation

MacKeyboard::MacKeyboard ( InputManager creator,
bool  buffered,
bool  repeat 
)

MacKeyboard::~MacKeyboard (  )  [virtual]


Member Function Documentation

void MacKeyboard::_initialize (  )  [virtual]

void MacKeyboard::_keyDownCallback ( EventRef  theEvent  ) 

void MacKeyboard::_keyUpCallback ( EventRef  theEvent  ) 

void MacKeyboard::_modChangeCallback ( EventRef  theEvent  ) 

void MacKeyboard::capture (  )  [virtual]

Remarks:
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

References OIS::KeyListener::keyPressed(), OIS::KeyListener::keyReleased(), OIS::MAC_KEYDOWN, OIS::MAC_KEYREPEAT, OIS::MAC_KEYUP, OIS::Object::mBuffered, OIS::Keyboard::mListener, and pendingEvents.

void MacKeyboard::copyKeyStates ( char  keys[256]  )  const [virtual]

Remarks:
Copies the state of the keys into the sent buffer (in the form of 1 is down and 0 is up)

Implements OIS::Keyboard.

References KeyBuffer.

std::string & MacKeyboard::getAsString ( KeyCode  kc  )  [virtual]

Remarks:
Translates KeyCode to string representation. For example, KC_ENTER will be "Enter" - Locale specific of course.
Parameters:
kc KeyCode to convert
Returns:
The string as determined from the current locale

Implements OIS::Keyboard.

References getString.

void MacKeyboard::injectEvent ( KeyCode  kc,
unsigned int  time,
MacEventType  type,
unsigned int  txt = 0 
) [protected]

bool MacKeyboard::isKeyDown ( KeyCode  key  )  const [virtual]

Remarks:
Returns true if key is donwn
Parameters:
key A KeyCode to check

Implements OIS::Keyboard.

References KeyBuffer.

void MacKeyboard::populateKeyConversion (  )  [protected]

virtual Interface* OIS::MacKeyboard::queryInterface ( Interface::IType  type  )  [inline, virtual]

Remarks:
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters:
type The type of interface you are looking for

Implements OIS::Object.

void MacKeyboard::setBuffered ( bool  buffered  )  [virtual]

Remarks:
Sets buffered mode

Implements OIS::Object.

References OIS::Object::mBuffered.


Member Data Documentation

Referenced by getAsString().

char OIS::MacKeyboard::KeyBuffer[256] [protected]

EventHandlerRef OIS::MacKeyboard::keyDownEventRef [protected]

EventHandlerUPP OIS::MacKeyboard::keyDownUPP [protected]

EventHandlerRef OIS::MacKeyboard::keyModEventRef [protected]

EventHandlerUPP OIS::MacKeyboard::keyModUPP [protected]

EventHandlerRef OIS::MacKeyboard::keyUpEventRef [protected]

EventHandlerUPP OIS::MacKeyboard::keyUpUPP [protected]

Referenced by capture(), and injectEvent().

UInt32 OIS::MacKeyboard::prevModMask [protected]

Referenced by _initialize(), and _modChangeCallback().

bool OIS::MacKeyboard::useRepeat [protected]

Referenced by _initialize(), and MacKeyboard().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:22:18 2009 for Orxonox by  doxygen 1.5.6