stefan pushed a commit to branch master.

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

commit 03d56674c3a02e7a5cc380467368d576676696df
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Wed Apr 22 13:16:50 2020 -0400

    tests/elm: add util callback for capturing event_info in smart callbacks
    
    useful when we want to verify that e.g., a certain object item is passed
    
    Reviewed-by: Stefan Schmidt <ste...@datenfreihafen.org>
    Differential Revision: https://phab.enlightenment.org/D11751
---
 src/tests/elementary/suite_helpers.c | 8 ++++++++
 src/tests/elementary/suite_helpers.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/src/tests/elementary/suite_helpers.c 
b/src/tests/elementary/suite_helpers.c
index 34e9de772d..62fe6deb77 100644
--- a/src/tests/elementary/suite_helpers.c
+++ b/src/tests/elementary/suite_helpers.c
@@ -619,6 +619,14 @@ event_callback_that_quits_the_main_loop_when_called()
    ecore_main_loop_quit();
 }
 
+void
+smart_callback_that_stores_event_info_to_data(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
+{
+   void **real_data = data;
+
+   *real_data = event_info;
+}
+
 void
 click_object_at(Eo *obj, int x, int y)
 {
diff --git a/src/tests/elementary/suite_helpers.h 
b/src/tests/elementary/suite_helpers.h
index 29aa03522a..7e5a0ad105 100644
--- a/src/tests/elementary/suite_helpers.h
+++ b/src/tests/elementary/suite_helpers.h
@@ -45,6 +45,7 @@ void wheel_object_at(Eo *obj, int x, int y, Eina_Bool horiz, 
Eina_Bool down);
 void event_callback_single_call_int_data(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED);
 void event_callback_that_quits_the_main_loop_when_called();
 void event_callback_that_increments_an_int_when_called(void *data, Evas_Object 
*obj, void *event_info);
+void smart_callback_that_stores_event_info_to_data(void *data, Evas_Object 
*obj EINA_UNUSED, void *event_info);
 
 void force_render(Eo *win);
 

-- 


Reply via email to