mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 07:47:54 +01:00
* Added namespace docs * Claned up FileServices * rewrote mainloop.md to be focused on multitasking * rewrote mainloop.md to be focused on multitasking2 * rewrote mainloop.md to be focused on multitasking3
1.0 KiB
1.0 KiB
uid, summary
| uid | summary |
|---|---|
| Terminal.Gui.App | The `App` namespace holds @Terminal.Gui.Application and associated classes. |
@Terminal.Gui.Application provides the main entry point and core application logic for Terminal.Gui applications. This static singleton class is responsible for initializing and shutting down the Terminal.Gui environment, managing the main event loop, handling input and output, and providing access to global application state.
Typical usage involves calling Application.Init() to initialize the application, creating and running a Window, and then calling Application.Shutdown() to clean up resources. The class also provides methods for culture support, idle handlers, and rendering the application state as a string.
Example Usage
Application.Init();
var win = new Window()
{
Title = $"Example App ({Application.QuitKey} to quit)"
};
Application.Run(win);
win.Dispose();
Application.Shutdown();