From f2297992fee2c02490f64b57d7e69537bad35f2d Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 22 Jul 2019 12:27:20 +0200 Subject: [PATCH] efl_ui_range_display: move events from spin we concluded min,reached and max,reached should be on every widget that implements range_display. This here is the start of that work, the events are moved, next commit fixes all widgets, the last commits enables tests in the spec unit test. ref T7897 ref T7895 Differential Revision: https://phab.enlightenment.org/D9371 --- src/bin/elementary/test_evas_snapshot.c | 2 +- src/bin/elementary/test_ui_box.c | 14 ++++++------ src/bin/elementary/test_ui_pager.c | 4 ++-- src/bin/elementary/test_ui_pager_scroll.c | 8 +++---- src/bin/elementary/test_ui_relative_layout.c | 6 +++--- src/bin/elementary/test_ui_slider.c | 2 +- src/bin/elementary/test_ui_slider_interval.c | 2 +- src/bin/elementary/test_ui_spin.c | 6 +++--- src/bin/elementary/test_ui_spin_button.c | 2 +- src/bin/elementary/test_ui_spotlight.c | 4 ++-- src/bin/elementary/test_ui_table.c | 12 +++++------ src/bin/elementary/test_ui_textpath.c | 4 ++-- src/lib/efl/interfaces/efl_ui_range_display.eo | 5 +++++ src/lib/elementary/efl_ui_datepicker.c | 6 +++--- src/lib/elementary/efl_ui_progressbar.c | 2 +- src/lib/elementary/efl_ui_progressbar.eo | 3 --- src/lib/elementary/efl_ui_slider.c | 4 ++-- src/lib/elementary/efl_ui_slider.eo | 3 +-- src/lib/elementary/efl_ui_slider_interval.c | 8 +++---- src/lib/elementary/efl_ui_spin.c | 6 +++--- src/lib/elementary/efl_ui_spin.eo | 5 ----- src/lib/elementary/efl_ui_timepicker.c | 4 ++-- src/lib/elementary/elc_player.c | 4 ++-- src/lib/elementary/elm_slider.c | 4 ++-- src/modules/elementary/prefs/elm_slider.c | 2 +- src/tests/elementary/efl_ui_test_slider.c | 6 +++--- src/tests/elementary/efl_ui_test_spin.c | 12 +++++------ src/tests/elementary/efl_ui_test_spin_button.c | 30 +++++++++++++------------- 28 files changed, 83 insertions(+), 87 deletions(-) diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c index dba6570..ea79aa8 100644 --- a/src/bin/elementary/test_evas_snapshot.c +++ b/src/bin/elementary/test_evas_snapshot.c @@ -173,7 +173,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e elm_slider_unit_format_set(efl_added, "%.0f px"), efl_gfx_hint_weight_set(efl_added, 1.0, 0.0), efl_pack_table(table, efl_added, 0, TABLE_SIZE, TABLE_SIZE, 1), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _radius_set, win)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _radius_set, win)); box = efl_add(EFL_UI_BOX_CLASS, win, efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL), diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c index 01414b9..8b2e8ef 100644 --- a/src/bin/elementary/test_ui_box.c +++ b/src/bin/elementary/test_ui_box.c @@ -379,7 +379,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, user_min_slider_cb, NULL); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, user_min_slider_cb, NULL); elm_slider_min_max_set(o, 0, 250); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 0); @@ -406,7 +406,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, padding_slider_cb, win); elm_slider_min_max_set(o, 0, 40); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 10); @@ -433,7 +433,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, margin_slider_cb, win); elm_slider_min_max_set(o, 0, 40); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 10); @@ -460,7 +460,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignv_slider_cb, win); elm_slider_min_max_set(o, -0.1, 1.0); elm_slider_step_set(o, 0.1); elm_slider_value_set(o, 0.5); @@ -474,7 +474,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 0); efl_gfx_hint_size_min_set(o, EINA_SIZE2D(100, 0)); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignh_slider_cb, win); elm_slider_min_max_set(o, -0.1, 1.0); elm_slider_step_set(o, 0.1); elm_slider_value_set(o, 0.5); @@ -500,7 +500,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_btn_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignv_btn_slider_cb, win); elm_slider_min_max_set(o, 0.0, 1.0); elm_slider_step_set(o, 0.1); elm_slider_value_set(o, 0.5); @@ -514,7 +514,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 0); efl_gfx_hint_size_min_set(o, EINA_SIZE2D(100, 0)); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_btn_slider_cb, win); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignh_btn_slider_cb, win); elm_slider_min_max_set(o, -0.1, 1.0); elm_slider_step_set(o, 0.1); elm_slider_value_set(o, 0.5); diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c index c6d1aa0..c01c978 100644 --- a/src/bin/elementary/test_ui_pager.c +++ b/src/bin/elementary/test_ui_pager.c @@ -364,7 +364,7 @@ static void page_size_cb(void *data, efl_ui_range_limits_set(efl_added, 100, 200), efl_ui_range_value_set(efl_added, params->w), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, width_slider_cb, params), efl_pack_end(inbox, efl_added)); @@ -405,7 +405,7 @@ static void page_size_cb(void *data, efl_ui_range_limits_set(efl_added, 100, 300), efl_ui_range_value_set(efl_added, params->h), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, height_slider_cb, params), efl_pack_end(inbox, efl_added)); diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c index a7e564a..8112716 100644 --- a/src/bin/elementary/test_ui_pager_scroll.c +++ b/src/bin/elementary/test_ui_pager_scroll.c @@ -418,7 +418,7 @@ static void page_size_cb(void *data, efl_ui_range_limits_set(efl_added, 100, 200), efl_ui_range_value_set(efl_added, params->w), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, width_slider_cb, params), efl_pack_end(inbox, efl_added)); @@ -459,7 +459,7 @@ static void page_size_cb(void *data, efl_ui_range_limits_set(efl_added, 100, 300), efl_ui_range_value_set(efl_added, params->h), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, height_slider_cb, params), efl_pack_end(inbox, efl_added)); @@ -503,7 +503,7 @@ static void padding_cb(void *data, efl_ui_range_limits_set(efl_added, 0, 50), efl_ui_range_value_set(efl_added, params->padding), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, padding_slider_cb, params), efl_pack_end(box, efl_added)); } @@ -534,7 +534,7 @@ static void side_page_num_cb(void *data, efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_gfx_hint_weight_set(efl_added, 1, 1), efl_gfx_hint_align_set(efl_added, -1, -1), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, side_page_num_slider_cb, params), efl_pack_end(box, efl_added)); } diff --git a/src/bin/elementary/test_ui_relative_layout.c b/src/bin/elementary/test_ui_relative_layout.c index 2632f34..63a6419 100644 --- a/src/bin/elementary/test_ui_relative_layout.c +++ b/src/bin/elementary/test_ui_relative_layout.c @@ -175,7 +175,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option) efl_ui_range_step_set(efl_added, 0.1), efl_ui_range_value_set(efl_added, relative), efl_key_wref_set(efl_added, "btn", btn), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_relative_cb, (void *)option), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _slider_changed_relative_cb, (void *)option), efl_pack(hbox, efl_added)); } @@ -246,7 +246,7 @@ _button_frame_add(Eo *box, Eo *btn) efl_ui_range_step_set(efl_added, 0.1), efl_ui_range_value_set(efl_added, align_x), efl_key_wref_set(efl_added, "btn", btn), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_align_cb, (void *)'x'), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _slider_changed_align_cb, (void *)'x'), efl_pack(hbox, efl_added)); hbox = efl_add(EFL_UI_BOX_CLASS, vbox, @@ -266,7 +266,7 @@ _button_frame_add(Eo *box, Eo *btn) efl_ui_range_step_set(efl_added, 0.1), efl_ui_range_value_set(efl_added, align_y), efl_key_wref_set(efl_added, "btn", btn), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_align_cb, (void *)'y'), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _slider_changed_align_cb, (void *)'y'), efl_pack(hbox, efl_added)); } diff --git a/src/bin/elementary/test_ui_slider.c b/src/bin/elementary/test_ui_slider.c index 75df5f9..11591e0 100644 --- a/src/bin/elementary/test_ui_slider.c +++ b/src/bin/elementary/test_ui_slider.c @@ -115,6 +115,6 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(260, 0)), efl_ui_range_limits_set(efl_added, 0, 150), efl_ui_range_step_set(efl_added, 9), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _slider_changed_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _slider_changed_cb, NULL), efl_pack(bx, efl_added)); } diff --git a/src/bin/elementary/test_ui_slider_interval.c b/src/bin/elementary/test_ui_slider_interval.c index 9d4eccd..75dcbe2 100644 --- a/src/bin/elementary/test_ui_slider_interval.c +++ b/src/bin/elementary/test_ui_slider_interval.c @@ -112,6 +112,6 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void efl_ui_range_limits_set(efl_added, 0, 600), efl_ui_slider_interval_value_set(efl_added, 100, 500), efl_ui_range_step_set(efl_added, step), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _intv_slider_changed_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _intv_slider_changed_cb, NULL), efl_pack(bx, efl_added)); } diff --git a/src/bin/elementary/test_ui_spin.c b/src/bin/elementary/test_ui_spin.c index 01b0ff3..b57dfac 100644 --- a/src/bin/elementary/test_ui_spin.c +++ b/src/bin/elementary/test_ui_spin.c @@ -51,9 +51,9 @@ test_ui_spin(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i efl_ui_range_value_set(efl_added, 6), efl_ui_range_step_set(efl_added, 2), efl_ui_format_string_set(efl_added, "test %d", EFL_UI_FORMAT_STRING_TYPE_SIMPLE), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_spin_changed_cb, NULL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_MIN_REACHED,_spin_min_reached_cb, NULL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_MAX_REACHED,_spin_max_reached_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_spin_changed_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_MIN_REACHED,_spin_min_reached_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_MAX_REACHED,_spin_max_reached_cb, NULL), efl_pack(bx, efl_added)); efl_add(EFL_UI_BUTTON_CLASS, bx, diff --git a/src/bin/elementary/test_ui_spin_button.c b/src/bin/elementary/test_ui_spin_button.c index 12cd7f1..511c1d4 100644 --- a/src/bin/elementary/test_ui_spin_button.c +++ b/src/bin/elementary/test_ui_spin_button.c @@ -44,7 +44,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_event_callback_add(efl_added, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED,_spin_delay_changed_cb, NULL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED, _spin_changed_cb, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _spin_changed_cb, NULL), efl_pack(bx, efl_added)); efl_add(EFL_UI_SPIN_BUTTON_CLASS, bx, diff --git a/src/bin/elementary/test_ui_spotlight.c b/src/bin/elementary/test_ui_spotlight.c index 9f1f9a2..698d231 100644 --- a/src/bin/elementary/test_ui_spotlight.c +++ b/src/bin/elementary/test_ui_spotlight.c @@ -397,7 +397,7 @@ spotlight_size(void *data, efl_ui_range_limits_set(efl_added, 100, 200), efl_ui_range_value_set(efl_added, params->w), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, width_slider_cb, params), efl_pack_end(inbox, efl_added)); @@ -438,7 +438,7 @@ spotlight_size(void *data, efl_ui_range_limits_set(efl_added, 100, 300), efl_ui_range_value_set(efl_added, params->h), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 0)), - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, height_slider_cb, params), efl_pack_end(inbox, efl_added)); diff --git a/src/bin/elementary/test_ui_table.c b/src/bin/elementary/test_ui_table.c index 437c9be..43b4c9c 100644 --- a/src/bin/elementary/test_ui_table.c +++ b/src/bin/elementary/test_ui_table.c @@ -304,7 +304,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, user_min_slider_cb, NULL); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, user_min_slider_cb, NULL); elm_slider_min_max_set(o, 0, 250); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 0); @@ -331,7 +331,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, table); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, padding_slider_cb, table); elm_slider_min_max_set(o, 0, 40); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 0); @@ -357,7 +357,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, table); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, margin_slider_cb, table); elm_slider_min_max_set(o, 0, 40); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 0); @@ -384,7 +384,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, btnmargins_slider_cb, table); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, btnmargins_slider_cb, table); elm_slider_min_max_set(o, 0, 40); elm_slider_inverted_set(o, 1); elm_slider_value_set(o, 0); @@ -411,7 +411,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 0); efl_gfx_hint_align_set(o, 0.5, -1); efl_gfx_hint_weight_set(o, 1, 1); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_slider_cb, NULL); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignv_slider_cb, NULL); elm_slider_min_max_set(o, 0, 1); elm_slider_value_set(o, 0.3); efl_pack(bx, o); @@ -423,7 +423,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_slider_horizontal_set(o, 1); efl_gfx_hint_align_set(o, -1, -1); efl_gfx_hint_weight_set(o, 1, 0); - efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_slider_cb, NULL); + efl_event_callback_add(o, EFL_UI_RANGE_EVENT_CHANGED, alignh_slider_cb, NULL); elm_slider_min_max_set(o, 0, 1); elm_slider_value_set(o, 0.3); efl_pack(bx, o); diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c index 111ebe1..8c27688 100644 --- a/src/bin/elementary/test_ui_textpath.c +++ b/src/bin/elementary/test_ui_textpath.c @@ -152,7 +152,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve efl_gfx_hint_align_set(sld, 0.5, EVAS_HINT_FILL); efl_gfx_hint_weight_set(sld, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND); efl_gfx_hint_size_min_set(sld, EINA_SIZE2D(150, 0)); - efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _angle_changed_cb, txtpath); + efl_event_callback_add(sld, EFL_UI_RANGE_EVENT_CHANGED, _angle_changed_cb, txtpath); elm_box_pack_end(hbox, sld); efl_gfx_entity_visible_set(sld, EINA_TRUE); angle_sld = sld; @@ -164,7 +164,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve efl_gfx_hint_align_set(sld, 0.5, EVAS_HINT_FILL); efl_gfx_hint_weight_set(sld, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND); efl_gfx_hint_size_min_set(sld, EINA_SIZE2D(150, 0)); - efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _slice_no_changed_cb, txtpath); + efl_event_callback_add(sld, EFL_UI_RANGE_EVENT_CHANGED, _slice_no_changed_cb, txtpath); elm_box_pack_end(hbox, sld); efl_gfx_entity_visible_set(sld, EINA_TRUE); slice_sld = sld; diff --git a/src/lib/efl/interfaces/efl_ui_range_display.eo b/src/lib/efl/interfaces/efl_ui_range_display.eo index 39ca1b2..172f58a 100644 --- a/src/lib/efl/interfaces/efl_ui_range_display.eo +++ b/src/lib/efl/interfaces/efl_ui_range_display.eo @@ -48,4 +48,9 @@ interface @beta Efl.Ui.Range_Display } } } + events { + changed: void; [[Emitted when the $range_value is getting changed]] + min,reached: void; [[Emitted when the $range_value has reached the minimum of $range_limits]] + max,reached: void; [[Emitted when the $range_value has reached the maximum of $range_limits]] + } } diff --git a/src/lib/elementary/efl_ui_datepicker.c b/src/lib/elementary/efl_ui_datepicker.c index a8cf48d..1aa472d 100644 --- a/src/lib/elementary/efl_ui_datepicker.c +++ b/src/lib/elementary/efl_ui_datepicker.c @@ -164,21 +164,21 @@ _fields_init(Eo *obj) efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_field_changed_cb, obj)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->month = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1, 12), efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_field_changed_cb, obj)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->day = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1, 31), efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_field_changed_cb, obj)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); DATE_GET(); //Using system config? diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index f3ce052..a924e66 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -571,7 +571,7 @@ _progressbar_part_value_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *pa _val_set(obj); _units_set(obj); efl_event_callback_legacy_call - (obj, EFL_UI_PROGRESSBAR_EVENT_CHANGED, NULL); + (obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); } static double diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo index 2054bfc..88fce98 100644 --- a/src/lib/elementary/efl_ui_progressbar.eo +++ b/src/lib/elementary/efl_ui_progressbar.eo @@ -78,7 +78,4 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang Efl.Ui.Widget.focus_direction_manager_is; // } - events { - changed: void; [[Called when progressbar changed]] - } } diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c index a72ac65..66524c1 100644 --- a/src/lib/elementary/efl_ui_slider.c +++ b/src/lib/elementary/efl_ui_slider.c @@ -76,8 +76,8 @@ _efl_ui_slider_val_fetch(Evas_Object *obj, Efl_Ui_Slider_Data *sd, Eina_Bool us sd->val = val; if (user_event) { - efl_event_callback_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); - efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); + efl_event_callback_legacy_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); ecore_timer_del(sd->delay); sd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); } diff --git a/src/lib/elementary/efl_ui_slider.eo b/src/lib/elementary/efl_ui_slider.eo index 364b226..480c707 100644 --- a/src/lib/elementary/efl_ui_slider.eo +++ b/src/lib/elementary/efl_ui_slider.eo @@ -20,11 +20,10 @@ class @beta Efl.Ui.Slider extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Int Efl.Access.Widget.Action.elm_actions { get; } } events { - changed: void; [[Called when the slider position has changed.]] steady: void; [[Called when the slider position has changed and has remained unchanged for 0.2s. This allows filtering out unwanted "noise" from the slider signal if you are only interested in the final position of the slider. - Use this signal instead of @[Efl.Ui.Slider.changed] if you are going to perform a costly operation + Use this signal instead of @[Efl.Ui.Range_Display.changed] if you are going to perform a costly operation on its handler.]] slider,drag,start: void; [[Called when a slider drag operation has started. This means a $press event has been received on the slider thumb but not the $unpress.]] diff --git a/src/lib/elementary/efl_ui_slider_interval.c b/src/lib/elementary/efl_ui_slider_interval.c index 0f0f9a5..77f543a 100644 --- a/src/lib/elementary/efl_ui_slider_interval.c +++ b/src/lib/elementary/efl_ui_slider_interval.c @@ -77,8 +77,8 @@ _efl_ui_slider_interval_val_fetch(Evas_Object *obj, Efl_Ui_Slider_Interval_Data pd->intvl_from = val; if (user_event) { - efl_event_callback_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); - efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); + efl_event_callback_legacy_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); } @@ -89,8 +89,8 @@ _efl_ui_slider_interval_val_fetch(Evas_Object *obj, Efl_Ui_Slider_Interval_Data pd->intvl_to = val2; if (user_event) { - efl_event_callback_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); - efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); + efl_event_callback_legacy_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); } diff --git a/src/lib/elementary/efl_ui_spin.c b/src/lib/elementary/efl_ui_spin.c index 636e3fe..1776fe3 100644 --- a/src/lib/elementary/efl_ui_spin.c +++ b/src/lib/elementary/efl_ui_spin.c @@ -156,11 +156,11 @@ _efl_ui_spin_efl_ui_range_display_range_value_set(Eo *obj, Efl_Ui_Spin_Data *sd, sd->val = val; if (EINA_DBL_EQ(sd->val, sd->val_min)) - efl_event_callback_call(obj, EFL_UI_SPIN_EVENT_MIN_REACHED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MIN_REACHED, NULL); else if (EINA_DBL_EQ(sd->val, sd->val_max)) - efl_event_callback_call(obj, EFL_UI_SPIN_EVENT_MAX_REACHED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MAX_REACHED, NULL); - efl_event_callback_call(obj, EFL_UI_SPIN_EVENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); _label_write(obj, sd); } diff --git a/src/lib/elementary/efl_ui_spin.eo b/src/lib/elementary/efl_ui_spin.eo index 7f02d5a..55b1e45 100644 --- a/src/lib/elementary/efl_ui_spin.eo +++ b/src/lib/elementary/efl_ui_spin.eo @@ -15,9 +15,4 @@ class @beta Efl.Ui.Spin extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Inter Efl.Ui.Range_Display.range_value { get; set; } Efl.Ui.Format.apply_formatted_value; } - events { - changed: void; [[Called when spin changed]] - min,reached: void; [[Called when spin value reached min]] - max,reached: void; [[Called when spin value reached max]] - } } diff --git a/src/lib/elementary/efl_ui_timepicker.c b/src/lib/elementary/efl_ui_timepicker.c index d7dd01a..4e02665 100644 --- a/src/lib/elementary/efl_ui_timepicker.c +++ b/src/lib/elementary/efl_ui_timepicker.c @@ -126,14 +126,14 @@ _fields_init(Eo *obj) efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_field_changed_cb, obj)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->min = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 0, 59), efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), - efl_event_callback_add(efl_added, EFL_UI_SPIN_EVENT_CHANGED,_field_changed_cb, obj)); + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->ampm = efl_add(EFL_UI_BUTTON_CLASS, obj, efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _field_changed_cb, obj), diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c index c5a17e0..1a0c7d5 100644 --- a/src/lib/elementary/elc_player.c +++ b/src/lib/elementary/elc_player.c @@ -88,7 +88,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(_emotion_cb, ); EFL_CALLBACKS_ARRAY_DEFINE(_slider_cb, - { EFL_UI_SLIDER_EVENT_CHANGED, _update_position }, + { EFL_UI_RANGE_EVENT_CHANGED, _update_position }, { EFL_UI_SLIDER_EVENT_SLIDER_DRAG_START, _drag_start }, { EFL_UI_SLIDER_EVENT_SLIDER_DRAG_STOP, _drag_stop } ); @@ -630,7 +630,7 @@ _elm_player_efl_canvas_group_group_add(Eo *obj, Elm_Player_Data *priv) elm_layout_content_set(obj, "elm.swallow.media_player.volumeslider", priv->vslider); efl_event_callback_add - (priv->vslider, EFL_UI_SLIDER_EVENT_CHANGED, _update_volume, obj); + (priv->vslider, EFL_UI_RANGE_EVENT_CHANGED, _update_volume, obj); elm_layout_sizing_eval(obj); elm_widget_can_focus_set(obj, EINA_TRUE); diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index 9ab95cc..f15b2a3 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -645,7 +645,7 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even id->intvl_from = val; if (user_event) { - efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); + efl_event_callback_legacy_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); evented = EINA_TRUE; @@ -658,7 +658,7 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even /* avoid emitting two events and setting a timer twice */ if (user_event && (!evented)) { - efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); + efl_event_callback_legacy_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); } diff --git a/src/modules/elementary/prefs/elm_slider.c b/src/modules/elementary/prefs/elm_slider.c index 961d76a..c4e5a95 100644 --- a/src/modules/elementary/prefs/elm_slider.c +++ b/src/modules/elementary/prefs/elm_slider.c @@ -27,7 +27,7 @@ elm_prefs_slider_add(const Elm_Prefs_Item_Iface *iface EINA_UNUSED, evas_object_data_set(obj, "prefs_type", (void *)type); efl_event_callback_add - (obj, EFL_UI_SLIDER_EVENT_CHANGED, _item_changed_cb, cb); + (obj, EFL_UI_RANGE_EVENT_CHANGED, _item_changed_cb, cb); if (type == ELM_PREFS_TYPE_INT) { elm_slider_unit_format_set(obj, "%1.0f"); diff --git a/src/tests/elementary/efl_ui_test_slider.c b/src/tests/elementary/efl_ui_test_slider.c index ff820b0..39b11b5 100644 --- a/src/tests/elementary/efl_ui_test_slider.c +++ b/src/tests/elementary/efl_ui_test_slider.c @@ -13,7 +13,7 @@ slider_changed(void *data EINA_UNUSED, const Efl_Event *ev) { event_counter++; if (event_counter == 1) - efl_event_callback_del(ev->object, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL); + efl_event_callback_del(ev->object, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL); else if (event_counter == 2) ecore_main_loop_quit(); } @@ -26,7 +26,7 @@ EFL_START_TEST(efl_ui_test_slider_events) efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100)); slider = efl_add(EFL_UI_SLIDER_CLASS, win, - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL), efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL), efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100)) ); @@ -60,7 +60,7 @@ EFL_START_TEST(efl_ui_test_slider_step) efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100)); slider = efl_add(EFL_UI_SLIDER_CLASS, win, - efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL), + efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL), efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL), efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100)) ); diff --git a/src/tests/elementary/efl_ui_test_spin.c b/src/tests/elementary/efl_ui_test_spin.c index 98c5432..abd55af 100644 --- a/src/tests/elementary/efl_ui_test_spin.c +++ b/src/tests/elementary/efl_ui_test_spin.c @@ -33,9 +33,9 @@ EFL_START_TEST (spin_value_events) efl_ui_range_limits_set(spin, -3.0, 3.0); efl_ui_range_value_set(spin, 0.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_ui_range_value_set(spin, 1.0); ck_assert_int_eq(changed, EINA_TRUE); @@ -67,9 +67,9 @@ EFL_START_TEST (spin_wheel_test) efl_ui_range_limits_set(spin, -100.0, 100.0); efl_ui_range_value_set(spin, 0.0); efl_ui_range_step_set(spin, 10.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60)); get_me_to_those_events(spin); diff --git a/src/tests/elementary/efl_ui_test_spin_button.c b/src/tests/elementary/efl_ui_test_spin_button.c index 78b21a4..f9e6bce 100644 --- a/src/tests/elementary/efl_ui_test_spin_button.c +++ b/src/tests/elementary/efl_ui_test_spin_button.c @@ -52,9 +52,9 @@ EFL_START_TEST (spin_value_events) efl_ui_range_limits_set(spin, -3.0, 3.0); efl_ui_range_value_set(spin, 0.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_ui_range_value_set(spin, 1.0); ck_assert_int_eq(changed, EINA_TRUE); @@ -89,9 +89,9 @@ EFL_START_TEST (spin_wheel_test) efl_ui_range_limits_set(spin, -100.0, 100.0); efl_ui_range_value_set(spin, 0.0); efl_ui_range_step_set(spin, 10.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60)); get_me_to_those_events(spin); @@ -122,9 +122,9 @@ EFL_START_TEST (spin_value_inc) efl_ui_range_limits_set(spin, 0.0, 3.0); efl_ui_range_value_set(spin, 1.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); click_spin_part(spin, "efl.inc_button"); @@ -147,9 +147,9 @@ EFL_START_TEST (spin_value_inc_max) efl_ui_range_limits_set(spin, 0.0, 3.0); efl_ui_range_value_set(spin, 2.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); click_spin_part(spin, "efl.inc_button"); @@ -172,9 +172,9 @@ EFL_START_TEST (spin_value_dec_min) efl_ui_range_limits_set(spin, 0.0, 3.0); efl_ui_range_value_set(spin, 1.0); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); - efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached); + efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached); efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); click_spin_part(spin, "efl.dec_button"); -- 2.7.4