#nullable enable using System.Collections.Concurrent; namespace Terminal.Gui; /// /// Interface for main loop that runs the core Terminal.Gui UI loop. /// /// public interface IMainLoop : IDisposable { /// /// Gets the class responsible for servicing user timeouts and idles /// public ITimedEvents TimedEvents { get; } /// /// Gets the class responsible for writing final rendered output to the console /// public IOutputBuffer OutputBuffer { get; } /// /// Class for writing output to the console. /// public IConsoleOutput Out { get; } /// /// Gets the class responsible for processing buffered console input and translating /// it into events on the UI thread. /// public IInputProcessor InputProcessor { get; } /// /// Gets the class responsible for sending ANSI escape requests which expect a response /// from the remote terminal e.g. Device Attribute Request /// public AnsiRequestScheduler AnsiRequestScheduler { get; } /// /// Gets the class responsible for determining the current console size /// public IWindowSizeMonitor WindowSizeMonitor { get; } /// /// Initializes the loop with a buffer from which data can be read /// /// /// /// /// void Initialize (ITimedEvents timedEvents, ConcurrentQueue inputBuffer, IInputProcessor inputProcessor, IConsoleOutput consoleOutput); /// /// Perform a single iteration of the main loop then blocks for a fixed length /// of time, this method is designed to be run in a loop. /// public void Iteration (); }