SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
Loading...
Searching...
No Matches
ui_widget_mgr.h File Reference
#include "ipc_ui_protocol.h"
#include "lvgl.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define UI_ITEM_ADD_OK_NO_CHILD   (-3)

Functions

void ui_widget_mgr_init (lv_obj_t *parent)
 Called by ipc_ui_init() itself — never call it directly.
void ui_widget_mgr_set_parent (lv_obj_t *parent)
 Clears all widgets and sets the new parent; called only via ipc_ui_set_container().
bool ui_widget_mgr_needs_container (void)
 True while the parent is NULL; no caller anywhere.
int ui_widget_mgr_create (const ipc_ui_create_t *cfg)
 Creates a widget from a config; handle 0-31, -1 table full, -2 invalid type.
int ui_widget_mgr_create_sprite (const lv_image_dsc_t *dsc, int16_t x, int16_t y)
 Creates an image sprite in the same handle table.
void ui_widget_mgr_set_sprite_image (int handle, const lv_image_dsc_t *dsc)
 Swaps a sprite's image; the descriptor comes from game_sprite_lookup().
void ui_widget_mgr_delete (int handle)
 Deletes one widget and frees its handle.
void ui_widget_mgr_clear_all (void)
 Deletes every widget and resets the handle table.
void ui_widget_mgr_set_text (int handle, const char *text)
 Sets a widget's text; the switch arms fast drain after it.
void ui_widget_mgr_set_value (int handle, int32_t value)
 Sets a numeric value; arms fast drain so dashboards are not pinned to 5 FPS.
void ui_widget_mgr_set_position (int handle, int16_t x, int16_t y)
 Moves a widget; arms fast drain for gameplay frame rate.
void ui_widget_mgr_set_size (int handle, int16_t w, int16_t h)
 Resizes a widget.
void ui_widget_mgr_set_color (int handle, uint32_t color)
 Sets the primary colour, 0xRRGGBB.
void ui_widget_mgr_set_visible (int handle, bool visible)
 Shows or hides one widget.
void ui_widget_mgr_set_all_visible (bool visible)
 Shows or hides every managed widget; the Playground console toggle's view switch.
int32_t ui_widget_mgr_get_value (int handle)
 Reads the widget's current value; 0 also means bad handle.
void ui_widget_mgr_set_dotmatrix (int handle, const uint8_t *bitmap, uint8_t len)
 Loads a bitmap into a DotMatrix widget.
void ui_widget_mgr_set_image (int handle, uint16_t offset, const uint8_t *data, uint8_t len)
 Chunked RGB565 transfer into an Image widget's canvas.
void ui_widget_mgr_event_push (uint8_t handle, uint8_t event_type, int32_t value)
 Producer side of the event ring; internal LVGL event callbacks only.
int ui_widget_mgr_event_drain (ipc_ui_event_t *out, int max_events)
 Drains events for POLL_EVENTS — the ui.poll() backend.
int ui_widget_mgr_count (void)
 Number of live handles; zero callers anywhere.
int ui_widget_mgr_list (ipc_ui_widget_info_t *out, int max_items)
 Handle + type of every active widget — the ui.list() backend.
lv_obj_t * ui_widget_mgr_get_parent (void)
 Nullable current parent; every call site null-checks it.
void ui_widget_mgr_set_screen (int16_t width, int16_t height)
 Sets screen dimensions and resets the auto-layout grid.
int ui_widget_mgr_chart_add_series (int handle, uint32_t color)
 Adds a series to a Chart; returns index 0-3 or -1.
void ui_widget_mgr_chart_set_next (int handle, uint8_t series_idx, int32_t value)
 Appends the next value to one chart series.
int ui_widget_mgr_item_add (const ipc_ui_item_add_t *it)
 Appends one item; overloaded returns, dual-implementation rule.
void ui_widget_mgr_item_clear (int handle)
 Empties a collection widget.
void ui_widget_mgr_set_prop (int handle, uint8_t prop_id, int32_t value)
 Sets one UI_PROP_* property; how .listen() subscribes to events.
lv_obj_t * ui_widget_mgr_get_object (int handle)
 LVGL object behind a handle; the GET_TEXT route for typed text.

Macro Definition Documentation

◆ UI_ITEM_ADD_OK_NO_CHILD

#define UI_ITEM_ADD_OK_NO_CHILD   (-3)

ui_widget_mgr_item_add() returned successfully but produced no child object (a data widget appended an item). Distinct from an error, and from a handle.