feat: input handler class init
This commit is contained in:
67
include/input/wayland.h
Normal file
67
include/input/wayland.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
#ifndef H_WAYLAND_INPUT_
|
||||
#define H_WAYLAND_INPUT_
|
||||
|
||||
#include <wayland-client-protocol.h>
|
||||
|
||||
class WaylandInputHandler {
|
||||
public:
|
||||
static WaylandInputHandler* GetInstance();
|
||||
private:
|
||||
static void handle_pointer_enter(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t serial,
|
||||
struct wl_surface *surface,
|
||||
wl_fixed_t surface_x,
|
||||
wl_fixed_t surface_y);
|
||||
static void handle_pointer_leave(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t serial,
|
||||
struct wl_surface *surface);
|
||||
static void handle_pointer_motion(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t time,
|
||||
wl_fixed_t surface_x,
|
||||
wl_fixed_t surface_y);
|
||||
static void handle_pointer_button(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t serial,
|
||||
uint32_t time,
|
||||
uint32_t button,
|
||||
uint32_t state);
|
||||
static void handle_pointer_axis(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t time,
|
||||
uint32_t axis,
|
||||
wl_fixed_t value);
|
||||
static void handle_pointer_frame(void *data,
|
||||
struct wl_pointer *wl_pointer);
|
||||
static void handle_pointer_axis_source(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t axis_source);
|
||||
static void handle_pointer_axis_stop(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t time,
|
||||
uint32_t axis);
|
||||
static void handle_pointer_axis_discrete(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t axis,
|
||||
int32_t discrete);
|
||||
static void handle_pointer_axis_value120(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t axis,
|
||||
int32_t value120);
|
||||
static void handle_pointer_axis_relative_direction(void *data,
|
||||
struct wl_pointer *wl_pointer,
|
||||
uint32_t axis,
|
||||
uint32_t direction);
|
||||
private:
|
||||
WaylandInputHandler();
|
||||
~WaylandInputHandler() = default;
|
||||
private:
|
||||
static WaylandInputHandler* s_instance;
|
||||
private:
|
||||
struct wl_pointer_listener m_pointer_listener;
|
||||
};
|
||||
|
||||
#endif // H_WAYLAND_INPUT_
|
||||
Reference in New Issue
Block a user