Sirikata
Classes | Typedefs | Enumerations | Functions
Sirikata::Input Namespace Reference

Classes

struct  AxisValue
class  InputDevice
class  PointerDevice
class  InputEventCompletion
 Tracks input events to ensure coherent streams of events when dispatching a single stream of input events to multiple consumers. More...
class  InputEvent
 Base class for all input events. More...
class  ButtonEvent
 Base class for keyboard/mouse/joystick button events. More...
class  ButtonPressed
 Fired whenever a button has been pushed down. More...
class  ButtonRepeated
 Fired on repeats -- whenever a button has been pushed and held down. More...
class  ButtonReleased
 Fired whenever a button is no longer held down. More...
class  ButtonDown
 In theory, this might be fired as long as a button is held down. More...
class  AxisEvent
 Upon changing the value of a mouse/joystick axis. More...
class  TextInputEvent
 SDL event fired as soon as textual input has been entered. More...
class  MouseEvent
 Base class for all pointer motion events. More...
class  MouseHoverEvent
 Event called when the cursor moves, and no buttons are down. More...
class  MouseDownEvent
 Base class for events involving a mouse click. More...
class  MouseClickEvent
 Event when the mouse was clicked (pressed and released without moving) More...
class  MousePressedEvent
 Event when the mouse was pressed. More...
class  MouseReleasedEvent
 Event when the mouse was released. More...
class  MouseDragEvent
 Event when the mouse was dragged. More...
class  WindowEvent
 Various SDL-specific events relating to the status of the top-level window. More...
class  DragAndDropEvent
class  WebViewEvent
 Events generated by a WebView calling Client.event(name, [args]) More...
class  EventResponse
 Defines the set of return values for an EventListener. More...
class  InputListener
 InputListener receives events from the InputManager. More...
struct  InputDeviceEvent
class  InputManager
class  SDLMouse
class  SDLJoystick
class  SDLKeyboard
struct  SDLKeyRepeatInfo
class  SDLInputManager

Typedefs

typedef std::tr1::shared_ptr
< InputDevice
InputDevicePtr
typedef std::tr1::weak_ptr
< InputDevice
InputDeviceWPtr
typedef std::tr1::shared_ptr
< PointerDevice
PointerDevicePtr
typedef uint32 Modifier
typedef uint32 AxisIndex
typedef int32 MouseButton
typedef int32 KeyButton
typedef std::tr1::shared_ptr
< InputEvent
InputEventPtr
typedef std::tr1::shared_ptr
< ButtonEvent
ButtonEventPtr
typedef std::tr1::shared_ptr
< ButtonPressed
ButtonPressedEventPtr
typedef std::tr1::shared_ptr
< ButtonRepeated
ButtonRepeatedEventPtr
typedef std::tr1::shared_ptr
< ButtonReleased
ButtonReleasedEventPtr
typedef std::tr1::shared_ptr
< ButtonDown
ButtonDownEventPtr
typedef std::tr1::shared_ptr
< AxisEvent
AxisEventPtr
typedef std::tr1::shared_ptr
< TextInputEvent
TextInputEventPtr
typedef std::tr1::shared_ptr
< MouseEvent
MouseEventPtr
typedef std::tr1::shared_ptr
< MouseHoverEvent
MouseHoverEventPtr
typedef std::tr1::shared_ptr
< MouseDownEvent
MouseDownEventPtr
typedef std::tr1::shared_ptr
< MouseClickEvent
MouseClickEventPtr
typedef std::tr1::shared_ptr
< MousePressedEvent
MousePressedEventPtr
typedef std::tr1::shared_ptr
< MouseReleasedEvent
MouseReleasedEventPtr
typedef std::tr1::shared_ptr
< MouseDragEvent
MouseDragEventPtr
typedef std::tr1::shared_ptr
< WindowEvent
WindowEventPtr
typedef std::tr1::shared_ptr
< DragAndDropEvent
DragAndDropEventPtr
typedef std::tr1::shared_ptr
< WebViewEvent
WebViewEventPtr
typedef std::tr1::shared_ptr
< InputDeviceEvent
InputDeviceEventPtr
typedef std::tr1::shared_ptr
< ButtonPressed
ButtonPressedPtr
typedef std::tr1::shared_ptr
< ButtonRepeated
ButtonRepeatedPtr
typedef std::tr1::shared_ptr
< ButtonReleased
ButtonReleasedPtr
typedef std::tr1::shared_ptr
< ButtonDown
ButtonDownPtr
typedef std::tr1::shared_ptr
< SDLMouse
SDLMousePtr
typedef std::tr1::shared_ptr
< SDLJoystick
SDLJoystickPtr
typedef std::tr1::shared_ptr
< SDLKeyboard
SDLKeyboardPtr
typedef std::tr1::shared_ptr
< SDLKeyRepeatInfo
SDLKeyRepeatInfoPtr

