mirror-ghostty/include/ghostty/vt
Mitchell Hashimoto 3cf01e8445
libghostty: add utf-8 grapheme cell getter to C API
Add a render-state row-cells getter that encodes the current cell's
full grapheme cluster directly as UTF-8 into a caller-provided
GhosttyBuffer. The getter writes the base codepoint first, followed by
any extra grapheme codepoints, and follows the existing buffer-writer
convention where len is bytes written on success or required capacity
on GHOSTTY_OUT_OF_SPACE.

Previously C consumers could query grapheme codepoints, but bindings
that needed UTF-8 text had to reconstruct and encode the cluster
themselves. That duplicated terminal internals in downstream bindings
and made users pay for awkward cross-language struct handling. By
owning the UTF-8/grapheme behavior in libghostty, bindings can use one
stable C API and optionally wrap it with small binding-local helpers.
2026-05-28 12:33:36 -07:00
..
key decbkm: expose DECBKM to libghostty-vt 2026-04-12 16:04:16 -05:00
mouse libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
allocator.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
build_info.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
color.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
device.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
focus.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
formatter.h libghostty: selection formatting 2026-05-24 14:01:35 -07:00
grid_ref.h libghostty: detach tracked grid refs on free 2026-05-24 14:13:26 -07:00
grid_ref_tracked.h libghostty: detach tracked grid refs on free 2026-05-24 14:13:26 -07:00
key.h example: rename some examples 2026-03-17 17:39:26 -07:00
kitty_graphics.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
modes.h core: implement backarrow key mode (DECBKM) - mode 67 2026-04-12 15:40:54 -05:00
mouse.h example: rename some examples 2026-03-17 17:39:26 -07:00
osc.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
paste.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
point.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
render.h libghostty: add utf-8 grapheme cell getter to C API 2026-05-28 12:33:36 -07:00
screen.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
selection.h example/c-vt-selection-gesture 2026-05-27 11:01:25 -07:00
sgr.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
size_report.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
style.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
sys.h libghostty: add log callback configuration 2026-04-10 10:52:45 -07:00
terminal.h libghostty: expose viewport active state 2026-05-27 15:24:49 -07:00
types.h libghostty: add utf-8 grapheme cell getter to C API 2026-05-28 12:33:36 -07:00
wasm.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00