summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-01-05 01:31:25 -0800
committerapache <apache@e5-web1.enlightenment.org>2018-01-05 01:31:25 -0800
commitb905b7e45135b241bb6453259d67873897b4c7bf (patch)
tree30c406bfc4899c9041a8cc8735a848a3b8e1ab3c /pages
parentff08e7f15b5296c2238cd2466a4b9fdeb9107f0a (diff)
Wiki page main-loop.md changed with summary [Added Application Main Loop section] by Xavi Artigas
Diffstat (limited to 'pages')
-rw-r--r--pages/develop/guides/c/core/main-loop.md.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/pages/develop/guides/c/core/main-loop.md.txt b/pages/develop/guides/c/core/main-loop.md.txt
index ee611c281..5d4e0e61b 100644
--- a/pages/develop/guides/c/core/main-loop.md.txt
+++ b/pages/develop/guides/c/core/main-loop.md.txt
@@ -15,6 +15,20 @@ EFL manages timers, file descriptors, user interface events amongst other things
15 15
16* Read the [Events Programming Guide](events.md) to learn how to register callbacks, which can be triggered by events. 16* Read the [Events Programming Guide](events.md) to learn how to register callbacks, which can be triggered by events.
17 17
18## The Application Main Loop ##
19
20For convenience, when your application starts, EFL creates one Main Loop for you, called the *Application Main Loop*. You can use it as the parent for any object you create that requires a main loop (Like [Promises and Futures](/develop/guides/c/eina/futures.md), for example).
21
22In the [Hello World](/develop/tutorials/c/hello-world.md) tutorial you learned that all EFL applications start with the ``efl_main()`` method. You can retrieve the Application Main Loop from the ``Efl_Event *`` parameter like this:
23
24```c
25EAPI_MAIN void
26efl_main(void *data, const Efl_Event *ev)
27{
28 Efl_Loop *loop = ev->object;
29}
30```
31
18## Timers ## 32## Timers ##
19 33
20Timers allow events to be triggered periodically after the given time has elapsed. After an event callback has been registered with the timer, it will be called at regular intervals. 34Timers allow events to be triggered periodically after the given time has elapsed. After an event callback has been registered with the timer, it will be called at regular intervals.