feat: separate wayland implementation
This commit is contained in:
24
src/window.cpp
Normal file
24
src/window.cpp
Normal 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(); }
|
||||
|
||||
Reference in New Issue
Block a user