tests/elm: add helper function for clicking at specified coords

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9505
This commit is contained in:
Mike Blumenkrantz 2019-08-05 13:53:03 -04:00 committed by Marcel Hollerbach
parent 067d65361e
commit f8dcb7dc2b
2 changed files with 10 additions and 0 deletions

View File

@ -465,3 +465,12 @@ event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointe
ck_assert_int_eq(*called, 0);
*called = 1;
}
void
click_object_at(Eo *obj, int x, int y)
{
Evas *e = evas_object_evas_get(obj);
evas_event_feed_mouse_move(e, x, y, 0, NULL);
evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
}

View File

@ -13,5 +13,6 @@ void fail_on_errors_setup(void);
void get_me_to_those_events(Eo *obj);
void click_object(Eo *obj);
void click_part(Eo *obj, const char *part);
void click_object_at(Eo *obj, int x, int y);
void event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
#endif