jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a73e51136f019f24c331529f87edf9c57b04b7dc

commit a73e51136f019f24c331529f87edf9c57b04b7dc
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jun 29 11:15:06 2016 +0900

    loop: Add main class property to return the main loop
    
    Note: this is both @class and @property. Hope that's ok for
    all bindings.
    
    This returns same as ecore_main_loop_get() (which now uses the eo
    api instead).
    
    Ping @cedric (so he can check this patch).
---
 src/lib/ecore/ecore_main.c | 9 ++++++++-
 src/lib/ecore/efl_loop.eo  | 7 +++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index a35a2c7..e09c77d 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2713,7 +2713,8 @@ _ecore_main_win32_select(int             nfds EINA_UNUSED,
 
 Eo *_mainloop_singleton = NULL;
 
-EAPI Eo *ecore_main_loop_get(void)
+EOLIAN static Efl_Loop *
+_efl_loop_main_get(Eo_Class *klass EINA_UNUSED, void *_pd EINA_UNUSED)
 {
    if (!_mainloop_singleton)
      {
@@ -2723,6 +2724,12 @@ EAPI Eo *ecore_main_loop_get(void)
    return _mainloop_singleton;
 }
 
+EAPI Eo *
+ecore_main_loop_get(void)
+{
+   return efl_loop_main_get(EFL_LOOP_CLASS);
+}
+
 EOLIAN static void
 _efl_loop_iterate(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
 {
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index 18d0392..bd878a2 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -15,6 +15,13 @@ class Efl.Loop (Eo.Base)
    provide them if you need to.
    ]]
    methods {
+      @property main @class {
+         [[Points to the main loop instance of the application.]]
+         get {}
+         values {
+            main_loop: Efl.Loop;
+         }
+      }
       iterate {
          [[Runs a single iteration of the main loop to process everything on 
the
          queue.]]

-- 


Reply via email to