summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_list.c')
-rw-r--r--src/lib/elementary/elm_list.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index 7310201..17b2b93 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -13,6 +13,7 @@
13#include "elm_priv.h" 13#include "elm_priv.h"
14#include "elm_widget_list.h" 14#include "elm_widget_list.h"
15#include "elm_interface_scrollable.h" 15#include "elm_interface_scrollable.h"
16#include "elm_pan_eo.h"
16 17
17#define MY_CLASS ELM_LIST_CLASS 18#define MY_CLASS ELM_LIST_CLASS
18 19
@@ -296,7 +297,7 @@ _elm_list_item_content_focus_set(Elm_List_Item_Data *it, Elm_Focus_Direction dir
296 Evas_Object *focus_chain[2]; 297 Evas_Object *focus_chain[2];
297 Evas_Object *focused = NULL; 298 Evas_Object *focused = NULL;
298 int idx; 299 int idx;
299 300
300 if (it->icon && elm_object_widget_check(it->icon) && elm_object_focus_allow_get(it->icon)) 301 if (it->icon && elm_object_widget_check(it->icon) && elm_object_focus_allow_get(it->icon))
301 focus_chain[focus_objs++] = it->icon; 302 focus_chain[focus_objs++] = it->icon;
302 if (it->end && elm_object_widget_check(it->end) && elm_object_focus_allow_get(it->end)) 303 if (it->end && elm_object_widget_check(it->end) && elm_object_focus_allow_get(it->end))
@@ -1077,13 +1078,12 @@ _show_region_hook(void *data EINA_UNUSED, Evas_Object *obj, Eina_Rect r)
1077 elm_interface_scrollable_content_region_set(obj, r.x, r.y, r.w, r.h); 1078 elm_interface_scrollable_content_region_set(obj, r.x, r.y, r.w, r.h);
1078} 1079}
1079 1080
1080EOLIAN static Eina_Bool 1081EOLIAN static void
1081_elm_list_efl_ui_widget_on_disabled_update(Eo *obj, Elm_List_Data *sd, Eina_Bool disabled) 1082_elm_list_efl_ui_widget_disabled_set(Eo *obj, Elm_List_Data *sd, Eina_Bool disabled)
1082{ 1083{
1083 if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled)) 1084 efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
1084 return EINA_FALSE;
1085 1085
1086 if (disabled) 1086 if (efl_ui_widget_disabled_get(obj))
1087 { 1087 {
1088 elm_widget_scroll_freeze_push(obj); 1088 elm_widget_scroll_freeze_push(obj);
1089 elm_widget_scroll_hold_push(obj); 1089 elm_widget_scroll_hold_push(obj);
@@ -1096,8 +1096,6 @@ _elm_list_efl_ui_widget_on_disabled_update(Eo *obj, Elm_List_Data *sd, Eina_Bool
1096 elm_widget_scroll_freeze_pop(obj); 1096 elm_widget_scroll_freeze_pop(obj);
1097 elm_widget_scroll_hold_pop(obj); 1097 elm_widget_scroll_hold_pop(obj);
1098 } 1098 }
1099
1100 return EINA_TRUE;
1101} 1099}
1102 1100
1103static void 1101static void
@@ -1118,15 +1116,15 @@ _mirrored_set(Evas_Object *obj,
1118 } 1116 }
1119} 1117}
1120 1118
1121EOLIAN static Efl_Ui_Theme_Apply_Result 1119EOLIAN static Eina_Error
1122_elm_list_efl_ui_widget_theme_apply(Eo *obj, Elm_List_Data *sd) 1120_elm_list_efl_ui_widget_theme_apply(Eo *obj, Elm_List_Data *sd)
1123{ 1121{
1124 Elm_Object_Item *eo_it; 1122 Elm_Object_Item *eo_it;
1125 Eina_List *n; 1123 Eina_List *n;
1126 1124
1127 Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL; 1125 Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
1128 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); 1126 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
1129 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 1127 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
1130 1128
1131 _mirrored_set(obj, efl_ui_mirrored_get(obj)); 1129 _mirrored_set(obj, efl_ui_mirrored_get(obj));
1132 1130
@@ -1150,6 +1148,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
1150{ 1148{
1151 ELM_LIST_ITEM_DATA_GET(eo_it, it); 1149 ELM_LIST_ITEM_DATA_GET(eo_it, it);
1152 ELM_LIST_DATA_GET_FROM_ITEM(it, sd); 1150 ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
1151 Evas_Object *win = elm_widget_top_get(WIDGET(it));
1153 Evas_Coord x, y, w, h, sx, sy, sw, sh; 1152 Evas_Coord x, y, w, h, sx, sy, sw, sh;
1154 const char *focus_raise; 1153 const char *focus_raise;
1155 1154
@@ -1173,7 +1172,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
1173 } 1172 }
1174 } 1173 }
1175 sd->focused_item = eo_it; 1174 sd->focused_item = eo_it;
1176 if (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable) 1175 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
1177 { 1176 {
1178 edje_object_signal_emit 1177 edje_object_signal_emit
1179 (VIEW(it), "elm,state,focused", "elm"); 1178 (VIEW(it), "elm,state,focused", "elm");
@@ -1184,7 +1183,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
1184 efl_event_callback_legacy_call 1183 efl_event_callback_legacy_call
1185 (WIDGET(it), ELM_LIST_EVENT_ITEM_FOCUSED, eo_it); 1184 (WIDGET(it), ELM_LIST_EVENT_ITEM_FOCUSED, eo_it);
1186 if (_elm_config->atspi_mode) 1185 if (_elm_config->atspi_mode)
1187 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 1186 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
1188} 1187}
1189 1188
1190static void 1189static void
@@ -1192,6 +1191,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
1192{ 1191{
1193 ELM_LIST_ITEM_DATA_GET(eo_it, it); 1192 ELM_LIST_ITEM_DATA_GET(eo_it, it);
1194 Evas_Object *obj = WIDGET(it); 1193 Evas_Object *obj = WIDGET(it);
1194 Evas_Object *win = elm_widget_top_get(obj);
1195 ELM_LIST_DATA_GET(obj, sd); 1195 ELM_LIST_DATA_GET(obj, sd);
1196 1196
1197 if ((!sd) || (!sd->focused_item) || 1197 if ((!sd) || (!sd->focused_item) ||
@@ -1201,7 +1201,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
1201 if (_is_no_select(it)) 1201 if (_is_no_select(it))
1202 return; 1202 return;
1203 1203
1204 if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) 1204 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
1205 { 1205 {
1206 ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it); 1206 ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it);
1207 edje_object_signal_emit 1207 edje_object_signal_emit
@@ -1211,7 +1211,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
1211 sd->focused_item = NULL; 1211 sd->focused_item = NULL;
1212 efl_event_callback_legacy_call(obj, ELM_LIST_EVENT_ITEM_UNFOCUSED, eo_it); 1212 efl_event_callback_legacy_call(obj, ELM_LIST_EVENT_ITEM_UNFOCUSED, eo_it);
1213 if (_elm_config->atspi_mode) 1213 if (_elm_config->atspi_mode)
1214 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_FOCUSED, EINA_FALSE); 1214 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_FALSE);
1215} 1215}
1216 1216
1217/* 1217/*
@@ -1450,7 +1450,7 @@ call:
1450 if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it); 1450 if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it);
1451 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTED, eo_it); 1451 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTED, eo_it);
1452 if (_elm_config->atspi_mode) 1452 if (_elm_config->atspi_mode)
1453 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_SELECTED, EINA_TRUE); 1453 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE);
1454 sd->last_selected_item = eo_it; 1454 sd->last_selected_item = eo_it;
1455 1455
1456 _elm_list_unwalk(obj, sd); 1456 _elm_list_unwalk(obj, sd);
@@ -1526,7 +1526,7 @@ _item_unselect(Elm_List_Item_Data *it)
1526 efl_event_callback_legacy_call 1526 efl_event_callback_legacy_call
1527 (WIDGET(it), EFL_UI_EVENT_UNSELECTED, EO_OBJ(it)); 1527 (WIDGET(it), EFL_UI_EVENT_UNSELECTED, EO_OBJ(it));
1528 if (_elm_config->atspi_mode) 1528 if (_elm_config->atspi_mode)
1529 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_SELECTED, EINA_FALSE); 1529 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE);
1530 } 1530 }
1531 1531
1532 _elm_list_unwalk(obj, sd); 1532 _elm_list_unwalk(obj, sd);
@@ -2142,13 +2142,13 @@ _elm_list_item_efl_access_object_state_set_get(const Eo *eo_it, Elm_List_Item_Da
2142 if (elm_object_item_disabled_get(eo_it)) 2142 if (elm_object_item_disabled_get(eo_it))
2143 return ret; 2143 return ret;
2144 2144
2145 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTABLE); 2145 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTABLE);
2146 2146
2147 sel = elm_obj_list_item_selected_get(eo_it); 2147 sel = elm_obj_list_item_selected_get(eo_it);
2148 if (sel) 2148 if (sel)
2149 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTED); 2149 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTED);
2150 else 2150 else
2151 STATE_TYPE_UNSET(ret, EFL_ACCESS_STATE_SELECTED); 2151 STATE_TYPE_UNSET(ret, EFL_ACCESS_STATE_TYPE_SELECTED);
2152 2152
2153 return ret; 2153 return ret;
2154} 2154}
@@ -3052,7 +3052,7 @@ _elm_list_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_List_Dat
3052} 3052}
3053 3053
3054EOLIAN static Elm_Object_Item* 3054EOLIAN static Elm_Object_Item*
3055_elm_list_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_List_Data *sd) 3055_elm_list_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_List_Data *sd)
3056{ 3056{
3057 return sd->focused_item; 3057 return sd->focused_item;
3058} 3058}
@@ -3214,5 +3214,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_list, Elm_List_Data)
3214 ELM_LAYOUT_SIZING_EVAL_OPS(elm_list), \ 3214 ELM_LAYOUT_SIZING_EVAL_OPS(elm_list), \
3215 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_list) 3215 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_list)
3216 3216
3217#include "elm_list.eo.c" 3217#include "elm_list_eo.c"
3218#include "elm_list_item.eo.c" 3218#include "elm_list_item_eo.c"