6#ifndef EGT_DETAIL_SCREEN_SDLSCREEN_H
7#define EGT_DETAIL_SCREEN_SDLSCREEN_H
15#include <egt/asio.hpp>
16#include <egt/detail/meta.h>
18#include <egt/screen.h>
69 std::unique_ptr<detail::SDLData> m_priv;
85 struct SDLInput :
public Input
Application definition.
Definition app.h:49
Manages one of more buffers that make up a Screen.
Definition screen.h:34
std::vector< Rect > DamageArray
Type used for damage arrays.
Definition screen.h:40
EGT_NODISCARD Size size() const
Size of the screen.
Definition screen.h:75
Screen in an SDL window.
Definition sdlscreen.h:35
SDLScreen(Application &app, const Size &size=Size(800, 480), const std::string &name={})
void key_event(EventId e, const Key &key)
std::thread m_thread
Internal thread for event processing.
Definition sdlscreen.h:72
void quit()
Definition sdlscreen.h:54
SDLScreen(SDLScreen &&)=delete
SDLScreen & operator=(SDLScreen &&)=delete
Application & m_app
Application reference.
Definition sdlscreen.h:95
void flip(const DamageArray &damage) override
Perform a flip of the buffers.
SDLInput m_in
Custom input for dispatching events.
Definition sdlscreen.h:92
std::atomic< bool > m_quit
Flag to quit thread.
Definition sdlscreen.h:75
SDLScreen(const SDLScreen &)=delete
void schedule_flip() override
Schedule a flip to occur later.
Definition sdlscreen.h:49
void pointer_event(EventId e, const Pointer &pointer)
void sdl_draw(const DamageArray &damage)
SDLScreen & operator=(const SDLScreen &)=delete
asio::io_context m_io
Internal io context.
Definition sdlscreen.h:78
static KeyboardCode sdl_to_egtkeys(int key)
EventId
Event identifiers.
Definition event.h:36
SizeType< DefaultDim, detail::Compatible::normal > Size
Helper type alias.
Definition geometry.h:573
KeyboardCode
Key codes that represent a physical key.
Definition keycode.h:26
EGT framework namespace.
Definition animation.h:24
Keyboard event data.
Definition event.h:165
Pointer event data.
Definition event.h:79