jpeg pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=2ae479a5e0770c3c85985af78c18f1f46ec90cd9
commit 2ae479a5e0770c3c85985af78c18f1f46ec90cd9 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Wed Sep 27 11:46:52 2017 +0900 tests: Improve test case for win/evas event refeed --- src/bin/elementary/test_events.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/bin/elementary/test_events.c b/src/bin/elementary/test_events.c index f49414f386..2ed81bdbbd 100644 --- a/src/bin/elementary/test_events.c +++ b/src/bin/elementary/test_events.c @@ -146,6 +146,22 @@ _win_del(void *data, const Efl_Event *ev EINA_UNUSED) free(td); } +static void +_button_pointer_down(void *data, const Efl_Event *ev) +{ + if (((intptr_t) data) != 0x1) abort(); + printf("Button raw event: DOWN. Fake = %d\n", efl_input_fake_get(ev->info)); + fflush(stdout); +} + +static void +_button_pointer_up(void *data, const Efl_Event *ev) +{ + if (((intptr_t) data) != 0x1) abort(); + printf("Button raw event: UP. Fake = %d\n", efl_input_fake_get(ev->info)); + fflush(stdout); +} + EFL_CALLBACKS_ARRAY_DEFINE(rect_pointer_callbacks, { EFL_EVENT_POINTER_DOWN, _pointer_down }, { EFL_EVENT_POINTER_MOVE, _pointer_move }, @@ -155,6 +171,10 @@ EFL_CALLBACKS_ARRAY_DEFINE(win_key_callbacks, { EFL_EVENT_KEY_DOWN, _key_down }, { EFL_EVENT_KEY_UP, _key_up }) +EFL_CALLBACKS_ARRAY_DEFINE(button_pointer_callbacks, +{ EFL_EVENT_POINTER_DOWN, _button_pointer_down }, +{ EFL_EVENT_POINTER_UP, _button_pointer_up }) + void test_events(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { @@ -203,6 +223,7 @@ test_events(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in evas_object_show(o); efl_event_callback_add(td->button, EFL_UI_EVENT_CLICKED, _clicked_button1, td); + efl_event_callback_array_add(td->button, button_pointer_callbacks(), (void*)(intptr_t)0x1); efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _clicked_button2, td); efl_event_callback_add(win, EFL_EVENT_DEL, _win_del, td); efl_event_callback_array_add(o, rect_pointer_callbacks(), td); --