mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-12-02 00:12:28 +08:00
7298636e7c
In case of embedded systems, the terminal size may not always be detectable (e.g. in case of serial output). Allow application to set up the default size in case autodetection fails. On platform such as Emscripten, there is only "fallback" size. Signed-off-by: Jarosław Pelczar <jarek@jpelczar.com>
30 lines
581 B
C++
30 lines
581 B
C++
#ifndef FTXUI_CORE_TERMINAL_HPP
|
|
#define FTXUI_CORE_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();
|
|
} // namespace Terminal
|
|
|
|
} // namespace ftxui
|
|
|
|
#endif /* end of include guard: FTXUI_CORE_TERMINAL_HPP */
|
|
|
|
// 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.
|