/termpaint

low level terminal interface library

Primary LanguageC++Boost Software License 1.0BSL-1.0

Termpaint

Low level terminal interface library for modern terminals.

Documentation

The full documentation for Termpaint can be found here.

Building / Installing

$ meson setup -Dprefix=$HOME/opt/termpaint/ _build
$ ninja -C _build
$ ninja -C _build install

Example

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);

Included examples

Why?

See this blog post.

License

Termpaint is licensed under the Boost Software License 1.0