This commit is contained in:
Timon 2019-12-13 07:12:35 +01:00 committed by GitHub
parent 71029c4a87
commit 41ff73e3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 45 deletions

View File

@ -1,20 +1,24 @@
# Version Master
# Version 0.14
- `queue!` & `execute!` macros allow trailing comma
- Replace the `input` module with brand new `event` module
- It's **highly recommended** to read the
- Terminal Resize Events
- Advanced modifier (SHIFT | ALT | CTRL) support for both mouse and key events and
- futures Stream (feature 'event-stream')
- Poll/read API
- It's **highly recommended** to read the
[Upgrade from 0.13 to 0.14](https://github.com/crossterm-rs/crossterm/wiki/Upgrade-from-0.13-to-0.14)
documentation
documentation
- Replace `docs/UPGRADE.md` with the [Upgrade Paths](https://github.com/crossterm-rs/crossterm/wiki#upgrade-paths)
documentation
- Add `MoveToColumn`, `MoveToPreviousLine`, `MoveToNextLine` commands
- Merge `screen` module into `terminal`
- Add `MoveToColumn`, `MoveToPreviousLine`, `MoveToNextLine` commands
- Merge `screen` module into `terminal`
- Remove `screen::AlternateScreen`
- Remove `screen::Rawscreen`
* Move and rename `Rawscreen::into_raw_mode` and `Rawscreen::disable_raw_mode` to `terminal::enable_raw_mode` and `terminal::disable_raw_mode`
* Move and rename `Rawscreen::into_raw_mode` and `Rawscreen::disable_raw_mode` to `terminal::enable_raw_mode` and `terminal::disable_raw_mode`
- Move `screen::EnterAlternateScreen` and `screen::LeaveAlternateScreen` to `terminal::EnterAlternateScreen` and `terminal::LeaveAlternateScreen`
- Replace `utils::Output` command with `style::Print` command
- Fix enable/disable mouse capture commands on Windows.
- Fix enable/disable mouse capture commands on Windows
- Allow trailing comma `queue!` & `execute!` macros
# Version 0.13.3

View File

@ -1,12 +1,12 @@
[package]
name = "crossterm"
version = "0.13.3"
version = "0.14.0"
authors = ["T. Post"]
description = "An crossplatform terminal library for manipulating terminals."
repository = "https://github.com/crossterm-rs/crossterm"
documentation = "https://docs.rs/crossterm/"
license = "MIT"
keywords = ["console", "color", "cursor", "input", "terminal"]
keywords = ["event", "color", "cursor", "input", "terminal"]
exclude = ["target", "Cargo.lock"]
readme = "README.md"
edition = "2018"
@ -55,7 +55,7 @@ crossterm_winapi = "0.5.1"
[target.'cfg(unix)'.dependencies]
libc = "0.2.51"
mio = "0.6.19"
signal-hook = { version = "0.1.11", features = ["mio-support"] }
signal-hook = { version = "0.1.12", features = ["mio-support"] }
#
# Dev dependencies (examples, ...)

View File

@ -49,33 +49,36 @@ repository. Sorry for the inconvenience.
- Multi-threaded (send, sync)
- Detailed documentation
- Few dependencies
- Full control over output buffer
- Cursor (feature `cursor`)
- Full control over writing and flushing output buffer
- Cursor
- Move the cursor N times (up, down, left, right)
- Move to previous / next line
- Move to column
- Set/get the cursor position
- Store the cursor position and restore to it later
- Hide/show the cursor
- Enable/disable cursor blinking (not all terminals do support this feature)
- Styled output (feature `style`)
- Styled output
- Foreground color (16 base colors)
- Background color (16 base colors)
- 256 (ANSI) color support (Windows 10 and UNIX only)
- RGB color support (Windows 10 and UNIX only)
- Text attributes like bold, italic, underscore, crossed, etc.
- Terminal (feature `terminal`)
- Text attributes like bold, italic, underscore, crossed, etc
- Terminal
- Clear (all lines, current line, from cursor down and up, until new line)
- Scroll up, down
- Set/get the terminal size
- Exit current process
- Input (feature `input`)
- Read character
- Read line
- Read key input events (async / sync)
- Read mouse input events (press, release, position, button)
- Screen (feature `screen`)
- Alternate screen
- Raw screen
- Input
- Input Events
- Mouse Events (press, release, position, button, drag)
- Terminal Resize Events
- Advanced modifier (SHIFT | ALT | CTRL) support for both mouse and key events and
- futures Stream (feature 'event-stream')
- Poll/read API
<!--
WARNING: Do not change following heading title as it's used in the URL by other crates!
-->
@ -141,22 +144,18 @@ Checkout this [list](https://docs.rs/crossterm/0.13.0/crossterm/index.html#suppo
### Feature Flags
All features are enabled by default. You can disable default features and enable some of them only.
To optional feature flags.
```toml
[dependencies.crossterm]
version = "0.12"
version = "0.14"
default-features = false # Disable default features
features = ["cursor", "screen"] # Enable required features only
features = ["event-stream"] # Enable required features only
```
| Feature | Description |
| :-- | :-- |
| `input` | Sync/Async input readers |
| `cursor` | Cursor manipulation |
| `screen` | Alternate screen & raw mode |
| `terminal` | Size, clear, scroll |
| `style` | Colors, text attributes |
| `event-stream` | `futures::Stream` producing `Result<Event>`.|
### Other Resources
@ -172,19 +171,13 @@ features = ["cursor", "screen"] # Enable required features only
## Contributing
I highly appreciate when anyone contributes to this crate. Before you do, please,
We highly appreciate when anyone contributes to this crate. Before you do, please,
read the [Contributing](docs/CONTRIBUTING.md) guidelines.
## Authors
* **Timon Post** - *Project Owner & creator*
## Support
Would you like Crossterm to be even more gorgeous and beautiful? You can help with this by donating.
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z8QK6XU749JB2)
## License
This project, `crossterm` and all it's sub-crates: `crossterm_screen`, `crossterm_cursor`, `crossterm_style`,

View File

@ -12,10 +12,11 @@ The examples are compatible with the latest release.
│   └── event-*
│   └── stderr
```
* `examples/interactive-test`, interactive demo
* `event-*`, event reading demo
* `stderr` , crossterm over stderr demo
| File Name | Description | Topics
| :------- | :------- | :------- |
| `examples/interactive-test` | interactive, walk trough, demo | cursor, style, event
| `event-*`| event reading demos | (async) event reading
| `stderr` | crossterm over stderr demo, | raw mode, alternate screen, custom output
## Run examples

View File

@ -4,7 +4,7 @@
//!
//! This documentation does not contain a lot of examples. The reason is that it's fairly
//! obvious how to use this crate. Although, we do provide
//! [examples](https://github.com/crossterm-rs/examples) repository
//! [examples](https://github.com/crossterm-rs/crossterm/tree/master/examples) repository
//! to demonstrate the capabilities.
//!
//! ## Examples

View File

@ -4,7 +4,7 @@
//!
//! This documentation does not contain a lot of examples. The reason is that it's fairly
//! obvious how to use this crate. Although, we do provide
//! [examples](https://github.com/crossterm-rs/examples) repository
//! [examples](https://github.com/crossterm-rs/crossterm/tree/master/examples) repository
//! to demonstrate the capabilities.
//!
//! ## Platform-specific Notes

View File

@ -4,7 +4,7 @@
//!
//! This documentation does not contain a lot of examples. The reason is that it's fairly
//! obvious how to use this crate. Although, we do provide
//! [examples](https://github.com/crossterm-rs/examples) repository
//! [examples](https://github.com/crossterm-rs/crossterm/tree/master/examples) repository
//! to demonstrate the capabilities.
//!
//! Most terminal actions can be performed with commands.