mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-29 16:25:20 +00:00
Add modes.h with GhosttyModeTag (uint16_t) matching the Zig ModeTag packed struct layout, along with inline helpers for constructing and inspecting mode tags. Provide GHOSTTY_MODE_* macros for all 39 built-in modes (4 ANSI, 35 DEC), parenthesized for safety. Add ghostty_terminal_mode_get and ghostty_terminal_mode_set to terminal.h, both returning GhosttyResult so that null terminals and unknown mode tags return GHOSTTY_INVALID_VALUE. The get function writes its result through a bool out-parameter. Add a note in the Zig mode entries reminding developers to update modes.h when adding new modes.