summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-09-18 13:33:34 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-09-18 13:33:34 -0700
commit8400859213fcfae30e4c9ae26e66e5589cb93f01 (patch)
tree986deb95ea767be9e4736603141dfd291c821d44 /src/lib
parent706bdcd7718cd0571e0f3716b589f0ff8736d38c (diff)
ecore: make efl_loop_future_scheduler_get shouldn't be exposed in the object function.
Function declared in a .eo are something that we want to allow people to inherit from or use in a binding. I can't think of a situation where that would be the case for this function and it solves at the same time problem of needing a shared interface for both loop and loop_user.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/Ecore_Eo.h2
-rw-r--r--src/lib/ecore/ecore_main.c13
-rw-r--r--src/lib/ecore/efl_loop.eo12
-rw-r--r--src/lib/ecore/efl_loop_user.c6
-rw-r--r--src/lib/ecore/efl_loop_user.eo12
5 files changed, 10 insertions, 35 deletions
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index aadd2ba..1be6dbc 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -40,6 +40,8 @@ extern "C" {
40 40
41#include "efl_loop_user.eo.h" 41#include "efl_loop_user.eo.h"
42 42
43EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(Eo *obj);
44
43#include "efl_loop_fd.eo.h" 45#include "efl_loop_fd.eo.h"
44 46
45#include "efl_promise.eo.h" 47#include "efl_promise.eo.h"
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 6819a05..967ee72 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -3390,12 +3390,15 @@ _efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
3390 return &version; 3390 return &version;
3391} 3391}
3392 3392
3393EOLIAN static Eina_Future_Scheduler * 3393EAPI Eina_Future_Scheduler *
3394_efl_loop_future_scheduler_get(Eo *obj EINA_UNUSED, 3394efl_loop_future_scheduler_get(Eo *obj)
3395 Efl_Loop_Data *pd EINA_UNUSED)
3396{ 3395{
3397 return _ecore_event_future_scheduler_get(); 3396 if (!obj) return NULL;
3398}
3399 3397
3398 if (efl_isa(obj, EFL_LOOP_CLASS))
3399 return _ecore_event_future_scheduler_get();
3400
3401 return efl_loop_future_scheduler_get(efl_loop_get(obj));
3402}
3400 3403
3401#include "efl_loop.eo.c" 3404#include "efl_loop.eo.c"
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index 1fc0fac..2a24ae7 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -70,18 +70,6 @@ class Efl.Loop (Efl.Object)
70 @in exit_code: ubyte; [[Returned value by begin()]] 70 @in exit_code: ubyte; [[Returned value by begin()]]
71 } 71 }
72 } 72 }
73 @property future_scheduler {
74 [[Gets the Eina_Future_Scheduler for a given mainloop.
75
76 The Eina_Future_Scheduler returned by this function
77 should be used for creating promises (eina_promise_new())
78 so then can properly schedule resolve/reject events.
79 ]]
80 get {}
81 values {
82 scheduler: ptr(Eina.Future.Scheduler); [[The scheduler.]]
83 }
84 }
85 Eina_FutureXXX_job { 73 Eina_FutureXXX_job {
86 [[A future promise that will be resolved from a clean main 74 [[A future promise that will be resolved from a clean main
87 loop context as soon as possible. 75 loop context as soon as possible.
diff --git a/src/lib/ecore/efl_loop_user.c b/src/lib/ecore/efl_loop_user.c
index 4bcfaad..530772f 100644
--- a/src/lib/ecore/efl_loop_user.c
+++ b/src/lib/ecore/efl_loop_user.c
@@ -29,10 +29,4 @@ _efl_loop_user_efl_object_parent_set(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED
29 efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent); 29 efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent);
30} 30}
31 31
32static Eina_Future_Scheduler *
33_efl_loop_user_future_scheduler_get(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED)
34{
35 return efl_loop_future_scheduler_get(efl_loop_get(obj));
36}
37
38#include "efl_loop_user.eo.c" 32#include "efl_loop_user.eo.c"
diff --git a/src/lib/ecore/efl_loop_user.eo b/src/lib/ecore/efl_loop_user.eo
index 67cc9b3..048888b 100644
--- a/src/lib/ecore/efl_loop_user.eo
+++ b/src/lib/ecore/efl_loop_user.eo
@@ -14,18 +14,6 @@ class Efl.Loop_User (Efl.Object)
14 loop: Efl.Loop; [[Efl loop]] 14 loop: Efl.Loop; [[Efl loop]]
15 } 15 }
16 } 16 }
17 @property future_scheduler {
18 [[Gets the Eina_Future_Scheduler for a given mainloop.
19
20 The Eina_Future_Scheduler returned by this function
21 should be used for creating promises (eina_promise_new())
22 so then can properly schedule resolve/reject events.
23 ]]
24 get {}
25 values {
26 scheduler: ptr(Eina.Future.Scheduler); [[The scheduler.]]
27 }
28 }
29 } 17 }
30 implements { 18 implements {
31 Efl.Object.parent { set; } 19 Efl.Object.parent { set; }