10#define WIN32_LEAN_AND_MEAN
30#if defined(__EMSCRIPTEN__)
51const char*
Safe(
const char* c) {
52 return (c !=
nullptr) ? c :
"";
55bool Contains(
const std::string& s,
const char*
key) {
56 return s.find(
key) != std::string::npos;
60#if defined(__EMSCRIPTEN__)
69 std::string
TERM =
Safe(std::getenv(
"TERM"));
74#if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
95#if defined(__EMSCRIPTEN__)
106 csbi.srWindow.Bottom -
csbi.srWindow.Top + 1};
115 if (w.ws_col == 0 || w.ws_row == 0 ||
status < 0) {
void SetColorSupport(Color color)
Override terminal color support in case auto-detection fails.
void SetFallbackSize(const Dimensions &fallbackSize)
Override terminal size in case auto-detection fails.
Dimensions Size()
Get the terminal size.
Color ColorSupport()
Get the color support of the terminal.
std::shared_ptr< T > Make(Args &&... args)
Decorator color(Color)
Decorate using a foreground color.