#pragma once #include "app.h" // The display task calls enter() once when the content is selected (the whole // canvas is then copied to both buffers), then every frame tick() followed by // draw() on the buffer being prepared. Any of them may be NULL. typedef struct { void (*enter)(const show_t *s); // draw static parts into the canvas void (*tick)(void); // update the canvas; mark changes with canvas_dirty() bool (*draw)(uint8_t *fb, int buf); // draw into the frame buffer; true if it changed } content_ops_t; const content_ops_t *content_ops(content_id_t c);