From 0df9ad1015f49a6ce5f1fd4e0c66b13bdccdc60a Mon Sep 17 00:00:00 2001 From: T Date: Thu, 25 Jan 2018 18:26:08 +0100 Subject: [PATCH] Added resizing terminal. Styling font with attributes for unix systems inplemented. Windows kernel refactored and cleared out some grammer mistakes. (Windows tested and unix jet to be tested). --- .idea/workspace.xml | 854 ++++++++++++--------- Cargo.toml | 3 + examples/bin.rs | 3 + examples/color/mod.rs | 2 +- examples/cursor/mod.rs | 12 + examples/terminal/mod.rs | 19 +- src/crossterm_cursor/ansi_cursor.rs | 12 + src/crossterm_cursor/base_cursor.rs | 4 + src/crossterm_cursor/cursor.rs | 46 ++ src/crossterm_cursor/winapi_cursor.rs | 26 +- src/crossterm_mouse/mod.rs | 0 src/crossterm_style/color/base_color.rs | 2 +- src/crossterm_style/color/color.rs | 77 +- src/crossterm_style/color/winapi_color.rs | 2 +- src/crossterm_style/mod.rs | 88 +++ src/crossterm_style/styles/objectstyle.rs | 13 +- src/crossterm_style/styles/styledobject.rs | 31 + src/crossterm_terminal/ansi_terminal.rs | 5 + src/crossterm_terminal/base_terminal.rs | 2 + src/crossterm_terminal/terminal.rs | 11 + src/crossterm_terminal/winapi_terminal.rs | 2 + src/kernel/windows_kernel/ansi_support.rs | 17 +- src/kernel/windows_kernel/color.rs | 30 +- src/kernel/windows_kernel/cursor.rs | 64 +- src/kernel/windows_kernel/handle.rs | 31 - src/kernel/windows_kernel/kernel.rs | 167 +++- src/kernel/windows_kernel/mod.rs | 1 - src/kernel/windows_kernel/terminal.rs | 169 ++-- src/shared/functions.rs | 6 - src/shared/traits.rs | 2 + todo.txt | 6 +- 31 files changed, 1087 insertions(+), 620 deletions(-) create mode 100644 src/crossterm_mouse/mod.rs delete mode 100644 src/kernel/windows_kernel/handle.rs diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7bf73c3..aa2c112 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,26 +2,37 @@ + - + + + + + + + + + + + - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - @@ -85,10 +164,27 @@ winapi kernel32 HANDLE - CONSOLE_SCREEN_BUFFER_INFO handleapi terminal_cursor terminal + r + short + console_mode + set + fsr_window + resizeBuffer + set_console_text_attribute + set( + kern + pos + csbi + kernel + success + count + xpos + handle:: + wincon + CONSOLE_SCREEN_BUFFER_INFO crossterm_cursor @@ -105,25 +201,40 @@ @@ -136,8 +247,8 @@ @@ -154,6 +265,7 @@ + @@ -166,21 +278,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +