AlpacaLibary  1.63
A closed source C++ bot for OSRS
Input.hpp
Go to the documentation of this file.
1 #ifndef INPUT_HPP_INCLUDED
2 #define INPUT_HPP_INCLUDED
3 
4 #include "Types/Point.hpp"
5 #include <string>
6 #include <cstdint>
7 
8 typedef enum ScrollDirection
9 {
12  SCROLL_UP = 1
14 
15 typedef enum Button
16 {
20  BUTTON_RIGHT = 3
22 
23 typedef enum Key
24 {
26  KEY_TAB = 9,
28  KEY_SHIFT = 16,
29  KEY_CTRL = 17,
30  KEY_ALT = 18,
31  KEY_ESC = 27,
32  KEY_DEL = 127,
33  KEY_LEFT = 256,
34  KEY_UP = 257,
35  KEY_RIGHT = 258,
36  KEY_DOWN = 259,
37  KEY_F1 = 260,
38  KEY_F2 = 261,
39  KEY_F3 = 262,
40  KEY_F4 = 263,
41  KEY_F5 = 264,
42  KEY_F6 = 265,
43  KEY_F7 = 266,
44  KEY_F8 = 267,
45  KEY_F9 = 268,
46  KEY_F10 = 269,
47  KEY_F11 = 270,
48  KEY_F12 = 271
49 } Key;
50 
51 void SetupInput();
52 void GainFocus();
53 void LoseFocus();
54 bool IsKeyDown(std::int32_t K);
55 void MouseEnter(std::int32_t X, std::int32_t Y);
56 void MouseExit(std::int32_t X, std::int32_t Y);
57 void ScrollUp();
58 void ScrollDown();
59 void MouseDown(std::int32_t B);
60 void MouseUp(std::int32_t B);
61 void MouseMove(const Point& P);
62 void MouseMove(std::int32_t X, std::int32_t Y);
63 void KeyDown(std::int32_t K);
64 void KeyUp(std::int32_t K);
65 void KeyHold(std::int32_t K, std::uint32_t Duration);
66 void KeyRelease(std::int32_t K);
67 bool ShiftNeeded(std::int32_t K);
69 
70 #endif // INPUT_HPP_INCLUDED
void GainFocus()
Button
Definition: Input.hpp:16
@ BUTTON_RIGHT
Definition: Input.hpp:20
@ BUTTON_NONE
Definition: Input.hpp:17
@ BUTTON_LEFT
Definition: Input.hpp:18
@ BUTTON_MIDDLE
Definition: Input.hpp:19
void KeyRelease(std::int32_t K)
bool IsKeyDown(std::int32_t K)
void MouseExit(std::int32_t X, std::int32_t Y)
void SetupInput()
void KeyUp(std::int32_t K)
void LoseFocus()
void KeyHold(std::int32_t K, std::uint32_t Duration)
void ScrollDown()
void MouseMove(const Point &P)
void ScrollUp()
Point GetMousePos()
void MouseDown(std::int32_t B)
Key
Definition: Input.hpp:24
@ KEY_F4
Definition: Input.hpp:40
@ KEY_CTRL
Definition: Input.hpp:29
@ KEY_UP
Definition: Input.hpp:34
@ KEY_F9
Definition: Input.hpp:45
@ KEY_F6
Definition: Input.hpp:42
@ KEY_F7
Definition: Input.hpp:43
@ KEY_NEWLINE
Definition: Input.hpp:27
@ KEY_F10
Definition: Input.hpp:46
@ KEY_DEL
Definition: Input.hpp:32
@ KEY_TAB
Definition: Input.hpp:26
@ KEY_LEFT
Definition: Input.hpp:33
@ KEY_RIGHT
Definition: Input.hpp:35
@ KEY_F5
Definition: Input.hpp:41
@ KEY_SHIFT
Definition: Input.hpp:28
@ KEY_F12
Definition: Input.hpp:48
@ KEY_F2
Definition: Input.hpp:38
@ KEY_F3
Definition: Input.hpp:39
@ KEY_F8
Definition: Input.hpp:44
@ KEY_BACKSPACE
Definition: Input.hpp:25
@ KEY_DOWN
Definition: Input.hpp:36
@ KEY_F11
Definition: Input.hpp:47
@ KEY_ESC
Definition: Input.hpp:31
@ KEY_ALT
Definition: Input.hpp:30
@ KEY_F1
Definition: Input.hpp:37
void KeyDown(std::int32_t K)
void MouseUp(std::int32_t B)
void MouseEnter(std::int32_t X, std::int32_t Y)
bool ShiftNeeded(std::int32_t K)
ScrollDirection
Definition: Input.hpp:9
@ SCROLL_NONE
Definition: Input.hpp:10
@ SCROLL_DOWN
Definition: Input.hpp:11
@ SCROLL_UP
Definition: Input.hpp:12
Definition: Point.hpp:10