28 lines
353 B
C
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;
|
||
|
};
|