feat: separate wayland implementation

This commit is contained in:
2026-02-13 13:27:06 +01:00
parent 696d55db02
commit ae9de0a22e
11 changed files with 635 additions and 470 deletions

24
src/window.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <stdio.h>
#include "window.h"
#define WINDOW_WAYLAND 1
#ifdef WINDOW_WAYLAND
#include "window/wayland.h"
#endif
Window::Window(size_t width, size_t height)
: m_last_time(0), m_width(width), m_height(height) {
#ifdef WINDOW_WAYLAND
m_impl = new WaylandWindowImpl(width, height);
#endif
}
Window::~Window() {}
size_t Window::GetWidth() const { return m_impl->GetWidth(); }
size_t Window::GetHeight() const { return m_impl->GetHeight(); }
bool Window::Running() const { return m_running && m_impl->Dispatch(); }