1#ifndef FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
2#define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
23using Component = std::shared_ptr<ComponentBase>;
24class ScreenInteractivePrivate;
65 void RunOnceBlocking(
Component component);
69 void ResetCursorPosition();
71 void Signal(
int signal);
74 enum class Dimension {
80 Dimension dimension_ = Dimension::Fixed;
81 bool use_alternative_screen_ =
false;
85 bool use_alternative_screen);
90 std::string set_cursor_position;
91 std::string reset_cursor_position;
93 std::atomic<bool> quit_ =
false;
94 std::thread event_listener_;
95 std::thread animation_listener_;
96 bool animation_requested_ =
false;
102 bool mouse_captured =
false;
103 bool previous_frame_resized_ =
false;
105 bool frame_valid_ =
false;
static void Signal(ScreenInteractive &s, int signal)
static ScreenInteractive TerminalOutput()
static ScreenInteractive FixedSize(int dimx, int dimy)
void PostEvent(Event event)
static ScreenInteractive FitComponent()
static ScreenInteractive Fullscreen()
static ScreenInteractive * Active()
CapturedMouse CaptureMouse()
void RequestAnimationFrame()
Closure ExitLoopClosure()
Closure WithRestoredIO(Closure)
Decorate a function. It executes the same way, but with the currently active screen terminal hooks te...
A rectangular grid of Pixel.
std::chrono::time_point< Clock > TimePoint
std::unique_ptr< CapturedMouseInterface > CapturedMouse
std::unique_ptr< ReceiverImpl< T > > Receiver
std::unique_ptr< SenderImpl< T > > Sender
std::variant< Event, Closure, AnimationTask > Task
std::function< void()> Closure
std::shared_ptr< ComponentBase > Component
Represent an event. It can be key press event, a terminal resize, or more ...