sco_widgets_v1.remove_panel
Removes an owned panel. Absent ID returns NOT_FOUND; success ends pending callbacks for that generation and permits immediate ctx destruction, including inside its callback. Failure preserves the panel.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, const char *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sco_widgets_v1.remove_panel |
| Record ID | sco-widgets-v1-remove-panel |
| Service | sco.widgets |
| Table | sco_widgets_v1 |
| Version macro | SCO_WIDGETS_VERSION_1_1 |
| Packed table version | 65537 |
| Since / availability | size >= 24; 1.0 |
| Complete member extent (x64 bytes) | 24 |
| Table size (x64 bytes) | 48 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*remove_panel)(sco_plugin* self, const char* id);
Removes an owned panel. Absent ID returns NOT_FOUND; success ends pending callbacks for that generation and permits immediate ctx destruction, including inside its callback. Failure preserves the panel.
Results and failures
Section titled “Results and failures”OK; WRONG_THREAD off game thread; UNAVAILABLE stopped service/host; BAD_ARG invalid/released owner or malformed ID; NOT_FOUND absent owned panel. Failure leaves registration unchanged.
Absent capability
Section titled “Absent capability”query_service NOT_FOUND absent service; UNAVAILABLE incompatible version. No game capability or renderer requirement.
Ownership
Section titled “Ownership”Host releases copied tree and borrowed callback registration, never frees plugin ctx; caller may free ctx after success.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD elsewhere. Callbacks game thread under owner callout guard.
Callback context
Section titled “Callback context”Event, text and panel ID borrowed during callback only; callback ctx is plugin-owned.
Reentrancy
Section titled “Reentrancy”Callbacks may invoke commands or replace/remove own panel; generation change drops remaining stale events, new tree renders next pass. Registry lock not held during plugin code.
Cleanup and cancellation
Section titled “Cleanup and cancellation”Successful replacement/removal and ordinary owner release discard stale-generation events and end borrowed callbacks. Fault guard stops delivery; retained-provider faults skip ordinary resource release until restart. No separate cancel token.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sco_widgets.h(*remove_panel) |
| cpp | typed-wrapper | include/scosdk/widgets.hppreturn table_->remove_panel(self_, id); |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Widgets.cs_t->set_panel(_plugin.SelfPtrsdk/csharp/Sco.Sdk/Widgets.cs _t->remove_panel(_plugin.SelfPtrsdk/csharp/Sco.Sdk/WidgetsInterop.cs public unsafe struct ScoWidgetsV1 |
| lua | typed-wrapper | plugins/lua/sco_lua.ct->set_panel(s->selfplugins/lua/sco_lua.c t->remove_panel(s->self |
Examples
Section titled “Examples”- sdk/examples/widgets/widgets.c
- sdk/examples/widgets_lua/main.lua
- sdk/examples/cs_widgets/WidgetsExample.cs
- tests/abi_widgets.c
- tests/test_widgets.cpp
- tests/test_widgets_sdk.cpp
- tests/test_lua.cpp
- sdk/csharp/Sco.Sdk.Tests/WidgetsTests.cs
- sdk/csharp/Sco.Sdk.Tests/WidgetsPins.cs
- sdk/test-zip.sh
ABI pins prove layout, not semantic behavior or a live game session.