44 s_pluginToast.
init(cp.c_str(), toIcon(icon), duration_ms,
true);
61 info->init(cpTitle.c_str(), cpBody.c_str());
Discovers, loads, runs and unloads WASM plugins on the badge.
static PluginManager & instance() noexcept
uint8_t pluginBaseDepth() const noexcept
void init(const char *message, Icon icon=Icon::NONE, uint16_t durationMs=1500, bool dismissible=true)
Initializes toast message content and timing behavior.
void popToDepth(uint8_t targetDepth)
Pops views until the stack depth is at most targetDepth.
void render(bool synchronous=false)
Render current view (and modal if present) and flush to display.
static ViewStack & instance()
Returns singleton view-stack instance.
void showModal(IView *modal)
void push(IView *view, void *context=nullptr)
int host_ui_pop(void)
Pop the topmost view.
int host_ui_repaint(void)
Force a repaint of the current view.
int host_ui_push_message(const char *text, uint8_t icon, uint32_t duration_ms)
Show a blocking message view that auto-dismisses after duration_ms.
int host_ui_push_info(const char *title, const char *body)
Show a scrollable info screen with title and body.
int host_ui_push_toast(const char *text, uint8_t icon, uint16_t duration_ms)
Show a transient toast overlay.
int host_ui_pop_to_plugin(void)
Pop back to the plugin's first view.
int host_ui_wink(uint8_t count, uint16_t period_ms)
Blink the backlight as a visual identification signal.
CDC Badge OS plugin host API - canonical C ABI contract.
#define HOST_ERR_INVALID_ARG
Internal UTF-8 <-> CP437 helpers for the plugin host API boundary.
void winkBacklight(uint8_t count=2, uint16_t period_ms=150)
Blink the backlight as a visual "look at me" signal.
std::string toDisplay(const char *utf8)
Decode a UTF-8 (with optional HTML entities) string into CP437 bytes.