https://github.com/richfitz/boxr
Interface to 'termbox' (https://github.com/nsf/termbox)
https://github.com/richfitz/boxr
Last synced: 3 months ago
JSON representation
Interface to 'termbox' (https://github.com/nsf/termbox)
- Host: GitHub
- URL: https://github.com/richfitz/boxr
- Owner: richfitz
- License: other
- Created: 2015-09-17T16:26:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T17:36:48.000Z (almost 11 years ago)
- Last Synced: 2025-12-30T16:12:12.616Z (7 months ago)
- Language: C
- Homepage:
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# boxr
> Interface to 'termbox'
[](https://travis-ci.org/richfitz/boxr)
Interface to '[termbox](https://github.com/nsf/termbox)'. The idea is low level support for terminal based reactive apps.
## Low level interface
`boxr` supports the full termbox interface, which is not very large.
* `tb_init`
* `tb_shutdown`
* `tb_width`
* `tb_height`
* `tb_clear`
* `tb_set_clear_attributes`
* `tb_present`
* `tb_set_cursor`
* `tb_change_cell`
* `tb_cell_buffer` (read-only)
* `tb_select_input_mode`
* `tb_select_output_mode`
* `tb_peek_event`
* `tb_poll_event`
The [termbox](https://github.com/nsf/termbox) documentation is the best place for details on these functions; the R interface here merely exposes them and does a teensy bit of type coersion.
The many, _many_ constants defined by termbox are available in the `tb` object (e.g. `tb$BLUE` is the colour code for blue). See `ls(boxr::tb)` for the full set.
In addition, `boxr` has two vectorised version of `tb_change_cell`:
* `boxr_change_cell` - vectorised in all arguments
* `boxr_change_rect` - takes x, y rectangle corners as x/y arguments
## Installation
```r
devtools::install_github("richfitz/boxr")
```
## License
MIT + file LICENSE © [Rich FitzJohn](https://github.com/richfitz).