mirror-ghostty/example
Mitchell Hashimoto 2355550a94
libghostty: add tracked grid ref API
Add a C API for tracked pins, known as a tracked grid ref in C.

The new API can create tracked refs from terminal points, snapshot them
back to regular grid refs for cell access, convert them to coordinates,
move them to a new point, report when their semantic location was lost,
and free the tracked pin bookkeeping. This is backed by PageList tracked
pins and exposed through the libghostty-vt export layer and headers.
2026-05-23 14:37:59 -07:00
..
c-vt update a bunch of required Zig versions to 0.15 2025-10-03 07:10:44 -07:00
c-vt-build-info libghostty-vt: add semver pre info to build info 2026-04-06 17:17:30 -05:00
c-vt-cmake libghostty: add ghostty_free for cross-runtime memory safety 2026-03-23 20:52:02 +01:00
c-vt-cmake-cross cmake: add ghostty_vt_add_target() for cross-compilation 2026-04-10 06:52:09 -07:00
c-vt-cmake-static libghostty: add ghostty_free for cross-runtime memory safety 2026-03-23 20:52:02 +01:00
c-vt-colors vt: expose terminal default colors via C API 2026-03-26 09:51:30 -07:00
c-vt-effects vt: pass pointer options directly to terminal_set 2026-03-24 13:52:49 -07:00
c-vt-encode-focus docs: extract focus encoding example into standalone project 2026-03-17 16:48:48 -07:00
c-vt-encode-key example: rename some examples 2026-03-17 17:39:26 -07:00
c-vt-encode-mouse example: rename some examples 2026-03-17 17:39:26 -07:00
c-vt-formatter libghostty: add ghostty_free for cross-runtime memory safety 2026-03-23 20:52:02 +01:00
c-vt-grid-ref-tracked libghostty: add tracked grid ref API 2026-05-23 14:37:59 -07:00
c-vt-grid-traverse example: add grid reference traversal example 2026-03-19 19:55:02 -07:00
c-vt-kitty-graphics libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
c-vt-modes docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-paste libghostty: expose paste encode to C API 2026-03-26 11:28:23 -07:00
c-vt-render vt: fix render state cell style and graphemes_buf APIs 2026-03-20 09:24:31 -07:00
c-vt-sgr docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-size-report docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-static build: add static library target for libghostty-vt 2026-03-21 15:01:53 -07:00
c-vt-stream example/c-vt-stream 2026-03-28 18:34:15 -07:00
cpp-vt-stream libghostty: Remove all libc++ and libc++ ABI dependencies 2026-04-15 10:27:05 -07:00
swift-vt-xcframework libghostty: Remove all libc++ and libc++ ABI dependencies 2026-04-15 10:27:05 -07:00
wasm-key-encode build: replace lib-vt step with -Demit-lib-vt option 2026-03-21 07:03:06 -07:00
wasm-sgr build: replace lib-vt step with -Demit-lib-vt option 2026-03-21 07:03:06 -07:00
wasm-vt vt: simplify ghostty_type_json to return null-terminated string 2026-03-30 10:16:19 -07:00
zig-formatter terminal: make stream processing infallible 2026-03-13 13:56:14 -07:00
zig-vt update a bunch of required Zig versions to 0.15 2025-10-03 07:10:44 -07:00
zig-vt-stream terminal: make stream processing infallible 2026-03-13 13:56:14 -07:00
.gitignore build: add GhosttyVt module map to xcframework and Swift example 2026-04-06 14:14:52 -07:00
AGENTS.md Add example AGENTS file 2026-03-17 17:13:08 -07:00
README.md example: add README 2026-03-17 17:37:20 -07:00

README.md

Examples

Standalone projects demonstrating the Ghostty library APIs. The directories starting with c- use the C API and the directories starting with zig- use the Zig API.

Every example can be built and run using zig build and zig build run from within the respective example directory. Even the C API examples use the Zig build system (not the language) to build the project.

Running an Example

cd example/<dir>
zig build run