Table of Contents

Interface IApplicationMainLoop<T>

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

Interface for the main application loop that runs the core Terminal.Gui UI rendering and event processing.

public interface IApplicationMainLoop<T> : IDisposable

Type Parameters

T

Type of raw input events processed by the loop, e.g. ConsoleKeyInfo for cross-platform .NET driver

Inherited Members

Remarks

This interface defines the contract for the main loop that coordinates:

  • Processing input events from the console
  • Running user timeout callbacks
  • Detecting UI changes that need redrawing
  • Rendering UI updates to the console

Properties

AnsiRequestScheduler

Gets the class responsible for sending ANSI escape requests which expect a response from the remote terminal e.g. Device Attribute Request

InputProcessor

Gets the class responsible for processing buffered console input and translating it into events on the UI thread.

Out

Class for writing output to the console.

OutputBuffer

Gets the class responsible for writing final rendered output to the console

TimedEvents

Gets the class responsible for servicing user timeouts

WindowSizeMonitor

Gets the class responsible for determining the current console size

Methods

Initialize(ITimedEvents, ConcurrentQueue<T>, IInputProcessor, IConsoleOutput, IComponentFactory<T>)

Initializes the loop with a buffer from which data can be read

Iteration()

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.