mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-21 11:08:09 +08:00
Extract common struct Dimensions from Terminal (#171)
- Convert Dimension to namespace to allow defining Fit method from dom. - Use Dimensions extracted from Terminal as replacement struct. - Convert Terminal to namespace as it only defines static members. - Remove dom references from screen library (circular dependency).
This commit is contained in:

committed by
GitHub

parent
34d955e9ac
commit
49e8cc57d3
@@ -2,24 +2,23 @@
|
||||
#define FTXUI_CORE_TERMINAL_HPP
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
class Terminal {
|
||||
public:
|
||||
struct Dimensions {
|
||||
int dimx;
|
||||
int dimy;
|
||||
};
|
||||
static Dimensions Size();
|
||||
|
||||
enum Color {
|
||||
Palette1,
|
||||
Palette16,
|
||||
Palette256,
|
||||
TrueColor,
|
||||
};
|
||||
static Color ColorSupport();
|
||||
struct Dimensions {
|
||||
int dimx;
|
||||
int dimy;
|
||||
};
|
||||
|
||||
namespace Terminal {
|
||||
Dimensions Size();
|
||||
|
||||
enum Color {
|
||||
Palette1,
|
||||
Palette16,
|
||||
Palette256,
|
||||
TrueColor,
|
||||
};
|
||||
Color ColorSupport();
|
||||
} // namespace Terminal
|
||||
|
||||
} // namespace ftxui
|
||||
|
||||
#endif /* end of include guard: FTXUI_CORE_TERMINAL_HPP */
|
||||
|
Reference in New Issue
Block a user