summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-24 18:18:09 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-25 10:07:27 +0200
commitef055a0e15bf6cc6ea7f9d3fd3040bc03ff2b803 (patch)
tree2827021017698ac160f92ca77cdd5955c510cabb
parentad6e44951eda223302cea7f94ff55e8344b4d7e3 (diff)
efl_input_interface: WIP check cancel eventdevs/bu5hm4n/work_test_efl_input_interface
however, the event is not emitted *YEY*.
-rw-r--r--src/tests/elementary/efl_ui_test_win.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_win.c b/src/tests/elementary/efl_ui_test_win.c
index cfc57a7834..a8424da2cb 100644
--- a/src/tests/elementary/efl_ui_test_win.c
+++ b/src/tests/elementary/efl_ui_test_win.c
@@ -366,6 +366,42 @@ EFL_START_TEST(efl_ui_win_test_efl_input_interface_pointer_wheel)
366 ck_assert_int_eq(pointer_wheel, EINA_TRUE); 366 ck_assert_int_eq(pointer_wheel, EINA_TRUE);
367} 367}
368EFL_END_TEST 368EFL_END_TEST
369
370#if 0
371static void
372_check_ptr_cancel_event(void *data, const Efl_Event *ev)
373{
374 Eina_Bool *called = data;
375 ck_assert_int_eq(efl_input_timestamp_get(ev->info), TIMESTAMP);
376 ck_assert_int_eq(efl_input_pointer_wheel_delta_get(ev->info), 0);
377 ck_assert_int_eq(efl_input_pointer_wheel_horizontal_get(ev->info), 0);
378 ck_assert_int_eq(efl_input_pointer_double_click_get(ev->info), 0);
379 ck_assert_int_eq(efl_input_pointer_triple_click_get(ev->info), EINA_TRUE);
380 ck_assert_int_eq(efl_input_pointer_button_flags_get(ev->info), EVAS_BUTTON_TRIPLE_CLICK);
381 ck_assert_int_eq(efl_input_pointer_touch_id_get(ev->info), 0);
382 position_eq(efl_input_pointer_position_get(ev->info), EINA_POSITION2D(20, 20));
383 ck_assert_int_eq(efl_input_pointer_button_get(ev->info), 1);
384 ck_assert_int_eq(efl_input_pointer_action_get(ev->info), EFL_POINTER_ACTION_UP);
385 *called = EINA_TRUE;
386}
387#endif
388
389EFL_START_TEST(efl_ui_win_test_efl_input_interface_pointer_cancel)
390{
391#if 0
392 Efl_Ui_Win *win;
393 Eina_Bool called = EINA_FALSE;
394 Efl_Canvas_Object *rect;
395 create_environment(&win, &rect);
396
397 evas_event_feed_mouse_move(evas_object_evas_get(win), 20, 20, TIMESTAMP - 1, NULL);
398 evas_event_feed_mouse_down(evas_object_evas_get(win), 1, EVAS_BUTTON_TRIPLE_CLICK, TIMESTAMP, NULL);
399 efl_event_callback_add(rect, EFL_EVENT_POINTER_CANCEL, _check_ptr_cancel_event, &called);
400 evas_event_feed_mouse_cancel(evas_object_evas_get(win), TIMESTAMP, NULL);
401 ck_assert_int_eq(called, EINA_TRUE);
402#endif
403}
404EFL_END_TEST
369void 405void
370efl_ui_test_win(TCase *tc) 406efl_ui_test_win(TCase *tc)
371{ 407{
@@ -379,4 +415,5 @@ efl_ui_test_win(TCase *tc)
379 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_up); 415 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_up);
380 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_in_out); 416 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_in_out);
381 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_wheel); 417 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_wheel);
418 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_cancel);
382} 419}