feat: input handler work

This commit is contained in:
2026-02-25 10:08:29 +01:00
parent dde47e7fac
commit 73fda759c5
10 changed files with 174 additions and 28 deletions

View File

@@ -2,11 +2,11 @@
#ifndef H_WAYLAND_INPUT_
#define H_WAYLAND_INPUT_
#include "input.h"
#include <wayland-client-protocol.h>
class WaylandInputHandler {
public:
static WaylandInputHandler* GetInstance();
class WaylandInputHandler : public InputHandlerImpl {
private:
static void handle_pointer_enter(void *data,
struct wl_pointer *wl_pointer,
@@ -58,10 +58,16 @@ private:
private:
WaylandInputHandler();
~WaylandInputHandler() = default;
private:
static WaylandInputHandler* s_instance;
friend class InputHandler;
public:
size_t GetMouseX() override;
size_t GetMouseY() override;
private:
struct wl_pointer_listener m_pointer_listener;
wl_fixed_t m_surface_x;
wl_fixed_t m_surface_y;
};
#endif // H_WAYLAND_INPUT_