]> _ Git - termbox2.git/log
termbox2.git
3 years agofmt termbox.h
Adam Saponara [Mon, 10 Jan 2022 02:56:39 +0000 (21:56 -0500)]
fmt termbox.h

3 years agoadd mouse support
Wolf Gupta [Mon, 10 Jan 2022 02:43:35 +0000 (08:13 +0530)]
add mouse support

3 years agoadd test for f715214
Adam Saponara [Fri, 7 Jan 2022 00:31:58 +0000 (19:31 -0500)]
add test for f715214

3 years agofix `#define` regex in tests
Adam Saponara [Fri, 7 Jan 2022 00:10:36 +0000 (19:10 -0500)]
fix `#define` regex in tests

3 years agoinclude tb_init_rwfd in api
Adam Saponara [Thu, 6 Jan 2022 06:36:10 +0000 (01:36 -0500)]
include tb_init_rwfd in api

3 years agofix bug in `extract_esc_cap`.
Adam Saponara [Thu, 6 Jan 2022 06:06:30 +0000 (01:06 -0500)]
fix bug in `extract_esc_cap`.

previously we were able to read past the actual end of the
input buffer (`global.in.buf`). we would not segfault due
to how bytebufs are implemented, but we could erroneously
re-process segments of input. in practice i think this
could only occur with an instantaneous burst of tty input
greater than the read buffer in `wait_event` (64 bytes). i
noticed this by accidentally mouse-wheeling very fast in
xfce4-terminal which, in my setup, sends a bunch of
up-arrow events (`\x1bOA`) all at once, in which case
termbox was pseduo-randomly emitting "O" and "A" events.

3 years agoadd test for tb_strerror
Adam Saponara [Thu, 6 Jan 2022 05:15:14 +0000 (00:15 -0500)]
add test for tb_strerror

3 years agorecompile in container before running tests
Adam Saponara [Thu, 6 Jan 2022 03:30:37 +0000 (22:30 -0500)]
recompile in container before running tests

3 years agoadd tb_strerror (#11)
Wolf Gupta [Thu, 6 Jan 2022 03:28:45 +0000 (08:58 +0530)]
add tb_strerror (#11)

3 years agouse github actions for ci
Adam Saponara [Fri, 31 Dec 2021 06:43:30 +0000 (01:43 -0500)]
use github actions for ci

3 years agoadd and apply `.clang-format`
git-bruh [Mon, 27 Dec 2021 02:04:27 +0000 (21:04 -0500)]
add and apply `.clang-format`

3 years agoexpose internal fds for external polling
git-bruh [Wed, 15 Dec 2021 11:12:01 +0000 (16:42 +0530)]
expose internal fds for external polling

3 years agoupdate inline docs (#4).
Adam Saponara [Fri, 10 Dec 2021 02:07:38 +0000 (21:07 -0500)]
update inline docs (#4).

specifically document return code TB_ERR_SELECT on
tb_peek/poll_event.

3 years agoadd regression test for #3
Adam Saponara [Sun, 28 Nov 2021 18:55:10 +0000 (13:55 -0500)]
add regression test for #3

3 years agoprevent segfault in `tb_deinit` when TERM is invalid
git-bruh [Sun, 28 Nov 2021 18:54:02 +0000 (13:54 -0500)]
prevent segfault in `tb_deinit` when TERM is invalid

3 years agoadd test case for `tb_printf_ex`
Adam Saponara [Sun, 28 Nov 2021 18:24:07 +0000 (13:24 -0500)]
add test case for `tb_printf_ex`

3 years agoadd `tb_print_ex` and `tb_printf_ex`.
git-bruh [Sun, 28 Nov 2021 18:21:04 +0000 (13:21 -0500)]
add `tb_print_ex` and `tb_printf_ex`.

these functions have an optional `out_w` param that
receives the printed width of the string if specified.

3 years agoadd readme
Adam Saponara [Sun, 24 Oct 2021 00:48:05 +0000 (20:48 -0400)]
add readme

3 years agoreplace linear cap search with trie.
Adam Saponara [Sun, 19 Sep 2021 01:07:56 +0000 (21:07 -0400)]
replace linear cap search with trie.

for every input, termbox used to iterate over termcaps one
at a time, `strncmp`ing it to the input buffer. the benefit
of this approach was that it had a very simple
implementation. the downside was that it was inefficient,
increasingly so as we added more caps such as modified
arrow keys.

the trie makes it easy to detect when there are overlaps in
termcaps. the obvious one is `TB_KEY_ESC` versus all other
escape codes. in the future we can modify function
`extract_esc_cap` to, e.g., potentially return `TB_KEY_ESC`
in `TB_INPUT_ALT` mode if no further input is available
after a certain amount of time.

3 years agoadd license header
Adam Saponara [Sun, 19 Sep 2021 01:05:52 +0000 (21:05 -0400)]
add license header

3 years agoadd cap kcbt (TB_KEY_BACK_TAB)
Adam Saponara [Sun, 19 Sep 2021 01:05:17 +0000 (21:05 -0400)]
add cap kcbt (TB_KEY_BACK_TAB)

3 years agotermbox rewrite (wip)
Adam Saponara [Tue, 7 Sep 2021 01:53:45 +0000 (21:53 -0400)]
termbox rewrite (wip)