feat: input handler work
This commit is contained in:
@@ -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_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user