README.md 1.22 KB
Newer Older
Ticki's avatar
Ticki committed
1
Termion
Ticki's avatar
Ticki committed
2 3
=======

4 5
A pure Rust library for handling, manipulating and reading information about terminals. This provides a full-featured alternative to Termbox.

Ticki's avatar
Ticki committed
6 7
Supports Redox and POSIX. Untested on Windows.

Ticki's avatar
Ticki committed
8 9
[Documentation.](http://ticki.github.io/termion/termion/) | [Examples.](https://github.com/Ticki/termion/tree/master/examples)

Ticki's avatar
Ticki committed
10 11 12 13 14
A note on stability
-------------------

This crate is not stable, yet. However, if you do want stability, you should specify the revision (commit hash) in your `Cargo.toml`, this way builds are complete reproducible, and won't break.

15 16 17 18 19 20 21 22 23 24 25
Features
--------

- Raw mode.
- Cursor movement.
- Color output.
- Text formatting.
- Console size.
- Control sequences.
- Termios control.
- Password input.
Ticki's avatar
Ticki committed
26 27 28
- Redox support.
- 256-color mode.
- Panic-free error handling.
Ticki's avatar
Ticki committed
29 30
- Special keys events (modifiers, special keys, etc.).
- Asynchronous key events.
Ticki's avatar
Ticki committed
31 32

and much more.
33

Ticki's avatar
Ticki committed
34 35 36 37 38
Usage
-----

See `examples/`, and the documentation, which can be rendered using `cargo doc`.

Ticki's avatar
Ticki committed
39
For a more complete example, see [a minesweeper implementation](https://github.com/redox-os/games-for-redox/blob/master/src/minesweeper.rs), that I made for Redox using termion.
Ticki's avatar
Ticki committed
40

Ticki's avatar
Resize  
Ticki committed
41 42
<img src="image.png" width="150">

Ticki's avatar
Ticki committed
43

44 45 46 47
TODO
----

- Mouse input
Ticki's avatar
Ticki committed
48 49 50 51 52

License
-------

MIT.