Enumerations

enum  KeyboardModifiers {
  MOD_NONE = 0, MOD_SHIFT = 1, MOD_CTRL = 2, MOD_ALT = 4,
  MOD_GUI = 8
}
enum  PointerModifiers { POINTER_ERASER = (1<<0), POINTER_CURSOR = (1<<1) }
enum  Axes {
  AXIS_CURSORX, AXIS_CURSORY, AXIS_RELX, AXIS_RELY,
  NUM_POINTER_AXES
}
enum  KeyEvent { KEY_PRESSED, KEY_DOWN, KEY_RELEASED, KEY_REPEATED }
enum  MouseDragType { DRAG_DEADBAND, DRAG_START, DRAG_DRAG, DRAG_END }
 The three types of drag events. More...
enum  WindowEventType {
  WindowShown, WindowHidden, WindowExposed, WindowMoved,
  WindowResized, WindowMinimized, WindowMaximized, WindowRestored,
  WindowMouseEnter, WindowMouseLeave, WindowFocusGained, WindowFocusLost,
  WindowQuit
}

Functions

SIRIKATA_OGRE_EXPORT bool keyIsModifier (Input::KeyButton b)
SIRIKATA_OGRE_EXPORT String keyButtonString (Input::KeyButton b)
SIRIKATA_OGRE_EXPORT String keyModifiersString (Input::Modifier m)
SIRIKATA_OGRE_EXPORT String mouseButtonString (Input::MouseButton b)
SIRIKATA_OGRE_EXPORT String axisString (Input::AxisIndex i)
SIRIKATA_OGRE_EXPORT
Input::KeyButton 
keyButtonFromStrings (std::vector< String > &parts)
SIRIKATA_OGRE_EXPORT
Input::Modifier 
keyModifiersFromStrings (std::vector< String > &parts)
SIRIKATA_OGRE_EXPORT
Input::MouseButton 
mouseButtonFromStrings (std::vector< String > &parts)
SIRIKATA_OGRE_EXPORT
Input::AxisIndex 
axisFromStrings (std::vector< String > &parts)
void ensure_initialized ()

Typedef Documentation

