Show / Hide Table of Contents

    Class UnixMainLoop

    Unix main loop, suitable for using on Posix systems
    Inheritance
    System.Object
    UnixMainLoop
    Implements
    IMainLoopDriver
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class UnixMainLoop : IMainLoopDriver
    Remarks
    In addition to the general functions of the mainloop, the Unix version can watch file descriptors using the AddWatch methods.

    Methods

    AddWatch(Int32, UnixMainLoop.Condition, Func<MainLoop, Boolean>)

    Watches a file descriptor for activity.
    Declaration
    public object AddWatch(int fileDescriptor, UnixMainLoop.Condition condition, Func<MainLoop, bool> callback)
    Parameters
    Type Name Description
    System.Int32 fileDescriptor
    UnixMainLoop.Condition condition
    System.Func<MainLoop, System.Boolean> callback
    Returns
    Type Description
    System.Object
    Remarks
    When the condition is met, the provided callback is invoked. If the callback returns false, the watch is automatically removed. The return value is a token that represents this watch, you can use this token to remove the watch by calling RemoveWatch.

    RemoveWatch(Object)

    Removes an active watch from the mainloop.
    Declaration
    public void RemoveWatch(object token)
    Parameters
    Type Name Description
    System.Object token
    Remarks
    The token parameter is the value returned from AddWatch

    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()

    Implements

    IMainLoopDriver
    Back to top Generated by DocFX