Go to file
mintsuki 1d6e5855e2 Massively reduce the default size of bump alloc pool
Also limit the resolution of the terminal if necessary and force no-canvas mode if using bump allocator
2024-04-05 18:18:47 +02:00
backends Massively reduce the default size of bump alloc pool 2024-04-05 18:18:47 +02:00
flanterm.c Bound some loops that could cause long hangs 2024-04-04 04:17:12 +02:00
flanterm.h Do not use reserved identifiers for include guards 2024-01-20 21:27:11 +01:00
LICENSE Update copyright years 2024-01-02 19:18:32 +01:00
README.md Add flanterm_fb_simple_init() and add basic usage to README 2023-07-07 18:25:04 +02:00

Flanterm

Flanterm is a fast and reasonably complete terminal emulator with support for multiple output backends. Included is a fast framebuffer backend.

Quick usage

To quickly set up and use a framebuffer Flanterm instance, it is possible to use the flanterm_fb_simple_init() function as such:

#include <flanterm/flanterm.h>
#include <flanterm/backends/fb.h>

struct flanterm_context *ft_ctx = flanterm_fb_simple_init(
    framebuffer_ptr, framebuffer_width, framebuffer_height, framebuffer_pitch
);

Where framebuffer_{ptr,width,height,pitch} represent the corresponding info about the framebuffer to use for this given instance.

To then print to the terminal instance, simply use the flanterm_write() function on the given instance. For example:

#include <flanterm/flanterm.h>

const char msg[] = "Hello world\n";

flanterm_write(ft_ctx, msg, sizeof(msg));