summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_slider.c
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2019-08-20 09:09:14 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-20 09:09:14 -0400
commitebae12f06a944259b9b4c094bdb009c6391c67ea (patch)
tree5e4dc38924b23a99e40688f2cda8a02a9605fdf6 /src/bin/elementary/test_slider.c
parent81a7b792359eb21f7318d0de7d52ac7c0a0f995c (diff)
elm_slider: remove dependency with efl_ui_slider
Summary: This commit includes follwoing works. 1. change parent class from EFL_UI_SLIDER_INTERVAL to EFL_UI_LAYOUT_BASE 2. get all necessary codes from efl_ui_slider and efl_ui_slider_interval to elm_slider 3. add callbacks to slider test code ref T7893 Test Plan: 1. elementary_test 2. slider 3. operate sliders on the window Reviewers: bu5hm4n, segfaultxavi, eagleeye, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7893 Differential Revision: https://phab.enlightenment.org/D9623
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_slider.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bin/elementary/test_slider.c b/src/bin/elementary/test_slider.c
index 1b0b299..10c2144 100644
--- a/src/bin/elementary/test_slider.c
+++ b/src/bin/elementary/test_slider.c
@@ -24,6 +24,18 @@ _change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
24 elm_slider_value_set(data, val); 24 elm_slider_value_set(data, val);
25} 25}
26 26
27void
28_drag_start_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
29{
30 printf("drag,started! slider value : %d\n", (int)round(elm_slider_value_get(obj)));
31}
32
33void
34_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
35{
36 printf("drag,stopped! slider value : %d\n", (int)round(elm_slider_value_get(obj)));
37}
38
27static void 39static void
28_ok_btn_clicked(void *data, Evas_Object *obj EINA_UNUSED, 40_ok_btn_clicked(void *data, Evas_Object *obj EINA_UNUSED,
29 void *event_info EINA_UNUSED) 41 void *event_info EINA_UNUSED)
@@ -244,6 +256,10 @@ test_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
244 evas_object_show(ic); 256 evas_object_show(ic);
245 evas_object_show(sl); 257 evas_object_show(sl);
246 258
259 evas_object_smart_callback_add(sl, "slider,drag,start", _drag_start_cb, NULL);
260 evas_object_smart_callback_add(sl, "slider,drag,stop", _drag_stop_cb, NULL);
261
262
247 // horizontally inverted slider 263 // horizontally inverted slider
248 ic = elm_icon_add(bx); 264 ic = elm_icon_add(bx);
249 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); 265 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());