libghostty-vt 0.0.0
Loading...
Searching...
No Matches
c-vt-color-scheme/src/main.c

Encode a color scheme report, the reply to a CSI ? 996 n query.

#include <stdio.h>
#include <ghostty/vt.h>
int main() {
uint8_t buf[16];
size_t written = 0;
GHOSTTY_COLOR_SCHEME_DARK, buf, sizeof(buf), &written);
if (result == GHOSTTY_SUCCESS) {
printf("Encoded %zu bytes: ", written);
fwrite(buf, 1, written, stdout);
printf("\n");
}
return 0;
}
GHOSTTY_API GhosttyResult ghostty_color_scheme_report_encode(GhosttyColorScheme scheme, uint8_t *buf, size_t buf_len, size_t *out_written)
GhosttyResult
Definition types.h:143
@ GHOSTTY_SUCCESS
Definition types.h:145