From ef918c5aec86303dd4bf546fe68581d9fbf176f7 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 20 Apr 2020 23:57:51 -0700 Subject: [PATCH] Added support/comments for more escape sequences. --- Lua/lbtui.c | 3 +++ Python/btui.py | 5 ++++- btui.h | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Lua/lbtui.c b/Lua/lbtui.c index 44c8a58..a794113 100644 --- a/Lua/lbtui.c +++ b/Lua/lbtui.c @@ -423,6 +423,9 @@ static struct { {"bg_cyan", BTUI_BG_NORMAL}, {"bg_white", BTUI_BG_NORMAL}, {"bg_normal", BTUI_BG_NORMAL}, + {"framed", BTUI_NO_FRAMED_OR_ENCIRCLED}, + {"encircled", BTUI_NO_FRAMED_OR_ENCIRCLED}, + {"overlined", BTUI_NO_OVERLINED}, {NULL, 0} }; diff --git a/Python/btui.py b/Python/btui.py index d940e58..a574bcc 100644 --- a/Python/btui.py +++ b/Python/btui.py @@ -98,7 +98,10 @@ BTUI_INVERSE_ATTRS = { "bg_cyan": attr('BTUI_BG_NORMAL'), "bg_white": attr('BTUI_BG_NORMAL'), "bg_normal": attr('BTUI_BG_NORMAL'), -}; + "framed": attr('BTUI_NO_FRAMED_OR_ENCIRCLED'), + "encircled": attr('BTUI_NO_FRAMED_OR_ENCIRCLED'), + "overlined": attr('BTUI_NO_OVERLINED'), +} class BTUI: diff --git a/btui.h b/btui.h index c2cbb8b..e8f2aff 100644 --- a/btui.h +++ b/btui.h @@ -111,12 +111,14 @@ const attr_t BTUI_BLINK_FAST = 1ul << 6; const attr_t BTUI_REVERSE = 1ul << 7; const attr_t BTUI_CONCEAL = 1ul << 8; const attr_t BTUI_STRIKETHROUGH = 1ul << 9; +// 10-19: alternative fonts const attr_t BTUI_FRAKTUR = 1ul << 20; const attr_t BTUI_DOUBLE_UNDERLINE = 1ul << 21; const attr_t BTUI_NO_BOLD_OR_FAINT = 1ul << 22; const attr_t BTUI_NO_ITALIC_OR_FRAKTUR = 1ul << 23; const attr_t BTUI_NO_UNDERLINE = 1ul << 24; const attr_t BTUI_NO_BLINK = 1ul << 25; +// 26: reserved const attr_t BTUI_NO_REVERSE = 1ul << 27; const attr_t BTUI_NO_CONCEAL = 1ul << 28; const attr_t BTUI_NO_STRIKETHROUGH = 1ul << 29; @@ -140,9 +142,14 @@ const attr_t BTUI_BG_CYAN = 1ul << 46; const attr_t BTUI_BG_WHITE = 1ul << 47; // 48: 256/24bit color const attr_t BTUI_BG_NORMAL = 1ul << 49; +// 50: Inverse of 26 (reserved) const attr_t BTUI_FRAMED = 1ul << 51; const attr_t BTUI_ENCIRCLED = 1ul << 52; const attr_t BTUI_OVERLINED = 1ul << 53; +const attr_t BTUI_NO_FRAMED_OR_ENCIRCLED = 1ul << 54; +const attr_t BTUI_NO_OVERLINED = 1ul << 55; +// 56-59: reserved +// 60-65: Ideogram stuff // BTUI object: