Update ReleaseNotesVersion 0.2.3.md

This commit is contained in:
Timon 2018-07-14 23:24:11 +02:00 committed by GitHub
parent 389804104c
commit 6527123f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,8 @@ Because you will have some work to get to the new version of crossterm depending
But if this is the firsttime you are using this crate I highly recommend you to switch to the new version `0.2.3`. But if this is the firsttime you are using this crate I highly recommend you to switch to the new version `0.2.3`.
Some Features crossterm 0.2.3 Some Features crossterm 0.2.3
- [Alternate screen](LINK) for windows and unix systems. - Alternate Screen for windows and unix systems.
- [Raw screen](LINK) for unix and windows systems [Issue 5](https://github.com/TimonPost/crossterm/issues/5).. - Raw screen for unix and windows systems [Issue 5](https://github.com/TimonPost/crossterm/issues/5)..
- Hiding an showing the cursor. - Hiding an showing the cursor.
- Control over blinking of the terminal cursor (only some terminals are supporting this). - Control over blinking of the terminal cursor (only some terminals are supporting this).
- The terminal state will be set to its original state when process ends [issue7](https://github.com/TimonPost/crossterm/issues/7). - The terminal state will be set to its original state when process ends [issue7](https://github.com/TimonPost/crossterm/issues/7).
@ -38,12 +38,12 @@ With these modes you can easier design the terminal screen.
- Hiding and showing terminal cursor - Hiding and showing terminal cursor
- Enable or disabling blinking of the cursor for unix systems (this is not widely supported) - Enable or disabling blinking of the cursor for unix systems (this is not widely supported)
- Restoring the terminal to original modes. - Restoring the terminal to original modes.
- Added a [wrapper](linktocrosstermtype) for managing all the functionalities of crossterm `Crossterm`. - Added a [wrapper](https://github.com/TimonPost/crossterm/blob/master/src/shared/crossterm.rs) for managing all the functionalities of crossterm `Crossterm`.
- Exit the current running process - Exit the current running process
## Examples ## Examples
Added [examples](link_to_examples) for each version of the crossterm version. Added [examples](https://github.com/TimonPost/crossterm/tree/master/examples) for each version of the crossterm version.
Also added a folder with some [real life examples](link_to_realive_examples). Also added a folder with some [real life examples](https://github.com/TimonPost/crossterm/tree/master/examples/Crossterm%200.2.3/program_examples).
## Context ## Context
@ -77,7 +77,7 @@ When this `Context` goes out of scope all changes made will be undone.
Also is this `Context` is a wrapper for access to the current console screen. Also is this `Context` is a wrapper for access to the current console screen.
Because Crossterm needs access to the above to types quite often I have chosen to add those two in one struct called `Context` so that this type could be shared throughout library. Because Crossterm needs access to the above to types quite often I have chosen to add those two in one struct called `Context` so that this type could be shared throughout library.
Check this link for more info: [cleanup of rust codr](https://stackoverflow.com/questions/48732387/how-can-i-run-clean-up-code-in-a-rust-library). Check this link for more info: [cleanup of rust code](https://stackoverflow.com/questions/48732387/how-can-i-run-clean-up-code-in-a-rust-library).
More info over writing to alternate screen buffer on windows and unix see this [link](https://github.com/TimonPost/crossterm/issues/17) More info over writing to alternate screen buffer on windows and unix see this [link](https://github.com/TimonPost/crossterm/issues/17)
__Now the user has to pass an context type to the modules of Crossterm like this:__ __Now the user has to pass an context type to the modules of Crossterm like this:__
@ -98,7 +98,7 @@ Because this looks a little odd I will provide a type withs will manage the `Con
### Alternate screen ### Alternate screen
When you want to switch to alternate screen there are a couple of things to keep in mind for it to work correctly. When you want to switch to alternate screen there are a couple of things to keep in mind for it to work correctly.
First off some code of how to switch to Alternate screen, for more info check the [alternate screen example](link). First off some code of how to switch to Alternate screen, for more info check the [alternate screen example](https://github.com/TimonPost/crossterm/blob/master/examples/Crossterm%200.2.3/terminal/alternate_screen.rs).
_Create alternate screen from `Context`_ _Create alternate screen from `Context`_
@ -120,4 +120,4 @@ _Create alternate screen from `Crossterm`:_
like demonstrated above, to get the functionalities of `cursor(), color(), terminal()` also working on alternate screen. like demonstrated above, to get the functionalities of `cursor(), color(), terminal()` also working on alternate screen.
You need to pass it the same `Context` as you have passed to the previous three called functions, You need to pass it the same `Context` as you have passed to the previous three called functions,
If you don't use the same `Context` in `cursor(), color(), terminal()` than these modules will be using the main screen and you will not see anything at the alternate screen. If you use the [Crossterm](link) type you can get the `Context` from it by calling the crossterm.get_context() whereafter you can create the AlternateScreen from it. If you don't use the same `Context` in `cursor(), color(), terminal()` than these modules will be using the main screen and you will not see anything at the alternate screen. If you use the [Crossterm](https://github.com/TimonPost/crossterm/blob/master/src/shared/crossterm.rs) type you can get the `Context` from it by calling the crossterm.get_context() whereafter you can create the AlternateScreen from it.