Termisu::FFI
C ABI bridge for non-Crystal integrations.
Exposes stable C symbols, opaque handles, flat structs, and explicit status/error handling for FFI callers.
Lives at ffi/ffi.cr (not termisu/ffi.cr) so the require "./termisu/*"
glob in src/termisu.cr cannot reach it - plain require "termisu"
consumers must not link the exported C symbols. Build src/termisu_ffi.cr
to produce libtermisu.
Constants
Inline capacity (bytes) for ABI::Event preedit text. Composing strings are short (a handful of codepoints); longer preedit is truncated on a boundary.
Class methods
Applies count cell writes with a single guard + registry fetch.
Per-op semantics match set_cell: ops rejected by the buffer (out of
bounds, unfittable wide char, zero-width char) are skipped and the call
returns Rejected after processing every op; malformed ops (invalid
codepoint, color mode, or attribute bits) raise and abort the batch with
Error, leaving prior ops applied. ops may be null only when count is 0.