From 4a943c124edc9049e9e6a94ac52d4c8f6b34fc16 Mon Sep 17 00:00:00 2001 From: TimonPost Date: Sun, 1 Jul 2018 22:40:07 +0200 Subject: [PATCH] Added alternatescreen functionalilty, and added options to terminate the current process. also added write option to the terminal module --- .idea/workspace.xml | 697 ++++++++++-------- 123 | 0 .../bin.rs | 26 +- .../color/mod.rs | 2 +- .../cursor/mod.rs | 4 +- .../program_examples/README.md | 3 + .../first_depth_search/map.rs | 49 ++ .../first_depth_search/mod.rs | 17 + .../first_depth_search/variables.rs | 63 ++ .../program_examples/mod.rs | 1 + .../terminal/alternate_screen.rs | 25 +- .../terminal/mod.rs | 9 +- src/cursor/cursor.rs | 7 +- src/cursor/winapi_cursor.rs | 31 +- src/kernel/windows_kernel/ansi_support.rs | 2 +- src/kernel/windows_kernel/cursor.rs | 16 +- src/kernel/windows_kernel/kernel.rs | 208 ++++-- src/kernel/windows_kernel/terminal.rs | 10 +- src/lib.rs | 3 +- src/manager/manager.rs | 25 +- src/manager/mod.rs | 9 +- src/manager/win_manager.rs | 18 +- src/shared/environment.rs | 66 ++ src/shared/functions.rs | 20 +- src/shared/mod.rs | 3 + src/shared/raw.rs | 2 + src/shared/screen.rs | 27 +- src/state/commands/shared_commands.rs | 3 +- src/state/commands/win_commands.rs | 74 +- src/state/context.rs | 3 + src/state/state_manager.rs | 2 + src/style/color/color.rs | 2 +- src/style/color/winapi_color.rs | 17 +- src/style/styles/objectstyle.rs | 2 +- src/terminal/ansi_terminal.rs | 2 +- src/terminal/terminal.rs | 15 + src/terminal/winapi_terminal.rs | 58 +- string | 0 38 files changed, 952 insertions(+), 569 deletions(-) create mode 100644 123 create mode 100644 examples/Crossterm 0.2.2 - New Version (Not finished)/program_examples/README.md create mode 100644 examples/Crossterm 0.2.2 - New Version (Not finished)/program_examples/first_depth_search/map.rs create mode 100644 examples/Crossterm 0.2.2 - New Version (Not finished)/program_examples/first_depth_search/mod.rs create mode 100644 examples/Crossterm 0.2.2 - New Version (Not finished)/program_examples/first_depth_search/variables.rs create mode 100644 examples/Crossterm 0.2.2 - New Version (Not finished)/program_examples/mod.rs create mode 100644 src/shared/environment.rs create mode 100644 string diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f3f365c..b697baa 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,8 +86,17 @@ - - + + + + + + + + + + + @@ -41,8 +104,8 @@ - - + + @@ -52,56 +115,20 @@ - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -117,11 +144,6 @@ - cursor( - IStateCommand - execute - functions - set cursor_vis write ToAlternateScreenBufferCommand @@ -141,12 +163,17 @@ fmt STD_OUTPUT_HANDLE data - context WinApiScreenManager color( d srct_read_rect get_output_handle(); + color + super:: + get_current_ha + csbi + context + terminal_size crossterm_cursor @@ -170,56 +197,56 @@ @@ -234,8 +261,8 @@ - @@ -278,6 +305,13 @@ + + + + + + + @@ -285,6 +319,21 @@ + + + + + + + + + + + + + + + @@ -354,6 +403,13 @@ + + + + + + + @@ -371,26 +427,26 @@