summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-04-22 13:16:50 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-28 13:48:33 +0200
commit03d56674c3a02e7a5cc380467368d576676696df (patch)
tree334a622f03473b661731cbba6491bc79f5c667b5
parentfaed679d532a84c3e8ab8b164c10a5420bf395d9 (diff)
downloadefl-03d56674c3a02e7a5cc380467368d576676696df.tar.gz
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 <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11751
-rw-r--r--src/tests/elementary/suite_helpers.c8
-rw-r--r--src/tests/elementary/suite_helpers.h1
2 files changed, 9 insertions, 0 deletions
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
@@ -620,6 +620,14 @@ event_callback_that_quits_the_main_loop_when_called()
}
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)
{
Evas *e = evas_object_evas_get(obj);
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);