ghostty_terminal_vt_write function

  1. @Native<Void Function(GhosttyTerminal, Pointer<Uint8>, Size)>(GhosttyTerminal, ffi.Pointer<ffi.Uint8>, ffi.Size)>()
void ghostty_terminal_vt_write(
  1. GhosttyTerminal terminal,
  2. Pointer<Uint8> data,
  3. int len
)

Write VT-encoded data to the terminal for processing.

Feeds raw bytes through the terminal's VT stream parser, updating terminal state accordingly. By default, sequences that require output (queries, device status reports) are silently ignored. Use ghostty_terminal_set() with GHOSTTY_TERMINAL_OPT_WRITE_PTY to install a callback that receives response data.

This never fails. Any erroneous input or errors in processing the input are logged internally but do not cause this function to fail because this input is assumed to be untrusted and from an external source; so the primary goal is to keep the terminal state consistent and not allow malformed input to corrupt or crash.

@param terminal The terminal handle @param data Pointer to the data to write @param len Length of the data in bytes

@ingroup terminal

Implementation

@ffi.Native<
  ffi.Void Function(GhosttyTerminal, ffi.Pointer<ffi.Uint8>, ffi.Size)
>()
external void ghostty_terminal_vt_write(
  GhosttyTerminal terminal,
  ffi.Pointer<ffi.Uint8> data,
  int len,
);