aboutsummaryrefslogtreecommitdiff
path: root/termbox2/README
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-10-04 20:02:15 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-10-04 20:02:15 +0200
commit2e31cbeb70d93bb0f5512064f181990db189d1f6 (patch)
tree049f137715b692bcac0fd402fcbf04ef703523f0 /termbox2/README
downloadhare-termbox2-2e31cbeb70d93bb0f5512064f181990db189d1f6.tar.gz
hare-termbox2-2e31cbeb70d93bb0f5512064f181990db189d1f6.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--termbox2/README41
1 files changed, 41 insertions, 0 deletions
diff --git a/termbox2/README b/termbox2/README
new file mode 100644
index 0000000..e28c58c
--- /dev/null
+++ b/termbox2/README
@@ -0,0 +1,41 @@
1This module provides bindings for termbox2.
2
3Some changes to the API have been made to enable using this library in a
4more Hare-idiomatic style. In particular:
5- The tb_ and TB_ prefixes have been removed, as the namespace termbox2::
6is used instead. We recommend importing this library as tb, so that one
7can write e.g. tb::init(), keeping it similar to the original tb_init().
8- Functions return a value that can be either a valid result (e.g. int,
9void, str...) or an int-backed error [[termbox2::err]]. The error codes
10are consistent with the original library and can be interpreted with
11[[termbox2::strerror]]. Some additional codes for binding-related errors
12are provided.
13- Similarly to the previous point, some functions that use to return
14multiple values by taking pointer parameters now simply return a tuple,
15see for example [[termbox2::get_fds]].
16- The tb_event type has changed into a tagged union of 3 types,
17see [[termbox2::event]].
18- The four tb_print* functions have been replaced by a single
19[[termbox2::print]] function that uses Hare-style string formatting.
20Similarly, tb_send and tb_sendf have replaced by only one function
21[[termbox2::send]].
22- The constants provided by ther termbox2 API, such as those for key codes,
23colors and attributes, have been split into various structures, such as
24[[termbox2::KEY]], [[termbox2::COLOR]] and [[termbox2::ATTRIBUTE]].
25
26Some functionality has been outright removed. If you are interested in
27having any of the following available in these bindings, don't hesitate
28to send a patch or a feature request to sebastiano@tronto.net:
29- The tb_get_cell function is not available. This function makes it
30possible to navigate through cells via pointer arithmetic, but since
31the Hare [[termbox2::cell]] type does not have the same size as the
32original tb_cell, this would not translate cleanly.
33- The tb_iswprint, tb_wcwidth and tb_utf8_* have functions have been
34removed. Use the Hare standard libary functions [[encoding::utf8::]]
35and [[strings::]] instead.
36- The tb_last_errno function has been removed.
37- The TB_CAP_* code constants have been removed.
38
39Links:
40- Main repository: https://git.tronto.net/hare-termbox2
41- termbox2: https://github.com/termbox/termbox2

Generated with cgit - Back to sebastiano.tronto.net