libghostty-vt
0.0.0
Toggle main menu visibility
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;
GhosttyResult
result =
ghostty_color_scheme_report_encode
(
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_color_scheme_report_encode
GHOSTTY_API GhosttyResult ghostty_color_scheme_report_encode(GhosttyColorScheme scheme, uint8_t *buf, size_t buf_len, size_t *out_written)
GhosttyResult
GhosttyResult
Definition
types.h:143
GHOSTTY_SUCCESS
@ GHOSTTY_SUCCESS
Definition
types.h:145
vt.h
Generated by
1.17.0