Fast and reasonably complete (framebuffer) terminal emulator (Zig fork)
1# Flanterm
2
3Flanterm is a fast and reasonably complete terminal emulator with support for
4multiple output backends. Included is a fast framebuffer backend.
5
6### Quick usage
7
8To quickly set up and use a framebuffer Flanterm instance, it is possible to
9use the `flanterm_fb_simple_init()` function as such:
10```c
11#include <flanterm/flanterm.h>
12#include <flanterm/backends/fb.h>
13
14struct flanterm_context *ft_ctx = flanterm_fb_simple_init(
15 framebuffer_ptr, framebuffer_width, framebuffer_height, framebuffer_pitch
16);
17```
18Where `framebuffer_{ptr,width,height,pitch}` represent the corresponding info
19about the framebuffer to use for this given instance.
20
21To then print to the terminal instance, simply use the `flanterm_write()`
22function on the given instance. For example:
23```c
24#include <flanterm/flanterm.h>
25
26const char msg[] = "Hello world\n";
27
28flanterm_write(ft_ctx, msg, sizeof(msg));
29```