Skip to content

gui_toolkit 0.378.0

Choose a tag to compare

@sachahjkl sachahjkl released this 03 Dec 19:51
· 90 commits to master since this release
v0.378.0
6bf644d

Added

  • terminal: a local terminal in one call per build: terminal.start runs a command, or the user's shell, on a
    pseudo-terminal and returns at once; terminal.build shows it in gt:term's grid with Ghostty's emulation
    (gt:vt), and terminal.event sends it the keys and the mouse. The child is told the grid's size once the grid rests,
    its end comes back with its code (on_exit), TERM is xterm-256color and COLORTERM truecolor unless the program
    says otherwise. Nothing waits on the interface's thread, and destroy returns at once, even while the child still
    writes. text and row_text read what the child wrote. See docs/terminal.md.
  • ui.task_link: a counted link from a thread of the program's own to a State's interface thread, which outlives the
    State: task_link_post runs a call at the next build, or its lost when the State is gone; task_link_release lets it
    go. For a reader that lives as long as a child. See docs/tasks.md.
  • gt:vt: a terminal's emulation, libghostty-vt (Ghostty's), moved from Tower, as the source of gt:term's grid:
    vt.create, feed, resize, recolour, source, title, text, and callbacks for the bytes for the child (typed,
    pasted, the answers to its queries), its title and its new size. A program takes it with toolbox.Feature.Vt
    (GT_VT=true, the native part vt, Ghostty's licence in its notices). tk build_native -features:vt builds or fetches
    libghostty-vt beside gt_native (Ghostty and Zig pinned); the Nix package .#native holds it, and a release publishes
    gt-vt-<os>-x64. tk gen_vt writes the binding from its headers (docs/vt.md).
  • terminal.Group: a program's terminals and its windows' events: the keys to the grid with the keyboard, the
    pointer to the grid under it, a press's release to the grid that took it, copy and paste done, a menu to on_menu.
    Tower's own routing, moved here.
  • pty: a child on a pseudo-terminal: pty.start runs a command on a pseudo-terminal of the size given (Linux: its
    controlling terminal; Windows: a pseudo console), so it prints colours, edits its line and answers isatty. read,
    write, resize, stop, wait (its exit code) and destroy are blocking calls for a worker. The child runs as a
    process tree that ends with the program; process.tree_start_terminal starts such a tree. See docs/pty.md.