summaryrefslogtreecommitdiff
path: root/src/lib/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/lib/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/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_collection.c4
-rw-r--r--src/lib/elementary/efl_ui_collection_view.c6
-rw-r--r--src/lib/elementary/efl_ui_item.c4
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable.eo2
-rw-r--r--src/lib/elementary/efl_ui_radio_box.c2
-rw-r--r--src/lib/elementary/efl_ui_radio_group_impl.c2
-rw-r--r--src/lib/elementary/efl_ui_select_model.c2
-rw-r--r--src/lib/elementary/efl_ui_single_selectable.eo1
-rw-r--r--src/lib/elementary/efl_ui_tab_bar.c2
-rw-r--r--src/lib/elementary/efl_ui_tab_pager.c2
10 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index 0dac5b0..a281997 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -431,7 +431,7 @@ _efl_ui_collection_efl_object_invalidate(Eo *obj, Efl_Ui_Collection_Data *pd EIN
431{ 431{
432 efl_ui_collection_position_manager_set(obj, NULL); 432 efl_ui_collection_position_manager_set(obj, NULL);
433 433
434 efl_ui_single_selectable_fallback_selection_set(obj, NULL); 434 efl_ui_selectable_fallback_selection_set(obj, NULL);
435 435
436 deselect_all(pd); 436 deselect_all(pd);
437 437
@@ -514,7 +514,7 @@ _schedule_selection_job_cb(Eo *o, void *data EINA_UNUSED, const Eina_Value value
514 514
515 pd->selection_changed_job = NULL; 515 pd->selection_changed_job = NULL;
516 516
517 efl_event_callback_call(o, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, NULL); 517 efl_event_callback_call(o, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, NULL);
518 518
519 return EINA_VALUE_EMPTY; 519 return EINA_VALUE_EMPTY;
520} 520}
diff --git a/src/lib/elementary/efl_ui_collection_view.c b/src/lib/elementary/efl_ui_collection_view.c
index 608c31c..400e80e 100644
--- a/src/lib/elementary/efl_ui_collection_view.c
+++ b/src/lib/elementary/efl_ui_collection_view.c
@@ -1885,7 +1885,7 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1885 if (pd->multi_selectable_async_model) 1885 if (pd->multi_selectable_async_model)
1886 { 1886 {
1887 efl_event_callback_forwarder_del(pd->multi_selectable_async_model, 1887 efl_event_callback_forwarder_del(pd->multi_selectable_async_model,
1888 EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, 1888 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1889 data); 1889 data);
1890 efl_composite_detach(data, pd->multi_selectable_async_model); 1890 efl_composite_detach(data, pd->multi_selectable_async_model);
1891 efl_replace(&pd->multi_selectable_async_model, NULL); 1891 efl_replace(&pd->multi_selectable_async_model, NULL);
@@ -1934,14 +1934,14 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1934 if (pd->multi_selectable_async_model) 1934 if (pd->multi_selectable_async_model)
1935 { 1935 {
1936 efl_event_callback_forwarder_del(pd->multi_selectable_async_model, 1936 efl_event_callback_forwarder_del(pd->multi_selectable_async_model,
1937 EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, 1937 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1938 data); 1938 data);
1939 efl_composite_detach(data, pd->multi_selectable_async_model); 1939 efl_composite_detach(data, pd->multi_selectable_async_model);
1940 } 1940 }
1941 efl_replace(&pd->multi_selectable_async_model, mselect); 1941 efl_replace(&pd->multi_selectable_async_model, mselect);
1942 efl_composite_attach(data, pd->multi_selectable_async_model); 1942 efl_composite_attach(data, pd->multi_selectable_async_model);
1943 efl_event_callback_forwarder_add(pd->multi_selectable_async_model, 1943 efl_event_callback_forwarder_add(pd->multi_selectable_async_model,
1944 EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, 1944 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1945 data); 1945 data);
1946 1946
1947 if (!sizing) model = efl_add(EFL_UI_HOMOGENEOUS_MODEL_CLASS, data, 1947 if (!sizing) model = efl_add(EFL_UI_HOMOGENEOUS_MODEL_CLASS, data,
diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c
index 3dce9c3..f3c35ac 100644
--- a/src/lib/elementary/efl_ui_item.c
+++ b/src/lib/elementary/efl_ui_item.c
@@ -30,10 +30,10 @@ static Efl_Ui_Select_Mode
30_fetch_state(Eo *obj) 30_fetch_state(Eo *obj)
31{ 31{
32 if (efl_isa(obj, EFL_UI_MULTI_SELECTABLE_INTERFACE)) 32 if (efl_isa(obj, EFL_UI_MULTI_SELECTABLE_INTERFACE))
33 return efl_ui_select_mode_get(obj); 33 return efl_ui_selectable_select_mode_get(obj);
34 if (efl_isa(obj, EFL_UI_SINGLE_SELECTABLE_INTERFACE)) 34 if (efl_isa(obj, EFL_UI_SINGLE_SELECTABLE_INTERFACE))
35 return EFL_UI_SELECT_MODE_SINGLE; 35 return EFL_UI_SELECT_MODE_SINGLE;
36 ERR("Uncaught state"); 36 ERR("Uncaught state %s", efl_debug_name_get(obj));
37 return EFL_UI_SELECT_MODE_NONE; 37 return EFL_UI_SELECT_MODE_NONE;
38} 38}
39 39
diff --git a/src/lib/elementary/efl_ui_multi_selectable.eo b/src/lib/elementary/efl_ui_multi_selectable.eo
index ea8e376..251f640 100644
--- a/src/lib/elementary/efl_ui_multi_selectable.eo
+++ b/src/lib/elementary/efl_ui_multi_selectable.eo
@@ -6,7 +6,7 @@ interface @beta Efl.Ui.Multi_Selectable extends Efl.Ui.Single_Selectable
6 6
7 The implementor of this interface provides the possibility to select multiple Selectables. 7 The implementor of this interface provides the possibility to select multiple Selectables.
8 If not, only @Efl.Ui.Single_Selectable should be implemented.]] 8 If not, only @Efl.Ui.Single_Selectable should be implemented.]]
9 c_prefix: efl_ui; 9 c_prefix: efl_ui_selectable;
10 methods 10 methods
11 { 11 {
12 @property select_mode { 12 @property select_mode {
diff --git a/src/lib/elementary/efl_ui_radio_box.c b/src/lib/elementary/efl_ui_radio_box.c
index 1e18f0f..84f6733 100644
--- a/src/lib/elementary/efl_ui_radio_box.c
+++ b/src/lib/elementary/efl_ui_radio_box.c
@@ -118,7 +118,7 @@ _efl_ui_radio_box_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Box_Data *pd)
118{ 118{
119 pd->group = efl_new(EFL_UI_RADIO_GROUP_IMPL_CLASS, NULL); 119 pd->group = efl_new(EFL_UI_RADIO_GROUP_IMPL_CLASS, NULL);
120 efl_composite_attach(obj, pd->group); 120 efl_composite_attach(obj, pd->group);
121 efl_event_callback_forwarder_add(pd->group, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, obj); 121 efl_event_callback_forwarder_add(pd->group, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, obj);
122 efl_event_callback_forwarder_add(pd->group, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, obj); 122 efl_event_callback_forwarder_add(pd->group, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, obj);
123 return efl_constructor(efl_super(obj, MY_CLASS)); 123 return efl_constructor(efl_super(obj, MY_CLASS));
124} 124}
diff --git a/src/lib/elementary/efl_ui_radio_group_impl.c b/src/lib/elementary/efl_ui_radio_group_impl.c
index 6c20f96..6a14f37 100644
--- a/src/lib/elementary/efl_ui_radio_group_impl.c
+++ b/src/lib/elementary/efl_ui_radio_group_impl.c
@@ -101,7 +101,7 @@ _selected_cb(void *data, const Efl_Event *ev)
101 else 101 else
102 value = -1; 102 value = -1;
103 efl_event_callback_call(data, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, &value); 103 efl_event_callback_call(data, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, &value);
104 efl_event_callback_call(data, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, NULL); 104 efl_event_callback_call(data, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, NULL);
105 } 105 }
106} 106}
107 107
diff --git a/src/lib/elementary/efl_ui_select_model.c b/src/lib/elementary/efl_ui_select_model.c
index c05d720..c6092a5 100644
--- a/src/lib/elementary/efl_ui_select_model.c
+++ b/src/lib/elementary/efl_ui_select_model.c
@@ -90,7 +90,7 @@ _select_notification_cb(Eo *o, void *data EINA_UNUSED, const Eina_Value v)
90{ 90{
91 Efl_Ui_Select_Model_Data *pd = efl_data_scope_get(o, EFL_UI_SELECT_MODEL_CLASS); 91 Efl_Ui_Select_Model_Data *pd = efl_data_scope_get(o, EFL_UI_SELECT_MODEL_CLASS);
92 92
93 efl_event_callback_call(o, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, NULL); 93 efl_event_callback_call(o, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, NULL);
94 94
95 pd->pending_selection_event = NULL; 95 pd->pending_selection_event = NULL;
96 96
diff --git a/src/lib/elementary/efl_ui_single_selectable.eo b/src/lib/elementary/efl_ui_single_selectable.eo
index 373cefa..457bf6c 100644
--- a/src/lib/elementary/efl_ui_single_selectable.eo
+++ b/src/lib/elementary/efl_ui_single_selectable.eo
@@ -4,6 +4,7 @@ interface @beta Efl.Ui.Single_Selectable {
4 The implementor is free to allow a specific number of selectables being selected or not. 4 The implementor is free to allow a specific number of selectables being selected or not.
5 This interface just covers always the latest selected selectable. 5 This interface just covers always the latest selected selectable.
6 ]] 6 ]]
7 c_prefix: efl_ui_selectable;
7 methods { 8 methods {
8 @property last_selected { 9 @property last_selected {
9 [[The selectable that was selected most recently.]] 10 [[The selectable that was selected most recently.]]
diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c
index ff831f8..34e3729 100644
--- a/src/lib/elementary/efl_ui_tab_bar.c
+++ b/src/lib/elementary/efl_ui_tab_bar.c
@@ -66,7 +66,7 @@ _selelction_change_cb(void *data, const Efl_Event *ev)
66 } 66 }
67 if (!pd->in_value_change) 67 if (!pd->in_value_change)
68 { 68 {
69 efl_event_callback_call(data, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, NULL); 69 efl_event_callback_call(data, EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, NULL);
70 } 70 }
71} 71}
72 72
diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c
index eb347ab..73e7d22 100644
--- a/src/lib/elementary/efl_ui_tab_pager.c
+++ b/src/lib/elementary/efl_ui_tab_pager.c
@@ -26,7 +26,7 @@ _tab_select_cb(void *data, const Efl_Event *event)
26 Efl_Ui_Tab_Bar_Default_Item *selected; 26 Efl_Ui_Tab_Bar_Default_Item *selected;
27 Efl_Ui_Tab_Page *page; 27 Efl_Ui_Tab_Page *page;
28 28
29 selected = efl_ui_single_selectable_last_selected_get(event->object); 29 selected = efl_ui_selectable_last_selected_get(event->object);
30 page = efl_parent_get(selected); 30 page = efl_parent_get(selected);
31 if (efl_ui_spotlight_active_element_get(data)) 31 if (efl_ui_spotlight_active_element_get(data))
32 efl_ui_spotlight_active_element_set(data, page); 32 efl_ui_spotlight_active_element_set(data, page);