https://gitlab.synchro.net/main/sbbs/-/commit/3c07fd6b3e95371b562d66c6
Added Files:
src/syncterm/scripts/auto/connected/status_default.wren
Modified Files:
src/syncterm/Wren.adoc src/syncterm/scripts/syncterm.wren src/syncterm/term.c wren_bind.c wren_bind_conn.c wren_bind_conn.h wren_bind_hook.c wren_bind_hook.h wren_bind_screen.c wren_bind_screen.h wren_host.c wren_host.h wren_host_internal.h
Log Message:
SyncTERM: reimplement status bar in Wren
The C update_status() now hands a pre-filled width¨1 Surface to a Wren
callable installed via Status.callable=(fn). The default
implementation lives in scripts/auto/connected/status_default.wren and
can be replaced by dropping a same-named file into the user's
auto-load dir or by reassigning Status.callable from any later script.
Improvements over the old C bar:
* Speed gets its own slot to the right of the connection type, so
long serial speeds (921600+) no longer truncate the BBS-name field.
* Indicators (mouse 'M', SFTP arrows) right-pin to the row's right
edge instead of fixed columns 27..30, so they stay readable at
any width.
Hook.onStatus is removed; new accessors expose the data the default
script needs (BBS.elapsedSeconds, BBS.connTypeName, CTerm.atasciiInverse, CTerm.ooiiMode, CTerm.mouseMode, CTerm.mouseDisabled, Host.safeMode).
The Surface is recycled across renders, reallocated only on width
change, so per-frame allocation churn stays out of the hot path.
Host.uploadArrow/downloadArrow move to pure Wren statics on the Host
class -- the C-side xfer_*_arrow flags and wren_*_arrow_lit helpers
are gone. Setters auto-call CTerm.refreshStatus() so writers don't
need to remember.
Wren.adoc updated to document the Status class, the new accessors,
the Host.uploadArrow/downloadArrow getter+setter shape, and the
removal of Hook.onStatus.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net