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,7 +1,10 @@
# Version Master # Version 0.14
- `queue!` & `execute!` macros allow trailing comma
- Replace the `input` module with brand new `event` module - Replace the `input` module with brand new `event` module
- 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 - 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) [Upgrade from 0.13 to 0.14](https://github.com/crossterm-rs/crossterm/wiki/Upgrade-from-0.13-to-0.14)
documentation documentation
@ -14,7 +17,8 @@
* 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` - Move `screen::EnterAlternateScreen` and `screen::LeaveAlternateScreen` to `terminal::EnterAlternateScreen` and `terminal::LeaveAlternateScreen`
- Replace `utils::Output` command with `style::Print` command - 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 # Version 0.13.3

View File

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

View File

@ -49,32 +49,35 @@ repository. Sorry for the inconvenience.
- Multi-threaded (send, sync) - Multi-threaded (send, sync)
- Detailed documentation - Detailed documentation
- Few dependencies - Few dependencies
- Full control over output buffer - Full control over writing and flushing output buffer
- Cursor (feature `cursor`) - Cursor
- Move the cursor N times (up, down, left, right) - Move the cursor N times (up, down, left, right)
- Move to previous / next line
- Move to column
- Set/get the cursor position - Set/get the cursor position
- Store the cursor position and restore to it later - Store the cursor position and restore to it later
- Hide/show the cursor - Hide/show the cursor
- Enable/disable cursor blinking (not all terminals do support this feature) - Enable/disable cursor blinking (not all terminals do support this feature)
- Styled output (feature `style`) - Styled output
- Foreground color (16 base colors) - Foreground color (16 base colors)
- Background color (16 base colors) - Background color (16 base colors)
- 256 (ANSI) color support (Windows 10 and UNIX only) - 256 (ANSI) color support (Windows 10 and UNIX only)
- RGB color support (Windows 10 and UNIX only) - RGB color support (Windows 10 and UNIX only)
- Text attributes like bold, italic, underscore, crossed, etc. - Text attributes like bold, italic, underscore, crossed, etc
- Terminal (feature `terminal`) - Terminal
- Clear (all lines, current line, from cursor down and up, until new line) - Clear (all lines, current line, from cursor down and up, until new line)
- Scroll up, down - Scroll up, down
- Set/get the terminal size - Set/get the terminal size
- Exit current process - 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 - Alternate screen
- Raw 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! 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 ### Feature Flags
All features are enabled by default. You can disable default features and enable some of them only. To optional feature flags.
```toml ```toml
[dependencies.crossterm] [dependencies.crossterm]
version = "0.12" version = "0.14"
default-features = false # Disable default features default-features = false # Disable default features
features = ["cursor", "screen"] # Enable required features only features = ["event-stream"] # Enable required features only
``` ```
| Feature | Description | | Feature | Description |
| :-- | :-- | | :-- | :-- |
| `input` | Sync/Async input readers | | `event-stream` | `futures::Stream` producing `Result<Event>`.|
| `cursor` | Cursor manipulation |
| `screen` | Alternate screen & raw mode |
| `terminal` | Size, clear, scroll |
| `style` | Colors, text attributes |
### Other Resources ### Other Resources
@ -172,19 +171,13 @@ features = ["cursor", "screen"] # Enable required features only
## Contributing ## 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. read the [Contributing](docs/CONTRIBUTING.md) guidelines.
## Authors ## Authors
* **Timon Post** - *Project Owner & creator* * **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 ## License
This project, `crossterm` and all it's sub-crates: `crossterm_screen`, `crossterm_cursor`, `crossterm_style`, 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-* │   └── event-*
│   └── stderr │   └── stderr
``` ```
| File Name | Description | Topics
* `examples/interactive-test`, interactive demo | :------- | :------- | :------- |
* `event-*`, event reading demo | `examples/interactive-test` | interactive, walk trough, demo | cursor, style, event
* `stderr` , crossterm over stderr demo | `event-*`| event reading demos | (async) event reading
| `stderr` | crossterm over stderr demo, | raw mode, alternate screen, custom output
## Run examples ## Run examples

View File

@ -4,7 +4,7 @@
//! //!
//! This documentation does not contain a lot of examples. The reason is that it's fairly //! 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 //! 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. //! to demonstrate the capabilities.
//! //!
//! ## Examples //! ## Examples

View File

@ -4,7 +4,7 @@
//! //!
//! This documentation does not contain a lot of examples. The reason is that it's fairly //! 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 //! 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. //! to demonstrate the capabilities.
//! //!
//! ## Platform-specific Notes //! ## 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 //! 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 //! 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. //! to demonstrate the capabilities.
//! //!
//! Most terminal actions can be performed with commands. //! Most terminal actions can be performed with commands.