Show / Hide Table of Contents

    Class EcoreMainloop

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll
    API Level:
    preview

    EcoreMainloop is a helper class, which provides the functions relative to Ecore's main loop.

    public static class EcoreMainloop
    Inheritance
    Object
    EcoreMainloop

    Properties

    View Source

    IsMainThread

    Checks if you are calling this function from the main thread.

    Declaration
    public static bool IsMainThread { get; }
    Property Value
    Type Description
    Boolean
    Remarks

    True if the calling function is the same thread, false otherwise.

    API Level: preview

    Methods

    View Source

    AddTimer(Double, Func<Boolean>)

    Creates a timer to call the given function in the given period of time.

    Declaration
    public static IntPtr AddTimer(double interval, Func<bool> handler)
    Parameters
    Type Name Description
    Double interval

    The interval in seconds.

    Func<Boolean> handler

    The given function.

    Returns
    Type Description
    IntPtr

    A timer object handler on success, or null on failure.

    API Level: preview
    View Source

    Begin()

    Runs the application main loop.

    Declaration
    public static void Begin()
    API Level: preview
    View Source

    Post(Action)

    Adds an idler handler.

    Declaration
    public static void Post(Action task)
    Parameters
    Type Name Description
    Action task

    The action to call when idle.

    API Level: preview
    View Source

    PostAndWakeUp(Action)

    Calls the callback asynchronously in the main loop.

    Declaration
    public static void PostAndWakeUp(Action task)
    Parameters
    Type Name Description
    Action task

    The action wanted to be called.

    API Level: preview
    View Source

    Quit()

    Quits the main loop, once all the events currently on the queue have been processed.

    Declaration
    public static void Quit()
    API Level: preview
    View Source

    RemoveTimer(IntPtr)

    Removes the specified timer from the timer list.

    Declaration
    public static void RemoveTimer(IntPtr id)
    Parameters
    Type Name Description
    IntPtr id

    The specified timer handler

    API Level: preview
    View Source

    Send(Action)

    Calls the callback synchronously in the main loop.

    Declaration
    public static void Send(Action task)
    Parameters
    Type Name Description
    Action task

    The action wanted to be called.

    API Level: preview
    • View Source
    Back to top Copyright © 2016-2020 Samsung
    Generated by DocFX