TB2026-YDS Firmware
Loading...
Searching...
No Matches
screen.h
Go to the documentation of this file.
1
12#pragma once
13
14#include "event.h"
15
22
24typedef struct screen_t screen_t;
25
31struct screen_t {
32 void (*on_enter)(screen_t *self);
33 void (*on_exit)(screen_t *self);
34 void (*handle_input)(screen_t *self, ui_event_t event);
35 void (*render)(screen_t *self);
36 unsigned refresh_ms;
39};
40
Input event vocabulary shared by screens and the navigator.
ui_event_t
A single UI input event, produced from button/encoder input.
Definition event.h:19
A screen's behaviour, as a table of function pointers.
Definition screen.h:31
void(* handle_input)(screen_t *self, ui_event_t event)
Definition screen.h:34
void(* on_enter)(screen_t *self)
Definition screen.h:32
unsigned refresh_ms
Definition screen.h:36
void(* on_exit)(screen_t *self)
Definition screen.h:33
void(* render)(screen_t *self)
Definition screen.h:35