Files
Aerofoil/PortabilityLayer/InputManager.h

28 lines
712 B
C
Raw Permalink Normal View History

2019-12-21 18:40:17 -05:00
#pragma once
2019-12-29 17:39:19 -05:00
#include "GpVOSEvent.h"
struct GpGamepadInputEvent;
2020-02-25 23:09:09 -05:00
struct GpKeyboardInputEvent;
struct GpMouseInputEvent;
2019-12-31 03:55:17 -05:00
struct KeyDownStates;
2019-12-25 22:20:10 -05:00
2019-12-21 18:40:17 -05:00
namespace PortabilityLayer
{
struct Vec2i;
2019-12-21 18:40:17 -05:00
class InputManager
{
public:
2020-01-05 16:41:04 -05:00
virtual const KeyDownStates *GetKeys() const = 0;
2019-12-29 17:39:19 -05:00
virtual void ApplyKeyboardEvent(const GpKeyboardInputEvent &vosEvent) = 0;
virtual void ApplyGamepadEvent(const GpGamepadInputEvent &vosEvent) = 0;
2020-02-25 23:09:09 -05:00
virtual void ApplyMouseEvent(const GpMouseInputEvent &vosEvent) = 0;
2019-12-29 17:39:19 -05:00
virtual int16_t GetGamepadAxis(unsigned int playerNum, GpGamepadAxis_t gamepadAxis) = 0;
virtual Vec2i GetMousePosition() const = 0;
2020-01-05 02:33:03 -05:00
virtual void ClearState() = 0;
2019-12-21 18:40:17 -05:00
static InputManager *GetInstance();
};
}