2017-12-25 23:49:48 +00:00
|
|
|
#ifndef INPUT_HPP_INCLUDED
|
|
|
|
#define INPUT_HPP_INCLUDED
|
|
|
|
|
|
|
|
#include "Types/Point.hpp"
|
|
|
|
#include <string>
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
typedef enum ScrollDirection
|
|
|
|
{
|
2019-02-20 19:52:58 +00:00
|
|
|
SCROLL_NONE = -1,
|
2017-12-25 23:49:48 +00:00
|
|
|
SCROLL_DOWN = 0,
|
|
|
|
SCROLL_UP = 1
|
|
|
|
} ScrollDirection;
|
|
|
|
|
|
|
|
typedef enum Button
|
|
|
|
{
|
|
|
|
BUTTON_NONE = 0,
|
|
|
|
BUTTON_LEFT = 1,
|
|
|
|
BUTTON_MIDDLE = 2,
|
|
|
|
BUTTON_RIGHT = 3
|
|
|
|
} Button;
|
|
|
|
|
|
|
|
typedef enum Key
|
|
|
|
{
|
|
|
|
KEY_BACKSPACE = 8,
|
|
|
|
KEY_TAB = 9,
|
|
|
|
KEY_NEWLINE = 10,
|
|
|
|
KEY_SHIFT = 16,
|
|
|
|
KEY_CTRL = 17,
|
|
|
|
KEY_ALT = 18,
|
|
|
|
KEY_ESC = 27,
|
|
|
|
KEY_DEL = 127,
|
|
|
|
KEY_LEFT = 256,
|
|
|
|
KEY_UP = 257,
|
|
|
|
KEY_RIGHT = 258,
|
|
|
|
KEY_DOWN = 259,
|
|
|
|
KEY_F1 = 260,
|
|
|
|
KEY_F2 = 261,
|
|
|
|
KEY_F3 = 262,
|
|
|
|
KEY_F4 = 263,
|
|
|
|
KEY_F5 = 264,
|
|
|
|
KEY_F6 = 265,
|
|
|
|
KEY_F7 = 266,
|
|
|
|
KEY_F8 = 267,
|
|
|
|
KEY_F9 = 268,
|
|
|
|
KEY_F10 = 269,
|
|
|
|
KEY_F11 = 270,
|
|
|
|
KEY_F12 = 271
|
|
|
|
} Key;
|
|
|
|
|
|
|
|
void SetupInput();
|
|
|
|
void GainFocus();
|
|
|
|
void LoseFocus();
|
|
|
|
bool IsKeyDown(std::int32_t K);
|
2019-11-20 02:17:31 +00:00
|
|
|
void MouseEnter(std::int32_t X, std::int32_t Y);
|
|
|
|
void MouseExit(std::int32_t X, std::int32_t Y);
|
2017-12-25 23:49:48 +00:00
|
|
|
void ScrollUp();
|
|
|
|
void ScrollDown();
|
|
|
|
void MouseDown(std::int32_t B);
|
|
|
|
void MouseUp(std::int32_t B);
|
2019-01-29 20:07:44 +00:00
|
|
|
void MouseMove(const Point& P);
|
2017-12-25 23:49:48 +00:00
|
|
|
void MouseMove(std::int32_t X, std::int32_t Y);
|
|
|
|
void KeyDown(std::int32_t K);
|
|
|
|
void KeyUp(std::int32_t K);
|
|
|
|
void KeyHold(std::int32_t K, std::uint32_t Duration);
|
|
|
|
void KeyRelease(std::int32_t K);
|
|
|
|
bool ShiftNeeded(std::int32_t K);
|
|
|
|
Point GetMousePos();
|
|
|
|
|
|
|
|
#endif // INPUT_HPP_INCLUDED
|