[EGIT] [core/efl] master 01/01: eolian-cxx: Added test for the removal of the .Base class requirement
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6124039c8f11936f78c08fd9b8dfd9c128c05ea2 commit 6124039c8f11936f78c08fd9b8dfd9c128c05ea2 Author: Felipe Magno de Almeida Date: Wed May 4 21:13:48 2016 -0300 eolian-cxx: Added test for the removal of the .Base class requirement Test creates class with the same name as the namespace of another class --- src/Makefile_Eolian_Cxx.am| 19 +++ src/tests/eolian_cxx/name_name.c | 10 ++ src/tests/eolian_cxx/name_name_cxx.cc | 4 src/tests/eolian_cxx/ns_name.eo | 4 src/tests/eolian_cxx/ns_name_other.eo | 4 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 5132a18..2e08a84 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -93,8 +93,8 @@ tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h -tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h -tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/ns_name.eo.c tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name_other.eo.c tests/eolian_cxx/ns_name_other.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name.eo.hh tests/eolian_cxx/ns_name_other.eo.h tests/eolian_cxx/ns_name_other.eo.hh CLEANFILES += \ tests/eolian_cxx/callback.eo.hh \ @@ -116,7 +116,16 @@ tests/eolian_cxx/d.eo.hh tests/eolian_cxx/d.eo.impl.hh tests/eolian_cxx/d.eo.c t tests/eolian_cxx/name_name.eo.hh \ tests/eolian_cxx/name_name.eo.c \ tests/eolian_cxx/name_name.eo.h \ -tests/eolian_cxx/name_name.eo.impl.hh +tests/eolian_cxx/name_name.eo.impl.hh \ +tests/eolian_cxx/ns_name.eo.hh \ +tests/eolian_cxx/ns_name.eo.c \ +tests/eolian_cxx/ns_name.eo.h \ +tests/eolian_cxx/ns_name.eo.impl.hh \ +tests/eolian_cxx/ns_name_other.eo.hh \ +tests/eolian_cxx/ns_name_other.eo.c \ +tests/eolian_cxx/ns_name_other.eo.h \ +tests/eolian_cxx/ns_name_other.eo.impl.hh + tests_eolian_cxx_eolian_cxx_suite_CXXFLAGS = \ -I$(top_builddir)/src/lib/efl \ @@ -147,7 +156,9 @@ tests/eolian_cxx/a.eo \ tests/eolian_cxx/b.eo \ tests/eolian_cxx/c.eo \ tests/eolian_cxx/d.eo \ -tests/eolian_cxx/name_name.eo +tests/eolian_cxx/name_name.eo \ +tests/eolian_cxx/ns_name.eo \ +tests/eolian_cxx/ns_name_other.eo include Makefile_Eolian_Cxx_Helper.am diff --git a/src/tests/eolian_cxx/name_name.c b/src/tests/eolian_cxx/name_name.c index 50b65d9..a4e9c06 100644 --- a/src/tests/eolian_cxx/name_name.c +++ b/src/tests/eolian_cxx/name_name.c @@ -4,5 +4,15 @@ struct Name_Name_Data {}; typedef struct Name_Name_Data Name_Name_Data; +struct Ns_Name_Data {}; +typedef struct Ns_Name_Data Ns_Name_Data; + +struct Ns_Name_Other_Data {}; +typedef struct Ns_Name_Other_Data Ns_Name_Other_Data; + #include "name_name.eo.h" #include "name_name.eo.c" +#include "ns_name.eo.h" +#include "ns_name.eo.c" +#include "ns_name_other.eo.h" +#include "ns_name_other.eo.c" diff --git a/src/tests/eolian_cxx/name_name_cxx.cc b/src/tests/eolian_cxx/name_name_cxx.cc index 9908754..d5669bc 100644 --- a/src/tests/eolian_cxx/name_name_cxx.cc +++ b/src/tests/eolian_cxx/name_name_cxx.cc @@ -3,4 +3,8 @@ #include "name_name.eo.h" #include "name_name.eo.hh" +#include "ns_name.eo.h" +#include "ns_name.eo.hh" +#include "ns_name_other.eo.h" +#include "ns_name_other.eo.hh" diff --git a/src/tests/eolian_cxx/ns_name.eo b/src/tests/eolian_cxx/ns_name.eo new file mode 100644 index 000..50ab890 --- /dev/null +++ b/src/tests/eolian_cxx/ns_name.eo @@ -0,0 +1,4 @@ +class Ns.Name { + legacy_prefix: null; +} + diff --git a/src/tests/eolian_cxx/ns_name_other.eo b/src/tests/eolian_cxx/ns_name_other.eo new file mode 100644 index 000..64a563f --- /dev/null +++ b/src/tests/eolian_cxx/ns_name_other.eo @@ -0,0 +1,4 @@ +class Ns.Name.Other { + legacy_prefix: null; +} + --
[EGIT] [core/efl] master 02/07: ecore: fix split built.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1adf08e41c7d424d9d876894667489295a8a163b commit 1adf08e41c7d424d9d876894667489295a8a163b Author: Cedric BAIL Date: Tue May 3 14:43:23 2016 -0700 ecore: fix split built. --- src/lib/ecore/Makefile.am | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/ecore/Makefile.am b/src/lib/ecore/Makefile.am index 5abf8d8..fffe62b 100644 --- a/src/lib/ecore/Makefile.am +++ b/src/lib/ecore/Makefile.am @@ -7,16 +7,12 @@ include ../../Makefile_Eolian_Subbuild_Helper.am ecore_eolian_files_legacy = \ efl_timer.eo \ ecore_poller.eo \ - ecore_job.eo \ ecore_exe.eo \ - ecore_idler.eo \ - ecore_idle_enterer.eo \ - ecore_idle_exiter.eo \ ecore_animator.eo ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ - ecore_mainloop.eo \ + efl_loop.eo \ ecore_parent.eo ecore_eolian_type_files = \ --
[EGIT] [core/efl] master 04/07: ecore: rework efl_timer to be a proper eo object emiting signal.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3ba901f15e06b10b488f4fc7f4c41adb806ba0a8 commit 3ba901f15e06b10b488f4fc7f4c41adb806ba0a8 Author: Cedric BAIL Date: Wed May 4 13:37:39 2016 -0700 ecore: rework efl_timer to be a proper eo object emiting signal. --- src/lib/ecore/ecore_main.c| 5 - src/lib/ecore/ecore_private.h | 6 - src/lib/ecore/ecore_timer.c | 561 -- src/lib/ecore/efl_timer.eo| 37 +-- 4 files changed, 275 insertions(+), 334 deletions(-) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 394fd17..71ce95b 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -461,7 +461,6 @@ _ecore_main_uv_poll_cb(uv_poll_t* handle, int status, int events) _ecore_event_call(); _ecore_main_fd_handlers_cleanup(); _efl_timer_expired_timers_call(_ecore_time_loop_time); - _efl_timer_cleanup(); } static int @@ -706,7 +705,6 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED, { _ecore_time_loop_time = ecore_time_get(); _efl_timer_expired_timers_call(_ecore_time_loop_time); -_efl_timer_cleanup(); _ecore_idle_enterer_call(_mainloop_singleton); _ecore_throttle(); @@ -889,7 +887,6 @@ _ecore_main_gsource_dispatch(GSource*source EINA_UNUSED, _ecore_main_fd_handlers_cleanup(); _efl_timer_expired_timers_call(_ecore_time_loop_time); -_efl_timer_cleanup(); _ecore_idle_enterer_call(_mainloop_singleton); _ecore_throttle(); @@ -1023,7 +1020,6 @@ _ecore_main_loop_uv_check(uv_check_t* handle EINA_UNUSED) _ecore_event_call(); _ecore_main_fd_handlers_cleanup(); _efl_timer_expired_timers_call(_ecore_time_loop_time); - _efl_timer_cleanup(); } while(fd_handlers_to_call); quit: @@ -2230,7 +2226,6 @@ _ecore_main_loop_iterate_internal(int once_only) in_main_loop++; /* expire any timers */ _efl_timer_expired_timers_call(_ecore_time_loop_time); - _efl_timer_cleanup(); /* process signals into events */ _ecore_signal_received_process(); diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index bba1361..c95a4d9 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -158,14 +158,8 @@ EAPI void _ecore_magic_fail(const void *d, void _ecore_time_init(void); -Ecore_Timer *_efl_timer_loop_add(double in, - Ecore_Task_Cb func, - const void *data); void*_efl_timer_del(Ecore_Timer *timer); -void _efl_timer_util_delay(Ecore_Timer *timer, -double add); void _efl_timer_shutdown(void); -void _efl_timer_cleanup(void); void _efl_timer_enable_new(void); double _efl_timer_next_get(void); void _efl_timer_expired_timers_call(double when); diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index 284f16a..54cf773 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -20,33 +20,36 @@ struct _Efl_Timer_Data { EINA_INLIST; - Ecore_Timer *obj; - double in; - double at; - double pending; - Ecore_Task_Cb func; - void *data; - - - int references; - unsigned char delete_me : 1; - unsigned char just_added : 1; - unsigned char frozen : 1; + + Eo*object; + + double in; + double at; + double pending; + + intlistening; + + unsigned char just_added : 1; + unsigned char frozen : 1; + unsigned char initialized : 1; }; typedef struct _Efl_Timer_Data Efl_Timer_Data; -static void _efl_timer_set(Ecore_Timer *timer, - doubleat, - doublein, - Ecore_Task_Cb func, - void *data); +static void _efl_timer_util_delay(Efl_Timer_Data *timer, + double add); +static void _efl_timer_util_instanciate(Efl_Timer_Data *timer); +static void _efl_timer_set(Efl_Timer_Data *timer, + doubleat, + doublein); + +static Eina_Inlist *timers = NULL; +static Eina_Inlist *suspended = NULL; -static int timers_added = 0; -static int timers_delete_me = 0; -static Efl_Timer_Data *timers = NULL; static Efl_Timer_Data *timer_current = NULL; -static Efl_Timer_Data *suspended = NULL; + +static int timers_added = 0; + static double last_check = 0.0; static double precision = 10.0 / 100.0; @@ -70,65 +73,116 @@ ecore_timer_precision_set(double value) precision = value; } -EAPI Ecore_Timer * -ecore_timer_add(doublein, -Ecore_Task_Cb func, -
[EGIT] [core/efl] master 01/07: ecore: rename ecore_timer to efl_timer.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=93af61f25593410110046f62281d0e60c60d5e0b commit 93af61f25593410110046f62281d0e60c60d5e0b Author: Cedric BAIL Date: Tue May 3 14:42:20 2016 -0700 ecore: rename ecore_timer to efl_timer. --- src/Makefile_Ecore.am | 2 +- src/lib/ecore/Ecore_Eo.h | 2 +- src/lib/ecore/Ecore_Legacy.h | 2 +- src/lib/ecore/Makefile.am | 2 +- src/lib/ecore/ecore.c | 2 +- src/lib/ecore/ecore_main.c | 60 +++ src/lib/ecore/ecore_private.h | 22 +-- src/lib/ecore/ecore_timer.c| 206 - src/lib/ecore/{ecore_timer.eo => efl_timer.eo} | 4 +- 9 files changed, 151 insertions(+), 151 deletions(-) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 2eefeaa..b48d49f 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -2,7 +2,7 @@ ### Library ecore_eolian_files_legacy = \ - lib/ecore/ecore_timer.eo \ + lib/ecore/efl_timer.eo \ lib/ecore/ecore_poller.eo \ lib/ecore/ecore_exe.eo \ lib/ecore/ecore_animator.eo diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index edd352a..9db6e79 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -35,7 +35,7 @@ extern "C" { * @{ */ -#include "ecore_timer.eo.h" +#include "efl_timer.eo.h" /** * @} diff --git a/src/lib/ecore/Ecore_Legacy.h b/src/lib/ecore/Ecore_Legacy.h index 4c5145c..80626de 100644 --- a/src/lib/ecore/Ecore_Legacy.h +++ b/src/lib/ecore/Ecore_Legacy.h @@ -235,7 +235,7 @@ EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer); EAPI void ecore_timer_thaw(Ecore_Timer *timer); -#include "ecore_timer.eo.legacy.h" +#include "efl_timer.eo.legacy.h" /** * @} diff --git a/src/lib/ecore/Makefile.am b/src/lib/ecore/Makefile.am index 73eed3e..5abf8d8 100644 --- a/src/lib/ecore/Makefile.am +++ b/src/lib/ecore/Makefile.am @@ -5,7 +5,7 @@ include ../../Makefile_Eolian_Subbuild_Helper.am ### Library ecore_eolian_files_legacy = \ - ecore_timer.eo \ + efl_timer.eo \ ecore_poller.eo \ ecore_job.eo \ ecore_exe.eo \ diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 758cd02..e403a0d 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -404,7 +404,7 @@ ecore_shutdown(void) #ifndef HAVE_EXOTIC _ecore_exe_shutdown(); #endif - _ecore_timer_shutdown(); + _efl_timer_shutdown(); _ecore_event_shutdown(); _ecore_main_shutdown(); _ecore_signal_shutdown(); diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index ad838be..394fd17 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -460,8 +460,8 @@ _ecore_main_uv_poll_cb(uv_poll_t* handle, int status, int events) _ecore_signal_received_process(); _ecore_event_call(); _ecore_main_fd_handlers_cleanup(); - _ecore_timer_expired_timers_call(_ecore_time_loop_time); - _ecore_timer_cleanup(); + _efl_timer_expired_timers_call(_ecore_time_loop_time); + _efl_timer_cleanup(); } static int @@ -705,8 +705,8 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED, if (!ecore_idling && !_ecore_glib_idle_enterer_called) { _ecore_time_loop_time = ecore_time_get(); -_ecore_timer_expired_timers_call(_ecore_time_loop_time); -_ecore_timer_cleanup(); +_efl_timer_expired_timers_call(_ecore_time_loop_time); +_efl_timer_cleanup(); _ecore_idle_enterer_call(_mainloop_singleton); _ecore_throttle(); @@ -724,10 +724,10 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED, /* only set idling state in dispatch */ if (ecore_idling && !_ecore_idler_exist(_mainloop_singleton) && !_ecore_event_exist()) { - if (_ecore_timers_exists()) + if (_efl_timers_exists()) { int r = -1; - double t = _ecore_timer_next_get(); + double t = _efl_timer_next_get(); if (timer_fd >= 0 && t > 0.0) { struct itimerspec ts; @@ -823,8 +823,8 @@ _ecore_main_gsource_check(GSource *source EINA_UNUSED) ret = TRUE; /* check timers after updating loop time */ - if (!ret && _ecore_timers_exists()) - ret = (0.0 == _ecore_timer_next_get()); + if (!ret && _efl_timers_exists()) + ret = (0.0 == _efl_timer_next_get()); in_main_loop--; @@ -841,11 +841,11 @@ _ecore_main_gsource_dispatch(GSource*source EINA_UNUSED, double next_time; _ecore_time_loop_time = ecore_time_get(); - _ecore_timer_enable_new(); - next_time = _ecore_timer_next_get(); + _efl_timer_enable_new(); + next_time = _efl_timer_next_get(); events_ready = _ecore_eve
[EGIT] [core/efl] master 05/07: ecore: add a timeout promise.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8d50990a2709b1745d40ee368ffa48cba7f15faa commit 8d50990a2709b1745d40ee368ffa48cba7f15faa Author: Cedric BAIL Date: Wed May 4 14:44:56 2016 -0700 ecore: add a timeout promise. --- src/lib/ecore/ecore_main.c | 107 - src/lib/ecore/efl_loop.eo | 12 - 2 files changed, 97 insertions(+), 22 deletions(-) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 71ce95b..93f1d1c 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -2800,54 +2800,121 @@ _efl_loop_eo_base_constructor(Eo *obj, Efl_Loop_Data *pd) return obj; } -typedef struct _Efl_Internal_Job Efl_Internal_Job; -struct _Efl_Internal_Job +typedef struct _Efl_Internal_Promise Efl_Internal_Promise; +struct _Efl_Internal_Promise { - Ecore_Job *job; + union { + Ecore_Job *job; + Efl_Timer *timer; + } u; Eina_Promise_Owner *promise; const void *data; + + Eina_Bool job_is : 1; }; static void _efl_loop_job_cb(void *data) { - Efl_Internal_Job *j = data; + Efl_Internal_Promise *j = data; eina_promise_owner_value_set(j->promise, &j->data, NULL); free(j); } +static Eina_Bool +_efl_loop_timeout_cb(void *data, const Eo_Event *event EINA_UNUSED) +{ + Efl_Internal_Promise *t = data; + + eina_promise_owner_value_set(t->promise, &t->data, NULL); + + eo_del(t->u.timer); + + return EO_CALLBACK_CONTINUE; +} + +static void +_efl_loop_internal_cancel(Efl_Internal_Promise *p) +{ + eina_promise_owner_error_set(p->promise, _promise_canceled); + free(p); +} + static void _efl_loop_job_cancel(void* data, Eina_Promise_Owner* promise EINA_UNUSED) { - Efl_Internal_Job *j = data; + Efl_Internal_Promise *j = data; - eina_promise_owner_error_set(j->promise, _promise_canceled); - ecore_job_del(j->job); - free(j); + if (j->job_is) + ecore_job_del(j->u.job); + else + eo_del(j->u.timer); + _efl_loop_internal_cancel(j); +} + +static Efl_Internal_Promise * +_efl_internal_promise_new(Eina_Promise_Owner* promise, const void *data) +{ + Efl_Internal_Promise *p; + + p = calloc(1, sizeof (Efl_Internal_Promise)); + if (!p) return NULL; + + eina_promise_owner_default_cancel_cb_add(promise, &_efl_loop_job_cancel, p, NULL); + p->promise = promise; + p->data = data; + + return p; } static void _efl_loop_job(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED, Eina_Promise_Owner *promise, const void *data) { - Efl_Internal_Job *j; + Efl_Internal_Promise *j; - j = calloc(1, sizeof (Efl_Internal_Job)); - if (!j) goto on_error; + j = _efl_internal_promise_new(promise, data); + if (!j) return ; - eina_promise_owner_default_cancel_cb_add(promise, &_efl_loop_job_cancel, j, NULL); - j->promise = promise; - j->data = data; - j->job = ecore_job_add(_efl_loop_job_cb, j); - if (!j->job) goto on_error; + j->job_is = EINA_TRUE; + j->u.job = ecore_job_add(_efl_loop_job_cb, j); - return ; + if (j->u.job) return ; - on_error: - eina_promise_owner_error_set(promise, _promise_canceled); - free(j); + _efl_loop_internal_cancel(j); +} + +/* This event will be triggered when the main loop is destroyed and destroy its timers along */ +static Eina_Bool +_efl_loop_timeout_force_cancel_cb(void *data, const Eo_Event *event EINA_UNUSED) +{ + _efl_loop_internal_cancel(data); + + return EO_CALLBACK_CONTINUE; +} + +EO_CALLBACKS_ARRAY_DEFINE(timeout, + { EFL_TIMER_EVENT_TICK, _efl_loop_timeout_cb }, + { EO_BASE_EVENT_DEL, _efl_loop_timeout_force_cancel_cb }); + +static void +_efl_loop_timeout(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, Eina_Promise_Owner *promise, double time, const void *data) +{ + Efl_Internal_Promise *t; + + t = _efl_internal_promise_new(promise, data); + if (!t) return ; + + t->job_is = EINA_FALSE; + t->u.timer = eo_add(EFL_TIMER_CLASS, obj, + efl_timer_interval_set(eo_self, time), + eo_event_callback_array_add(eo_self, timeout(), t)); + + if (t->u.timer) return ; + + _efl_loop_internal_cancel(t); } #include "efl_loop.eo.c" diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 2896b40..283d583 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -34,8 +34,16 @@ class Efl.Loop (Eo.Base) job { [[Will execute that promise in the near future.]] params { -@inout promise: promise*; - @in data: const(void)* @optional; +@inout promise: promise*; [[The promise that will be triggered.]] + @in data: const(void)* @optional; [[The data to be given when the promise is done.]] +} + } + timeout { + [[Will trigger this promise when the specified timeout occur.]] +params { +@inout promise: promise*; [
[EGIT] [core/efl] master 07/07: ecore: add timeout promise test.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a1bd7a74991fc5a618077df6f28494cb8453d6f5 commit a1bd7a74991fc5a618077df6f28494cb8453d6f5 Author: Cedric BAIL Date: Wed May 4 15:42:23 2016 -0700 ecore: add timeout promise test. --- src/tests/ecore/ecore_test_timer.c | 36 1 file changed, 36 insertions(+) diff --git a/src/tests/ecore/ecore_test_timer.c b/src/tests/ecore/ecore_test_timer.c index ab85893..bb76968 100644 --- a/src/tests/ecore/ecore_test_timer.c +++ b/src/tests/ecore/ecore_test_timer.c @@ -4,6 +4,8 @@ #include +#include + #include "ecore_suite.h" #define TIMEOUT_1 0.01 // interval for timer1 @@ -173,7 +175,41 @@ START_TEST(ecore_test_timers) } END_TEST +static void +_ecore_promise_quit(void *data, void *value) +{ + Eina_Bool *bob = data; + double *start = *(double**)value; + double delta = fabs(ecore_loop_time_get() - *start); + + fail_if(fabs(delta - 0.2) > 0.01); + + *bob = EINA_TRUE; + ecore_main_loop_quit(); +} + +START_TEST(ecore_test_timeout) +{ + Eina_Promise *timeout = NULL; + Eina_Bool bob = EINA_FALSE; + double start; + + ecore_init(); + + start = ecore_time_get(); + efl_loop_timeout(ecore_main_loop_get(), &timeout, 0.2, &start); + eina_promise_then(timeout, &_ecore_promise_quit, NULL, &bob); + + ecore_main_loop_begin(); + + fail_if(bob != EINA_TRUE); + + ecore_shutdown(); +} +END_TEST + void ecore_test_timer(TCase *tc) { tcase_add_test(tc, ecore_test_timers); + tcase_add_test(tc, ecore_test_timeout); } --
[EGIT] [core/efl] master 03/07: ecore: remove timer dump logic as Eo and clouseau should give us that info.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=639378bfc70fb01c7fa7b62de7c7992036fbaca1 commit 639378bfc70fb01c7fa7b62de7c7992036fbaca1 Author: Cedric BAIL Date: Tue May 3 16:20:29 2016 -0700 ecore: remove timer dump logic as Eo and clouseau should give us that info. --- src/lib/ecore/ecore_timer.c | 79 - 1 file changed, 79 deletions(-) diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index d65fdd6..284f16a 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -17,13 +17,6 @@ if (!eo_isa((obj), MY_CLASS)) \ return -#ifdef WANT_ECORE_TIMER_DUMP -# include -# include -# define ECORE_TIMER_DEBUG_BT_NUM 64 -typedef void (*Ecore_Timer_Bt_Func)(); -#endif - struct _Efl_Timer_Data { EINA_INLIST; @@ -34,10 +27,6 @@ struct _Efl_Timer_Data Ecore_Task_Cb func; void *data; -#ifdef WANT_ECORE_TIMER_DUMP - Ecore_Timer_Bt_Func timer_bt[ECORE_TIMER_DEBUG_BT_NUM]; - int timer_bt_num; -#endif int references; unsigned char delete_me : 1; @@ -52,10 +41,6 @@ static void _efl_timer_set(Ecore_Timer *timer, doublein, Ecore_Task_Cb func, void *data); -#ifdef WANT_ECORE_TIMER_DUMP -static int _efl_timer_cmp(const void *d1, -const void *d2); -#endif static int timers_added = 0; static int timers_delete_me = 0; @@ -122,10 +107,6 @@ _efl_timer_add(Ecore_Timer *obj, if (in < 0.0) in = 0.0; -#ifdef WANT_ECORE_TIMER_DUMP - timer->timer_bt_num = backtrace((void **)(timer->timer_bt), - ECORE_TIMER_DEBUG_BT_NUM); -#endif _efl_timer_set(obj, now + in, in, func, (void *)data); return EINA_TRUE; } @@ -300,55 +281,7 @@ _efl_timer_eo_base_event_thaw(Eo *obj, Efl_Timer_Data *timer) EAPI char * ecore_timer_dump(void) { -#ifdef WANT_EFL_TIMER_DUMP - Eina_Strbuf *result; - char *out; - Efl_Timer_Data *tm; - Eina_List *tmp = NULL; - int living_timer = 0; - int unknow_timer = 0; - - EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); - result = eina_strbuf_new(); - - EINA_INLIST_FOREACH(timers, tm) - tmp = eina_list_sorted_insert(tmp, _efl_timer_cmp, tm); - - EINA_LIST_FREE(tmp, tm) - { -char **strings; -int j; - -if (!tm->frozen && !tm->delete_me) - living_timer++; - -strings = backtrace_symbols((void **)tm->timer_bt, tm->timer_bt_num); -if (tm->timer_bt_num <= 0 || strings == NULL) - { - unknow_timer++; - continue; - } - -eina_strbuf_append_printf(result, "*** timer: %f ***\n", tm->in); -if (tm->frozen) - eina_strbuf_append(result, "FROZEN\n"); -if (tm->delete_me) - eina_strbuf_append(result, "DELETED\n"); -for (j = 0; j < tm->timer_bt_num; j++) - eina_strbuf_append_printf(result, "%s\n", strings[j]); - -free(strings); - } - - eina_strbuf_append_printf(result, "\n***\nThere is %i living timer.\nWe did lost track of %i timers.\n", living_timer, unknow_timer); - - out = eina_strbuf_string_steal(result); - eina_strbuf_free(result); - - return out; -#else return NULL; -#endif } Ecore_Timer * @@ -737,16 +670,4 @@ _efl_timer_set(Ecore_Timer *obj, timers = (Efl_Timer_Data *)eina_inlist_prepend(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); } -#ifdef WANT_ECORE_TIMER_DUMP -static int -_efl_timer_cmp(const void *d1, - const void *d2) -{ - const Efl_Timer_Data *t1 = d1; - const Efl_Timer_Data *t2 = d2; - - return (int)((t1->in - t2->in) * 100); -} -#endif - #include "efl_timer.eo.c" --
[EGIT] [core/efl] master 06/07: ecore: silence warning in job test.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=950701b7383150ac0f999e6215c0db84f003f720 commit 950701b7383150ac0f999e6215c0db84f003f720 Author: Cedric BAIL Date: Wed May 4 15:41:37 2016 -0700 ecore: silence warning in job test. --- src/tests/ecore/ecore_test_job.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ecore/ecore_test_job.c b/src/tests/ecore/ecore_test_job.c index 1e36be5..4f94be0 100644 --- a/src/tests/ecore/ecore_test_job.c +++ b/src/tests/ecore/ecore_test_job.c @@ -6,11 +6,11 @@ #include "ecore_suite.h" static void -_ecore_promise_quit(void *data, void **value) +_ecore_promise_quit(void *data, void *value) { Eina_Bool *bob = data; - fail_if(data != *value); + fail_if(data != *(Eina_Bool**)value); *bob = EINA_TRUE; ecore_main_loop_quit(); } --
[EGIT] [core/enlightenment] master 01/01: disable option for mouse to use Application theme if we are running in Wayland
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9e3b8b752836643d9f00bc27802d48dd269e51f2 commit 9e3b8b752836643d9f00bc27802d48dd269e51f2 Author: Chris Michael Date: Wed May 4 14:52:15 2016 -0400 disable option for mouse to use Application theme if we are running in Wayland Small patch to disable selecting Application themed mouse pointers when running in wayland as this option is currently broken when running in wayland (gives no mouse cursor at all) e_pointer calls _e_pointer_x11_setup (from _e_pointer_type_set) which only sets the cursor via ecore_x_cursor_shape_get calls... essentially you end up with no mouse cursor because e_pointer is missing codepaths to lookup system mouse cursor images when running in wayland. ref T3585 Signed-off-by: Chris Michael --- src/modules/conf_interaction/e_int_config_mouse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/conf_interaction/e_int_config_mouse.c b/src/modules/conf_interaction/e_int_config_mouse.c index 18de2fd..fc22e07 100644 --- a/src/modules/conf_interaction/e_int_config_mouse.c +++ b/src/modules/conf_interaction/e_int_config_mouse.c @@ -163,6 +163,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia e_widget_on_change_hook_set(ob, _use_e_cursor_cb_change, cfdata); e_widget_framelist_object_append(of, ob); e_widget_check_widget_disable_on_unchecked_add(oc, ob); + if (!e_comp_util_has_x()) e_widget_disabled_set(ob, 1); ob = e_widget_radio_add(evas, _("Enlightenment"), 1, rg); e_widget_on_change_hook_set(ob, _use_e_cursor_cb_change, cfdata); --
[EGIT] [core/efl] master 01/01: ecore-audio: Fix issue of improper deleting of ecore_job
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cf7cf35c3c465e674d4b4c351cd262e38cd6ee4f commit cf7cf35c3c465e674d4b4c351cd262e38cd6ee4f Author: Chris Michael Date: Wed May 4 11:40:29 2016 -0400 ecore-audio: Fix issue of improper deleting of ecore_job This patch fixes a compiler warning where eo_del was being called on an Ecore_Job. ref c1141c7b0b09b23c802b27d8c2c2bbe91919121b @fix Signed-off-by: Chris Michael --- src/lib/ecore_audio/ecore_audio_obj_out_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c index 95aa0c0..5a97d44 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c @@ -286,7 +286,7 @@ _ecore_audio_out_pulse_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Dat } class_vars.outputs = eina_list_append(class_vars.outputs, eo_obj); - if (class_vars.state_job) eo_del(class_vars.state_job); + if (class_vars.state_job) ecore_job_del(class_vars.state_job); class_vars.state_job = ecore_job_add(_state_job, NULL); return eo_obj; --
[EGIT] [core/efl] master 01/01: elput: Add API function to set pointer position on a given seat
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=54cce990d3fbf607d166294f202b86778709bc7e commit 54cce990d3fbf607d166294f202b86778709bc7e Author: Chris Michael Date: Wed May 4 10:43:36 2016 -0400 elput: Add API function to set pointer position on a given seat Small patch to add an API function that can be used to set the current pointer position on a given seat name. This function (typically) will be used inside an Ecore_Evas to "pointer warp". @feature Signed-off-by: Chris Michael --- src/lib/elput/Elput.h | 13 + src/lib/elput/elput_evdev.c | 6 ++ src/lib/elput/elput_input.c | 34 ++ src/lib/elput/elput_private.h | 1 + 4 files changed, 54 insertions(+) diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h index beee677..f3fe16b 100644 --- a/src/lib/elput/Elput.h +++ b/src/lib/elput/Elput.h @@ -240,6 +240,19 @@ EAPI void elput_input_shutdown(Elput_Manager *manager); EAPI void elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int *y); /** + * Set the pointer position on a given seat + * + * @param manager + * @param seat + * @param x + * @param y + * + * @ingroup Elput_Input_Group + * @since 1.18 + */ +EAPI void elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, int x, int y); + +/** * @defgroup Elput_Device_Group * * Functions that deal with input devices. diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 043e7b6..392a25f 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -1325,6 +1325,12 @@ _evdev_touch_destroy(Elput_Touch *touch) free(touch); } +void +_evdev_pointer_motion_send(Elput_Device *edev) +{ + _pointer_motion_send(edev); +} + Elput_Pointer * _evdev_pointer_get(Elput_Seat *seat) { diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index c6d22cb..d50b023 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -300,3 +300,37 @@ elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int break; } } + +EAPI void +elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, int x, int y) +{ + Elput_Seat *eseat; + Elput_Device *edev; + Eina_List *l, *ll; + + EINA_SAFETY_ON_NULL_RETURN(manager); + + /* if no seat name is passed in, just use default seat name */ + if (!seat) seat = "seat0"; + + EINA_LIST_FOREACH(manager->input.seats, l, eseat) + { +if (!eseat->ptr) continue; +if ((eseat->name) && (strcmp(eseat->name, seat))) + continue; + +eseat->ptr->x = x; +eseat->ptr->y = y; +eseat->ptr->timestamp = ecore_loop_time_get(); + +EINA_LIST_FOREACH(eseat->devices, ll, edev) + { + if (!libinput_device_has_capability(edev->device, + LIBINPUT_DEVICE_CAP_POINTER)) + continue; + + _evdev_pointer_motion_send(edev); + break; + } + } +} diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h index 3564161..05ee0b1 100644 --- a/src/lib/elput/elput_private.h +++ b/src/lib/elput/elput_private.h @@ -240,6 +240,7 @@ void _evdev_device_destroy(Elput_Device *edev); void _evdev_keyboard_destroy(Elput_Keyboard *kbd); void _evdev_pointer_destroy(Elput_Pointer *ptr); void _evdev_touch_destroy(Elput_Touch *touch); +void _evdev_pointer_motion_send(Elput_Device *edev); Elput_Pointer *_evdev_pointer_get(Elput_Seat *seat); Elput_Keyboard *_evdev_keyboard_get(Elput_Seat *seat); --
[EGIT] [core/efl] master 01/01: elput: Add API function to get pointer position on a given seat
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=28f725a6875951c0500d22c5bca9a393d77507d7 commit 28f725a6875951c0500d22c5bca9a393d77507d7 Author: Chris Michael Date: Wed May 4 10:20:04 2016 -0400 elput: Add API function to get pointer position on a given seat Small patch to add an API function that can be used to retrieve current pointer position on a given seat name. @feature Signed-off-by: Chris Michael --- src/lib/elput/Elput.h | 13 + src/lib/elput/elput_input.c | 25 + 2 files changed, 38 insertions(+) diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h index d629dd4..beee677 100644 --- a/src/lib/elput/Elput.h +++ b/src/lib/elput/Elput.h @@ -227,6 +227,19 @@ EAPI Eina_Bool elput_input_init(Elput_Manager *manager, const char *seat); EAPI void elput_input_shutdown(Elput_Manager *manager); /** + * Get the pointer position on a given seat + * + * @param manager + * @param seat + * @param x + * @param y + * + * @ingroup Elput_Input_Group + * @since 1.18 + */ +EAPI void elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int *y); + +/** * @defgroup Elput_Device_Group * * Functions that deal with input devices. diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 6c43f2f..c6d22cb 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -275,3 +275,28 @@ elput_input_shutdown(Elput_Manager *manager) libinput_unref(manager->input.lib); } + +EAPI void +elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int *y) +{ + Elput_Seat *eseat; + Eina_List *l; + + if (x) *x = 0; + if (y) *y = 0; + + EINA_SAFETY_ON_NULL_RETURN(manager); + + /* if no seat name is passed in, just use default seat name */ + if (!seat) seat = "seat0"; + + EINA_LIST_FOREACH(manager->input.seats, l, eseat) + { +if (!eseat->ptr) continue; +if ((eseat->name) && (strcmp(eseat->name, seat))) + continue; +if (x) *x = eseat->ptr->x; +if (y) *y = eseat->ptr->y; +break; + } +} --
[EGIT] [core/efl] master 01/01: elm_cnp: comment the debug macro
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6a237f3cca3c62b1c05035e532a7abbc790b7cbb commit 6a237f3cca3c62b1c05035e532a7abbc790b7cbb Author: Amitesh Singh Date: Wed May 4 16:28:56 2016 +0530 elm_cnp: comment the debug macro It was accidently enabled in 1bc9483a82bf18be3 --- src/lib/elementary/elm_cnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c index 56c34d5..9cce31c 100644 --- a/src/lib/elementary/elm_cnp.c +++ b/src/lib/elementary/elm_cnp.c @@ -8,7 +8,7 @@ # include #endif -#define DEBUGON 1 +//#define DEBUGON 1 #ifdef DEBUGON # define cnp_debug(fmt, args...) fprintf(stderr, __FILE__":%s/%d : " fmt , __FUNCTION__, __LINE__, ##args) #else --
[EGIT] [core/efl] master 01/01: eo: replace loop_get with object_find
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c66695bedb2f4986a21b7c10087b26b78d036e85 commit c66695bedb2f4986a21b7c10087b26b78d036e85 Author: Marcel Hollerbach Date: Wed May 4 10:08:00 2016 +0200 eo: replace loop_get with object_find Summary: object_find is more generic, so other mechanisms can also reuse the code. The object itself has to support the function, so there is no need for eo_isa which would have a negative performance impact. The base class implementation calls interface_get on the parent, so a override of the function can just call the super function to continue in the recursion. Test Plan: just run the eo test suite Reviewers: raster, tasn, jpeg Reviewed By: tasn, jpeg Subscribers: felipealmeida, netstar, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3909 --- src/lib/ecore/ecore_main.c| 6 -- src/lib/ecore/efl_loop.eo | 2 +- src/lib/eo/eo_base.eo | 31 ++- src/lib/eo/eo_base_class.c| 6 +++--- src/tests/eo/suite/eo_test_class_simple.c | 25 + src/tests/eo/suite/eo_test_class_simple.h | 3 +++ src/tests/eo/suite/eo_test_general.c | 14 +++--- 7 files changed, 57 insertions(+), 30 deletions(-) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 0009f6ac..ad838be 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -2749,9 +2749,11 @@ _efl_loop_quit(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED) } EOLIAN static Eo_Base * -_efl_loop_eo_base_loop_get(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED) +_efl_loop_eo_base_provider_find(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const Eo_Base *klass) { - return obj; + if (klass == EFL_LOOP_CLASS) return obj; + + return eo_provider_find(eo_super(obj, EFL_LOOP_CLASS), klass); } static Eina_Bool diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 38b4a04..2896b40 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -47,6 +47,6 @@ class Efl.Loop (Eo.Base) } implements { Eo.Base.constructor; - Eo.Base.loop.get; + Eo.Base.provider_find; } } diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index 01ce468..59025fc 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -146,23 +146,20 @@ abstract Eo.Base () finalized: bool; } } - @property loop { - [[The owning loop object. - - Objects that have anything to do with I/O, time based events - or anything async should have an owining loop. They will ask - their parent for the owning loop and iterate until the - toplevel/root object. The root object should be a loop object - which will return itself. Some objects may shortcut this - and be fixed to live in only a single loop. Either way all - you need to do is get the loop for an object and use that - for I/O, timing etc. needs. - ]] - get { - } - values { -obj: Eo.Base *; [[ XXX: this should be Efl.Loop *; ]] - } + provider_find { +[[Searches up in the object tree for a provider which knows the given class/interface. + + The object from the provider will then be returned. + The base implementation calls the provider_find function on the object parent, + and returnes its result. If no parent is present NULL is returned. + Each implementation has to support this function by overriding + it and returning itself if the interface matches the parameter. + If this is not done the class cannot be found up in the object tree. +]] +params { + klass : const(Eo.Base)*; [[The class identifier to search for]] +} +return : Eo.Base*; } constructor { [[Call the object's constructor. diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 34ab13c..1cbb644 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -546,14 +546,14 @@ _eo_base_finalized_get(Eo *obj_id, Eo_Base_Data *pd EINA_UNUSED) return obj->finalized; } -// XXX: this should be Efl_Loop *; EOLIAN static Eo_Base * -_eo_base_loop_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd) +_eo_base_provider_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const Eo_Base *klass) { - if (!pd->parent) return eo_loop_get(pd->parent); + if (pd->parent) return eo_provider_find(pd->parent, klass); return NULL; } + /* Children accessor */ typedef struct _Eo_Children_Iterator Eo_Children_Iterator; struct _Eo_Children_Iterator diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c index 8566ed9..d
[EGIT] [core/efl] master 01/01: elm_win: move elm_win_raise into eo again.
jypark pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1ee72bbf04eb2297f47e888c66b107d9ad27d013 commit 1ee72bbf04eb2297f47e888c66b107d9ad27d013 Author: Ji-Youn Park Date: Wed May 4 15:49:32 2016 +0830 elm_win: move elm_win_raise into eo again. elm_win_raise is used not only x but also wayland. so I modify doc and move again this api to eo. --- src/lib/elementary/elm_win.c| 15 ++- src/lib/elementary/elm_win.eo | 7 +++ src/lib/elementary/elm_win_legacy.h | 13 - 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c index c7c6694..c0f0a25 100644 --- a/src/lib/elementary/elm_win.c +++ b/src/lib/elementary/elm_win.c @@ -4360,6 +4360,12 @@ _elm_win_activate(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) } EOLIAN static void +_elm_win_raise(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) +{ + TRAP(sd, raise); +} + +EOLIAN static void _elm_win_center(Eo *obj, Elm_Win_Data *sd, Eina_Bool h, Eina_Bool v) { int win_w, win_h, screen_w, screen_h, nx, ny; @@ -5938,13 +5944,4 @@ elm_win_lower(Evas_Object *obj) TRAP(sd, lower); } -EAPI void -elm_win_raise(Evas_Object *obj) -{ - ELM_WIN_CHECK(obj); - ELM_WIN_DATA_GET_OR_RETURN(obj, sd); - - TRAP(sd, raise); -} - #include "elm_win.eo.c" diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo index 69f81d2..60bf3f9 100644 --- a/src/lib/elementary/elm_win.eo +++ b/src/lib/elementary/elm_win.eo @@ -1105,6 +1105,13 @@ class Elm.Win (Elm.Widget, Elm.Interface_Atspi_Window, window will be the active one after it. ]] } + raise { + [[Raise a window object. + + Places the window pointed by $obj at the top of the stack, so + that it's not covered by any other window. + ]] + } center { [[Center a window on its screen diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h index cd06396..7a7e3f6 100644 --- a/src/lib/elementary/elm_win_legacy.h +++ b/src/lib/elementary/elm_win_legacy.h @@ -379,19 +379,6 @@ EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override); EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj); /** - * @brief Raise a window object. - * - * Places the window pointed by @c obj at the top of the stack, so that it's - * not covered by any other window. - * - * If @ref elm_win_override_set is not set, the Window Manager may ignore this - * request. - * - * @ingroup Elm_Win - */ -EAPI void elm_win_raise(Evas_Object *obj); - -/** * @brief Lower a window object. * * Places the window pointed by @c obj at the bottom of the stack, so that no --