summaryrefslogtreecommitdiff
path: root/src/examples/elementary
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-26 18:16:24 +0900
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-09-26 18:32:58 +0900
commit1df17abba575f70b1f26fb50b972a1c8f37d2d27 (patch)
tree8b9c45aebb2a041e1f87e8c495649571ea3822af /src/examples/elementary
parenta4f5da0fb22a0dbc688abe32d87dabd15a72e560 (diff)
efl_ui_*selectable: unify these APIs with the same c_prefix
Summary: with this commit that api for single and multi selectable shares the same prefix, which makes sense in c as we do not really differ between those two types there anyway. ref T7871 Reviewers: SanghyeonLee, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7871 Differential Revision: https://phab.enlightenment.org/D10183
Diffstat (limited to 'src/examples/elementary')
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c8
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index dab45ae..5b808d0 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -30,7 +30,7 @@ _list_selected(void *data EINA_UNUSED, const Efl_Event *ev)
30 Eo *item = ev->info, *tmp; 30 Eo *item = ev->info, *tmp;
31 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected")); 31 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected"));
32 32
33 Eina_Iterator *selects = efl_ui_selected_iterator_new(list); 33 Eina_Iterator *selects = efl_ui_selectable_selected_iterator_new(list);
34 34
35 EINA_ITERATOR_FOREACH(selects, tmp) 35 EINA_ITERATOR_FOREACH(selects, tmp)
36 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp)); 36 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp));
@@ -70,7 +70,7 @@ static void
70_select_radio_changed(void *data, const Efl_Event *ev) 70_select_radio_changed(void *data, const Efl_Event *ev)
71{ 71{
72 Eo *list = data; 72 Eo *list = data;
73 efl_ui_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object)); 73 efl_ui_selectable_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object));
74} 74}
75 75
76static void 76static void
@@ -82,7 +82,7 @@ _anim_radio_changed(void *data, const Efl_Event *ev EINA_UNUSED)
82static void 82static void
83_scrl_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) 83_scrl_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
84{ 84{
85 Efl_Ui_List_Default_Item *item = efl_ui_single_selectable_last_selected_get(priv_d.list); 85 Efl_Ui_List_Default_Item *item = efl_ui_selectable_last_selected_get(priv_d.list);
86 printf("show [%d:%p] [%d]\n", efl_ui_item_index_get(item), item, priv_d.anim); 86 printf("show [%d:%p] [%d]\n", efl_ui_item_index_get(item), item, priv_d.anim);
87 efl_ui_collection_item_scroll(priv_d.list, item, priv_d.anim); 87 efl_ui_collection_item_scroll(priv_d.list, item, priv_d.anim);
88} 88}
@@ -90,7 +90,7 @@ _scrl_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
90static void 90static void
91_scrl_align_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) 91_scrl_align_btn_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
92{ 92{
93 Efl_Ui_List_Default_Item *item = efl_ui_single_selectable_last_selected_get(priv_d.list); 93 Efl_Ui_List_Default_Item *item = efl_ui_selectable_last_selected_get(priv_d.list);
94 double align = efl_ui_range_value_get(priv_d.slider); 94 double align = efl_ui_range_value_get(priv_d.slider);
95 printf("show [%d:%p] [%.2lf], [%d]\n", efl_ui_item_index_get(item), item, align, priv_d.anim); 95 printf("show [%d:%p] [%.2lf], [%d]\n", efl_ui_item_index_get(item), item, align, priv_d.anim);
96 efl_ui_collection_item_scroll_align(priv_d.list, item, align, priv_d.anim); 96 efl_ui_collection_item_scroll_align(priv_d.list, item, align, priv_d.anim);
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index ca839bc..c9f6b0d 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -60,7 +60,7 @@ _selected(void *data, const Efl_Event *event)
60{ 60{
61 Priv_Data *priv = (Priv_Data*)data; 61 Priv_Data *priv = (Priv_Data*)data;
62 62
63 priv->selected = efl_ui_single_selectable_last_selected_get(event->object); 63 priv->selected = efl_ui_selectable_last_selected_get(event->object);
64} 64}
65 65
66static void 66static void
@@ -299,7 +299,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
299 elm_box_pack_end(vbx, bt); 299 elm_box_pack_end(vbx, bt);
300 300
301 elm_box_pack_end(bx, priv->list2); 301 elm_box_pack_end(bx, priv->list2);
302 efl_event_callback_add(priv->list2, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, _selected, priv); 302 efl_event_callback_add(priv->list2, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, _selected, priv);
303 303
304 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, priv); 304 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, priv);
305 305