Luna/wind/Screen.h
apio fa6534004a
wind: Add a simple display server skeleton using libui
No client functionality yet, but it's a start.
2023-08-22 13:36:41 +02:00

28 lines
353 B
C++

#pragma once
#include <luna/OwnedPtr.h>
#include <ui/Canvas.h>
constexpr int BYTES_PER_PIXEL = 4;
class Screen
{
public:
static Result<Screen> open();
ui::Canvas& canvas()
{
return m_canvas;
}
int size() const
{
return m_size;
}
void sync();
private:
ui::Canvas m_canvas;
int m_size;
};