29 lines
1.3 KiB
C++
29 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "WaylandPointerEvent.h"
|
|
|
|
class WaylandPointerInterface
|
|
{
|
|
public:
|
|
WaylandPointerInterface(wl_pointer* pointer);
|
|
|
|
~WaylandPointerInterface();
|
|
|
|
private:
|
|
static void pointerEnterEvent(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 pointerLeaveEvent(void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface);
|
|
static void pointerMotionEvent(void *data, struct wl_pointer *wl_pointer, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
|
static void pointerButtonEvent(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state);
|
|
static void pointerFrameEvent(void *data, struct wl_pointer *wl_pointer);
|
|
|
|
void onPointerButton(uint32_t serial, uint32_t time, uint32_t button, uint32_t state);
|
|
void onPointerLeave(uint32_t serial);
|
|
void onPointerEnter(uint32_t serial, struct wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
|
void onPointerMotion(uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
|
void onPointerFrame();
|
|
|
|
wl_pointer* mPointer{nullptr};
|
|
wl_pointer_listener mPointerListener;
|
|
|
|
WaylandPointerEvent mWorkingPointerEvent;
|
|
};
|