|
TB2026-YDS Firmware
|
A screen's behaviour, as a table of function pointers. More...
#include <screen.h>
Data Fields | |
| void(* | on_enter )(screen_t *self) |
| void(* | on_exit )(screen_t *self) |
| void(* | handle_input )(screen_t *self, ui_event_t event) |
| void(* | render )(screen_t *self) |
| unsigned | refresh_ms |
A screen's behaviour, as a table of function pointers.
Concrete screens put this struct first, so their pointer can be cast to screen_t*.
| void(* screen_t::handle_input) (screen_t *self, ui_event_t event) |
Process one input event.
| void(* screen_t::on_enter) (screen_t *self) |
Called when the screen is pushed.
| void(* screen_t::on_exit) (screen_t *self) |
Called when the screen is popped.
| unsigned screen_t::refresh_ms |
0 (default): event-driven, the UI task blocks until input. >0: the task wakes every refresh_ms to re-render this screen, for live data (e.g. the stats pages). Only live screens cost periodic wake-ups.
| void(* screen_t::render) (screen_t *self) |
Draw the screen into the framebuffer.