Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mintsuki/flanterm
Fast and reasonably complete (framebuffer) terminal emulator.
https://github.com/mintsuki/flanterm
framebuffer terminal terminal-emulator
Last synced: 3 days ago
JSON representation
Fast and reasonably complete (framebuffer) terminal emulator.
- Host: GitHub
- URL: https://github.com/mintsuki/flanterm
- Owner: mintsuki
- License: bsd-2-clause
- Created: 2022-10-03T22:49:20.000Z (over 2 years ago)
- Default Branch: trunk
- Last Pushed: 2024-10-24T00:28:45.000Z (3 months ago)
- Last Synced: 2024-12-31T22:06:55.117Z (10 days ago)
- Topics: framebuffer, terminal, terminal-emulator
- Language: C
- Homepage:
- Size: 133 KB
- Stars: 85
- Watchers: 2
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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_init()` function as such:
```c
#include
#includestruct flanterm_context *ft_ctx = flanterm_fb_init(
NULL,
NULL,
framebuffer_ptr, width, height, pitch,
red_mask_size, red_mask_shift,
green_mask_size, green_mask_shift,
blue_mask_size, blue_mask_shift,
NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, 0, 0, 1,
0, 0,
0
);
```
Where `framebuffer_ptr, width, height, pitch` and `{red,green,blue}_mask_{size,shift}`
represent the corresponding info about the framebuffer to use for this given instance.The meaning of the other arguments can be found in `backends/fb.h`.
To then print to the terminal instance, simply use the `flanterm_write()`
function on the given instance. For example:
```c
#includeconst char msg[] = "Hello world\n";
flanterm_write(ft_ctx, msg, sizeof(msg));
```