Class FakeMainLoop
Mainloop intended to be used with the .NET System.Console API, and can
be used on Windows and Unix, it is cross platform but lacks things like
file descriptor monitoring.
Inheritance
System.Object
FakeMainLoop
Implements
Remarks
This implementation is used for FakeDriver.
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class FakeMainLoop : Object, IMainLoopDriver
Constructors
FakeMainLoop(Func<ConsoleKeyInfo>)
Initializes the class.
Declaration
public FakeMainLoop(Func<ConsoleKeyInfo> consoleKeyReaderFn = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.ConsoleKeyInfo> | consoleKeyReaderFn | The method to be called to get a key from the console. |
Fields
KeyPressed
Invoked when a Key is pressed.
Declaration
public Action<ConsoleKeyInfo> KeyPressed
Field Value
Type | Description |
---|---|
System.Action<System.ConsoleKeyInfo> |
Explicit Interface Implementations
IMainLoopDriver.EventsPending(Boolean)
Declaration
bool IMainLoopDriver.EventsPending(bool wait)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | wait |
Returns
Type | Description |
---|---|
System.Boolean |
IMainLoopDriver.MainIteration()
Declaration
void IMainLoopDriver.MainIteration()
IMainLoopDriver.Setup(MainLoop)
Declaration
void IMainLoopDriver.Setup(MainLoop mainLoop)
Parameters
Type | Name | Description |
---|---|---|
MainLoop | mainLoop |
IMainLoopDriver.Wakeup()
Declaration
void IMainLoopDriver.Wakeup()