10#define SDL_MAIN_HANDLED
16constexpr static const char *
const TAG =
"sdl";
23 void setup()
override;
66 bool capture_bgr(uint8_t *dest,
size_t row_stride)
override;
83 int32_t
pos_x_{SDL_WINDOWPOS_UNDEFINED};
84 int32_t
pos_y_{SDL_WINDOWPOS_UNDEFINED};
void set_window_options(uint32_t window_options)
int get_height() override
int snapshot_height() override
void set_headless(bool headless)
void add_key_listener(int32_t keycode, F &&callback)
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order, display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
static Sdl * instance_for_window_(uint32_t window_id)
The display owning the given window, or nullptr if it is not one of ours.
int get_height_internal() override
void process_key(uint32_t keycode, bool down)
void set_dimensions(uint16_t width, uint16_t height)
void set_position(int32_t pos_x, int32_t pos_y)
void redraw_(SDL_Rect &rect)
bool setup_failed_(const char *what)
Log an SDL failure during setup, release anything already created, and return false.
void handle_event_(const SDL_Event &event)
void dump_config() override
bool capture_bgr(uint8_t *dest, size_t row_stride) override
void destroy_renderer_()
Release the window, surface, renderer and textures, and forget them.
void draw_pixel_at(int x, int y, Color color) override
int snapshot_width() override
int get_width_internal() override
float get_setup_priority() const override
SDL_Texture * shot_target_
display::DisplayType get_display_type() override
void set_snapshot_key(int32_t keycode)
std::map< int32_t, CallbackManager< void(bool)> > key_callbacks_
Base for anything that can hand over the picture it is showing so it can be written to a file.
constexpr float HARDWARE
For components that deal with hardware and are very important like GPIO switch.