Luna/wind/Screen.h

35 lines
437 B
C++

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