ghostty/terminal.lisp
An explicitly owned libghostty-vt terminal.
Ghostty's bytes are borrowed only for this callback. Copy before entering application code, which may enqueue them for later IO.
A Lisp condition must never unwind through Ghostty's C stack. Retain it on the terminal so the owner can surface it safely.
Create an owned libghostty-vt terminal using its default allocator.
Release terminal. Repeated calls are harmless.
Feed the UTF-8 encoding of text to terminal's VT stream parser.
Feed the octets in bytes from start to end to terminal's VT parser.
Resize terminal in cells and record its optional cell pixel geometry.
Return terminal's column and row counts.
Route terminal-generated response octets to function, or disable with NIL.
function is called synchronously during write-terminal or
write-terminal-bytes. Its octet vector is an owned copy of Ghostty's borrowed
callback bytes. function must enqueue or copy promptly and must not feed the
same terminal recursively.
Return the active screen of terminal as trimmed plain UTF-8 text.
(result operation)An explicitly owned libghostty-vt terminal.
(pointer)(terminal)Logical negation of one test or raw truth value.
(terminal)(&key (columns 80) (rows 24))(&optional path)Load libghostty-vt from PATH, or search for its platform soname. PATH is useful for development builds which have not been installed. When it is NIL, LUV_GHOSTTY_LIBRARY is consulted before the platform soname search.
(terminal)(terminal function)Route terminal-generated response octets to FUNCTION, or disable with NIL. FUNCTION is called synchronously during WRITE-TERMINAL or WRITE-TERMINAL-BYTES. Its octet vector is an owned copy of Ghostty's borrowed callback bytes. FUNCTION must enqueue or copy promptly and must not feed the same terminal recursively.
((variable &rest initargs) &body body)(terminal text)(terminal bytes &key (start 0) end)Multiplication and scalar scaling.
Logical disjunction of tests and raw truth values.
Test whether one compatible scalar is at most another.
Test whether two compatible scalars are equal.
Subtraction or unary negation.
(terminal columns rows &key (cell-width-pixels 0) (cell-height-pixels 0))(terminal)(terminal)(string)(terminal)
cffi-libffi returns the formatter constructor's scalar result through raw storage because that call also has a structure-by-value argument.