Low level terminal interface library for modern terminals.
The full documentation for Termpaint can be found here.
$ meson setup -Dprefix=$HOME/opt/termpaint/ _build
$ ninja -C _build
$ ninja -C _build install
See Getting started or full source.
integration = termpaintx_full_integration_setup_terminal_fullscreen(
"+kbdsig +kbdsigint",
event_callback, &quit,
&terminal);
surface = termpaint_terminal_get_surface(terminal);
termpaint_surface_clear(surface,
TERMPAINT_DEFAULT_COLOR, TERMPAINT_DEFAULT_COLOR);
termpaint_surface_write_with_colors(surface,
0, 0,
"Hello World",
TERMPAINT_DEFAULT_COLOR, TERMPAINT_DEFAULT_COLOR);
termpaint_terminal_flush(terminal, false);
while (!quit) {
if (!termpaintx_full_integration_do_iteration(integration)) {
// some kind of error
break;
}
}
termpaint_terminal_free_with_restore(terminal);
- attrdemo demo/attrs.c
Show attributes and colors. - playground playground2.cpp
Show keyboard events. - life demo/life.c
A simple "Conway's Game of Life" demo. - shuffle demo/shuffle.c
A simple shuffle numbers demo. - textwrap demo/textwrap.c
Usage of text measurement to wrap text.
See this blog post.
Termpaint is licensed under the Boost Software License 1.0