Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::InputManager Class Referenceabstract

#include <aurore/core/input.hpp>

Inheritance diagram for aurore::InputManager:
aurore::HeadlessInputManager

Public Member Functions

virtual ~InputManager ()
 
virtual short getControllersConnectedCount ()=0
 
virtual void updateUnifiedControllerState (ControllerState *state)=0
 
virtual void updateControllerState (ControllerState *state, int controller)=0
 
virtual bool getKeyboardKeyState (AuroreKeyboardScancode state)=0
 
virtual void updateTouchStates (std::vector< RawTouchState > *states)=0
 
virtual void updateMouseStates (RawMouseState *state)=0
 
virtual void sendRumble (unsigned short controller, unsigned short lowFreqMotor, unsigned short highFreqMotor)=0
 
virtual void runloopStart ()
 
virtual void drawCursor (NVGcontext *vg)
 
virtual void setPointerLock (bool lock)
 
Event< bool > * getMouseCusorEntered ()
 
Event< Point > * getMouseCusorOffsetChanged ()
 
Event< Point > * getMouseScrollOffsetChanged ()
 
Event< SensorEvent > * getControllerSensorStateChanged ()
 
Event< KeyState > * getKeyboardKeyStateChanged ()
 

Static Public Member Functions

static TouchState computeTouchState (RawTouchState currentTouch, TouchState lastFrameState)
 
static MouseState computeMouseState (RawMouseState currentTouch, MouseState lastFrameState)
 
static ControllerButton mapControllerState (ControllerButton button)
 

Constructor & Destructor Documentation

◆ ~InputManager()

virtual aurore::InputManager::~InputManager ( )
inlinevirtual

Member Function Documentation

◆ computeMouseState()

static MouseState aurore::InputManager::computeMouseState ( RawMouseState  currentTouch,
MouseState  lastFrameState 
)
static

Calculate current touch phase based on it's previous state

◆ computeTouchState()

static TouchState aurore::InputManager::computeTouchState ( RawTouchState  currentTouch,
TouchState  lastFrameState 
)
static

Calculate current touch phase based on it's previous state

◆ drawCursor()

virtual void aurore::InputManager::drawCursor ( NVGcontext *  vg)
inlinevirtual

◆ getControllersConnectedCount()

virtual short aurore::InputManager::getControllersConnectedCount ( )
pure virtual

◆ getControllerSensorStateChanged()

Event< SensorEvent > * aurore::InputManager::getControllerSensorStateChanged ( )
inline

◆ getKeyboardKeyState()

virtual bool aurore::InputManager::getKeyboardKeyState ( AuroreKeyboardScancode  state)
pure virtual

◆ getKeyboardKeyStateChanged()

Event< KeyState > * aurore::InputManager::getKeyboardKeyStateChanged ( )
inline

◆ getMouseCusorEntered()

Event< bool > * aurore::InputManager::getMouseCusorEntered ( )
inline

◆ getMouseCusorOffsetChanged()

Event< Point > * aurore::InputManager::getMouseCusorOffsetChanged ( )
inline

◆ getMouseScrollOffsetChanged()

Event< Point > * aurore::InputManager::getMouseScrollOffsetChanged ( )
inline

◆ mapControllerState()

static ControllerButton aurore::InputManager::mapControllerState ( ControllerButton  button)
static

◆ runloopStart()

virtual void aurore::InputManager::runloopStart ( )
inlinevirtual

Called once every runloop cycle to perform some cleanup before new one. For internal call only

◆ sendRumble()

virtual void aurore::InputManager::sendRumble ( unsigned short  controller,
unsigned short  lowFreqMotor,
unsigned short  highFreqMotor 
)
pure virtual

Calls to update gamepad's rumble state.

Implemented in aurore::HeadlessInputManager.

◆ setPointerLock()

virtual void aurore::InputManager::setPointerLock ( bool  lock)
inlinevirtual

◆ updateControllerState()

virtual void aurore::InputManager::updateControllerState ( ControllerState *  state,
int  controller 
)
pure virtual

Called once every frame to fill the given ControllerState struct with the controller state.

Implemented in aurore::HeadlessInputManager.

◆ updateMouseStates()

virtual void aurore::InputManager::updateMouseStates ( RawMouseState *  state)
pure virtual

Called once every frame to fill the given RawTouchState struct with the raw touch data.

Implemented in aurore::HeadlessInputManager.

◆ updateTouchStates()

virtual void aurore::InputManager::updateTouchStates ( std::vector< RawTouchState > *  states)
pure virtual

Called once every frame to fill the given RawTouchState struct with the raw touch data.

Implemented in aurore::HeadlessInputManager.

◆ updateUnifiedControllerState()

virtual void aurore::InputManager::updateUnifiedControllerState ( ControllerState *  state)
pure virtual

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