Commit Graph

29 Commits

Author SHA1 Message Date
ftilde 95233e9e5c Add support for alternate screen (#88)
* Add (optional) support for alternate screen (#77)

The user can manually switch between main and alternate screen or
(preferably) use the wrapper struct for automatic screen restoration.

* Add two examples for screen switching

* Improve screen module documentation
2017-02-27 13:42:55 +01:00
ticki 8572ee6eb8 Get the tty device, get_tty 2016-07-29 19:49:29 +02:00
ticki 5b94db9663 Merge 2016-07-23 17:49:52 +02:00
ticki e36ff1c71b Termion 1.0.0: Complete overhaul of how escape codes are handled, add truecolor support.
This commit is a major semver bump. Every progra utilizing escape codes generated by Termion is likely broken. The main change is to make each escape has their own type implementing the Display trait.

- Use formatters, mainly Display for escapes.

- Add Truecolor support (`color::Rgb`).

- Put each primitive into distinct modules.

- Add is_tty for checking if some stream is a TTY.

- Add multiple new examples.
2016-07-23 16:40:27 +02:00
IGI-111 206c61de9e made mouse optional and fixed small issues 2016-07-20 01:13:03 +02:00
IGI-111 cc9c32b981 added mouse input
The event system has been reworked to allow the detection of mouse
events as well as key presses.
Xterm, rxvt and X10 emulated escape codes are supported, they are
enabled and disabled by sending the right escape codes when creating a
RawTerminal.

To allow for byte manipulation, which was necessary to implement those
features, the backend iterator has been changed from chars() to bytes()
(with specific treatment of unicode sequences), making the whole crate
not require nightly rustc.
2016-07-19 18:17:12 +02:00
ticki a7821206e9 Update README 2016-07-02 15:42:18 +02:00
ticki b499d4825f Refactor how colors are handled 2016-07-02 15:06:47 +02:00
Ticki b36e5fa721 Fix build with 'nightly' feature 2016-04-02 23:06:10 +02:00
Jeremy Soller f5936c0035 Use env for terminal size in redox
Undo color changes to test redox 256 color support

Get terminal size for Redox's kernel terminal

Use env for terminal size in redox
2016-04-02 18:31:03 +02:00
Ticki 28a95cf447 Libterm is now termion 2016-03-15 21:36:33 +01:00
Ticki b65328c304 Asynchronous key events 2016-03-15 20:32:25 +01:00
Ticki 32d8ccfa24 Use IO error, instead of a custom one 2016-03-13 11:55:24 +01:00
Ticki 2335596a1a TerminalRestorer -> RawTerminal 2016-03-10 16:24:41 +01:00
Ticki 6f1621d2d0 Introduce 'Key', which can decode special key input 2016-03-09 09:39:22 +01:00
Ticki abe4681158 Fix examples 2016-03-08 21:40:48 +01:00
Ticki a16cc84ea3 Rename WriteExt to TermWrite 2016-03-08 21:39:24 +01:00
Ticki 45aa8912f9 Rename Mode to Style
Mode is somewhat ambiguous term, which is often overused, for that reason I want to avoid it. This is a breaking change, but I don't guarantee stability yet, however I'll do my best to not break things.
2016-03-08 18:38:07 +01:00
Florian Gilcher 5a11c6d2c7 Use libc from crates.io 2016-03-08 11:15:41 +01:00
Florian Gilcher 4d21e7f3e4 Replace unstable 'chars' by 'bytes'
As this is a paththrough function and all important control chars
are in the byte range, chars is not necessary.
2016-03-08 11:04:09 +01:00
Ticki 22ef240967 terminal_size() for Redox 2016-03-08 10:31:12 +01:00
Ticki 54ce18f17d Better documentation, fix TIOCGWINSZ 2016-03-08 10:08:50 +01:00
Ticki fd2d74d41a Now supports Redox! 2016-03-07 22:19:35 +01:00
Ticki 45b1136f75 get_passwd(), new example, update README 2016-03-07 18:42:11 +01:00
Ticki 098ce66b84 Rendition modes 2016-03-07 17:57:17 +01:00
Ticki 6f9addc42b Yay! 256-color mode 2016-03-07 17:39:25 +01:00
Ticki c89a8f7027 Restructuring and error handling 2016-03-07 16:01:20 +01:00
Ticki 1e30802d32 u16 instead, don't allocate for formatting 2016-03-06 17:51:07 +01:00
Ticki bf7ca5c143 Initial commit 2016-03-06 14:54:26 +01:00