mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
Rename device_status.h to device.h and add C-compatible structs for device attributes (DA1/DA2/DA3) responses. The new header includes defines for all known conformance levels, DA1 feature codes, and DA2 device type identifiers. Add a GhosttyTerminalDeviceAttributesFn callback that C consumers can set via GHOSTTY_TERMINAL_OPT_DEVICE_ATTRIBUTES. The callback follows the existing bool + out-pointer pattern used by color_scheme and size callbacks. When the callback is unset or returns false, the trampoline returns a default VT220 response (conformance level 62, ANSI color). The DA1 primary features use a fixed [64]uint16_t inline array with a num_features count rather than a pointer, so the entire struct is value-typed and can be safely copied without lifetime concerns.