mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
Add GHOSTTY_TERMINAL_OPT_ENQUIRY and GHOSTTY_TERMINAL_OPT_XTVERSION so C consumers can respond to ENQ (0x05) and XTVERSION (CSI > q) queries. Both callbacks return a GhosttyString rather than using out-pointers. Introduce GhosttyString in types.h as a borrowed byte string (ptr + len) backed by lib.String on the Zig side. This will be reusable for future callbacks that need to return string data. Without an xtversion callback the trampoline returns an empty string, which causes the handler to report the default "libghostty" version. Without an enquiry callback no response is sent.