tests/elm: add util callback for incrementing an int data
authorMike Blumenkrantz <zmike@samsung.com>
Mon, 21 Oct 2019 14:30:45 +0000 (10:30 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:39 +0000 (11:20 +0900)
this is a common functionality

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10509

src/tests/elementary/suite_helpers.c
src/tests/elementary/suite_helpers.h

index a109f83..8aebdcb 100644 (file)
@@ -524,6 +524,14 @@ event_callback_single_call_int_data(void *data, Evas_Object *obj EINA_UNUSED, vo
 }
 
 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()
 {
    ecore_main_loop_quit();
index d0ada37..928dda9 100644 (file)
@@ -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