diff options
Diffstat (limited to 'main/local_screens.h')
| -rw-r--r-- | main/local_screens.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/main/local_screens.h b/main/local_screens.h index ffe9a3d..f1e4876 100644 --- a/main/local_screens.h +++ b/main/local_screens.h @@ -1,5 +1,7 @@ #pragma once +#include <stdbool.h> + #include "esp_err.h" // Initialize the local-screen renderer. Allocates a PSRAM scratch buffer @@ -20,9 +22,15 @@ esp_err_t local_screens_show_ip(void); // until the next /frame arrives. esp_err_t local_screens_show_loading(void); -// Repaint the current best screen for `state`. Used after the BOOT-button -// 15-second overlay expires. -// UNCONFIGURED -> IP screen -// ASLEEP -> (caller handles backlight; this paints a black FB) -// AWAKE -> black FB; Scrypted's next /frame restores live content -esp_err_t local_screens_restore_for_state(void); +// Show the identity ("who am I") screen for `duration_ms`, then drop the +// backlight off. Used by the BOOT button short-press (any state) and by +// the touch handler when the device is unconfigured. +esp_err_t local_screens_overlay(uint32_t duration_ms); + +// True while the identity overlay is currently shown (timer armed). +// Used by the touch handler to make a second tap dismiss the overlay +// instead of re-arming it. +bool local_screens_overlay_active(void); + +// Dismiss the overlay now: cancel the timer and drop the backlight. +void local_screens_overlay_dismiss(void); |
