This commit is contained in:
Jorijn van der Graaf 2025-11-16 20:42:48 +01:00
commit e795ab880c
6 changed files with 89 additions and 24 deletions

View file

@ -62,9 +62,11 @@ export namespace Crafter {
xdg_wm_base* xdgWmBase = NULL;
zxdg_decoration_manager_v1* manager = NULL;
wl_surface* surface = NULL;
wl_buffer* buffer = NULL;
wl_buffer* frontBuffer = NULL;
wl_buffer* backBuffer = NULL;
xdg_surface* xdgSurface = NULL;
wl_display* display = NULL;
wl_callback* cb = nullptr;
inline static wl_compositor* compositor = NULL;
static wl_pointer_listener pointer_listener;
static wl_keyboard_listener keyboard_listener;
@ -72,6 +74,8 @@ export namespace Crafter {
static wl_registry_listener registry_listener;
static xdg_surface_listener xdg_surface_listener;
static xdg_toplevel_listener xdg_toplevel_listener;
static wl_callback_listener surface_frame_listener;
static void wl_surface_frame_done(void *data, wl_callback *cb, uint32_t time);
static void PointerListenerHandleMotion(void* data, wl_pointer* wl_pointer, uint time, wl_fixed_t surface_x, wl_fixed_t surface_y);
static void PointerListenerHandleAxis(void*, wl_pointer*, std::uint32_t, std::uint32_t, wl_fixed_t value);
static void PointerListenerHandleEnter(void* data, wl_pointer* wl_pointer, uint serial, wl_surface* surface, wl_fixed_t surface_x, wl_fixed_t surface_y);