sco.widgets
Methods and entrypoints for sco.widgets.
sco_widgets_v1
Section titled “sco_widgets_v1”Renderer-neutral retained panels, host-owned service 1.1. Source: include/sco_widgets.h,
src/widgets/widgets.cpp; design: widgets. This does not change
the frozen sco_api ABI or the legacy sco.ui draw-context/hotkey route. Limits:
64 panels, 256 nodes/panel, 4096 live nodes, 256 items/node, 16 table columns.
Strings are copied UTF-8, plain text; callbacks and context are borrowed. All
methods/events are game-thread only. Events update retained state then dispatch
under the owner guard; replacing/removing a panel invalidates pending generations.
C is direct; C++ has scosdk/widgets.hpp; Lua has bounded sco.widgets tables
and registry-rooted typed callbacks. C# is unsupported/deferred in
#142, a follow-up to #139.
The optional ImGui adapter is host-only; plugins never include it.
1.1 appends update_nodes, remove_nodes and capabilities (table 24 -> 48 bytes) and
adds opt-in sco_widget_node_1_1 (104 bytes: tooltip, severity, LIST/TABLE paging) and
sco_widget_event_1_1 (40 bytes: row). The 80-byte node and 32-byte event are unchanged, so
1.0 strides and size checks stay valid; a node below 104 bytes is a 1.0 node. Panels that
hold a 1.1 node receive 1.1 events, including SCO_WIDGET_EVENT_PAGE; other panels keep
32-byte events. Render snapshots are rebuilt at most once per panel render pass, after a
change. C# and Lua sco.widgets 1.1 routes are unsupported. Pins: tests/abi_widgets.c; host tests:
tests/test_widgets11.cpp.