• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H27-Oct-2019-

tools/H27-Oct-2019-

.gitignoreH A D27-Oct-201989

COPYINGH A D27-Oct-20191.1 KiB

README.mdH A D27-Oct-20192.5 KiB

makefileH A D27-Oct-2019716

README.md

1# Termbox-next
2[![CodeFactor](https://www.codefactor.io/repository/github/cylgom/termbox-next/badge)](https://www.codefactor.io/repository/github/cylgom/termbox-next)
3
4## The original Termbox
5[Termbox](https://github.com/nsf/termbox)
6was a promising Text User Interface (TUI) library.
7Unfortunately, its original author
8[changed his mind](https://github.com/nsf/termbox/issues/37#issuecomment-261075481)
9about consoles and despite the
10[community's efforts](https://github.com/nsf/termbox/pull/104#issuecomment-300308156)
11to keep the library's development going, preferred to let it die. Before it happened,
12[some people](https://wiki.musl-libc.org/alternatives.html)
13already noticed the robustness of the initial architecture
14[became compromised](https://github.com/nsf/termbox/commit/66c3f91b14e24510319bce6b5cc2fecf8cf5abff#commitcomment-3790714)
15in a nonsensical refactoring frenzy. Now, the author refuses to merge features
16like true-color support, invoking some
17[spurious correlations](https://github.com/nsf/termbox/pull/104#issuecomment-300292223)
18we will discuss no further.
19
20## The new Termbox-next
21This fork was made to restore the codebase to its original quality (before
22[66c3f91](https://github.com/nsf/termbox/commit/66c3f91b14e24510319bce6b5cc2fecf8cf5abff))
23while providing all the functionnalities of the current implementation.
24This was achieved by branching at
25[a2e217f](https://github.com/nsf/termbox/commit/a2e217f0fb97e6bbd589136ea3945f9d5a123d81)
26and cherry-picking all the commits up to
27[d63b83a](https://github.com/nsf/termbox/commit/d63b83af04e0fd6da836bb8f37e5cec72a1dc95a)
28if they weren't harmful.
29
30## Changes
31A lot of things changed during the process:
32 - *waf*, the original build system, was completely removed from the
33   project and replaced by make.
34 - anything related to python was removed as well
35
36## Getting started
37Termbox's interface only consists of 12 functions:
38```
39tb_init() // initialization
40tb_shutdown() // shutdown
41
42tb_width() // width of the terminal screen
43tb_height() // height of the terminal screen
44
45tb_clear() // clear buffer
46tb_present() // sync internal buffer with terminal
47
48tb_put_cell()
49tb_change_cell()
50tb_blit() // drawing functions
51
52tb_select_input_mode() // change input mode
53tb_peek_event() // peek a keyboard event
54tb_poll_event() // wait for a keyboard event
55```
56See src/termbox.h header file for full detail.
57
58## TL;DR
59`make` to build a static version of the lib under bin/termbox.a
60`cd src/demo && make` to build the example programs in src/demo/
61