serenity/Widgets/FrameBufferSDL.h

25 lines
482 B
C
Raw Normal View History

2018-10-10 13:12:38 +00:00
#pragma once
#include "AbstractScreen.h"
#include <SDL.h>
class FrameBufferSDL final : public AbstractScreen {
public:
FrameBufferSDL(unsigned width, unsigned height);
virtual ~FrameBufferSDL() override;
void show();
2018-10-10 14:49:36 +00:00
SDL_Surface* surface() { return m_surface; }
SDL_Window* window() { return m_window; }
static FrameBufferSDL& the();
2018-10-10 13:12:38 +00:00
private:
void initializeSDL();
SDL_Window* m_window { nullptr };
SDL_Surface* m_surface { nullptr };
};