Commit Graph

25 Commits

Author SHA1 Message Date
akitsu-sanae a1c43eec08 fix warnings 2019-07-21 01:08:09 +09:00
Ophir LOJKINE d3a7878fb4 Make Color extend Debug 2019-03-11 13:58:35 +01:00
Michael Aaron Murphy acd94a3625 Extra derives & performance optimizations 2018-08-20 22:11:58 +00:00
ticki 15c65dc5f9
Run rustfmt on the code. 2017-03-24 21:53:05 +01:00
IGI-111 8760faca15 no need for templating 2017-03-13 11:49:24 +01:00
IGI-111 0758c07ab7 added cursor position detection
This solves #85 in a similar fashion as the color amount detection: the
cursor module now provides a trait that adds a `cursor_pos()` method to
an instance of `Write`. It also corrects that previous implementation
somewhat by making the `CONTROL_SEQUENCE_TIMEOUT` a member of the raw
module and implementing `DetectColors` for any instance of `Write`
rather than just `RawTerminal` (`MouseTerminal` for instance works as
well).
2017-03-12 20:18:32 +00:00
IGI-111 ba72d0bcec Added color support detection (#91)
* Added color support detection

Color support is inferred by using either OSC 4 escape codes or the
value of TERM.

* minor refactor and cosmetic changes
2017-02-26 09:35:39 +01:00
ticki f9eaf6d0bc Merge branch 'master' of github.com:Ticki/libterm 2016-12-18 19:29:18 +01:00
ticki 7047acbabf Add `Color` implementation for `&Color`
Fix #53
2016-12-18 19:28:25 +01:00
Alexandre Bury 00ca758d45 Add `UnknownCSI` event type (#73)
* Add `UnknownCSI` event type.

* Compile test from `raw` module

But don't run it.

* Fix unused import warning in doc-test

* Rename UnknownCSI -> UnknownCsi
2016-12-16 18:20:17 +01:00
Jordan MacDonald 654db645cb Derive PartialEq for Rgb type (#56) 2016-10-22 08:40:06 +02:00
Alexandre Bury 4358ed6c48 Derive Copy for color::{Rgb, Fg, Bg, Reset} (#54) 2016-10-09 07:13:41 +02:00
Esption a0751f21b0 Add Debug to color structs and Clone to Rgb / Fg / Bg (#51) 2016-10-03 07:15:12 +02:00
ticki e63b645859 Update the documentation. 2016-09-07 11:39:32 +02:00
Jeremy Soller b81bcc6749 Fix formatting 2016-07-24 08:24:49 -06:00
Jeremy Soller ef023ed596 Allow colors to be reset to terminal defaults 2016-07-24 08:23:10 -06: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
ticki d52e2a2426 Fix documentation for colors 2016-07-02 15:59:51 +02:00
ticki b499d4825f Refactor how colors are handled 2016-07-02 15:06:47 +02:00
Ticki 7d1d424c8a Small doc fixes 2016-03-16 08:52:09 +01:00
Ticki 5d4826d4ff Add test to _everything_ 2016-03-09 17:18:31 +01:00
Ticki 543b2f8975 Hi -> Light 2016-03-09 11:19:51 +01:00
Ticki 6f1621d2d0 Introduce 'Key', which can decode special key input 2016-03-09 09:39:22 +01:00
Ticki a19d2e245d Make debug_check private, remove warnings from examples 2016-03-08 08:27:59 +01:00
Ticki 6f9addc42b Yay! 256-color mode 2016-03-07 17:39:25 +01:00