Class EcoreMainloop
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
EcoreMainloop is a helper class, which provides the functions relative to Ecore's main loop.
[Obsolete("This has been deprecated in API12")]
public static class EcoreMainloop
- Inheritance
-
objectEcoreMainloop
Properties
View SourceIsMainThread
Checks if you are calling this function from the main thread.
Declaration
[Obsolete("This has been deprecated in API12")]
public static bool IsMainThread { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
True if the calling function is the same thread, false otherwise.
Methods
View SourceAddTimer(double, Func<bool>)
Creates a timer to call the given function in the given period of time.
Declaration
[Obsolete("This has been deprecated in API12")]
public static IntPtr AddTimer(double interval, Func<bool> handler)
Parameters
Type | Name | Description |
---|---|---|
double | interval | The interval in seconds. |
System.Func<TResult><bool> | handler | The given function. |
Returns
Type | Description |
---|---|
System.IntPtr | A timer object handler on success, or null on failure. |
Begin()
Runs the application main loop.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void Begin()
Post(Action)
Adds an idler handler.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void Post(Action task)
Parameters
Type | Name | Description |
---|---|---|
System.Action | task | The action to call when idle. |
PostAndWakeUp(Action)
Calls the callback asynchronously in the main loop.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void PostAndWakeUp(Action task)
Parameters
Type | Name | Description |
---|---|---|
System.Action | task | The action wanted to be called. |
Quit()
Quits the main loop, once all the events currently on the queue have been processed.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void Quit()
RemoveTimer(IntPtr)
Removes the specified timer from the timer list.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void RemoveTimer(IntPtr id)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | id | The specified timer handler |
Send(Action)
Calls the callback synchronously in the main loop.
Declaration
[Obsolete("This has been deprecated in API12")]
public static void Send(Action task)
Parameters
Type | Name | Description |
---|---|---|
System.Action | task | The action wanted to be called. |