TB2026-YDS Firmware
Loading...
Searching...
No Matches
screen_t Struct Reference

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

Detailed Description

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*.

Field Documentation

◆ handle_input

void(* screen_t::handle_input) (screen_t *self, ui_event_t event)

Process one input event.

◆ on_enter

void(* screen_t::on_enter) (screen_t *self)

Called when the screen is pushed.

◆ on_exit

void(* screen_t::on_exit) (screen_t *self)

Called when the screen is popped.

◆ refresh_ms

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.

◆ render

void(* screen_t::render) (screen_t *self)

Draw the screen into the framebuffer.


The documentation for this struct was generated from the following file: