summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_genlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_genlist.c')
-rw-r--r--src/lib/elementary/elm_genlist.c70
1 files changed, 37 insertions, 33 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 0163524..2ba846e 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -16,11 +16,12 @@
16#include "elm_priv.h" 16#include "elm_priv.h"
17#include "elm_widget_genlist.h" 17#include "elm_widget_genlist.h"
18#include "elm_interface_scrollable.h" 18#include "elm_interface_scrollable.h"
19#include "efl_ui_focus_parent_provider_gen.eo.h" 19#include "elm_pan_eo.h"
20#include "efl_ui_focus_parent_provider_gen_eo.h"
20#include "efl_ui_focus_composition_adapter.eo.h" 21#include "efl_ui_focus_composition_adapter.eo.h"
21#include "elm_genlist_item.eo.h" 22#include "elm_genlist_item_eo.h"
22#include "elm_genlist_pan.eo.h" 23#include "elm_genlist_pan_eo.h"
23#include "elm_genlist.eo.h" 24#include "elm_genlist_eo.h"
24 25
25#define MY_PAN_CLASS ELM_GENLIST_PAN_CLASS 26#define MY_PAN_CLASS ELM_GENLIST_PAN_CLASS
26 27
@@ -456,7 +457,7 @@ _item_content_realize(Elm_Gen_Item *it,
456 ELM_WIDGET_DATA_GET_OR_RETURN(content, wd); 457 ELM_WIDGET_DATA_GET_OR_RETURN(content, wd);
457 458
458 // FIXME : Layout need sizing eval before group calculate 459 // FIXME : Layout need sizing eval before group calculate
459 if (efl_class_get(content) == EFL_UI_LAYOUT_CLASS) 460 if (efl_class_get(content) == EFL_UI_LAYOUT_BASE_CLASS)
460 elm_layout_sizing_eval(content); 461 elm_layout_sizing_eval(content);
461 462
462 _widget_calculate_recursive(content); 463 _widget_calculate_recursive(content);
@@ -566,10 +567,10 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style)
566 "",style ? : "default"); 567 "",style ? : "default");
567 } 568 }
568 569
569 Efl_Ui_Theme_Apply_Result th_ret = 570 Eina_Error th_ret =
570 elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf, 571 elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf,
571 elm_widget_style_get(WIDGET(it))); 572 elm_widget_style_get(WIDGET(it)));
572 if (th_ret == EFL_UI_THEME_APPLY_RESULT_FAIL) 573 if (th_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
573 { 574 {
574 ERR("%s is not a valid genlist item style. " 575 ERR("%s is not a valid genlist item style. "
575 "Automatically falls back into default style.", 576 "Automatically falls back into default style.",
@@ -1598,6 +1599,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
1598 Item_Cache *itc = NULL; 1599 Item_Cache *itc = NULL;
1599 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 1600 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
1600 Evas_Object *obj = sd->obj; 1601 Evas_Object *obj = sd->obj;
1602 Evas_Object *win = elm_widget_top_get(obj);
1601 Evas *e = evas_object_evas_get(obj); 1603 Evas *e = evas_object_evas_get(obj);
1602 1604
1603 evas_event_freeze(e); 1605 evas_event_freeze(e);
@@ -1629,7 +1631,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
1629 if (elm_wdg_item_disabled_get(EO_OBJ(it))) 1631 if (elm_wdg_item_disabled_get(EO_OBJ(it)))
1630 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm"); 1632 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
1631 if ((EO_OBJ(it) == sd->focused_item) && 1633 if ((EO_OBJ(it) == sd->focused_item) &&
1632 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) 1634 (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable))
1633 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm"); 1635 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");
1634 1636
1635 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 1637 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
@@ -1807,9 +1809,10 @@ _elm_genlist_item_focus_update(Elm_Gen_Item *it)
1807{ 1809{
1808 const char *focus_raise; 1810 const char *focus_raise;
1809 Evas_Object *obj = WIDGET(it); 1811 Evas_Object *obj = WIDGET(it);
1812 Evas_Object *win = elm_widget_top_get(obj);
1810 ELM_GENLIST_DATA_GET(obj, sd); 1813 ELM_GENLIST_DATA_GET(obj, sd);
1811 1814
1812 if (elm_widget_focus_highlight_enabled_get(obj) 1815 if (elm_win_focus_highlight_enabled_get(win)
1813 || _elm_config->win_auto_focus_enable) 1816 || _elm_config->win_auto_focus_enable)
1814 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); 1817 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
1815 1818
@@ -2894,7 +2897,7 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it)
2894 _elm_genlist_item_focus_update(it); 2897 _elm_genlist_item_focus_update(it);
2895 efl_event_callback_legacy_call(obj, ELM_GENLIST_EVENT_ITEM_FOCUSED, eo_it); 2898 efl_event_callback_legacy_call(obj, ELM_GENLIST_EVENT_ITEM_FOCUSED, eo_it);
2896 if (_elm_config->atspi_mode) 2899 if (_elm_config->atspi_mode)
2897 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 2900 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
2898} 2901}
2899 2902
2900static void 2903static void
@@ -2904,6 +2907,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2904 2907
2905 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 2908 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
2906 Evas_Object *obj = WIDGET(it); 2909 Evas_Object *obj = WIDGET(it);
2910 Evas_Object *win = elm_widget_top_get(obj);
2907 ELM_GENLIST_DATA_GET(obj, sd); 2911 ELM_GENLIST_DATA_GET(obj, sd);
2908 2912
2909 if (_is_no_select(it)) 2913 if (_is_no_select(it))
@@ -2913,7 +2917,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2913 (eo_it != sd->focused_item)) 2917 (eo_it != sd->focused_item))
2914 return; 2918 return;
2915 2919
2916 if (elm_widget_focus_highlight_enabled_get(obj)) 2920 if (elm_win_focus_highlight_enabled_get(win))
2917 { 2921 {
2918 ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it); 2922 ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it);
2919 edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm"); 2923 edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm");
@@ -2922,7 +2926,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2922 sd->focused_item = NULL; 2926 sd->focused_item = NULL;
2923 efl_event_callback_legacy_call(obj, ELM_GENLIST_EVENT_ITEM_UNFOCUSED, eo_it); 2927 efl_event_callback_legacy_call(obj, ELM_GENLIST_EVENT_ITEM_UNFOCUSED, eo_it);
2924 if (_elm_config->atspi_mode) 2928 if (_elm_config->atspi_mode)
2925 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_FOCUSED, EINA_FALSE); 2929 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_FALSE);
2926} 2930}
2927 2931
2928static Eina_Bool 2932static Eina_Bool
@@ -3530,17 +3534,17 @@ _mirrored_set(Evas_Object *obj,
3530 efl_ui_mirrored_set(obj, rtl); 3534 efl_ui_mirrored_set(obj, rtl);
3531} 3535}
3532 3536
3533EOLIAN static Efl_Ui_Theme_Apply_Result 3537EOLIAN static Eina_Error
3534_elm_genlist_efl_ui_widget_theme_apply(Eo *obj, Elm_Genlist_Data *sd) 3538_elm_genlist_efl_ui_widget_theme_apply(Eo *obj, Elm_Genlist_Data *sd)
3535{ 3539{
3536 Item_Block *itb; 3540 Item_Block *itb;
3537 Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL; 3541 Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
3538 Eina_List *l; 3542 Eina_List *l;
3539 Elm_Gen_Item *it; 3543 Elm_Gen_Item *it;
3540 Evas *e; 3544 Evas *e;
3541 3545
3542 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); 3546 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
3543 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 3547 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
3544 3548
3545 e = evas_object_evas_get(obj); 3549 e = evas_object_evas_get(obj);
3546 evas_event_freeze(e); 3550 evas_event_freeze(e);
@@ -3930,7 +3934,7 @@ _item_unselect(Elm_Gen_Item *it)
3930 efl_event_callback_legacy_call 3934 efl_event_callback_legacy_call
3931 (WIDGET(it), EFL_UI_EVENT_UNSELECTED, EO_OBJ(it)); 3935 (WIDGET(it), EFL_UI_EVENT_UNSELECTED, EO_OBJ(it));
3932 if (_elm_config->atspi_mode) 3936 if (_elm_config->atspi_mode)
3933 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_SELECTED, EINA_FALSE); 3937 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE);
3934} 3938}
3935 3939
3936static void 3940static void
@@ -4151,7 +4155,7 @@ _long_press_cb(void *data)
4151 { 4155 {
4152 edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_ENABLED, "elm"); 4156 edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_ENABLED, "elm");
4153 if (_elm_config->atspi_mode) 4157 if (_elm_config->atspi_mode)
4154 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_ANIMATED, EINA_TRUE); 4158 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_ANIMATED, EINA_TRUE);
4155 } 4159 }
4156 } 4160 }
4157 4161
@@ -5131,7 +5135,7 @@ _item_mouse_up_cb(void *data,
5131 } 5135 }
5132 edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_DISABLED, "elm"); 5136 edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_DISABLED, "elm");
5133 if (_elm_config->atspi_mode) 5137 if (_elm_config->atspi_mode)
5134 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_ANIMATED, EINA_FALSE); 5138 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_ANIMATED, EINA_FALSE);
5135 sd->reorder_it = sd->reorder_rel = NULL; 5139 sd->reorder_it = sd->reorder_rel = NULL;
5136 elm_interface_scrollable_hold_set(sd->obj, EINA_FALSE); 5140 elm_interface_scrollable_hold_set(sd->obj, EINA_FALSE);
5137 elm_interface_scrollable_bounce_allow_set 5141 elm_interface_scrollable_bounce_allow_set
@@ -6114,7 +6118,7 @@ _item_select(Elm_Gen_Item *it)
6114 if ((it->base)->on_deletion) goto item_deleted; 6118 if ((it->base)->on_deletion) goto item_deleted;
6115 efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTED, eo_it); 6119 efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTED, eo_it);
6116 if (_elm_config->atspi_mode) 6120 if (_elm_config->atspi_mode)
6117 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_SELECTED, EINA_TRUE); 6121 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE);
6118 // delete item if it's requested deletion in the above callbacks. 6122 // delete item if it's requested deletion in the above callbacks.
6119 if ((it->base)->on_deletion) 6123 if ((it->base)->on_deletion)
6120 { 6124 {
@@ -7200,7 +7204,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
7200 (WIDGET(it), ELM_GENLIST_EVENT_EXPANDED, EO_OBJ(it)); 7204 (WIDGET(it), ELM_GENLIST_EVENT_EXPANDED, EO_OBJ(it));
7201 sd->auto_scroll_enabled = EINA_TRUE; 7205 sd->auto_scroll_enabled = EINA_TRUE;
7202 if (_elm_config->atspi_mode) 7206 if (_elm_config->atspi_mode)
7203 efl_access_state_changed_signal_emit(eo_item, EFL_ACCESS_STATE_EXPANDED, EINA_TRUE); 7207 efl_access_state_changed_signal_emit(eo_item, EFL_ACCESS_STATE_TYPE_EXPANDED, EINA_TRUE);
7204 } 7208 }
7205 else 7209 else
7206 { 7210 {
@@ -7210,7 +7214,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
7210 (WIDGET(it), ELM_GENLIST_EVENT_CONTRACTED, EO_OBJ(it)); 7214 (WIDGET(it), ELM_GENLIST_EVENT_CONTRACTED, EO_OBJ(it));
7211 sd->auto_scroll_enabled = EINA_FALSE; 7215 sd->auto_scroll_enabled = EINA_FALSE;
7212 if (_elm_config->atspi_mode) 7216 if (_elm_config->atspi_mode)
7213 efl_access_state_changed_signal_emit(eo_item, EFL_ACCESS_STATE_EXPANDED, EINA_FALSE); 7217 efl_access_state_changed_signal_emit(eo_item, EFL_ACCESS_STATE_TYPE_EXPANDED, EINA_FALSE);
7214 } 7218 }
7215} 7219}
7216 7220
@@ -7644,7 +7648,7 @@ _elm_genlist_item_elm_widget_item_tooltip_window_mode_set(Eo *eo_it, Elm_Gen_Ite
7644 return ret; 7648 return ret;
7645 } 7649 }
7646 7650
7647 return EINA_TRUE; 7651 return disable;
7648} 7652}
7649 7653
7650EAPI Eina_Bool 7654EAPI Eina_Bool
@@ -8528,16 +8532,16 @@ _elm_genlist_item_efl_access_object_state_set_get(const Eo *eo_it, Elm_Gen_Item
8528 8532
8529 sel = elm_obj_genlist_item_selected_get(eo_it); 8533 sel = elm_obj_genlist_item_selected_get(eo_it);
8530 8534
8531 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTABLE); 8535 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTABLE);
8532 8536
8533 if (sel) 8537 if (sel)
8534 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTED); 8538 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTED);
8535 8539
8536 if (elm_genlist_item_type_get(eo_it) == ELM_GENLIST_ITEM_TREE) 8540 if (elm_genlist_item_type_get(eo_it) == ELM_GENLIST_ITEM_TREE)
8537 { 8541 {
8538 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_EXPANDABLE); 8542 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_EXPANDABLE);
8539 if (elm_genlist_item_expanded_get(eo_it)) 8543 if (elm_genlist_item_expanded_get(eo_it))
8540 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_EXPANDED); 8544 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_EXPANDED);
8541 } 8545 }
8542 8546
8543 return ret; 8547 return ret;
@@ -8721,7 +8725,7 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
8721} 8725}
8722 8726
8723EOLIAN static Elm_Object_Item* 8727EOLIAN static Elm_Object_Item*
8724_elm_genlist_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd) 8728_elm_genlist_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
8725{ 8729{
8726 return sd->focused_item; 8730 return sd->focused_item;
8727} 8731}
@@ -8790,13 +8794,13 @@ _elm_genlist_efl_access_object_state_set_get(const Eo *obj, Elm_Genlist_Data *sd
8790 8794
8791 ret = efl_access_object_state_set_get(efl_super(obj, ELM_GENLIST_CLASS)); 8795 ret = efl_access_object_state_set_get(efl_super(obj, ELM_GENLIST_CLASS));
8792 8796
8793 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_MANAGES_DESCENDANTS); 8797 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_MANAGES_DESCENDANTS);
8794 8798
8795 if (elm_genlist_multi_select_get(obj)) 8799 if (elm_genlist_multi_select_get(obj))
8796 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_MULTISELECTABLE); 8800 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_MULTISELECTABLE);
8797 8801
8798 if (elm_genlist_reorder_mode_get(obj)) 8802 if (elm_genlist_reorder_mode_get(obj))
8799 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_ANIMATED); 8803 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_ANIMATED);
8800 8804
8801 return ret; 8805 return ret;
8802} 8806}
@@ -8950,6 +8954,6 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_genlist, Elm_Genlist_Data)
8950#define ELM_GENLIST_PAN_EXTRA_OPS \ 8954#define ELM_GENLIST_PAN_EXTRA_OPS \
8951 EFL_CANVAS_GROUP_DEL_OPS(elm_genlist_pan) 8955 EFL_CANVAS_GROUP_DEL_OPS(elm_genlist_pan)
8952 8956
8953#include "elm_genlist.eo.c" 8957#include "elm_genlist_eo.c"
8954#include "elm_genlist_pan.eo.c" 8958#include "elm_genlist_pan_eo.c"
8955#include "elm_genlist_item.eo.c" 8959#include "elm_genlist_item_eo.c"