Files
t-embed-insecam-widget/main/ui.h
T
Juli 65a391940b insecam desk widget for the LilyGO T-Embed
ESP-IDF 5.5 + LVGL 9 firmware that plays random public cameras from
insecam.org on the T-Embed's 320x170 screen, live MJPEG where available,
a new camera every 20 seconds. Knob steps through cameras, LED ring shows
the countdown. Auto-detects the original vs CC1101 board, reuses Wi-Fi
credentials from NVS and falls back to a captive-portal setup hotspot.
2026-09-17 00:38:09 +02:00

24 lines
888 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
// All calls take the LVGL lock themselves; safe from any task.
void ui_init(void);
// Full-screen text page (boot, Wi-Fi setup, fatal errors).
void ui_status(const char *title, const char *msg);
// Switch to the camera page.
void ui_show_camera_page(void);
// Hand a freshly decoded 320x170 RGB565 frame to the canvas. The buffer stays
// owned by the caller and must not be written until the next swap.
void ui_present_frame(uint16_t *rgb565);
void ui_set_caption(const char *place, const char *meta);
// Badge in the top-right corner: "LIVE", "PAUSED", "..." — NULL hides it.
void ui_set_badge(const char *text, uint32_t rgb);
// 0..1000 countdown bar; <0 hides the bar.
void ui_set_progress(int permille);
void ui_toast(const char *msg, uint32_t ms);
void ui_set_overlay_visible(bool visible);
bool ui_overlay_visible(void);