Class MainLoop | Terminal.Gui v1 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers.
Inheritance
MainLoop
Inherited Members
Remarks
Monitoring of file descriptors is only available on Unix, there does not seem to be a way of supporting this on Windows.
Constructors
Creates a new Mainloop.
Properties
The current IMainLoopDriver in use.
Gets a copy of the list of all idle handlers.
Gets the list of all timeouts sorted by the TimeSpan time ticks./>. A shorter limit time can be added at the end, but it will be called before an earlier addition that has a longer limit time.
Methods
Adds specified idle handler function to mainloop processing. The handler function will be called once per iteration of the main loop after other events have been handled.
AddTimeout(TimeSpan, Func<MainLoop, bool>)
Adds a timeout to the mainloop.
Determines whether there are pending events to be processed.
Runs action
on the thread that is processing events
Runs one iteration of timers and file watches
Removes an idle handler added with AddIdle(Func) from processing.
Removes a previously scheduled timeout
Runs the mainloop.
Stops the mainloop.
Events
Invoked when a new timeout is added. To be used in the case when ExitRunLoopAfterFirstIteration is true.