From 5ab30b1e01195b73293fdc18bf3eed5b41c5db68 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 21 Oct 2019 10:30:45 -0400 Subject: [PATCH] tests/elm: add util callback for incrementing an int data this is a common functionality Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10509 --- 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 a109f838db..8aebdcb3f0 100644 --- a/src/tests/elementary/suite_helpers.c +++ b/src/tests/elementary/suite_helpers.c @@ -523,6 +523,14 @@ event_callback_single_call_int_data(void *data, Evas_Object *obj EINA_UNUSED, vo *called = 1; } +void +event_callback_that_increments_an_int_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + int *called = data; + + *called += 1; +} + void event_callback_that_quits_the_main_loop_when_called() { diff --git a/src/tests/elementary/suite_helpers.h b/src/tests/elementary/suite_helpers.h index d0ada37fb8..928dda9637 100644 --- a/src/tests/elementary/suite_helpers.h +++ b/src/tests/elementary/suite_helpers.h @@ -19,4 +19,5 @@ void wheel_part(Eo *obj, const char *part, Eina_Bool horiz, Eina_Bool down); 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); #endif