7#ifndef GHOSTTY_VT_SGR_H
8#define GHOSTTY_VT_SGR_H
62 GHOSTTY_SGR_ATTR_UNSET = 0,
63 GHOSTTY_SGR_ATTR_UNKNOWN = 1,
64 GHOSTTY_SGR_ATTR_BOLD = 2,
65 GHOSTTY_SGR_ATTR_RESET_BOLD = 3,
66 GHOSTTY_SGR_ATTR_ITALIC = 4,
67 GHOSTTY_SGR_ATTR_RESET_ITALIC = 5,
68 GHOSTTY_SGR_ATTR_FAINT = 6,
69 GHOSTTY_SGR_ATTR_UNDERLINE = 7,
70 GHOSTTY_SGR_ATTR_UNDERLINE_COLOR = 8,
71 GHOSTTY_SGR_ATTR_UNDERLINE_COLOR_256 = 9,
72 GHOSTTY_SGR_ATTR_RESET_UNDERLINE_COLOR = 10,
73 GHOSTTY_SGR_ATTR_OVERLINE = 11,
74 GHOSTTY_SGR_ATTR_RESET_OVERLINE = 12,
75 GHOSTTY_SGR_ATTR_BLINK = 13,
76 GHOSTTY_SGR_ATTR_RESET_BLINK = 14,
77 GHOSTTY_SGR_ATTR_INVERSE = 15,
78 GHOSTTY_SGR_ATTR_RESET_INVERSE = 16,
79 GHOSTTY_SGR_ATTR_INVISIBLE = 17,
80 GHOSTTY_SGR_ATTR_RESET_INVISIBLE = 18,
81 GHOSTTY_SGR_ATTR_STRIKETHROUGH = 19,
82 GHOSTTY_SGR_ATTR_RESET_STRIKETHROUGH = 20,
83 GHOSTTY_SGR_ATTR_DIRECT_COLOR_FG = 21,
84 GHOSTTY_SGR_ATTR_DIRECT_COLOR_BG = 22,
85 GHOSTTY_SGR_ATTR_BG_8 = 23,
86 GHOSTTY_SGR_ATTR_FG_8 = 24,
87 GHOSTTY_SGR_ATTR_RESET_FG = 25,
88 GHOSTTY_SGR_ATTR_RESET_BG = 26,
89 GHOSTTY_SGR_ATTR_BRIGHT_BG_8 = 27,
90 GHOSTTY_SGR_ATTR_BRIGHT_FG_8 = 28,
91 GHOSTTY_SGR_ATTR_BG_256 = 29,
92 GHOSTTY_SGR_ATTR_FG_256 = 30,
93 GHOSTTY_SGR_ATTR_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
102 GHOSTTY_SGR_UNDERLINE_NONE = 0,
103 GHOSTTY_SGR_UNDERLINE_SINGLE = 1,
104 GHOSTTY_SGR_UNDERLINE_DOUBLE = 2,
105 GHOSTTY_SGR_UNDERLINE_CURLY = 3,
106 GHOSTTY_SGR_UNDERLINE_DOTTED = 4,
107 GHOSTTY_SGR_UNDERLINE_DASHED = 5,
108 GHOSTTY_SGR_UNDERLINE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
120 const uint16_t* full_ptr;
122 const uint16_t* partial_ptr;
148 uint64_t _padding[8];
242 const uint16_t* params,
243 const char* separators,
275 const uint16_t** ptr);
291 const uint16_t** ptr);
uint8_t GhosttyColorPaletteIndex
GHOSTTY_API size_t ghostty_sgr_unknown_partial(GhosttySgrUnknown unknown, const uint16_t **ptr)
GHOSTTY_API size_t ghostty_sgr_unknown_full(GhosttySgrUnknown unknown, const uint16_t **ptr)
GHOSTTY_API void ghostty_sgr_free(GhosttySgrParser parser)
GHOSTTY_API GhosttySgrAttributeValue * ghostty_sgr_attribute_value(GhosttySgrAttribute *attr)
struct GhosttySgrParserImpl * GhosttySgrParser
GHOSTTY_API GhosttyResult ghostty_sgr_set_params(GhosttySgrParser parser, const uint16_t *params, const char *separators, size_t len)
GHOSTTY_API GhosttyResult ghostty_sgr_new(const GhosttyAllocator *allocator, GhosttySgrParser *parser)
GHOSTTY_API bool ghostty_sgr_next(GhosttySgrParser parser, GhosttySgrAttribute *attr)
GHOSTTY_API void ghostty_sgr_reset(GhosttySgrParser parser)
GHOSTTY_API GhosttySgrAttributeTag ghostty_sgr_attribute_tag(GhosttySgrAttribute attr)
GHOSTTY_API GhosttySgrAttribute * ghostty_wasm_alloc_sgr_attribute(void)
GHOSTTY_API void ghostty_wasm_free_sgr_attribute(GhosttySgrAttribute *attr)
#define GHOSTTY_ENUM_TYPED