Loading...
Searching...
No Matches
terminal.hpp
Go to the documentation of this file.
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#ifndef FTXUI_SCREEN_TERMINAL_HPP
#define FTXUI_SCREEN_TERMINAL_HPP
namespace ftxui {
struct Dimensions {
int dimx;
int dimy;
};
namespace Terminal {
Dimensions Size();
void SetFallbackSize(const Dimensions& fallbackSize);
enum Color {
Palette1,
Palette16,
Palette256,
TrueColor,
};
Color ColorSupport();
void SetColorSupport(Color color);
} // namespace Terminal
} // namespace ftxui
#endif // FTXUI_SCREEN_TERMINAL_HPP
ftxui::Color
A class representing terminal colors.
Definition color.hpp:20
ftxui::Terminal
Definition terminal.hpp:13
ftxui::Terminal::SetColorSupport
void SetColorSupport(Color color)
Override terminal color support in case auto-detection fails.
Definition terminal.cpp:140
ftxui::Terminal::SetFallbackSize
void SetFallbackSize(const Dimensions &fallbackSize)
Override terminal size in case auto-detection fails.
Definition terminal.cpp:124
ftxui::Terminal::Color
Color
Definition terminal.hpp:17
ftxui::Terminal::TrueColor
@ TrueColor
Definition terminal.hpp:21
ftxui::Terminal::Palette256
@ Palette256
Definition terminal.hpp:20
ftxui::Terminal::Palette16
@ Palette16
Definition terminal.hpp:19
ftxui::Terminal::Palette1
@ Palette1
Definition terminal.hpp:18
ftxui::Terminal::Size
Dimensions Size()
Get the terminal size.
Definition terminal.cpp:94
ftxui::Terminal::ColorSupport
Color ColorSupport()
Get the color support of the terminal.
Definition terminal.cpp:130
ftxui
Definition animation.hpp:10
ftxui::Dimensions::dimy
int dimy
Definition terminal.hpp:10
ftxui::Dimensions::dimx
int dimx
Definition terminal.hpp:9
ftxui::color
Decorator color(Color)
Decorate using a foreground color.
Definition color.cpp:110
ftxui::Dimensions
Definition terminal.hpp:8