2022-03-17 15:53:45 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
2022-03-17 20:55:04 +01:00
|
|
|
#include <deque>
|
|
|
|
#include "../helpers/WLClasses.hpp"
|
2022-03-17 15:53:45 +01:00
|
|
|
|
|
|
|
class CInputManager {
|
|
|
|
public:
|
|
|
|
|
|
|
|
void onMouseMoved(wlr_event_pointer_motion*);
|
2022-03-17 16:56:33 +01:00
|
|
|
void onMouseWarp(wlr_event_pointer_motion_absolute*);
|
2022-03-18 20:42:49 +01:00
|
|
|
void onMouseButton(wlr_event_pointer_button*);
|
2022-03-17 20:55:04 +01:00
|
|
|
void onKeyboardKey(wlr_event_keyboard_key*);
|
|
|
|
void onKeyboardMod(void*);
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-03-17 20:55:04 +01:00
|
|
|
void newKeyboard(wlr_input_device*);
|
2022-03-18 22:53:27 +01:00
|
|
|
void newMouse(wlr_input_device*);
|
2022-03-17 19:03:15 +01:00
|
|
|
|
|
|
|
Vector2D getMouseCoordsInternal();
|
|
|
|
|
2022-03-17 15:53:45 +01:00
|
|
|
private:
|
|
|
|
Vector2D m_vMouseCoords = Vector2D(0,0);
|
|
|
|
Vector2D m_vWLRMouseCoords = Vector2D(0,0);
|
|
|
|
|
2022-03-17 20:55:04 +01:00
|
|
|
std::deque<SKeyboard> m_dKeyboards;
|
|
|
|
|
2022-03-17 15:53:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inline std::unique_ptr<CInputManager> g_pInputManager;
|