summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-07-31 10:36:37 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-31 12:44:31 +0200
commit359a118cdaa9d044a2381a829c9bcae1be177b6c (patch)
treec3d60543af76577303b1c401733d97e38f94b2ce /src/tests
parentb218dcbc3f874672fde32cbfca414c39598a8689 (diff)
Efl.Ui.Spin: Remove mouse wheel interaction
This widget is now meant as a base class for other widgets, with very limited user interaction. Efl.Ui.Spin_Button already takes care of mouse wheel events. Ref T7897 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9453
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_spin.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/tests/elementary/efl_ui_test_spin.c b/src/tests/elementary/efl_ui_test_spin.c
index abd55afd5c..3bbb551a7f 100644
--- a/src/tests/elementary/efl_ui_test_spin.c
+++ b/src/tests/elementary/efl_ui_test_spin.c
@@ -60,41 +60,9 @@ EFL_START_TEST (spin_value_events)
60} 60}
61EFL_END_TEST 61EFL_END_TEST
62 62
63EFL_START_TEST (spin_wheel_test)
64{
65 Eina_Bool changed = EINA_FALSE, min_reached = EINA_FALSE, max_reached = EINA_FALSE;
66
67 efl_ui_range_limits_set(spin, -100.0, 100.0);
68 efl_ui_range_value_set(spin, 0.0);
69 efl_ui_range_step_set(spin, 10.0);
70 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
71 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
72 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
73
74 efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60));
75 get_me_to_those_events(spin);
76 evas_event_feed_mouse_move(evas_object_evas_get(spin), 30, 30, 1234, NULL);
77 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, -1, 12345, NULL);
78 ck_assert(efl_ui_range_value_get(spin) == 10.0);
79 ck_assert_int_eq(changed, EINA_TRUE);
80 ck_assert_int_eq(min_reached, EINA_FALSE);
81 ck_assert_int_eq(max_reached, EINA_FALSE);
82 changed = EINA_FALSE;
83 min_reached = EINA_FALSE;
84 max_reached = EINA_FALSE;
85
86 evas_event_feed_mouse_wheel(evas_object_evas_get(spin), -1, 1, 12345, NULL);
87 ck_assert(efl_ui_range_value_get(spin) == 0.0);
88 ck_assert_int_eq(changed, EINA_TRUE);
89 ck_assert_int_eq(min_reached, EINA_FALSE);
90 ck_assert_int_eq(max_reached, EINA_FALSE);
91}
92EFL_END_TEST
93
94void efl_ui_test_spin(TCase *tc) 63void efl_ui_test_spin(TCase *tc)
95{ 64{
96 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown); 65 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
97 tcase_add_checked_fixture(tc, spin_setup, NULL); 66 tcase_add_checked_fixture(tc, spin_setup, NULL);
98 tcase_add_test(tc, spin_value_events); 67 tcase_add_test(tc, spin_value_events);
99 tcase_add_test(tc, spin_wheel_test);
100} 68}