From c1105485079fba97a62df62baeff3a4dcc7686ef Mon Sep 17 00:00:00 2001 From: inmarket Date: Tue, 4 Mar 2014 14:14:15 +1000 Subject: Add support for ANSI like escape sequences to control display color and attributes in a GWIN console. Updated the console demo to demonstrate this. --- src/gwin/sys_options.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gwin/sys_options.h') diff --git a/src/gwin/sys_options.h b/src/gwin/sys_options.h index 02467916..e7bb93b4 100644 --- a/src/gwin/sys_options.h +++ b/src/gwin/sys_options.h @@ -159,6 +159,25 @@ #ifndef GWIN_CONSOLE_USE_FLOAT #define GWIN_CONSOLE_USE_FLOAT FALSE #endif + /** + * @brief Console windows support escape sequences to control display + * @details Defaults to FALSE + * + * @note + * Currently supported: + * ESC color Change subsequent text color + * color: "0" = black, "1" = red, "2" = green, "3" = yellow, "4" = blue, + * "5" = magenta, "6" = cyan, "7" = white + * ESC C Revert subsequent text color to the window default + * ESC u Turn on underline + * ESC U Turn off underline + * ESC b Turn on bold + * ESC B Turn off bold + * ESC J Clear the window + */ + #ifndef GWIN_CONSOLE_ESCSEQ + #define GWIN_CONSOLE_ESCSEQ FALSE + #endif /** * @brief Console Windows need BaseStreamSequential support (ChibiOS only) * @details Defaults to FALSE -- cgit v1.2.3