Wiki page mainloop changed with summary [Move Javascript docs to legacy API] by Andrew Williams

This commit is contained in:
Andrew Williams 2017-10-20 11:08:43 -07:00 committed by apache
parent dff29b0b49
commit 2f1f87bda0
1 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,81 @@
===== Javascript binding API - Ecore Mainloop =====
[[api:javascript:ecore|Back to the JS Ecore page]]
**DRAFT**
This page discusses functions that are acting on Ecore's main loop itself or on events and infrastructure directly linked to it.
Most programs only need to start and end the main loop, the rest of the function discussed here are meant to be used in special situations, and with great care.
==== Constants ====
=== Callback control ===
These constants are used through ecore to control the lifetime of callbacks. They are usually returned by the callback to indicate if the callback should be kept for future activations, if it should be cancelled, etc.
* ''efl.Ecore.Mainloop.CALLBACK_CANCEL'' - Remove the callback from the active list.
* ''efl.Ecore.Mainloop.CALLBACK_DONE'' - Stop event handling.
* ''efl.Ecore.Mainloop.CALLBACK_PASS_ON'' - Pass the event to the next handler.
* ''efl.Ecore.Mainloop.CALLBACK_RENEW'' - Keep the callback active for future activation.
==== Functions ====
=== begin() ===
Syntax
<code javascript>
efl.Ecore.Mainloop.begin();
</code>
Runs the application main loop.
=== getAnimatorTicked() ===
Syntax
<code javascript>
var animatorTicked = efl.Ecore.Mainloop.getAnimatorTicked()
</code>
Return value
* boolean - ''true'' if an animator has been called, ''false'' otherwise.
Returns if an animator has ticked off during this loop iteration
=== getNested() ===
Syntax
<code javascript>
var isRunning = efl.Ecore.Mainloop.getNested()
</code>
Return value
* number - an integer specifying if the ecore_main_loop is running, 0 if not running, > 0 if running
Returns if the ecore_main_loop is running
=== iterate() ===
Syntax
<code javascript>
efl.Ecore.Mainloop.iterate()
</code>
Runs a single iteration of the main loop to process everything on the queue.
=== quit() ===
Syntax
<code javascript>
efl.Ecore.Mainloop.quit()
</code>
Quits the main loop once all the events currently on the queue have been processed.