FTXUI/include/ftxui/screen/terminal.hpp
Jarosław Pelczar 7298636e7c
Add API to set terminal fallback size (#230)
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>
2021-10-13 13:44:30 +02:00

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.