typedef std::tr1::shared_ptr< AxisEvent > Sirikata::Input::AxisEventPtr
typedef std::tr1::shared_ptr<ButtonDown> Sirikata::Input::ButtonDownEventPtr
typedef std::tr1::shared_ptr<ButtonDown> Sirikata::Input::ButtonDownPtr
typedef std::tr1::shared_ptr<ButtonEvent> Sirikata::Input::ButtonEventPtr
typedef std::tr1::shared_ptr<ButtonPressed> Sirikata::Input::ButtonPressedPtr
typedef std::tr1::shared_ptr<ButtonReleased> Sirikata::Input::ButtonReleasedPtr
typedef std::tr1::shared_ptr<ButtonRepeated> Sirikata::Input::ButtonRepeatedPtr
typedef std::tr1::shared_ptr< DragAndDropEvent > Sirikata::Input::DragAndDropEventPtr
typedef std::tr1::shared_ptr< InputDevice > Sirikata::Input::InputDevicePtr
typedef std::tr1::weak_ptr< InputDevice > Sirikata::Input::InputDeviceWPtr
typedef std::tr1::shared_ptr<InputEvent> Sirikata::Input::InputEventPtr
typedef uint32 Sirikata::Input::Modifier
typedef std::tr1::shared_ptr< MouseClickEvent > Sirikata::Input::MouseClickEventPtr
typedef std::tr1::shared_ptr<MouseDownEvent> Sirikata::Input::MouseDownEventPtr
typedef std::tr1::shared_ptr< MouseDragEvent > Sirikata::Input::MouseDragEventPtr
typedef std::tr1::shared_ptr<MouseEvent> Sirikata::Input::MouseEventPtr
typedef std::tr1::shared_ptr< MouseHoverEvent > Sirikata::Input::MouseHoverEventPtr
typedef std::tr1::shared_ptr<PointerDevice> Sirikata::Input::PointerDevicePtr
typedef std::tr1::shared_ptr< SDLJoystick > Sirikata::Input::SDLJoystickPtr
typedef std::tr1::shared_ptr< SDLKeyboard > Sirikata::Input::SDLKeyboardPtr
typedef std::tr1::shared_ptr< SDLMouse > Sirikata::Input::SDLMousePtr
typedef std::tr1::shared_ptr< TextInputEvent > Sirikata::Input::TextInputEventPtr
typedef std::tr1::shared_ptr< WebViewEvent > Sirikata::Input::WebViewEventPtr
typedef std::tr1::shared_ptr< WindowEvent > Sirikata::Input::WindowEventPtr

Enumeration Type Documentation

Enumerator:
AXIS_CURSORX 
AXIS_CURSORY 
AXIS_RELX 
AXIS_RELY 
NUM_POINTER_AXES 
Enumerator:
MOD_NONE 
MOD_SHIFT 
MOD_CTRL 
MOD_ALT 
MOD_GUI 
Enumerator:
KEY_PRESSED 
KEY_DOWN 
KEY_RELEASED 
KEY_REPEATED 

The three types of drag events.

The START event will only be triggered once the motion is determined to be a drag (exceeded some number of pixels). The END event happens at the time the mouse button is released (mPressure == 0)

The DRAG_END event Will not be called on release if still in the DRAG_DEADBAND state -- in this case, see MouseClickEvent.

Enumerator:
DRAG_DEADBAND 
DRAG_START 
DRAG_DRAG 
DRAG_END 
Enumerator:
POINTER_ERASER 
POINTER_CURSOR 
Enumerator:
WindowShown 
WindowHidden 
WindowExposed 
WindowMoved 
WindowResized 
WindowMinimized 
WindowMaximized 
WindowRestored 
WindowMouseEnter 
WindowMouseLeave 
WindowFocusGained 
WindowFocusLost 
WindowQuit 

Function Documentation

Input::AxisIndex Sirikata::Input::axisFromStrings ( std::vector< String > &  parts)
String Sirikata::Input::axisString ( Input::AxisIndex  i)
void Sirikata::Input::ensure_initialized ( )
Input::KeyButton Sirikata::Input::keyButtonFromStrings ( std::vector< String > &  parts)

References ensure_initialized().

String Sirikata::Input::keyButtonString ( Input::KeyButton  b)
bool Sirikata::Input::keyIsModifier ( Input::KeyButton  b)
Input::Modifier Sirikata::Input::keyModifiersFromStrings ( std::vector< String > &  parts)

References MOD_ALT, MOD_CTRL, MOD_GUI, MOD_NONE, and MOD_SHIFT.

String Sirikata::Input::keyModifiersString ( Input::Modifier  m)

References MOD_ALT, MOD_CTRL, MOD_GUI, MOD_NONE, and MOD_SHIFT.

Input::MouseButton Sirikata::Input::mouseButtonFromStrings ( std::vector< String > &  parts)
String Sirikata::Input::mouseButtonString ( Input::MouseButton  b)