summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-08-14 09:20:51 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-17 15:08:42 +0300
commita62119ca3ab9bec796220f3325ebfc5f527fe201 (patch)
treeb9f5acc4649624adfead00c4bbbf02cbf4ef400c
parent9cdb6987e3b260ed254e4056eec457271dc16c56 (diff)
Porting to Eo: Elm Genlist Item
-rw-r--r--src/lib/Makefile.am11
-rw-r--r--src/lib/elm_gen_common.h4
-rw-r--r--src/lib/elm_genlist.c1083
-rw-r--r--src/lib/elm_genlist_common.h401
-rw-r--r--src/lib/elm_genlist_item.eo509
-rw-r--r--src/lib/elm_widget_genlist.h26
6 files changed, 1198 insertions, 836 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index ce875ae60..d0ea5eea2 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -867,7 +867,9 @@ BUILT_SOURCES = \
867 elm_multibuttonentry_item.eo.c \ 867 elm_multibuttonentry_item.eo.c \
868 elm_multibuttonentry_item.eo.h \ 868 elm_multibuttonentry_item.eo.h \
869 elm_naviframe_item.eo.c \ 869 elm_naviframe_item.eo.c \
870 elm_naviframe_item.eo.h 870 elm_naviframe_item.eo.h \
871 elm_genlist_item.eo.c \
872 elm_genlist_item.eo.h
871 873
872elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ 874elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@
873elementaryeolianfiles_DATA = \ 875elementaryeolianfiles_DATA = \
@@ -973,7 +975,8 @@ elementaryeolianfiles_DATA = \
973 elm_ctxpopup_item.eo \ 975 elm_ctxpopup_item.eo \
974 elm_index_item.eo \ 976 elm_index_item.eo \
975 elm_multibuttonentry_item.eo \ 977 elm_multibuttonentry_item.eo \
976 elm_naviframe_item.eo 978 elm_naviframe_item.eo \
979 elm_genlist_item.eo
977 980
978EXTRA_DIST += ${elementaryeolianfiles_DATA} 981EXTRA_DIST += ${elementaryeolianfiles_DATA}
979 982
@@ -1079,6 +1082,7 @@ nodist_includesunstable_HEADERS = \
1079 elm_index_item.eo.h \ 1082 elm_index_item.eo.h \
1080 elm_multibuttonentry_item.eo.h \ 1083 elm_multibuttonentry_item.eo.h \
1081 elm_naviframe_item.eo.h \ 1084 elm_naviframe_item.eo.h \
1085 elm_genlist_item.eo.h \
1082 elm_ctxpopup_item.eo.h \ 1086 elm_ctxpopup_item.eo.h \
1083 elm_slideshow_item.eo.h \ 1087 elm_slideshow_item.eo.h \
1084 elm_layout.eo.legacy.h \ 1088 elm_layout.eo.legacy.h \
@@ -1155,7 +1159,8 @@ nodist_includesunstable_HEADERS = \
1155 elm_ctxpopup_item.eo.legacy.h \ 1159 elm_ctxpopup_item.eo.legacy.h \
1156 elm_index_item.eo.legacy.h \ 1160 elm_index_item.eo.legacy.h \
1157 elm_multibuttonentry_item.eo.legacy.h \ 1161 elm_multibuttonentry_item.eo.legacy.h \
1158 elm_naviframe_item.eo.legacy.h 1162 elm_naviframe_item.eo.legacy.h \
1163 elm_genlist_item.eo.legacy.h
1159 1164
1160if HAVE_CXX11 1165if HAVE_CXX11
1161 1166
diff --git a/src/lib/elm_gen_common.h b/src/lib/elm_gen_common.h
index 3df68a511..df637c411 100644
--- a/src/lib/elm_gen_common.h
+++ b/src/lib/elm_gen_common.h
@@ -25,7 +25,11 @@ struct Elm_Gen_Item_Tooltip
25 25
26struct Elm_Gen_Item 26struct Elm_Gen_Item
27{ 27{
28#ifndef OBJECT_ITEMS_MIGRATION
28 ELM_WIDGET_ITEM; 29 ELM_WIDGET_ITEM;
30#else
31 Elm_Widget_Item_Data *base;
32#endif
29 EINA_INLIST; 33 EINA_INLIST;
30 34
31 Elm_Gen_Item_Type *item; 35 Elm_Gen_Item_Type *item;
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index ce82804e8..158e9a606 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -4,6 +4,7 @@
4 4
5#include <fnmatch.h> 5#include <fnmatch.h>
6 6
7#define ELM_WIDGET_ITEM_PROTECTED
7#include <Elementary.h> 8#include <Elementary.h>
8#include <Elementary_Cursor.h> 9#include <Elementary_Cursor.h>
9 10
@@ -19,6 +20,8 @@
19#include "elm_interface_atspi_widget_action.h" 20#include "elm_interface_atspi_widget_action.h"
20#include "elm_interface_atspi_widget_action.eo.h" 21#include "elm_interface_atspi_widget_action.eo.h"
21 22
23#include "elm_genlist_item.eo.h"
24
22#define MY_PAN_CLASS ELM_GENLIST_PAN_CLASS 25#define MY_PAN_CLASS ELM_GENLIST_PAN_CLASS
23 26
24#define MY_PAN_CLASS_NAME "Elm_Genlist_Pan" 27#define MY_PAN_CLASS_NAME "Elm_Genlist_Pan"
@@ -285,7 +288,7 @@ _item_text_realize(Elm_Gen_Item *it,
285 continue; 288 continue;
286 289
287 char *s = it->itc->func.text_get 290 char *s = it->itc->func.text_get
288 ((void *)it->base.data, WIDGET(it), key); 291 ((void *)it->base->data, WIDGET(it), key);
289 292
290 if (s) 293 if (s)
291 { 294 {
@@ -326,14 +329,14 @@ _item_content_realize(Elm_Gen_Item *it,
326 329
327 if (it->itc->func.content_get) 330 if (it->itc->func.content_get)
328 ic = it->itc->func.content_get 331 ic = it->itc->func.content_get
329 ((void *)it->base.data, WIDGET(it), key); 332 ((void *)it->base->data, WIDGET(it), key);
330 if (ic) 333 if (ic)
331 { 334 {
332 res = eina_list_append(res, ic); 335 res = eina_list_append(res, ic);
333 edje_object_part_swallow(target, key, ic); 336 edje_object_part_swallow(target, key, ic);
334 evas_object_show(ic); 337 evas_object_show(ic);
335 elm_widget_sub_object_add(WIDGET(it), ic); 338 elm_widget_sub_object_add(WIDGET(it), ic);
336 if (elm_widget_item_disabled_get(it)) 339 if (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
337 elm_widget_disabled_set(ic, EINA_TRUE); 340 elm_widget_disabled_set(ic, EINA_TRUE);
338 } 341 }
339 } 342 }
@@ -363,7 +366,7 @@ _item_state_realize(Elm_Gen_Item *it,
363 continue; 366 continue;
364 367
365 Eina_Bool on = it->itc->func.state_get 368 Eina_Bool on = it->itc->func.state_get
366 ((void *)it->base.data, WIDGET(it), key); 369 ((void *)it->base->data, WIDGET(it), key);
367 370
368 if (on) 371 if (on)
369 { 372 {
@@ -551,14 +554,14 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it,
551 554
552 evas_event_freeze(evas_object_evas_get(WIDGET(it))); 555 evas_event_freeze(evas_object_evas_get(WIDGET(it)));
553 if (!calc) 556 if (!calc)
554 evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it); 557 evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, EO_OBJ(it));
555 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 558 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
556 559
557 _view_clear(VIEW(it), &(it->texts), &(it->contents), &(it->states), &(it->content_objs)); 560 _view_clear(VIEW(it), &(it->texts), &(it->contents), &(it->states), &(it->content_objs));
558 561
559 ELM_SAFE_FREE(it->item_focus_chain, eina_list_free); 562 ELM_SAFE_FREE(it->item_focus_chain, eina_list_free);
560 563
561 elm_widget_item_track_cancel(it); 564 eo_do((Eo *)EO_OBJ(it), elm_wdg_item_track_cancel());
562 565
563 it->unrealize_cb(it); 566 it->unrealize_cb(it);
564 567
@@ -886,16 +889,17 @@ static void
886_item_tree_effect(Elm_Genlist_Data *sd, 889_item_tree_effect(Elm_Genlist_Data *sd,
887 int y) 890 int y)
888{ 891{
889 Elm_Gen_Item *it = NULL, *expanded_next_it; 892 Elm_Gen_Item *expanded_next_it;
893 Elm_Object_Item *eo_it;
890 894
891 expanded_next_it = sd->expanded_next_item; 895 expanded_next_it = sd->expanded_next_item;
892 896
893 if (sd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_EXPAND) 897 if (sd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_EXPAND)
894 { 898 {
895 it = (Elm_Gen_Item *)elm_genlist_item_prev_get 899 eo_it = elm_genlist_item_prev_get(EO_OBJ(expanded_next_it));
896 ((Elm_Object_Item *)expanded_next_it); 900 while (eo_it)
897 while (it)
898 { 901 {
902 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
899 if (it->item->expanded_depth <= 903 if (it->item->expanded_depth <=
900 expanded_next_it->item->expanded_depth) break; 904 expanded_next_it->item->expanded_depth) break;
901 if (it->item->scrl_y && 905 if (it->item->scrl_y &&
@@ -912,16 +916,15 @@ _item_tree_effect(Elm_Genlist_Data *sd,
912 it->item->tree_effect_finished = EINA_TRUE; 916 it->item->tree_effect_finished = EINA_TRUE;
913 } 917 }
914 } 918 }
915 it = (Elm_Gen_Item *)elm_genlist_item_prev_get 919 eo_it = elm_genlist_item_prev_get(eo_it);
916 ((Elm_Object_Item *)it);
917 } 920 }
918 } 921 }
919 else if (sd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_CONTRACT) 922 else if (sd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_CONTRACT)
920 { 923 {
921 it = (Elm_Gen_Item *)elm_genlist_item_prev_get 924 eo_it = elm_genlist_item_prev_get(EO_OBJ(expanded_next_it));
922 ((Elm_Object_Item *)expanded_next_it); 925 while (eo_it)
923 while (it)
924 { 926 {
927 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
925 if ((it->item->scrl_y > expanded_next_it->item->old_scrl_y + y) && 928 if ((it->item->scrl_y > expanded_next_it->item->old_scrl_y + y) &&
926 (it->item->expanded_depth > 929 (it->item->expanded_depth >
927 expanded_next_it->item->expanded_depth)) 930 expanded_next_it->item->expanded_depth))
@@ -935,8 +938,7 @@ _item_tree_effect(Elm_Genlist_Data *sd,
935 } 938 }
936 else 939 else
937 break; 940 break;
938 it = (Elm_Gen_Item *)elm_genlist_item_prev_get 941 eo_it = elm_genlist_item_prev_get(eo_it);
939 ((Elm_Object_Item *)it);
940 } 942 }
941 } 943 }
942} 944}
@@ -945,14 +947,14 @@ static void
945_item_sub_items_clear(Elm_Gen_Item *it) 947_item_sub_items_clear(Elm_Gen_Item *it)
946{ 948{
947 Eina_List *tl = NULL, *l; 949 Eina_List *tl = NULL, *l;
948 Elm_Object_Item *it2; 950 Elm_Gen_Item *it2;
949 951
950 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 952 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
951 953
952 EINA_LIST_FOREACH(it->item->items, l, it2) 954 EINA_LIST_FOREACH(it->item->items, l, it2)
953 tl = eina_list_append(tl, it2); 955 tl = eina_list_append(tl, it2);
954 EINA_LIST_FREE(tl, it2) 956 EINA_LIST_FREE(tl, it2)
955 elm_widget_item_del(it2); 957 eo_do((Eo *)EO_OBJ(it2), elm_wdg_item_del());
956} 958}
957 959
958static void 960static void
@@ -1154,9 +1156,9 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it,
1154 (it->deco_all_view, "elm,state,selected", "elm"); 1156 (it->deco_all_view, "elm,state,selected", "elm");
1155 } 1157 }
1156 } 1158 }
1157 if (elm_widget_item_disabled_get(it) != itc->disabled) 1159 if (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()) != itc->disabled)
1158 { 1160 {
1159 if (elm_widget_item_disabled_get(it)) 1161 if (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
1160 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm"); 1162 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
1161 if (it->deco_all_view) 1163 if (it->deco_all_view)
1162 edje_object_signal_emit 1164 edje_object_signal_emit
@@ -1180,7 +1182,7 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it,
1180 edje_object_signal_emit 1182 edje_object_signal_emit
1181 (it->deco_all_view, "elm,state,selected", "elm"); 1183 (it->deco_all_view, "elm,state,selected", "elm");
1182 } 1184 }
1183 if (elm_widget_item_disabled_get(it)) 1185 if (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
1184 { 1186 {
1185 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm"); 1187 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
1186 if (it->deco_all_view) 1188 if (it->deco_all_view)
@@ -1202,7 +1204,7 @@ _elm_genlist_item_index_update(Elm_Gen_Item *it)
1202{ 1204{
1203 if (it->position_update || it->item->block->position_update) 1205 if (it->position_update || it->item->block->position_update)
1204 { 1206 {
1205 evas_object_smart_callback_call(WIDGET(it), SIG_INDEX_UPDATE, it); 1207 evas_object_smart_callback_call(WIDGET(it), SIG_INDEX_UPDATE, EO_OBJ(it));
1206 it->position_update = EINA_FALSE; 1208 it->position_update = EINA_FALSE;
1207 } 1209 }
1208} 1210}
@@ -1310,9 +1312,9 @@ _expand_toggle_signal_cb(void *data,
1310 Elm_Gen_Item *it = data; 1312 Elm_Gen_Item *it = data;
1311 1313
1312 if (it->item->expanded) 1314 if (it->item->expanded)
1313 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it); 1315 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, EO_OBJ(it));
1314 else 1316 else
1315 evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it); 1317 evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, EO_OBJ(it));
1316} 1318}
1317 1319
1318static void 1320static void
@@ -1324,7 +1326,7 @@ _expand_signal_cb(void *data,
1324 Elm_Gen_Item *it = data; 1326 Elm_Gen_Item *it = data;
1325 1327
1326 if (!it->item->expanded) 1328 if (!it->item->expanded)
1327 evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it); 1329 evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, EO_OBJ(it));
1328} 1330}
1329 1331
1330static void 1332static void
@@ -1336,7 +1338,7 @@ _contract_signal_cb(void *data,
1336 Elm_Gen_Item *it = data; 1338 Elm_Gen_Item *it = data;
1337 1339
1338 if (it->item->expanded) 1340 if (it->item->expanded)
1339 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it); 1341 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, EO_OBJ(it));
1340} 1342}
1341 1343
1342//-- item cache handle routine --// 1344//-- item cache handle routine --//
@@ -1425,7 +1427,7 @@ _item_cache_add(Elm_Gen_Item *it)
1425 itc->item_style = eina_stringshare_add(it->itc->item_style); 1427 itc->item_style = eina_stringshare_add(it->itc->item_style);
1426 if (it->item->type & ELM_GENLIST_ITEM_TREE) itc->tree = 1; 1428 if (it->item->type & ELM_GENLIST_ITEM_TREE) itc->tree = 1;
1427 itc->selected = it->selected; 1429 itc->selected = it->selected;
1428 itc->disabled = elm_widget_item_disabled_get(it); 1430 itc->disabled = eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get());
1429 itc->expanded = it->item->expanded; 1431 itc->expanded = it->item->expanded;
1430 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 1432 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
1431 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); 1433 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del);
@@ -1497,7 +1499,7 @@ _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
1497 EINA_LIST_FOREACH(it->texts, l, key) 1499 EINA_LIST_FOREACH(it->texts, l, key)
1498 { 1500 {
1499 char *s = it->itc->func.text_get 1501 char *s = it->itc->func.text_get
1500 ((void *)it->base.data, WIDGET(it), key); 1502 ((void *)it->base->data, WIDGET(it), key);
1501 1503
1502 if (s) 1504 if (s)
1503 { 1505 {
@@ -1519,7 +1521,7 @@ _access_state_cb(void *data, Evas_Object *obj EINA_UNUSED)
1519 Elm_Gen_Item *it = (Elm_Gen_Item *)data; 1521 Elm_Gen_Item *it = (Elm_Gen_Item *)data;
1520 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL); 1522 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
1521 1523
1522 if (it->base.disabled) 1524 if (it->base->disabled)
1523 return strdup(E_("State: Disabled")); 1525 return strdup(E_("State: Disabled"));
1524 1526
1525 return NULL; 1527 return NULL;
@@ -1533,13 +1535,13 @@ _access_on_highlight_cb(void *data)
1533 Elm_Gen_Item *it = (Elm_Gen_Item *)data; 1535 Elm_Gen_Item *it = (Elm_Gen_Item *)data;
1534 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 1536 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
1535 1537
1536 evas_object_geometry_get(it->base.view, &x, &y, &w, &h); 1538 evas_object_geometry_get(it->base->view, &x, &y, &w, &h);
1537 // XXX There would be a reason. 1539 // XXX There would be a reason.
1538 if ((w == 0) && (h == 0)) return; 1540 if ((w == 0) && (h == 0)) return;
1539 1541
1540 evas_object_geometry_get(it->base.widget, &sx, &sy, &sw, &sh); 1542 evas_object_geometry_get(it->base->widget, &sx, &sy, &sw, &sh);
1541 if ((x < sx) || (y < sy) || ((x + w) > (sx + sw)) || ((y + h) > (sy + sh))) 1543 if ((x < sx) || (y < sy) || ((x + w) > (sx + sw)) || ((y + h) > (sy + sh)))
1542 elm_genlist_item_bring_in((Elm_Object_Item *)it, 1544 elm_genlist_item_bring_in(EO_OBJ(it),
1543 ELM_GENLIST_ITEM_SCROLLTO_IN); 1545 ELM_GENLIST_ITEM_SCROLLTO_IN);
1544} 1546}
1545 1547
@@ -1550,12 +1552,12 @@ _access_widget_item_register(Elm_Gen_Item *it)
1550 1552
1551 _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); 1553 _elm_access_widget_item_register((Elm_Widget_Item_Data *)it);
1552 1554
1553 ai = _elm_access_info_get(it->base.access_obj); 1555 ai = _elm_access_info_get(it->base->access_obj);
1554 1556
1555 _elm_access_callback_set(ai, ELM_ACCESS_INFO, _access_info_cb, it); 1557 _elm_access_callback_set(ai, ELM_ACCESS_INFO, _access_info_cb, it);
1556 _elm_access_callback_set(ai, ELM_ACCESS_STATE, _access_state_cb, it); 1558 _elm_access_callback_set(ai, ELM_ACCESS_STATE, _access_state_cb, it);
1557 _elm_access_on_highlight_hook_set(ai, _access_on_highlight_cb, it); 1559 _elm_access_on_highlight_hook_set(ai, _access_on_highlight_cb, it);
1558 _elm_access_activate_callback_set(ai, _access_activate_cb, it); 1560 _elm_access_activate_callback_set(ai, _access_activate_cb, EO_OBJ(it));
1559} 1561}
1560 1562
1561static void 1563static void
@@ -1731,14 +1733,16 @@ _item_realize(Elm_Gen_Item *it,
1731 1733
1732 if (it->tooltip.content_cb) 1734 if (it->tooltip.content_cb)
1733 { 1735 {
1734 elm_widget_item_tooltip_content_cb_set 1736 eo_do((Eo *)EO_OBJ(it),
1735 (it, it->tooltip.content_cb, it->tooltip.data, NULL); 1737 elm_wdg_item_tooltip_content_cb_set(
1736 elm_widget_item_tooltip_style_set(it, it->tooltip.style); 1738 it->tooltip.content_cb, it->tooltip.data, NULL),
1737 elm_widget_item_tooltip_window_mode_set(it, it->tooltip.free_size); 1739 elm_wdg_item_tooltip_style_set(it->tooltip.style),
1740 elm_wdg_item_tooltip_window_mode_set(it->tooltip.free_size));
1738 } 1741 }
1739 1742
1740 if (it->mouse_cursor) 1743 if (it->mouse_cursor)
1741 elm_widget_item_cursor_set(it, it->mouse_cursor); 1744 eo_do((Eo *)EO_OBJ(it),
1745 elm_wdg_item_cursor_set(it->mouse_cursor));
1742 1746
1743 it->realized = EINA_TRUE; 1747 it->realized = EINA_TRUE;
1744 it->want_unrealize = EINA_FALSE; 1748 it->want_unrealize = EINA_FALSE;
@@ -1779,7 +1783,7 @@ _item_realize(Elm_Gen_Item *it,
1779 1783
1780 } 1784 }
1781 1785
1782 evas_object_smart_callback_call(WIDGET(it), SIG_REALIZED, it); 1786 evas_object_smart_callback_call(WIDGET(it), SIG_REALIZED, EO_OBJ(it));
1783 } 1787 }
1784 1788
1785 if ((!calc) && (sd->decorate_all_mode) && 1789 if ((!calc) && (sd->decorate_all_mode) &&
@@ -1809,6 +1813,7 @@ _tree_effect_animator_cb(void *data)
1809 Eina_Bool end = EINA_FALSE, vis = EINA_TRUE; 1813 Eina_Bool end = EINA_FALSE, vis = EINA_TRUE;
1810 Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh; 1814 Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
1811 Elm_Gen_Item *it = NULL, *it2, *expanded_next_it; 1815 Elm_Gen_Item *it = NULL, *it2, *expanded_next_it;
1816 Elm_Object_Item *eo_it, *eo_it2;
1812 1817
1813 t = ((0.0 > (t = ecore_time_get() - sd->start_time)) ? 0.0 : t); 1818 t = ((0.0 > (t = ecore_time_get() - sd->start_time)) ? 0.0 : t);
1814 evas_object_geometry_get(sd->pan_obj, &ox, &oy, &ow, &oh); 1819 evas_object_geometry_get(sd->pan_obj, &ox, &oy, &ow, &oh);
@@ -1818,14 +1823,15 @@ _tree_effect_animator_cb(void *data)
1818 1823
1819 // Below while statement is needed, when the genlist is resized. 1824 // Below while statement is needed, when the genlist is resized.
1820 it2 = sd->expanded_item; 1825 it2 = sd->expanded_item;
1821 while (it2 && vis) 1826 eo_it2 = EO_OBJ(it2);
1827 while (eo_it2 && vis)
1822 { 1828 {
1829 it2 = eo_data_scope_get((Eo *)eo_it2, ELM_GENLIST_ITEM_CLASS);
1823 evas_object_move(VIEW(it2), it2->item->scrl_x, it2->item->scrl_y); 1830 evas_object_move(VIEW(it2), it2->item->scrl_x, it2->item->scrl_y);
1824 vis = (ELM_RECTS_INTERSECT(it2->item->scrl_x, it2->item->scrl_y, 1831 vis = (ELM_RECTS_INTERSECT(it2->item->scrl_x, it2->item->scrl_y,
1825 it2->item->w, it2->item->h, cvx, cvy, cvw, 1832 it2->item->w, it2->item->h, cvx, cvy, cvw,
1826 cvh)); 1833 cvh));
1827 it2 = 1834 eo_it2 = elm_genlist_item_prev_get(eo_it2);
1828 (Elm_Gen_Item *)elm_genlist_item_prev_get((Elm_Object_Item *)it2);
1829 } 1835 }
1830 1836
1831 if (sd->expanded_next_item) 1837 if (sd->expanded_next_item)
@@ -1911,19 +1917,18 @@ _tree_effect_animator_cb(void *data)
1911 int num = 0; 1917 int num = 0;
1912 1918
1913 if (sd->expanded_item) 1919 if (sd->expanded_item)
1914 it = (Elm_Gen_Item *)elm_genlist_item_next_get 1920 eo_it = elm_genlist_item_next_get(EO_OBJ(sd->expanded_item));
1915 ((Elm_Object_Item *)sd->expanded_item);
1916 1921
1917 it2 = it; 1922 eo_it2 = eo_it;
1918 while (it2) 1923 while (eo_it2)
1919 { 1924 {
1920 expanded_item_num++; 1925 expanded_item_num++;
1921 it2 = (Elm_Gen_Item *)elm_genlist_item_next_get 1926 eo_it2 = elm_genlist_item_next_get(eo_it2);
1922 ((Elm_Object_Item *)it2);
1923 } 1927 }
1924 1928
1925 while (it) 1929 while (eo_it)
1926 { 1930 {
1931 it = eo_data_scope_get((Eo *)eo_it, ELM_GENLIST_ITEM_CLASS);
1927 num++; 1932 num++;
1928 if (sd->expanded_item->item->expanded_depth >= 1933 if (sd->expanded_item->item->expanded_depth >=
1929 it->item->expanded_depth) break; 1934 it->item->expanded_depth) break;
@@ -1942,8 +1947,7 @@ _tree_effect_animator_cb(void *data)
1942 } 1947 }
1943 } 1948 }
1944 } 1949 }
1945 it = (Elm_Gen_Item *)elm_genlist_item_next_get 1950 eo_it = elm_genlist_item_next_get(eo_it);
1946 ((Elm_Object_Item *)it);
1947 } 1951 }
1948 } 1952 }
1949 1953
@@ -2320,30 +2324,31 @@ _elm_genlist_pan_class_constructor(Eo_Class *klass)
2320static Eina_Bool 2324static Eina_Bool
2321_item_multi_select_up(Elm_Genlist_Data *sd) 2325_item_multi_select_up(Elm_Genlist_Data *sd)
2322{ 2326{
2323 Elm_Object_Item *prev; 2327 Elm_Object_Item *eo_prev;
2324 2328
2325 if (!sd->selected) return EINA_FALSE; 2329 if (!sd->selected) return EINA_FALSE;
2326 if (!sd->multi) return EINA_FALSE; 2330 if (!sd->multi) return EINA_FALSE;
2327 2331
2328 prev = elm_genlist_item_prev_get(sd->last_selected_item); 2332 eo_prev = elm_genlist_item_prev_get(EO_OBJ(sd->last_selected_item));
2329 while (prev) 2333 while (eo_prev)
2330 { 2334 {
2331 if ((((Elm_Gen_Item*)prev)->generation == sd->generation) && 2335 ELM_GENLIST_ITEM_DATA_GET(eo_prev, prev);
2332 (!elm_object_item_disabled_get(prev))) 2336 if ((prev->generation == sd->generation) &&
2337 (!elm_object_item_disabled_get(eo_prev)))
2333 break; 2338 break;
2334 prev = (Elm_Object_Item *)ELM_GEN_ITEM_FROM_INLIST( 2339 eo_prev = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev));
2335 EINA_INLIST_GET((Elm_Gen_Item *)prev)->prev);
2336 } 2340 }
2337 if (!prev) return EINA_TRUE; 2341 if (!eo_prev) return EINA_TRUE;
2338 2342
2339 if (elm_genlist_item_selected_get(prev)) 2343 if (elm_genlist_item_selected_get(eo_prev))
2340 { 2344 {
2341 elm_genlist_item_selected_set(sd->last_selected_item, EINA_FALSE); 2345 ELM_GENLIST_ITEM_DATA_GET(eo_prev, prev);
2346 elm_genlist_item_selected_set(EO_OBJ(sd->last_selected_item), EINA_FALSE);
2342 sd->last_selected_item = prev; 2347 sd->last_selected_item = prev;
2343 } 2348 }
2344 else 2349 else
2345 { 2350 {
2346 elm_genlist_item_selected_set(prev, EINA_TRUE); 2351 elm_genlist_item_selected_set(eo_prev, EINA_TRUE);
2347 } 2352 }
2348 return EINA_TRUE; 2353 return EINA_TRUE;
2349} 2354}
@@ -2351,30 +2356,31 @@ _item_multi_select_up(Elm_Genlist_Data *sd)
2351static Eina_Bool 2356static Eina_Bool
2352_item_multi_select_down(Elm_Genlist_Data *sd) 2357_item_multi_select_down(Elm_Genlist_Data *sd)
2353{ 2358{
2354 Elm_Object_Item *next; 2359 Elm_Object_Item *eo_next;
2355 2360
2356 if (!sd->selected) return EINA_FALSE; 2361 if (!sd->selected) return EINA_FALSE;
2357 if (!sd->multi) return EINA_FALSE; 2362 if (!sd->multi) return EINA_FALSE;
2358 2363
2359 next = elm_genlist_item_next_get(sd->last_selected_item); 2364 eo_next = elm_genlist_item_next_get(EO_OBJ(sd->last_selected_item));
2360 while ((next)) 2365 while ((eo_next))
2361 { 2366 {
2362 if ((((Elm_Gen_Item *)next)->generation == sd->generation) && 2367 ELM_GENLIST_ITEM_DATA_GET(eo_next, next);
2363 (!elm_object_item_disabled_get(next))) 2368 if ((next->generation == sd->generation) &&
2369 (!elm_object_item_disabled_get(eo_next)))
2364 break; 2370 break;
2365 next = (Elm_Object_Item *)ELM_GEN_ITEM_FROM_INLIST( 2371 eo_next = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next));
2366 EINA_INLIST_GET((Elm_Gen_Item *)next)->next);
2367 } 2372 }
2368 if (!next) return EINA_TRUE; 2373 if (!eo_next) return EINA_TRUE;
2369 2374
2370 if (elm_genlist_item_selected_get(next)) 2375 if (elm_genlist_item_selected_get(eo_next))
2371 { 2376 {
2372 elm_genlist_item_selected_set(sd->last_selected_item, EINA_FALSE); 2377 ELM_GENLIST_ITEM_DATA_GET(eo_next, next);
2378 elm_genlist_item_selected_set(EO_OBJ(sd->last_selected_item), EINA_FALSE);
2373 sd->last_selected_item = next; 2379 sd->last_selected_item = next;
2374 } 2380 }
2375 else 2381 else
2376 { 2382 {
2377 elm_genlist_item_selected_set(next, EINA_TRUE); 2383 elm_genlist_item_selected_set(eo_next, EINA_TRUE);
2378 } 2384 }
2379 2385
2380 return EINA_TRUE; 2386 return EINA_TRUE;
@@ -2405,13 +2411,16 @@ _item_single_select_up(Elm_Genlist_Data *sd)
2405 if (!sd->selected) 2411 if (!sd->selected)
2406 prev = ELM_GEN_ITEM_FROM_INLIST(sd->items->last); 2412 prev = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
2407 else 2413 else
2408 prev = (Elm_Gen_Item *)elm_genlist_item_prev_get 2414 {
2409 (sd->last_selected_item); 2415 Elm_Object_Item *eo_prev = elm_genlist_item_prev_get
2416 (EO_OBJ(sd->last_selected_item));
2417 prev = eo_data_scope_get((Eo *)eo_prev, ELM_GENLIST_ITEM_CLASS);
2418 }
2410 2419
2411 while (prev) 2420 while (prev)
2412 { 2421 {
2413 if ((prev->generation == sd->generation) && 2422 if ((prev->generation == sd->generation) &&
2414 (!elm_object_item_disabled_get((Elm_Object_Item *)prev))) 2423 (!elm_object_item_disabled_get(EO_OBJ(prev))))
2415 break; 2424 break;
2416 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); 2425 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
2417 } 2426 }
@@ -2420,7 +2429,7 @@ _item_single_select_up(Elm_Genlist_Data *sd)
2420 2429
2421 _all_items_deselect(sd); 2430 _all_items_deselect(sd);
2422 2431
2423 elm_genlist_item_selected_set((Elm_Object_Item *)prev, EINA_TRUE); 2432 elm_genlist_item_selected_set(EO_OBJ(prev), EINA_TRUE);
2424 return EINA_TRUE; 2433 return EINA_TRUE;
2425} 2434}
2426 2435
@@ -2428,19 +2437,20 @@ static Eina_Bool
2428_item_single_select_down(Elm_Genlist_Data *sd) 2437_item_single_select_down(Elm_Genlist_Data *sd)
2429{ 2438{
2430 Elm_Gen_Item *next = NULL; 2439 Elm_Gen_Item *next = NULL;
2440 Elm_Object_Item *eo_next = NULL;
2431 2441
2432 if (!sd->selected) 2442 if (!sd->selected)
2433 next = ELM_GEN_ITEM_FROM_INLIST(sd->items); 2443 next = ELM_GEN_ITEM_FROM_INLIST(sd->items);
2434 else 2444 else
2435 { 2445 {
2436 next = (Elm_Gen_Item *)elm_genlist_item_next_get 2446 eo_next = elm_genlist_item_next_get(EO_OBJ(sd->last_selected_item));
2437 (sd->last_selected_item); 2447 next = eo_data_scope_get((Eo *)eo_next, ELM_GENLIST_ITEM_CLASS);
2438 } 2448 }
2439 2449
2440 while ((next)) 2450 while ((next))
2441 { 2451 {
2442 if ((next->generation == sd->generation) && 2452 if ((next->generation == sd->generation) &&
2443 (!elm_object_item_disabled_get((Elm_Object_Item *)next))) 2453 (!elm_object_item_disabled_get(EO_OBJ(next))))
2444 break; 2454 break;
2445 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); 2455 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
2446 } 2456 }
@@ -2449,7 +2459,7 @@ _item_single_select_down(Elm_Genlist_Data *sd)
2449 2459
2450 _all_items_deselect(sd); 2460 _all_items_deselect(sd);
2451 2461
2452 elm_genlist_item_selected_set((Elm_Object_Item *)next, EINA_TRUE); 2462 elm_genlist_item_selected_set(EO_OBJ(next), EINA_TRUE);
2453 2463
2454 return EINA_TRUE; 2464 return EINA_TRUE;
2455} 2465}
@@ -2465,25 +2475,25 @@ _elm_genlist_item_focused(Elm_Gen_Item *it)
2465 return; 2475 return;
2466 2476
2467 if (_is_no_select(it) || 2477 if (_is_no_select(it) ||
2468 (it == (Elm_Gen_Item *)sd->focused_item) || 2478 (it == sd->focused_item) ||
2469 (elm_widget_item_disabled_get(it))) 2479 (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get())))
2470 return; 2480 return;
2471 2481
2472 switch (_elm_config->focus_autoscroll_mode) 2482 switch (_elm_config->focus_autoscroll_mode)
2473 { 2483 {
2474 case ELM_FOCUS_AUTOSCROLL_MODE_SHOW: 2484 case ELM_FOCUS_AUTOSCROLL_MODE_SHOW:
2475 elm_genlist_item_show((Elm_Object_Item *)it, 2485 elm_genlist_item_show(EO_OBJ(it),
2476 ELM_GENLIST_ITEM_SCROLLTO_IN); 2486 ELM_GENLIST_ITEM_SCROLLTO_IN);
2477 break; 2487 break;
2478 case ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN: 2488 case ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN:
2479 elm_genlist_item_bring_in((Elm_Object_Item *)it, 2489 elm_genlist_item_bring_in(EO_OBJ(it),
2480 ELM_GENLIST_ITEM_SCROLLTO_IN); 2490 ELM_GENLIST_ITEM_SCROLLTO_IN);
2481 break; 2491 break;
2482 default: 2492 default:
2483 break; 2493 break;
2484 } 2494 }
2485 2495
2486 sd->focused_item = (Elm_Object_Item *)it; 2496 sd->focused_item = it;
2487 2497
2488 if (elm_widget_focus_highlight_enabled_get(obj)) 2498 if (elm_widget_focus_highlight_enabled_get(obj))
2489 { 2499 {
@@ -2494,7 +2504,7 @@ _elm_genlist_item_focused(Elm_Gen_Item *it)
2494 focus_raise = edje_object_data_get(VIEW(it), "focusraise"); 2504 focus_raise = edje_object_data_get(VIEW(it), "focusraise");
2495 if ((focus_raise) && (!strcmp(focus_raise, "on"))) 2505 if ((focus_raise) && (!strcmp(focus_raise, "on")))
2496 evas_object_raise(VIEW(it)); 2506 evas_object_raise(VIEW(it));
2497 evas_object_smart_callback_call(obj, SIG_ITEM_FOCUSED, it); 2507 evas_object_smart_callback_call(obj, SIG_ITEM_FOCUSED, EO_OBJ(it));
2498} 2508}
2499 2509
2500static void 2510static void
@@ -2510,7 +2520,7 @@ _elm_genlist_item_unfocused(Elm_Gen_Item *it)
2510 return; 2520 return;
2511 2521
2512 if ((!sd->focused_item) || 2522 if ((!sd->focused_item) ||
2513 (it != (Elm_Gen_Item *)sd->focused_item)) 2523 (it != sd->focused_item))
2514 return; 2524 return;
2515 2525
2516 if (elm_widget_focus_highlight_enabled_get(obj)) 2526 if (elm_widget_focus_highlight_enabled_get(obj))
@@ -2518,7 +2528,7 @@ _elm_genlist_item_unfocused(Elm_Gen_Item *it)
2518 (VIEW(sd->focused_item), "elm,state,unfocused", "elm"); 2528 (VIEW(sd->focused_item), "elm,state,unfocused", "elm");
2519 2529
2520 sd->focused_item = NULL; 2530 sd->focused_item = NULL;
2521 evas_object_smart_callback_call(obj, SIG_ITEM_UNFOCUSED, it); 2531 evas_object_smart_callback_call(obj, SIG_ITEM_UNFOCUSED, EO_OBJ(it));
2522} 2532}
2523 2533
2524static Eina_Bool 2534static Eina_Bool
@@ -2526,8 +2536,9 @@ _item_focused_next(Evas_Object *obj, Elm_Focus_Direction dir)
2526{ 2536{
2527 ELM_GENLIST_DATA_GET(obj, sd); 2537 ELM_GENLIST_DATA_GET(obj, sd);
2528 Elm_Gen_Item *next; 2538 Elm_Gen_Item *next;
2529 Elm_Object_Item *first_item; 2539 Elm_Object_Item *eo_next;
2530 Elm_Object_Item *last_item; 2540 Elm_Object_Item *eo_first_item;
2541 Elm_Object_Item *eo_last_item;
2531 2542
2532 if (!sd->focused_item) 2543 if (!sd->focused_item)
2533 { 2544 {
@@ -2540,28 +2551,36 @@ _item_focused_next(Evas_Object *obj, Elm_Focus_Direction dir)
2540 2551
2541 while ((next) && 2552 while ((next) &&
2542 (next->generation < sd->generation) && 2553 (next->generation < sd->generation) &&
2543 (!elm_widget_item_disabled_get(next))) 2554 (!eo_do((Eo *)EO_OBJ(next), elm_wdg_item_disabled_get())))
2544 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); 2555 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
2545 } 2556 }
2546 else 2557 else
2547 { 2558 {
2548 if (dir == ELM_FOCUS_UP) 2559 if (dir == ELM_FOCUS_UP)
2549 { 2560 {
2550 first_item = elm_genlist_first_item_get(WIDGET(sd->focused_item)); 2561 eo_first_item = elm_genlist_first_item_get(WIDGET(sd->focused_item));
2551 if (first_item == sd->focused_item) return EINA_FALSE; 2562 if (eo_first_item == EO_OBJ(sd->focused_item)) return EINA_FALSE;
2552 next = (Elm_Gen_Item *)elm_genlist_item_prev_get(sd->focused_item); 2563 eo_next = elm_genlist_item_prev_get(EO_OBJ(sd->focused_item));
2564 next = eo_data_scope_get((Eo *)eo_next, ELM_GENLIST_ITEM_CLASS);
2553 2565
2554 while (elm_widget_item_disabled_get(next)) 2566 while (eo_do((Eo *)eo_next, elm_wdg_item_disabled_get()))
2555 next = (Elm_Gen_Item *)elm_genlist_item_prev_get((Elm_Object_Item *)next); 2567 {
2568 eo_next = elm_genlist_item_prev_get(eo_next);
2569 next = eo_data_scope_get((Eo *)eo_next, ELM_GENLIST_ITEM_CLASS);
2570 }
2556 } 2571 }
2557 else if (dir == ELM_FOCUS_DOWN) 2572 else if (dir == ELM_FOCUS_DOWN)
2558 { 2573 {
2559 last_item = elm_genlist_last_item_get(WIDGET(sd->focused_item)); 2574 eo_last_item = elm_genlist_last_item_get(WIDGET(sd->focused_item));
2560 if (last_item == sd->focused_item) return EINA_FALSE; 2575 if (eo_last_item == EO_OBJ(sd->focused_item)) return EINA_FALSE;
2561 next = (Elm_Gen_Item *)elm_genlist_item_next_get(sd->focused_item); 2576 eo_next = elm_genlist_item_next_get(EO_OBJ(sd->focused_item));
2577 next = eo_data_scope_get((Eo *)eo_next, ELM_GENLIST_ITEM_CLASS);
2562 2578
2563 while (elm_widget_item_disabled_get(next)) 2579 while (eo_do((Eo *)eo_next, elm_wdg_item_disabled_get()))
2564 next = (Elm_Gen_Item *)elm_genlist_item_next_get((Elm_Object_Item *)next); 2580 {
2581 eo_next = elm_genlist_item_next_get(eo_next);
2582 next = eo_data_scope_get((Eo *)eo_next, ELM_GENLIST_ITEM_CLASS);
2583 }
2565 } 2584 }
2566 else 2585 else
2567 return EINA_FALSE; 2586 return EINA_FALSE;
@@ -2569,7 +2588,7 @@ _item_focused_next(Evas_Object *obj, Elm_Focus_Direction dir)
2569 if (!next) return EINA_FALSE; 2588 if (!next) return EINA_FALSE;
2570 } 2589 }
2571 2590
2572 elm_object_item_focus_set((Elm_Object_Item *)next, EINA_TRUE); 2591 elm_object_item_focus_set(EO_OBJ(next), EINA_TRUE);
2573 2592
2574 return EINA_TRUE; 2593 return EINA_TRUE;
2575} 2594}
@@ -2723,7 +2742,8 @@ _key_action_move(Evas_Object *obj, const char *params)
2723 { 2742 {
2724 x -= step_x; 2743 x -= step_x;
2725 2744
2726 Elm_Gen_Item *gt = (Elm_Gen_Item*)elm_genlist_selected_item_get(obj); 2745 Elm_Object_Item *eo_gt = elm_genlist_selected_item_get(obj);
2746 ELM_GENLIST_ITEM_DATA_GET(eo_gt, gt);
2727 _elm_genlist_item_content_focus_set(gt, ELM_FOCUS_LEFT); 2747 _elm_genlist_item_content_focus_set(gt, ELM_FOCUS_LEFT);
2728 2748
2729 return EINA_FALSE; 2749 return EINA_FALSE;
@@ -2732,7 +2752,8 @@ _key_action_move(Evas_Object *obj, const char *params)
2732 { 2752 {
2733 x += step_x; 2753 x += step_x;
2734 2754
2735 Elm_Gen_Item *gt = (Elm_Gen_Item*)elm_genlist_selected_item_get(obj); 2755 Elm_Object_Item *eo_gt = elm_genlist_selected_item_get(obj);
2756 ELM_GENLIST_ITEM_DATA_GET(eo_gt, gt);
2736 _elm_genlist_item_content_focus_set(gt, ELM_FOCUS_RIGHT); 2757 _elm_genlist_item_content_focus_set(gt, ELM_FOCUS_RIGHT);
2737 2758
2738 return EINA_FALSE; 2759 return EINA_FALSE;
@@ -2807,12 +2828,13 @@ _key_action_move(Evas_Object *obj, const char *params)
2807static Eina_Bool 2828static Eina_Bool
2808_key_action_select(Evas_Object *obj, const char *params EINA_UNUSED) 2829_key_action_select(Evas_Object *obj, const char *params EINA_UNUSED)
2809{ 2830{
2810 Elm_Object_Item *it = NULL; 2831 Elm_Object_Item *eo_it = NULL;
2811 2832
2812 it = elm_object_focused_item_get(obj); 2833 eo_it = elm_object_focused_item_get(obj);
2813 if (!it) return EINA_TRUE; 2834 if (!eo_it) return EINA_TRUE;
2814 elm_genlist_item_expanded_set(it, !elm_genlist_item_expanded_get(it)); 2835 elm_genlist_item_expanded_set(eo_it, !elm_genlist_item_expanded_get(eo_it));
2815 evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it); 2836 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
2837 evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, EO_OBJ(it));
2816 2838
2817 return EINA_TRUE; 2839 return EINA_TRUE;
2818} 2840}
@@ -2895,14 +2917,14 @@ _elm_genlist_elm_widget_sub_object_del(Eo *obj, Elm_Genlist_Data *sd, Evas_Objec
2895 * Or this searches the realized items and checks the nearest fully visible item 2917 * Or this searches the realized items and checks the nearest fully visible item
2896 * according to the given item's position. 2918 * according to the given item's position.
2897 */ 2919 */
2898static Elm_Object_Item * 2920static Elm_Gen_Item *
2899_elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it) 2921_elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Gen_Item *it)
2900{ 2922{
2901 Evas_Coord vx = 0, vy = 0, vw = 0, vh = 0; // genlist viewport geometry 2923 Evas_Coord vx = 0, vy = 0, vw = 0, vh = 0; // genlist viewport geometry
2902 Evas_Coord ix = 0, iy = 0, iw = 0, ih = 0; // given item geometry 2924 Evas_Coord ix = 0, iy = 0, iw = 0, ih = 0; // given item geometry
2903 Evas_Coord cx = 0, cy = 0, cw = 0, ch = 0; // candidate item geometry 2925 Evas_Coord cx = 0, cy = 0, cw = 0, ch = 0; // candidate item geometry
2904 Eina_List *item_list = NULL, *l = NULL; 2926 Eina_List *item_list = NULL, *l = NULL;
2905 Elm_Object_Item *item = NULL; 2927 Elm_Object_Item *eo_item = NULL;
2906 ELM_GENLIST_DATA_GET(obj, sd); 2928 ELM_GENLIST_DATA_GET(obj, sd);
2907 Eina_Bool search_next = EINA_FALSE; 2929 Eina_Bool search_next = EINA_FALSE;
2908 2930
@@ -2915,7 +2937,7 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
2915 2937
2916 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) 2938 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih))
2917 { 2939 {
2918 if (!elm_object_item_disabled_get(it)) 2940 if (!elm_object_item_disabled_get(EO_OBJ(it)))
2919 return it; 2941 return it;
2920 else 2942 else
2921 search_next = EINA_TRUE; 2943 search_next = EINA_TRUE;
@@ -2923,21 +2945,23 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
2923 2945
2924 if ((iy < vy) || search_next) 2946 if ((iy < vy) || search_next)
2925 { 2947 {
2926 EINA_LIST_FOREACH(item_list, l, item) 2948 EINA_LIST_FOREACH(item_list, l, eo_item)
2927 { 2949 {
2950 ELM_GENLIST_ITEM_DATA_GET(eo_item, item);
2928 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch); 2951 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch);
2929 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 2952 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
2930 !elm_object_item_disabled_get(item)) 2953 !elm_object_item_disabled_get(eo_item))
2931 return item; 2954 return item;
2932 } 2955 }
2933 } 2956 }
2934 else 2957 else
2935 { 2958 {
2936 EINA_LIST_REVERSE_FOREACH(item_list, l, item) 2959 EINA_LIST_REVERSE_FOREACH(item_list, l, eo_item)
2937 { 2960 {
2961 ELM_GENLIST_ITEM_DATA_GET(eo_item, item);
2938 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch); 2962 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch);
2939 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 2963 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
2940 !elm_object_item_disabled_get(item)) 2964 !elm_object_item_disabled_get(eo_item))
2941 return item; 2965 return item;
2942 } 2966 }
2943 } 2967 }
@@ -2948,7 +2972,7 @@ EOLIAN static Eina_Bool
2948_elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd) 2972_elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2949{ 2973{
2950 Eina_Bool int_ret = EINA_FALSE; 2974 Eina_Bool int_ret = EINA_FALSE;
2951 Elm_Object_Item *it = NULL; 2975 Elm_Gen_Item *it = NULL;
2952 Eina_Bool is_sel = EINA_FALSE; 2976 Eina_Bool is_sel = EINA_FALSE;
2953 2977
2954 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 2978 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus());
@@ -2956,7 +2980,10 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2956 2980
2957 if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) && 2981 if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) &&
2958 (!sd->last_selected_item)) 2982 (!sd->last_selected_item))
2959 sd->last_selected_item = eina_list_data_get(sd->selected); 2983 {
2984 Elm_Object_Item *sel = eina_list_data_get(sd->selected);
2985 sd->last_selected_item = eo_data_scope_get((Eo *)sel, ELM_GENLIST_ITEM_CLASS);
2986 }
2960 2987
2961 if (elm_widget_focus_get(obj) && !sd->mouse_down) 2988 if (elm_widget_focus_get(obj) && !sd->mouse_down)
2962 { 2989 {
@@ -2967,7 +2994,7 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2967 else if (_elm_config->first_item_focus_on_first_focus_in && 2994 else if (_elm_config->first_item_focus_on_first_focus_in &&
2968 elm_widget_focus_highlight_enabled_get(obj)) 2995 elm_widget_focus_highlight_enabled_get(obj))
2969 { 2996 {
2970 it = elm_genlist_first_item_get(obj); 2997 it = eo_data_scope_get((Eo *)elm_genlist_first_item_get(obj), ELM_GENLIST_ITEM_CLASS);
2971 is_sel = EINA_TRUE; 2998 is_sel = EINA_TRUE;
2972 } 2999 }
2973 3000
@@ -2977,9 +3004,9 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2977 if (it) 3004 if (it)
2978 { 3005 {
2979 if (!_elm_config->item_select_on_focus_disable && is_sel) 3006 if (!_elm_config->item_select_on_focus_disable && is_sel)
2980 elm_genlist_item_selected_set(it, EINA_TRUE); 3007 elm_genlist_item_selected_set(EO_OBJ(it), EINA_TRUE);
2981 else 3008 else
2982 elm_object_item_focus_set(it, EINA_TRUE); 3009 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
2983 _elm_widget_focus_highlight_start(obj); 3010 _elm_widget_focus_highlight_start(obj);
2984 } 3011 }
2985 } 3012 }
@@ -2989,7 +3016,7 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd)
2989 if (sd->focused_item) 3016 if (sd->focused_item)
2990 { 3017 {
2991 sd->last_focused_item = sd->focused_item; 3018 sd->last_focused_item = sd->focused_item;
2992 _elm_genlist_item_unfocused((Elm_Gen_Item *)sd->focused_item); 3019 _elm_genlist_item_unfocused(sd->focused_item);
2993 } 3020 }
2994 } 3021 }
2995 3022
@@ -3033,19 +3060,19 @@ _elm_genlist_elm_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Elm_Focus_Dire
3033 { 3060 {
3034 if (it->realized) 3061 if (it->realized)
3035 { 3062 {
3036 evas_object_geometry_get(it->base.view, &x, &y, &w, &h); 3063 evas_object_geometry_get(it->base->view, &x, &y, &w, &h);
3037 3064
3038 /* check item which displays more than half of its size */ 3065 /* check item which displays more than half of its size */
3039 if (it->base.access_obj && 3066 if (it->base->access_obj &&
3040 ELM_RECTS_INTERSECT 3067 ELM_RECTS_INTERSECT
3041 (x + (w / 2), y + (h / 2), 0, 0, sx, sy, sw, sh)) 3068 (x + (w / 2), y + (h / 2), 0, 0, sx, sy, sw, sh))
3042 items = eina_list_append(items, it->base.access_obj); 3069 items = eina_list_append(items, it->base->access_obj);
3043 3070
3044 if (!it->base.access_order) continue; 3071 if (!it->base->access_order) continue;
3045 3072
3046 Eina_List *subl; 3073 Eina_List *subl;
3047 Evas_Object *subo; 3074 Evas_Object *subo;
3048 EINA_LIST_FOREACH(it->base.access_order, subl, subo) 3075 EINA_LIST_FOREACH(it->base->access_order, subl, subo)
3049 items = eina_list_append(items, subo); 3076 items = eina_list_append(items, subo);
3050 } 3077 }
3051 } 3078 }
@@ -3129,14 +3156,14 @@ _item_highlight(Elm_Gen_Item *it)
3129 if (_is_no_select(it) || 3156 if (_is_no_select(it) ||
3130 (!sd->highlight) || 3157 (!sd->highlight) ||
3131 (it->generation < sd->generation) || 3158 (it->generation < sd->generation) ||
3132 (it->highlighted) || elm_widget_item_disabled_get(it) || 3159 (it->highlighted) || eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()) ||
3133 (it->item->deco_it_view)) 3160 (it->item->deco_it_view))
3134 return; 3161 return;
3135 3162
3136 edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm"); 3163 edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
3137 if (it->deco_all_view) 3164 if (it->deco_all_view)
3138 edje_object_signal_emit(it->deco_all_view, "elm,state,selected", "elm"); 3165 edje_object_signal_emit(it->deco_all_view, "elm,state,selected", "elm");
3139 evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, it); 3166 evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, EO_OBJ(it));
3140 3167
3141 selectraise = edje_object_data_get(VIEW(it), "selectraise"); 3168 selectraise = edje_object_data_get(VIEW(it), "selectraise");
3142 if ((selectraise) && (!strcmp(selectraise, "on"))) 3169 if ((selectraise) && (!strcmp(selectraise, "on")))
@@ -3158,7 +3185,7 @@ _item_unhighlight(Elm_Gen_Item *it)
3158 return; 3185 return;
3159 3186
3160 edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm"); 3187 edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
3161 evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, it); 3188 evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, EO_OBJ(it));
3162 if (it->deco_all_view) 3189 if (it->deco_all_view)
3163 edje_object_signal_emit 3190 edje_object_signal_emit
3164 (it->deco_all_view, "elm,state,unselected", "elm"); 3191 (it->deco_all_view, "elm,state,unselected", "elm");
@@ -3340,7 +3367,7 @@ _elm_genlist_item_del_not_serious(Elm_Gen_Item *it)
3340{ 3367{
3341 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3368 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3342 3369
3343 elm_widget_item_pre_notify_del(it); 3370 eo_do((Eo *)EO_OBJ(it), elm_wdg_item_pre_notify_del());
3344 it->generation = sd->generation - 1; /* This means that 3371 it->generation = sd->generation - 1; /* This means that
3345 * the item is 3372 * the item is
3346 * deleted */ 3373 * deleted */
@@ -3349,19 +3376,19 @@ _elm_genlist_item_del_not_serious(Elm_Gen_Item *it)
3349 3376
3350 if (it->selected) 3377 if (it->selected)
3351 { 3378 {
3352 sd->selected = eina_list_remove(sd->selected, it); 3379 sd->selected = eina_list_remove(sd->selected, EO_OBJ(it));
3353 if (sd->deselecting) 3380 if (sd->deselecting)
3354 sd->deselecting = eina_list_remove(sd->deselecting, it); 3381 sd->deselecting = eina_list_remove(sd->deselecting, it);
3355 } 3382 }
3356 if (sd->last_focused_item == (Elm_Object_Item *)it) 3383 if (sd->last_focused_item == it)
3357 sd->last_focused_item = NULL; 3384 sd->last_focused_item = NULL;
3358 if (sd->focused_item == (Elm_Object_Item *)it) 3385 if (sd->focused_item == it)
3359 sd->focused_item = NULL; 3386 sd->focused_item = NULL;
3360 if (sd->last_selected_item == (Elm_Object_Item *)it) 3387 if (sd->last_selected_item == it)
3361 sd->last_selected_item = NULL; 3388 sd->last_selected_item = NULL;
3362 3389
3363 if (it->itc->func.del) 3390 if (it->itc->func.del)
3364 it->itc->func.del((void *)it->base.data, WIDGET(it)); 3391 it->itc->func.del((void *)it->base->data, WIDGET(it));
3365} 3392}
3366 3393
3367static void 3394static void
@@ -3405,7 +3432,7 @@ _item_del(Elm_Gen_Item *it)
3405 Elm_Gen_Item *tmp; 3432 Elm_Gen_Item *tmp;
3406 EINA_LIST_FREE(it->item->rel_revs, tmp) tmp->item->rel = NULL; 3433 EINA_LIST_FREE(it->item->rel_revs, tmp) tmp->item->rel = NULL;
3407 } 3434 }
3408 elm_genlist_item_subitems_clear((Elm_Object_Item *)it); 3435 elm_genlist_item_subitems_clear(EO_OBJ(it));
3409 if (sd->show_item == it) sd->show_item = NULL; 3436 if (sd->show_item == it) sd->show_item = NULL;
3410 if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE); 3437 if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
3411 if (it->item->decorate_all_item_realized) _decorate_all_item_unrealize(it); 3438 if (it->item->decorate_all_item_realized) _decorate_all_item_unrealize(it);
@@ -3459,8 +3486,8 @@ _item_unselect(Elm_Gen_Item *it)
3459 } 3486 }
3460 3487
3461 it->selected = EINA_FALSE; 3488 it->selected = EINA_FALSE;
3462 sd->selected = eina_list_remove(sd->selected, it); 3489 sd->selected = eina_list_remove(sd->selected, EO_OBJ(it));
3463 evas_object_smart_callback_call(WIDGET(it), SIG_UNSELECTED, it); 3490 evas_object_smart_callback_call(WIDGET(it), SIG_UNSELECTED, EO_OBJ(it));
3464} 3491}
3465 3492
3466static void 3493static void
@@ -3469,9 +3496,10 @@ _item_mouse_in_cb(void *data,
3469 Evas_Object *obj EINA_UNUSED, 3496 Evas_Object *obj EINA_UNUSED,
3470 void *event_info EINA_UNUSED) 3497 void *event_info EINA_UNUSED)
3471{ 3498{
3472 if (!elm_object_item_disabled_get(data) && 3499 Elm_Gen_Item *it = data;
3500 if (!elm_object_item_disabled_get(EO_OBJ(it)) &&
3473 (_elm_config->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN)) 3501 (_elm_config->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN))
3474 elm_object_item_focus_set(data, EINA_TRUE); 3502 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
3475} 3503}
3476 3504
3477static void 3505static void
@@ -3516,7 +3544,7 @@ _item_mouse_move_cb(void *data,
3516 sd->movements++; 3544 sd->movements++;
3517 } 3545 }
3518 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 3546 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
3519 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG, it); 3547 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG, EO_OBJ(it));
3520 return; 3548 return;
3521 } 3549 }
3522 if ((!it->down) || (sd->longpressed)) 3550 if ((!it->down) || (sd->longpressed))
@@ -3595,30 +3623,30 @@ _item_mouse_move_cb(void *data,
3595 { 3623 {
3596 if (ady > adx) 3624 if (ady > adx)
3597 evas_object_smart_callback_call 3625 evas_object_smart_callback_call
3598 (WIDGET(it), SIG_DRAG_START_UP, it); 3626 (WIDGET(it), SIG_DRAG_START_UP, EO_OBJ(it));
3599 else 3627 else
3600 { 3628 {
3601 if (dx < 0) 3629 if (dx < 0)
3602 evas_object_smart_callback_call 3630 evas_object_smart_callback_call
3603 (WIDGET(it), SIG_DRAG_START_LEFT, it); 3631 (WIDGET(it), SIG_DRAG_START_LEFT, EO_OBJ(it));
3604 else 3632 else
3605 evas_object_smart_callback_call 3633 evas_object_smart_callback_call
3606 (WIDGET(it), SIG_DRAG_START_RIGHT, it); 3634 (WIDGET(it), SIG_DRAG_START_RIGHT, EO_OBJ(it));
3607 } 3635 }
3608 } 3636 }
3609 else 3637 else
3610 { 3638 {
3611 if (ady > adx) 3639 if (ady > adx)
3612 evas_object_smart_callback_call 3640 evas_object_smart_callback_call
3613 (WIDGET(it), SIG_DRAG_START_DOWN, it); 3641 (WIDGET(it), SIG_DRAG_START_DOWN, EO_OBJ(it));
3614 else 3642 else
3615 { 3643 {
3616 if (dx < 0) 3644 if (dx < 0)
3617 evas_object_smart_callback_call 3645 evas_object_smart_callback_call
3618 (WIDGET(it), SIG_DRAG_START_LEFT, it); 3646 (WIDGET(it), SIG_DRAG_START_LEFT, EO_OBJ(it));
3619 else 3647 else
3620 evas_object_smart_callback_call 3648 evas_object_smart_callback_call
3621 (WIDGET(it), SIG_DRAG_START_RIGHT, it); 3649 (WIDGET(it), SIG_DRAG_START_RIGHT, EO_OBJ(it));
3622 } 3650 }
3623 } 3651 }
3624 } 3652 }
@@ -3627,17 +3655,18 @@ _item_mouse_move_cb(void *data,
3627static Eina_Bool 3655static Eina_Bool
3628_long_press_cb(void *data) 3656_long_press_cb(void *data)
3629{ 3657{
3630 Elm_Gen_Item *it = data, *it_tmp; 3658 Elm_Gen_Item *it = data;
3659 Elm_Object_Item *eo_it_tmp;
3631 Eina_List *list; 3660 Eina_List *list;
3632 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3661 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3633 3662
3634 it->long_timer = NULL; 3663 it->long_timer = NULL;
3635 if (_is_no_select(it) || 3664 if (_is_no_select(it) ||
3636 elm_widget_item_disabled_get(it) || (it->dragging)) 3665 eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()) || (it->dragging))
3637 return ECORE_CALLBACK_CANCEL; 3666 return ECORE_CALLBACK_CANCEL;
3638 3667
3639 sd->longpressed = EINA_TRUE; 3668 sd->longpressed = EINA_TRUE;
3640 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it); 3669 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, EO_OBJ(it));
3641 if ((sd->reorder_mode) && (!it->group)) 3670 if ((sd->reorder_mode) && (!it->group))
3642 { 3671 {
3643 sd->reorder_it = it; 3672 sd->reorder_it = it;
@@ -3653,12 +3682,15 @@ _long_press_cb(void *data)
3653 3682
3654 list = elm_genlist_realized_items_get 3683 list = elm_genlist_realized_items_get
3655 ((sd)->obj); 3684 ((sd)->obj);
3656 EINA_LIST_FREE(list, it_tmp) 3685 EINA_LIST_FREE(list, eo_it_tmp)
3657 if (it != it_tmp) it->unsel_cb(it_tmp); 3686 {
3687 ELM_GENLIST_ITEM_DATA_GET(eo_it_tmp, it_tmp);
3688 if (it != it_tmp) it->unsel_cb(it_tmp);
3689 }
3658 3690
3659 if (elm_genlist_item_expanded_get((Elm_Object_Item *)it)) 3691 if (elm_genlist_item_expanded_get(EO_OBJ(it)))
3660 { 3692 {
3661 elm_genlist_item_expanded_set((Elm_Object_Item *)it, EINA_FALSE); 3693 elm_genlist_item_expanded_set(EO_OBJ(it), EINA_FALSE);
3662 return ECORE_CALLBACK_RENEW; 3694 return ECORE_CALLBACK_RENEW;
3663 } 3695 }
3664 3696
@@ -3677,7 +3709,7 @@ _swipe_do(Elm_Gen_Item *it)
3677 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3709 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3678 3710
3679 if (_is_no_select(it) || 3711 if (_is_no_select(it) ||
3680 elm_widget_item_disabled_get(it)) return; 3712 eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get())) return;
3681 3713
3682 sd->swipe = EINA_FALSE; 3714 sd->swipe = EINA_FALSE;
3683 for (i = 0; i < sd->movements; i++) 3715 for (i = 0; i < sd->movements; i++)
@@ -3689,7 +3721,7 @@ _swipe_do(Elm_Gen_Item *it)
3689 3721
3690 sum /= sd->movements; 3722 sum /= sd->movements;
3691 if (abs(sum - sd->history[0].x) <= 10) return; 3723 if (abs(sum - sd->history[0].x) <= 10) return;
3692 evas_object_smart_callback_call(WIDGET(it), SIG_SWIPE, it); 3724 evas_object_smart_callback_call(WIDGET(it), SIG_SWIPE, EO_OBJ(it));
3693} 3725}
3694 3726
3695static Eina_Bool 3727static Eina_Bool
@@ -3744,33 +3776,33 @@ _multi_touch_gesture_eval(Elm_Gen_Item *it)
3744 { 3776 {
3745 if ((sd->cur_x > sd->prev_x) && (sd->cur_mx > sd->prev_mx)) 3777 if ((sd->cur_x > sd->prev_x) && (sd->cur_mx > sd->prev_mx))
3746 evas_object_smart_callback_call 3778 evas_object_smart_callback_call
3747 (WIDGET(it), SIG_MULTI_SWIPE_RIGHT, it); 3779 (WIDGET(it), SIG_MULTI_SWIPE_RIGHT, EO_OBJ(it));
3748 else if ((sd->cur_x < sd->prev_x) && (sd->cur_mx < sd->prev_mx)) 3780 else if ((sd->cur_x < sd->prev_x) && (sd->cur_mx < sd->prev_mx))
3749 evas_object_smart_callback_call 3781 evas_object_smart_callback_call
3750 (WIDGET(it), SIG_MULTI_SWIPE_LEFT, it); 3782 (WIDGET(it), SIG_MULTI_SWIPE_LEFT, EO_OBJ(it));
3751 else if (abs(sd->cur_x - sd->cur_mx) > 3783 else if (abs(sd->cur_x - sd->cur_mx) >
3752 abs(sd->prev_x - sd->prev_mx)) 3784 abs(sd->prev_x - sd->prev_mx))
3753 evas_object_smart_callback_call 3785 evas_object_smart_callback_call
3754 (WIDGET(it), SIG_MULTI_PINCH_OUT, it); 3786 (WIDGET(it), SIG_MULTI_PINCH_OUT, EO_OBJ(it));
3755 else 3787 else
3756 evas_object_smart_callback_call 3788 evas_object_smart_callback_call
3757 (WIDGET(it), SIG_MULTI_PINCH_IN, it); 3789 (WIDGET(it), SIG_MULTI_PINCH_IN, EO_OBJ(it));
3758 } 3790 }
3759 else 3791 else
3760 { 3792 {
3761 if ((sd->cur_y > sd->prev_y) && (sd->cur_my > sd->prev_my)) 3793 if ((sd->cur_y > sd->prev_y) && (sd->cur_my > sd->prev_my))
3762 evas_object_smart_callback_call 3794 evas_object_smart_callback_call
3763 (WIDGET(it), SIG_MULTI_SWIPE_DOWN, it); 3795 (WIDGET(it), SIG_MULTI_SWIPE_DOWN, EO_OBJ(it));
3764 else if ((sd->cur_y < sd->prev_y) && (sd->cur_my < sd->prev_my)) 3796 else if ((sd->cur_y < sd->prev_y) && (sd->cur_my < sd->prev_my))
3765 evas_object_smart_callback_call 3797 evas_object_smart_callback_call
3766 (WIDGET(it), SIG_MULTI_SWIPE_UP, it); 3798 (WIDGET(it), SIG_MULTI_SWIPE_UP, EO_OBJ(it));
3767 else if (abs(sd->cur_y - sd->cur_my) > 3799 else if (abs(sd->cur_y - sd->cur_my) >
3768 abs(sd->prev_y - sd->prev_my)) 3800 abs(sd->prev_y - sd->prev_my))
3769 evas_object_smart_callback_call 3801 evas_object_smart_callback_call
3770 (WIDGET(it), SIG_MULTI_PINCH_OUT, it); 3802 (WIDGET(it), SIG_MULTI_PINCH_OUT, EO_OBJ(it));
3771 else 3803 else
3772 evas_object_smart_callback_call 3804 evas_object_smart_callback_call
3773 (WIDGET(it), SIG_MULTI_PINCH_IN, it); 3805 (WIDGET(it), SIG_MULTI_PINCH_IN, EO_OBJ(it));
3774 } 3806 }
3775 } 3807 }
3776 3808
@@ -3804,7 +3836,7 @@ _item_multi_down_cb(void *data,
3804 if (it->dragging) 3836 if (it->dragging)
3805 { 3837 {
3806 it->dragging = EINA_FALSE; 3838 it->dragging = EINA_FALSE;
3807 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it); 3839 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, EO_OBJ(it));
3808 } 3840 }
3809 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); 3841 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del);
3810 if (sd->on_hold) 3842 if (sd->on_hold)
@@ -3896,7 +3928,7 @@ _item_mouse_down_cb(void *data,
3896 sd->movements = 0; 3928 sd->movements = 0;
3897 3929
3898 if (_is_no_select(it) || 3930 if (_is_no_select(it) ||
3899 elm_widget_item_disabled_get(it)) 3931 eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
3900 return; 3932 return;
3901 3933
3902 // and finally call the user callbacks. 3934 // and finally call the user callbacks.
@@ -3905,10 +3937,10 @@ _item_mouse_down_cb(void *data,
3905 it->highlight_cb(it); 3937 it->highlight_cb(it);
3906 if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) 3938 if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
3907 { 3939 {
3908 evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it); 3940 evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, EO_OBJ(it));
3909 evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it); 3941 evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, EO_OBJ(it));
3910 } 3942 }
3911 evas_object_smart_callback_call(WIDGET(it), SIG_PRESSED, it); 3943 evas_object_smart_callback_call(WIDGET(it), SIG_PRESSED, EO_OBJ(it));
3912} 3944}
3913 3945
3914static Item_Block * 3946static Item_Block *
@@ -4237,9 +4269,10 @@ _item_process_post(Elm_Genlist_Data *sd,
4237 if (sd->selected && it->item->before) 4269 if (sd->selected && it->item->before)
4238 { 4270 {
4239 int y = 0, h; 4271 int y = 0, h;
4240 Elm_Gen_Item *it2; 4272 Elm_Object_Item *eo_it2;
4241 4273
4242 it2 = sd->selected->data; 4274 eo_it2 = sd->selected->data;
4275 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
4243 if (!it2->item->block) return; 4276 if (!it2->item->block) return;
4244 eo_do(sd->obj, elm_interface_scrollable_content_pos_get(NULL, &y)); 4277 eo_do(sd->obj, elm_interface_scrollable_content_pos_get(NULL, &y));
4245 evas_object_geometry_get(sd->pan_obj, NULL, NULL, NULL, &h); 4278 evas_object_geometry_get(sd->pan_obj, NULL, NULL, NULL, &h);
@@ -4382,15 +4415,15 @@ _item_move_after(Elm_Gen_Item *it,
4382 if (after->item->group_item) it->item->group_item = after->item->group_item; 4415 if (after->item->group_item) it->item->group_item = after->item->group_item;
4383 _item_queue(sd, it, NULL); 4416 _item_queue(sd, it, NULL);
4384 4417
4385 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED_AFTER, it); 4418 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED_AFTER, EO_OBJ(it));
4386} 4419}
4387 4420
4388static void 4421static void
4389_access_activate_cb(void *data EINA_UNUSED, 4422_access_activate_cb(void *data EINA_UNUSED,
4390 Evas_Object *part_obj EINA_UNUSED, 4423 Evas_Object *part_obj EINA_UNUSED,
4391 Elm_Object_Item *item) 4424 Elm_Object_Item *eo_it)
4392{ 4425{
4393 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 4426 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
4394 if (!it) return; 4427 if (!it) return;
4395 4428
4396 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 4429 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
@@ -4411,15 +4444,20 @@ _access_activate_cb(void *data EINA_UNUSED,
4411 if (!it->selected) 4444 if (!it->selected)
4412 { 4445 {
4413 while (sd->selected) 4446 while (sd->selected)
4414 it->unsel_cb(sd->selected->data); 4447 {
4448 Elm_Object_Item *eo_sel = sd->selected->data;
4449 Elm_Gen_Item *sel = eo_data_scope_get((Eo *)eo_sel, ELM_GENLIST_ITEM_CLASS);
4450 it->unsel_cb(sel);
4451 }
4415 } 4452 }
4416 else 4453 else
4417 { 4454 {
4418 const Eina_List *l, *l_next; 4455 const Eina_List *l, *l_next;
4419 Elm_Gen_Item *it2; 4456 Elm_Object_Item *eo_it2;
4420 4457
4421 EINA_LIST_FOREACH_SAFE(sd->selected, l, l_next, it2) 4458 EINA_LIST_FOREACH_SAFE(sd->selected, l, l_next, eo_it2)
4422 { 4459 {
4460 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
4423 if (it2 != it) 4461 if (it2 != it)
4424 it->unsel_cb(it2); 4462 it->unsel_cb(it2);
4425 } 4463 }
@@ -4455,7 +4493,7 @@ _item_move_before(Elm_Gen_Item *it,
4455 it->item->group_item = before->item->group_item; 4493 it->item->group_item = before->item->group_item;
4456 _item_queue(sd, it, NULL); 4494 _item_queue(sd, it, NULL);
4457 4495
4458 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED_BEFORE, it); 4496 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED_BEFORE, EO_OBJ(it));
4459} 4497}
4460 4498
4461static void 4499static void
@@ -4473,7 +4511,7 @@ _item_mouse_up_cb(void *data,
4473 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 4511 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
4474 4512
4475 sd->mouse_down = EINA_FALSE; 4513 sd->mouse_down = EINA_FALSE;
4476 evas_object_smart_callback_call(WIDGET(it), SIG_RELEASED, it); 4514 evas_object_smart_callback_call(WIDGET(it), SIG_RELEASED, EO_OBJ(it));
4477 if (sd->multi_touched) 4515 if (sd->multi_touched)
4478 { 4516 {
4479 if ((!sd->multi) && (!it->selected) && (it->highlighted)) 4517 if ((!sd->multi) && (!it->selected) && (it->highlighted))
@@ -4489,7 +4527,7 @@ _item_mouse_up_cb(void *data,
4489 if (it->dragging) 4527 if (it->dragging)
4490 { 4528 {
4491 it->dragging = EINA_FALSE; 4529 it->dragging = EINA_FALSE;
4492 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it); 4530 evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, EO_OBJ(it));
4493 dragged = 1; 4531 dragged = 1;
4494 } 4532 }
4495 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); 4533 ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del);
@@ -4517,7 +4555,7 @@ _item_mouse_up_cb(void *data,
4517 _item_move_before(sd->reorder_it, sd->reorder_rel); 4555 _item_move_before(sd->reorder_it, sd->reorder_rel);
4518 else 4556 else
4519 _item_move_after(sd->reorder_it, sd->reorder_rel); 4557 _item_move_after(sd->reorder_it, sd->reorder_rel);
4520 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, it); 4558 evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, EO_OBJ(it));
4521 } 4559 }
4522 else 4560 else
4523 { 4561 {
@@ -4549,13 +4587,13 @@ _item_mouse_up_cb(void *data,
4549 } 4587 }
4550 4588
4551 if (_is_no_select(it) || 4589 if (_is_no_select(it) ||
4552 (elm_widget_item_disabled_get(it) || (dragged))) 4590 (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()) || (dragged)))
4553 return; 4591 return;
4554 4592
4555 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; 4593 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
4556 4594
4557 if (sd->focused_item != (Elm_Object_Item *)it) 4595 if (sd->focused_item != it)
4558 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE); 4596 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
4559 4597
4560 if (sd->multi && 4598 if (sd->multi &&
4561 ((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) || 4599 ((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) ||
@@ -4574,15 +4612,20 @@ _item_mouse_up_cb(void *data,
4574 if (!it->selected) 4612 if (!it->selected)
4575 { 4613 {
4576 while (sd->selected) 4614 while (sd->selected)
4577 it->unsel_cb(sd->selected->data); 4615 {
4616 Elm_Object_Item *eo_sel = sd->selected->data;
4617 Elm_Gen_Item *sel = eo_data_scope_get((Eo *)eo_sel, ELM_GENLIST_ITEM_CLASS);
4618 it->unsel_cb(sel);
4619 }
4578 } 4620 }
4579 else 4621 else
4580 { 4622 {
4581 const Eina_List *l, *l_next; 4623 const Eina_List *l, *l_next;
4582 Elm_Gen_Item *it2; 4624 Elm_Object_Item *eo_it2;
4583 4625
4584 EINA_LIST_FOREACH_SAFE(sd->selected, l, l_next, it2) 4626 EINA_LIST_FOREACH_SAFE(sd->selected, l, l_next, eo_it2)
4585 { 4627 {
4628 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
4586 if (it2 != it) 4629 if (it2 != it)
4587 it->unsel_cb(it2); 4630 it->unsel_cb(it2);
4588 } 4631 }
@@ -5190,9 +5233,9 @@ _elm_genlist_looping_up_cb(void *data,
5190 5233
5191 ELM_GENLIST_DATA_GET(genlist, sd); 5234 ELM_GENLIST_DATA_GET(genlist, sd);
5192 5235
5193 Elm_Object_Item *it = elm_genlist_last_item_get(genlist); 5236 Elm_Object_Item *eo_it = elm_genlist_last_item_get(genlist);
5194 5237
5195 elm_genlist_item_show((Elm_Object_Item *)it, ELM_GENLIST_ITEM_SCROLLTO_IN); 5238 elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
5196 _elm_widget_focus_highlight_signal_emit(genlist, "elm,action,focus,move,up", "elm"); 5239 _elm_widget_focus_highlight_signal_emit(genlist, "elm,action,focus,move,up", "elm");
5197 elm_layout_signal_emit(genlist, "elm,action,looping,up,end", "elm"); 5240 elm_layout_signal_emit(genlist, "elm,action,looping,up,end", "elm");
5198 sd->item_looping_on = EINA_FALSE; 5241 sd->item_looping_on = EINA_FALSE;
@@ -5208,9 +5251,9 @@ _elm_genlist_looping_down_cb(void *data,
5208 5251
5209 ELM_GENLIST_DATA_GET(genlist, sd); 5252 ELM_GENLIST_DATA_GET(genlist, sd);
5210 5253
5211 Elm_Object_Item *it = elm_genlist_first_item_get(genlist); 5254 Elm_Object_Item *eo_it = elm_genlist_first_item_get(genlist);
5212 5255
5213 elm_genlist_item_show((Elm_Object_Item *)it, ELM_GENLIST_ITEM_SCROLLTO_IN); 5256 elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
5214 _elm_widget_focus_highlight_signal_emit(genlist, "elm,action,focus,move,down", "elm"); 5257 _elm_widget_focus_highlight_signal_emit(genlist, "elm,action,focus,move,down", "elm");
5215 elm_layout_signal_emit(genlist, "elm,action,looping,down,end", "elm"); 5258 elm_layout_signal_emit(genlist, "elm,action,looping,down,end", "elm");
5216 sd->item_looping_on = EINA_FALSE; 5259 sd->item_looping_on = EINA_FALSE;
@@ -5223,12 +5266,12 @@ _elm_genlist_focus_highlight_move_down_end_cb(void *data,
5223 const char *source EINA_UNUSED) 5266 const char *source EINA_UNUSED)
5224{ 5267{
5225 Evas_Object *gl = data; 5268 Evas_Object *gl = data;
5226 Elm_Gen_Item *it = (Elm_Gen_Item *)elm_genlist_first_item_get(gl); 5269 Elm_Object_Item *eo_it = elm_genlist_first_item_get(gl);
5227 5270
5228 if (!_elm_config->item_select_on_focus_disable) 5271 if (!_elm_config->item_select_on_focus_disable)
5229 elm_genlist_item_selected_set((Elm_Object_Item *)it, EINA_TRUE); 5272 elm_genlist_item_selected_set(eo_it, EINA_TRUE);
5230 else 5273 else
5231 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE); 5274 elm_object_item_focus_set(eo_it, EINA_TRUE);
5232 5275
5233 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,up", "elm"); 5276 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,up", "elm");
5234} 5277}
@@ -5240,12 +5283,12 @@ _elm_genlist_focus_highlight_move_up_end_cb(void *data,
5240 const char *source EINA_UNUSED) 5283 const char *source EINA_UNUSED)
5241{ 5284{
5242 Evas_Object *gl = data; 5285 Evas_Object *gl = data;
5243 Elm_Gen_Item *it = (Elm_Gen_Item *)elm_genlist_last_item_get(gl); 5286 Elm_Object_Item *eo_it = elm_genlist_last_item_get(gl);
5244 5287
5245 if (!_elm_config->item_select_on_focus_disable) 5288 if (!_elm_config->item_select_on_focus_disable)
5246 elm_genlist_item_selected_set((Elm_Object_Item *)it, EINA_TRUE); 5289 elm_genlist_item_selected_set(eo_it, EINA_TRUE);
5247 else 5290 else
5248 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE); 5291 elm_object_item_focus_set(eo_it, EINA_TRUE);
5249 5292
5250 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,down", "elm"); 5293 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,down", "elm");
5251} 5294}
@@ -5484,7 +5527,7 @@ _internal_elm_genlist_clear(Evas_Object *obj,
5484 if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); 5527 if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next);
5485 if (itn) itn->walking++; /* prevent early death of subitem */ 5528 if (itn) itn->walking++; /* prevent early death of subitem */
5486 it->del_cb(it); 5529 it->del_cb(it);
5487 elm_widget_item_free(it); 5530 eo_del((Eo *)EO_OBJ(it));
5488 if (itn) itn->walking--; 5531 if (itn) itn->walking--;
5489 } 5532 }
5490 } 5533 }
@@ -5528,7 +5571,7 @@ _item_select(Elm_Gen_Item *it)
5528 { 5571 {
5529 it->selected = EINA_TRUE; 5572 it->selected = EINA_TRUE;
5530 sd->selected = 5573 sd->selected =
5531 eina_list_append(sd->selected, it); 5574 eina_list_append(sd->selected, EO_OBJ(it));
5532 } 5575 }
5533 else if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) && 5576 else if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) &&
5534 (it->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)) 5577 (it->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS))
@@ -5537,11 +5580,11 @@ _item_select(Elm_Gen_Item *it)
5537 evas_object_ref(obj); 5580 evas_object_ref(obj);
5538 it->walking++; 5581 it->walking++;
5539 sd->walking++; 5582 sd->walking++;
5540 if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), it); 5583 if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), EO_OBJ(it));
5541 if (it->generation == sd->generation) 5584 if (it->generation == sd->generation)
5542 { 5585 {
5543 evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, it); 5586 evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, EO_OBJ(it));
5544 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE); 5587 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
5545 _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS); 5588 _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS);
5546 } 5589 }
5547 5590
@@ -5569,18 +5612,17 @@ _item_select(Elm_Gen_Item *it)
5569 if ((!it->walking) && (it->generation < sd->generation)) 5612 if ((!it->walking) && (it->generation < sd->generation))
5570 { 5613 {
5571 it->del_cb(it); 5614 it->del_cb(it);
5572 elm_widget_item_free(it); 5615 eo_del((Eo *)EO_OBJ(it));
5573 } 5616 }
5574 else 5617 else
5575 sd->last_selected_item = (Elm_Object_Item *)it; 5618 sd->last_selected_item = it;
5576 } 5619 }
5577 5620
5578 evas_object_unref(obj); 5621 evas_object_unref(obj);
5579} 5622}
5580 5623
5581static Evas_Object * 5624EOLIAN static Evas_Object *
5582_item_content_get_hook(Elm_Gen_Item *it, 5625_elm_genlist_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it, const char * part)
5583 const char *part)
5584{ 5626{
5585 Evas_Object *ret = NULL; 5627 Evas_Object *ret = NULL;
5586 if (it->deco_all_view) 5628 if (it->deco_all_view)
@@ -5597,9 +5639,8 @@ _item_content_get_hook(Elm_Gen_Item *it,
5597 return ret; 5639 return ret;
5598} 5640}
5599 5641
5600static const char * 5642EOLIAN static const char *
5601_item_text_get_hook(Elm_Gen_Item *it, 5643_elm_genlist_item_elm_widget_item_part_text_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it, const char * part)
5602 const char *part)
5603{ 5644{
5604 if (!it->itc->func.text_get) return NULL; 5645 if (!it->itc->func.text_get) return NULL;
5605 const char *ret = NULL; 5646 const char *ret = NULL;
@@ -5617,21 +5658,20 @@ _item_text_get_hook(Elm_Gen_Item *it,
5617 return ret; 5658 return ret;
5618} 5659}
5619 5660
5620static void 5661EOLIAN static void
5621_item_disable_hook(Elm_Object_Item *item) 5662_elm_genlist_item_elm_widget_item_disable(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
5622{ 5663{
5623 Eina_List *l; 5664 Eina_List *l;
5624 Evas_Object *obj; 5665 Evas_Object *obj;
5625 Elm_Gen_Item *it = (Elm_Gen_Item *)item;
5626 5666
5627 if (it->generation < GL_IT(it)->wsd->generation) return; 5667 if (it->generation < GL_IT(it)->wsd->generation) return;
5628 5668
5629 if (it->selected) 5669 if (it->selected)
5630 elm_genlist_item_selected_set(item, EINA_FALSE); 5670 elm_genlist_item_selected_set(EO_OBJ(it), EINA_FALSE);
5631 5671
5632 if (it->realized) 5672 if (it->realized)
5633 { 5673 {
5634 if (elm_widget_item_disabled_get(it)) 5674 if (eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
5635 { 5675 {
5636 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm"); 5676 edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
5637 if (it->deco_all_view) 5677 if (it->deco_all_view)
@@ -5646,14 +5686,13 @@ _item_disable_hook(Elm_Object_Item *item)
5646 (it->deco_all_view, "elm,state,enabled", "elm"); 5686 (it->deco_all_view, "elm,state,enabled", "elm");
5647 } 5687 }
5648 EINA_LIST_FOREACH(it->content_objs, l, obj) 5688 EINA_LIST_FOREACH(it->content_objs, l, obj)
5649 elm_widget_disabled_set(obj, elm_widget_item_disabled_get(it)); 5689 elm_widget_disabled_set(obj, eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()));
5650 } 5690 }
5651} 5691}
5652 5692
5653static Eina_Bool 5693EOLIAN static Eina_Bool
5654_item_del_pre_hook(Elm_Object_Item *item) 5694_elm_genlist_item_elm_widget_item_del_pre(Eo *eo_it, Elm_Gen_Item *it)
5655{ 5695{
5656 Elm_Gen_Item *it = (Elm_Gen_Item *)item;
5657 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 5696 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
5658 5697
5659 if (it->walking > 0) 5698 if (it->walking > 0)
@@ -5670,7 +5709,7 @@ _item_del_pre_hook(Elm_Object_Item *item)
5670 Elm_Gen_Item *tmp; 5709 Elm_Gen_Item *tmp;
5671 EINA_LIST_FREE(it->item->rel_revs, tmp) tmp->item->rel = NULL; 5710 EINA_LIST_FREE(it->item->rel_revs, tmp) tmp->item->rel = NULL;
5672 } 5711 }
5673 elm_genlist_item_subitems_clear(item); 5712 elm_genlist_item_subitems_clear((Elm_Object_Item *)eo_it);
5674 if (sd->show_item == it) 5713 if (sd->show_item == it)
5675 sd->show_item = NULL; 5714 sd->show_item = NULL;
5676 5715
@@ -5695,18 +5734,15 @@ _item_del_pre_hook(Elm_Object_Item *item)
5695 return EINA_TRUE; 5734 return EINA_TRUE;
5696} 5735}
5697 5736
5698static void 5737EOLIAN static void
5699_item_signal_emit_hook(Elm_Object_Item *it, 5738_elm_genlist_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it, const char *emission, const char *source)
5700 const char *emission,
5701 const char *source)
5702{ 5739{
5703 edje_object_signal_emit(VIEW(it), emission, source); 5740 edje_object_signal_emit(VIEW(it), emission, source);
5704} 5741}
5705 5742
5706static void 5743EOLIAN static void
5707_item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused) 5744_elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it, Eina_Bool focused)
5708{ 5745{
5709 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
5710 Evas_Object *obj = WIDGET(it); 5746 Evas_Object *obj = WIDGET(it);
5711 ELM_GENLIST_DATA_GET(obj, sd); 5747 ELM_GENLIST_DATA_GET(obj, sd);
5712 5748
@@ -5719,22 +5755,21 @@ _item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused)
5719 if (it != sd->focused_item) 5755 if (it != sd->focused_item)
5720 { 5756 {
5721 if (sd->focused_item) 5757 if (sd->focused_item)
5722 _elm_genlist_item_unfocused((Elm_Gen_Item *)sd->focused_item); 5758 _elm_genlist_item_unfocused(sd->focused_item);
5723 _elm_genlist_item_focused((Elm_Gen_Item *)it); 5759 _elm_genlist_item_focused(it);
5724 5760
5725 _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it); 5761 _elm_widget_item_highlight_in_theme(obj, EO_OBJ(it));
5726 _elm_widget_highlight_in_theme_update(obj); 5762 _elm_widget_highlight_in_theme_update(obj);
5727 _elm_widget_focus_highlight_start(obj); 5763 _elm_widget_focus_highlight_start(obj);
5728 } 5764 }
5729 } 5765 }
5730 else 5766 else
5731 _elm_genlist_item_unfocused((Elm_Gen_Item *)it); 5767 _elm_genlist_item_unfocused(it);
5732} 5768}
5733 5769
5734static Eina_Bool 5770EOLIAN static Eina_Bool
5735_item_focus_get_hook(Elm_Object_Item *it) 5771_elm_genlist_item_elm_widget_item_focus_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
5736{ 5772{
5737 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
5738 Evas_Object *obj = WIDGET(it); 5773 Evas_Object *obj = WIDGET(it);
5739 ELM_GENLIST_DATA_GET(obj, sd); 5774 ELM_GENLIST_DATA_GET(obj, sd);
5740 5775
@@ -5744,40 +5779,41 @@ _item_focus_get_hook(Elm_Object_Item *it)
5744 return EINA_FALSE; 5779 return EINA_FALSE;
5745} 5780}
5746 5781
5782EOLIAN static void
5783_elm_genlist_item_eo_base_constructor(Eo *eo_it, Elm_Gen_Item *it)
5784{
5785 eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS, eo_constructor());
5786 it->base = eo_data_scope_get(eo_it, ELM_WIDGET_ITEM_CLASS);
5787}
5788
5747static Elm_Gen_Item * 5789static Elm_Gen_Item *
5748_elm_genlist_item_new(Elm_Genlist_Data *sd, 5790_elm_genlist_item_new(Elm_Genlist_Data *sd,
5749 const Elm_Genlist_Item_Class *itc, 5791 const Elm_Genlist_Item_Class *itc,
5750 const void *data, 5792 const void *data,
5751 Elm_Gen_Item *parent, 5793 Elm_Object_Item *eo_parent,
5752 Elm_Genlist_Item_Type type, 5794 Elm_Genlist_Item_Type type,
5753 Evas_Smart_Cb func, 5795 Evas_Smart_Cb func,
5754 const void *func_data) 5796 const void *func_data)
5755{ 5797{
5756 Elm_Gen_Item *it, *it2; 5798 Elm_Gen_Item *it2;
5757 int depth = 0; 5799 int depth = 0;
5758 5800
5759 if (!itc) return NULL; 5801 if (!itc) return NULL;
5760 5802
5761 it = elm_widget_item_new(sd->obj, Elm_Gen_Item); 5803 Eo *eo_it = eo_add(ELM_GENLIST_ITEM_CLASS, sd->obj);
5762 if (!it) return NULL; 5804 if (!eo_it) return NULL;
5805 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
5763 5806
5764 it->generation = sd->generation; 5807 it->generation = sd->generation;
5765 it->itc = itc; 5808 it->itc = itc;
5766 elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)itc); 5809 elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)itc);
5767 5810
5768 it->base.data = data; 5811 ELM_GENLIST_ITEM_DATA_GET(eo_parent, parent);
5812 it->base->data = data;
5769 it->parent = parent; 5813 it->parent = parent;
5770 it->func.func = func; 5814 it->func.func = func;
5771 it->func.data = func_data; 5815 it->func.data = func_data;
5772 5816
5773 elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
5774 elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
5775 elm_widget_item_disable_hook_set(it, _item_disable_hook);
5776 elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
5777 elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);
5778 elm_widget_item_focus_set_hook_set(it, _item_focus_set_hook);
5779 elm_widget_item_focus_get_hook_set(it, _item_focus_get_hook);
5780
5781 it->del_cb = (Ecore_Cb)_item_del; 5817 it->del_cb = (Ecore_Cb)_item_del;
5782 it->highlight_cb = (Ecore_Cb)_item_highlight; 5818 it->highlight_cb = (Ecore_Cb)_item_highlight;
5783 it->unhighlight_cb = (Ecore_Cb)_item_unhighlight; 5819 it->unhighlight_cb = (Ecore_Cb)_item_unhighlight;
@@ -5815,7 +5851,7 @@ _elm_genlist_item_compare(const void *data,
5815 5851
5816 it = ELM_GEN_ITEM_FROM_INLIST(data); 5852 it = ELM_GEN_ITEM_FROM_INLIST(data);
5817 item1 = ELM_GEN_ITEM_FROM_INLIST(data1); 5853 item1 = ELM_GEN_ITEM_FROM_INLIST(data1);
5818 return GL_IT(it)->wsd->item_compare_cb(it, item1); 5854 return GL_IT(it)->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1));
5819} 5855}
5820 5856
5821static int 5857static int
@@ -5825,7 +5861,7 @@ _elm_genlist_item_list_compare(const void *data,
5825 const Elm_Gen_Item *it = data; 5861 const Elm_Gen_Item *it = data;
5826 const Elm_Gen_Item *item1 = data1; 5862 const Elm_Gen_Item *item1 = data1;
5827 5863
5828 return GL_IT(it)->wsd->item_compare_cb(it, item1); 5864 return GL_IT(it)->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1));
5829} 5865}
5830 5866
5831EOLIAN static unsigned int 5867EOLIAN static unsigned int
@@ -5863,7 +5899,7 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Ge
5863 Elm_Gen_Item *it; 5899 Elm_Gen_Item *it;
5864 5900
5865 it = _elm_genlist_item_new 5901 it = _elm_genlist_item_new
5866 (sd, itc, data, (Elm_Gen_Item *)parent, type, func, func_data); 5902 (sd, itc, data, parent, type, func, func_data);
5867 if (!it) return NULL; 5903 if (!it) return NULL;
5868 5904
5869 if (!it->parent) 5905 if (!it->parent)
@@ -5890,7 +5926,7 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Ge
5890 it->item->before = EINA_FALSE; 5926 it->item->before = EINA_FALSE;
5891 _item_queue(sd, it, NULL); 5927 _item_queue(sd, it, NULL);
5892 5928
5893 return (Elm_Object_Item *)it; 5929 return EO_OBJ(it);
5894} 5930}
5895 5931
5896EOLIAN static Elm_Object_Item* 5932EOLIAN static Elm_Object_Item*
@@ -5899,7 +5935,7 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_G
5899 Elm_Gen_Item *it; 5935 Elm_Gen_Item *it;
5900 5936
5901 it = _elm_genlist_item_new 5937 it = _elm_genlist_item_new
5902 (sd, itc, data, (Elm_Gen_Item *)parent, type, func, func_data); 5938 (sd, itc, data, parent, type, func, func_data);
5903 if (!it) return NULL; 5939 if (!it) return NULL;
5904 5940
5905 if (!it->parent) 5941 if (!it->parent)
@@ -5926,23 +5962,23 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_G
5926 it->item->before = EINA_TRUE; 5962 it->item->before = EINA_TRUE;
5927 _item_queue(sd, it, NULL); 5963 _item_queue(sd, it, NULL);
5928 5964
5929 return (Elm_Object_Item *)it; 5965 return EO_OBJ(it);
5930} 5966}
5931 5967
5932EOLIAN static Elm_Object_Item* 5968EOLIAN static Elm_Object_Item*
5933_elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after_it, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data) 5969_elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *eo_after, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data)
5934{ 5970{
5935 Elm_Gen_Item *after = (Elm_Gen_Item *)after_it; 5971 ELM_GENLIST_ITEM_DATA_GET(eo_after, after);
5936 Elm_Gen_Item *it; 5972 Elm_Gen_Item *it;
5937 5973
5938 ELM_GENLIST_ITEM_CHECK_OR_RETURN(after_it, NULL); 5974 ELM_GENLIST_ITEM_CHECK_OR_RETURN(after, NULL);
5939 5975
5940 /* It makes no sense to insert after in an empty list with after != 5976 /* It makes no sense to insert after in an empty list with after !=
5941 * NULL, something really bad is happening in your app. */ 5977 * NULL, something really bad is happening in your app. */
5942 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->items, NULL); 5978 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->items, NULL);
5943 5979
5944 it = _elm_genlist_item_new 5980 it = _elm_genlist_item_new
5945 (sd, itc, data, (Elm_Gen_Item *)parent, type, func, func_data); 5981 (sd, itc, data, parent, type, func, func_data);
5946 if (!it) return NULL; 5982 if (!it) return NULL;
5947 5983
5948 if (!it->parent) 5984 if (!it->parent)
@@ -5964,23 +6000,23 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
5964 it->item->before = EINA_FALSE; 6000 it->item->before = EINA_FALSE;
5965 _item_queue(sd, it, NULL); 6001 _item_queue(sd, it, NULL);
5966 6002
5967 return (Elm_Object_Item *)it; 6003 return EO_OBJ(it);
5968} 6004}
5969 6005
5970EOLIAN static Elm_Object_Item* 6006EOLIAN static Elm_Object_Item*
5971_elm_genlist_item_insert_before(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before_it, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data) 6007_elm_genlist_item_insert_before(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *eo_before, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data)
5972{ 6008{
5973 Elm_Gen_Item *before = (Elm_Gen_Item *)before_it; 6009 ELM_GENLIST_ITEM_DATA_GET(eo_before, before);
5974 Elm_Gen_Item *it; 6010 Elm_Gen_Item *it;
5975 6011
5976 ELM_GENLIST_ITEM_CHECK_OR_RETURN(before_it, NULL); 6012 ELM_GENLIST_ITEM_CHECK_OR_RETURN(before, NULL);
5977 6013
5978 /* It makes no sense to insert before in an empty list with before 6014 /* It makes no sense to insert before in an empty list with before
5979 * != NULL, something really bad is happening in your app. */ 6015 * != NULL, something really bad is happening in your app. */
5980 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->items, NULL); 6016 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->items, NULL);
5981 6017
5982 it = _elm_genlist_item_new 6018 it = _elm_genlist_item_new
5983 (sd, itc, data, (Elm_Gen_Item *)parent, type, func, func_data); 6019 (sd, itc, data, parent, type, func, func_data);
5984 if (!it) return NULL; 6020 if (!it) return NULL;
5985 6021
5986 if (!it->parent) 6022 if (!it->parent)
@@ -6001,7 +6037,7 @@ _elm_genlist_item_insert_before(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
6001 it->item->before = EINA_TRUE; 6037 it->item->before = EINA_TRUE;
6002 _item_queue(sd, it, NULL); 6038 _item_queue(sd, it, NULL);
6003 6039
6004 return (Elm_Object_Item *)it; 6040 return EO_OBJ(it);
6005} 6041}
6006 6042
6007EOLIAN static Elm_Object_Item* 6043EOLIAN static Elm_Object_Item*
@@ -6011,7 +6047,7 @@ _elm_genlist_item_sorted_insert(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
6011 Elm_Gen_Item *it; 6047 Elm_Gen_Item *it;
6012 6048
6013 it = _elm_genlist_item_new 6049 it = _elm_genlist_item_new
6014 (sd, itc, data, (Elm_Gen_Item *)parent, type, func, func_data); 6050 (sd, itc, data, parent, type, func, func_data);
6015 if (!it) return NULL; 6051 if (!it) return NULL;
6016 6052
6017 sd->item_compare_cb = comp; 6053 sd->item_compare_cb = comp;
@@ -6094,7 +6130,7 @@ _elm_genlist_item_sorted_insert(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
6094 6130
6095 _item_queue(sd, it, _elm_genlist_item_list_compare); 6131 _item_queue(sd, it, _elm_genlist_item_list_compare);
6096 6132
6097 return (Elm_Object_Item *)it; 6133 return EO_OBJ(it);
6098} 6134}
6099 6135
6100EOLIAN static void 6136EOLIAN static void
@@ -6164,7 +6200,7 @@ _elm_genlist_realized_items_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
6164 done = EINA_TRUE; 6200 done = EINA_TRUE;
6165 EINA_LIST_FOREACH(itb->items, l, it) 6201 EINA_LIST_FOREACH(itb->items, l, it)
6166 { 6202 {
6167 if (it->realized) ret = eina_list_append(ret, it); 6203 if (it->realized) ret = eina_list_append(ret, EO_OBJ(it));
6168 } 6204 }
6169 } 6205 }
6170 else 6206 else
@@ -6211,7 +6247,7 @@ _elm_genlist_at_xy_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Evas_Coor
6211 else *posret = 0; 6247 else *posret = 0;
6212 } 6248 }
6213 6249
6214 return (Elm_Object_Item *)it; 6250 return EO_OBJ(it);
6215 } 6251 }
6216 lasty = ity + it->item->h; 6252 lasty = ity + it->item->h;
6217 } 6253 }
@@ -6236,7 +6272,7 @@ _elm_genlist_first_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
6236 while ((it) && (it->generation < sd->generation)) 6272 while ((it) && (it->generation < sd->generation))
6237 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); 6273 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
6238 6274
6239 return (Elm_Object_Item *)it; 6275 return EO_OBJ(it);
6240} 6276}
6241 6277
6242EOLIAN static Elm_Object_Item* 6278EOLIAN static Elm_Object_Item*
@@ -6250,65 +6286,85 @@ _elm_genlist_last_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
6250 while ((it) && (it->generation < sd->generation)) 6286 while ((it) && (it->generation < sd->generation))
6251 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); 6287 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
6252 6288
6253 return (Elm_Object_Item *)it; 6289 return EO_OBJ(it);
6254} 6290}
6255 6291
6256EAPI Elm_Object_Item * 6292EAPI Elm_Object_Item *
6257elm_genlist_item_next_get(const Elm_Object_Item *item) 6293elm_genlist_item_next_get(const Elm_Object_Item *item)
6258{ 6294{
6259 Elm_Gen_Item *it = NULL; 6295 return eo_do((Eo *)item, elm_obj_genlist_item_next_get());
6260 6296}
6261 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, NULL);
6262 6297
6263 it = (Elm_Gen_Item *)item; 6298EOLIAN static Elm_Object_Item *
6299_elm_genlist_item_next_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6300{
6264 while (it) 6301 while (it)
6265 { 6302 {
6266 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); 6303 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
6267 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break; 6304 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break;
6268 } 6305 }
6269 6306
6270 return (Elm_Object_Item *)it; 6307 if (it) return EO_OBJ(it);
6308 else return NULL;
6271} 6309}
6272 6310
6273EAPI Elm_Object_Item * 6311EAPI Elm_Object_Item *
6274elm_genlist_item_prev_get(const Elm_Object_Item *item) 6312elm_genlist_item_prev_get(const Elm_Object_Item *item)
6275{ 6313{
6276 Elm_Gen_Item *it = NULL; 6314 return eo_do((Eo *)item, elm_obj_genlist_item_prev_get());
6277 6315}
6278 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, NULL);
6279 6316
6280 it = (Elm_Gen_Item *)item; 6317EOLIAN static Elm_Object_Item *
6318_elm_genlist_item_prev_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6319{
6281 while (it) 6320 while (it)
6282 { 6321 {
6283 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); 6322 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
6284 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break; 6323 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break;
6285 } 6324 }
6286 6325
6287 return (Elm_Object_Item *)it; 6326 if (it) return EO_OBJ(it);
6327 else return NULL;
6288} 6328}
6289 6329
6290EAPI Elm_Object_Item * 6330EAPI Elm_Object_Item *
6291elm_genlist_item_parent_get(const Elm_Object_Item *it) 6331elm_genlist_item_parent_get(const Elm_Object_Item *item)
6332{
6333 return eo_do((Eo *)item, elm_obj_genlist_item_parent_get());
6334}
6335
6336EOLIAN static Elm_Object_Item *
6337_elm_genlist_item_parent_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6292{ 6338{
6293 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL); 6339 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
6294 6340
6295 return (Elm_Object_Item *)((Elm_Gen_Item *)it)->parent; 6341 return EO_OBJ(it->parent);
6296} 6342}
6297 6343
6298EAPI unsigned int 6344EAPI unsigned int
6299elm_genlist_item_subitems_count(const Elm_Object_Item *it) 6345elm_genlist_item_subitems_count(const Elm_Object_Item *item)
6300{ 6346{
6301 Elm_Gen_Item *item = (Elm_Gen_Item *)it; 6347 return eo_do((Eo *)item, elm_obj_genlist_item_subitems_count());
6302 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0); 6348}
6349
6350EOLIAN static unsigned int
6351_elm_genlist_item_subitems_count(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item)
6352{
6353 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, 0);
6303 6354
6304 return eina_list_count(item->item->items); 6355 return eina_list_count(item->item->items);
6305} 6356}
6306 6357
6307EAPI const Eina_List * 6358EAPI const Eina_List *
6308elm_genlist_item_subitems_get(const Elm_Object_Item *it) 6359elm_genlist_item_subitems_get(const Elm_Object_Item *item)
6309{ 6360{
6310 Elm_Gen_Item *item = (Elm_Gen_Item *)it; 6361 return eo_do((Eo *)item, elm_obj_genlist_item_subitems_get());
6311 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL); 6362}
6363
6364EOLIAN static const Eina_List *
6365_elm_genlist_item_subitems_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item)
6366{
6367 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, NULL);
6312 6368
6313 return item->item->items; 6369 return item->item->items;
6314} 6370}
@@ -6316,9 +6372,13 @@ elm_genlist_item_subitems_get(const Elm_Object_Item *it)
6316EAPI void 6372EAPI void
6317elm_genlist_item_subitems_clear(Elm_Object_Item *item) 6373elm_genlist_item_subitems_clear(Elm_Object_Item *item)
6318{ 6374{
6319 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6375 eo_do((Eo *)item, elm_obj_genlist_item_subitems_clear());
6376}
6320 6377
6321 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6378EOLIAN static void
6379_elm_genlist_item_subitems_clear(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6380{
6381 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6322 ELM_GENLIST_DATA_GET(WIDGET(it), sd); 6382 ELM_GENLIST_DATA_GET(WIDGET(it), sd);
6323 6383
6324 if (!sd->tree_effect_enabled || !sd->move_effect_mode) 6384 if (!sd->tree_effect_enabled || !sd->move_effect_mode)
@@ -6344,11 +6404,17 @@ EAPI void
6344elm_genlist_item_selected_set(Elm_Object_Item *item, 6404elm_genlist_item_selected_set(Elm_Object_Item *item,
6345 Eina_Bool selected) 6405 Eina_Bool selected)
6346{ 6406{
6347 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6407 eo_do((Eo *)item, elm_obj_genlist_item_selected_set(selected));
6348 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6408}
6409
6410EOLIAN static void
6411_elm_genlist_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
6412 Eina_Bool selected)
6413{
6414 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6349 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6415 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6350 6416
6351 if ((it->generation < sd->generation) || elm_widget_item_disabled_get(it)) 6417 if ((it->generation < sd->generation) || eo_do((Eo *)EO_OBJ(it), elm_wdg_item_disabled_get()))
6352 return; 6418 return;
6353 selected = !!selected; 6419 selected = !!selected;
6354 if (it->selected == selected) return; 6420 if (it->selected == selected) return;
@@ -6359,9 +6425,11 @@ elm_genlist_item_selected_set(Elm_Object_Item *item,
6359 { 6425 {
6360 while (sd->selected) 6426 while (sd->selected)
6361 { 6427 {
6428 Elm_Object_Item *eo_sel = sd->selected->data;
6429 ELM_GENLIST_ITEM_DATA_GET(eo_sel, sel);
6362 if (it->unhighlight_cb) 6430 if (it->unhighlight_cb)
6363 it->unhighlight_cb(sd->selected->data); 6431 it->unhighlight_cb(sel);
6364 it->unsel_cb(sd->selected->data); 6432 it->unsel_cb(sel);
6365 } 6433 }
6366 } 6434 }
6367 it->highlight_cb(it); 6435 it->highlight_cb(it);
@@ -6376,31 +6444,40 @@ elm_genlist_item_selected_set(Elm_Object_Item *item,
6376EAPI Eina_Bool 6444EAPI Eina_Bool
6377elm_genlist_item_selected_get(const Elm_Object_Item *it) 6445elm_genlist_item_selected_get(const Elm_Object_Item *it)
6378{ 6446{
6447 return eo_do((Eo *)it, elm_obj_genlist_item_selected_get());
6448}
6449
6450EOLIAN static Eina_Bool
6451_elm_genlist_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6452{
6379 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); 6453 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
6380 6454
6381 return ((Elm_Gen_Item *)it)->selected; 6455 return it->selected;
6382} 6456}
6383 6457
6384static Elm_Gen_Item * 6458static Elm_Gen_Item *
6385_elm_genlist_expanded_next_item_get(Elm_Gen_Item *it) 6459_elm_genlist_expanded_next_item_get(Elm_Gen_Item *it)
6386{ 6460{
6387 Elm_Gen_Item *it2; 6461 Elm_Object_Item *eo_it = EO_OBJ(it);
6462 Elm_Object_Item *eo_it2;
6388 6463
6389 if (it->item->expanded) 6464 if (it->item->expanded)
6390 { 6465 {
6391 it2 = (Elm_Gen_Item *)elm_genlist_item_next_get((Elm_Object_Item *)it); 6466 eo_it2 = elm_genlist_item_next_get(eo_it);
6467 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
6468 return it2;
6392 } 6469 }
6393 else 6470 else
6394 { 6471 {
6395 it2 = (Elm_Gen_Item *)elm_genlist_item_next_get((Elm_Object_Item *)it); 6472 eo_it2 = elm_genlist_item_next_get(eo_it);
6396 while (it2) 6473 while (eo_it2)
6397 { 6474 {
6398 if (it->item->expanded_depth >= it2->item->expanded_depth) break; 6475 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
6399 it2 = (Elm_Gen_Item *) 6476 if (it->item->expanded_depth >= it2->item->expanded_depth) return it2;
6400 elm_genlist_item_next_get((Elm_Object_Item *)it2); 6477 eo_it2 = elm_genlist_item_next_get(eo_it2);
6401 } 6478 }
6402 } 6479 }
6403 return it2; 6480 return eo_data_scope_get((Eo *)eo_it2, ELM_GENLIST_ITEM_CLASS);
6404} 6481}
6405 6482
6406static void 6483static void
@@ -6416,7 +6493,13 @@ _elm_genlist_move_items_set(Elm_Gen_Item *it)
6416 6493
6417 if (it->item->expanded) 6494 if (it->item->expanded)
6418 { 6495 {
6419 sd->move_items = elm_genlist_realized_items_get((sd)->obj); 6496 Elm_Object_Item *eo_item;
6497 l = elm_genlist_realized_items_get((sd)->obj);
6498 EINA_LIST_FREE(l, eo_item)
6499 {
6500 ELM_GENLIST_ITEM_DATA_GET(eo_item, item);
6501 sd->move_items = eina_list_append(sd->move_items, item);
6502 }
6420 6503
6421 EINA_LIST_FOREACH_SAFE(sd->move_items, l, ll, it2) 6504 EINA_LIST_FOREACH_SAFE(sd->move_items, l, ll, it2)
6422 { 6505 {
@@ -6426,15 +6509,16 @@ _elm_genlist_move_items_set(Elm_Gen_Item *it)
6426 } 6509 }
6427 else 6510 else
6428 { 6511 {
6512 Elm_Object_Item *eo_it2 = NULL;
6429 evas_object_geometry_get(sd->pan_obj, &ox, &oy, &ow, &oh); 6513 evas_object_geometry_get(sd->pan_obj, &ox, &oy, &ow, &oh);
6430 it2 = sd->expanded_next_item; 6514 if (sd->expanded_next_item) eo_it2 = EO_OBJ(sd->expanded_next_item);
6431 6515
6432 while (it2 && (dh < oy + oh)) 6516 while (eo_it2 && (dh < oy + oh))
6433 { 6517 {
6518 it2 = eo_data_scope_get((Eo *)eo_it2, ELM_GENLIST_ITEM_CLASS);
6434 dh += it2->item->h; 6519 dh += it2->item->h;
6435 sd->move_items = eina_list_append(sd->move_items, it2); 6520 sd->move_items = eina_list_append(sd->move_items, it2);
6436 it2 = (Elm_Gen_Item *) 6521 eo_it2 = elm_genlist_item_next_get(eo_it2);
6437 elm_genlist_item_next_get((Elm_Object_Item *)it2);
6438 } 6522 }
6439 } 6523 }
6440} 6524}
@@ -6464,9 +6548,13 @@ EAPI void
6464elm_genlist_item_expanded_set(Elm_Object_Item *item, 6548elm_genlist_item_expanded_set(Elm_Object_Item *item,
6465 Eina_Bool expanded) 6549 Eina_Bool expanded)
6466{ 6550{
6467 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6551 eo_do((Eo *)item, elm_obj_genlist_item_expanded_set(expanded));
6552}
6468 6553
6469 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6554EOLIAN static void
6555_elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_Bool expanded)
6556{
6557 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6470 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6558 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6471 6559
6472 expanded = !!expanded; 6560 expanded = !!expanded;
@@ -6484,7 +6572,7 @@ elm_genlist_item_expanded_set(Elm_Object_Item *item,
6484 sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_EXPAND; 6572 sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_EXPAND;
6485 if (it->realized) 6573 if (it->realized)
6486 edje_object_signal_emit(VIEW(it), "elm,state,expanded", "elm"); 6574 edje_object_signal_emit(VIEW(it), "elm,state,expanded", "elm");
6487 evas_object_smart_callback_call(WIDGET(it), SIG_EXPANDED, it); 6575 evas_object_smart_callback_call(WIDGET(it), SIG_EXPANDED, EO_OBJ(it));
6488 sd->auto_scroll_enabled = EINA_TRUE; 6576 sd->auto_scroll_enabled = EINA_TRUE;
6489 } 6577 }
6490 else 6578 else
@@ -6492,7 +6580,7 @@ elm_genlist_item_expanded_set(Elm_Object_Item *item,
6492 sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_CONTRACT; 6580 sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_CONTRACT;
6493 if (it->realized) 6581 if (it->realized)
6494 edje_object_signal_emit(VIEW(it), "elm,state,contracted", "elm"); 6582 edje_object_signal_emit(VIEW(it), "elm,state,contracted", "elm");
6495 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACTED, it); 6583 evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACTED, EO_OBJ(it));
6496 sd->auto_scroll_enabled = EINA_FALSE; 6584 sd->auto_scroll_enabled = EINA_FALSE;
6497 } 6585 }
6498} 6586}
@@ -6500,21 +6588,33 @@ elm_genlist_item_expanded_set(Elm_Object_Item *item,
6500EAPI Eina_Bool 6588EAPI Eina_Bool
6501elm_genlist_item_expanded_get(const Elm_Object_Item *it) 6589elm_genlist_item_expanded_get(const Elm_Object_Item *it)
6502{ 6590{
6591 return eo_do((Eo *)it, elm_obj_genlist_item_expanded_get());
6592}
6593
6594EOLIAN static Eina_Bool
6595_elm_genlist_item_expanded_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6596{
6503 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); 6597 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
6504 6598
6505 return ((Elm_Gen_Item *)it)->item->expanded; 6599 return it->item->expanded;
6506} 6600}
6507 6601
6508EAPI int 6602EAPI int
6509elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it) 6603elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it)
6510{ 6604{
6605 return eo_do((Eo *)it, elm_obj_genlist_item_expanded_depth_get());
6606}
6607
6608EOLIAN static int
6609_elm_genlist_item_expanded_depth_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6610{
6511 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0); 6611 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0);
6512 6612
6513 return ((Elm_Gen_Item *)it)->item->expanded_depth; 6613 return it->item->expanded_depth;
6514} 6614}
6515 6615
6516static Eina_Bool 6616static Eina_Bool
6517_elm_genlist_item_coordinates_calc(Elm_Object_Item *item, 6617_elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
6518 Elm_Genlist_Item_Scrollto_Type type, 6618 Elm_Genlist_Item_Scrollto_Type type,
6519 Eina_Bool bring_in, 6619 Eina_Bool bring_in,
6520 Evas_Coord *x, 6620 Evas_Coord *x,
@@ -6522,7 +6622,6 @@ _elm_genlist_item_coordinates_calc(Elm_Object_Item *item,
6522 Evas_Coord *w, 6622 Evas_Coord *w,
6523 Evas_Coord *h) 6623 Evas_Coord *h)
6524{ 6624{
6525 Elm_Gen_Item *it = (Elm_Gen_Item *)item;
6526 Evas_Coord gith = 0; 6625 Evas_Coord gith = 0;
6527 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6626 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6528 6627
@@ -6579,29 +6678,46 @@ _elm_genlist_item_coordinates_calc(Elm_Object_Item *item,
6579EAPI void 6678EAPI void
6580elm_genlist_item_promote(Elm_Object_Item *item) 6679elm_genlist_item_promote(Elm_Object_Item *item)
6581{ 6680{
6582 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6681 eo_do((Eo *)item, elm_obj_genlist_item_promote());
6682}
6583 6683
6584 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6684EOLIAN static void
6685_elm_genlist_item_promote(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6686{
6687 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6585 6688
6586 if (it->generation < GL_IT(it)->wsd->generation) return; 6689 if (it->generation < GL_IT(it)->wsd->generation) return;
6587 _item_move_before 6690 Elm_Object_Item *eo_first_item = elm_genlist_first_item_get(WIDGET(it));
6588 (it, (Elm_Gen_Item *)elm_genlist_first_item_get(WIDGET(it))); 6691 ELM_GENLIST_ITEM_DATA_GET(eo_first_item, first_item);
6692 _item_move_before(it, first_item);
6589} 6693}
6590 6694
6591EAPI void 6695EAPI void
6592elm_genlist_item_demote(Elm_Object_Item *item) 6696elm_genlist_item_demote(Elm_Object_Item *item)
6593{ 6697{
6594 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6698 eo_do((Eo *)item, elm_obj_genlist_item_demote());
6699}
6595 6700
6596 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6701EOLIAN static void
6702_elm_genlist_item_demote(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6703{
6704 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6597 if (it->generation < GL_IT(it)->wsd->generation) return; 6705 if (it->generation < GL_IT(it)->wsd->generation) return;
6598 _item_move_after(it, (Elm_Gen_Item *)elm_genlist_last_item_get(WIDGET(it))); 6706 Elm_Object_Item *eo_last_item = elm_genlist_last_item_get(WIDGET(it));
6707 ELM_GENLIST_ITEM_DATA_GET(eo_last_item, last_item);
6708 _item_move_after(it, last_item);
6599} 6709}
6600 6710
6601EAPI void 6711EAPI void
6602elm_genlist_item_show(Elm_Object_Item *item, 6712elm_genlist_item_show(Elm_Object_Item *item,
6603 Elm_Genlist_Item_Scrollto_Type type) 6713 Elm_Genlist_Item_Scrollto_Type type)
6604{ 6714{
6715 eo_do((Eo *)item, elm_obj_genlist_item_show(type));
6716}
6717
6718EOLIAN static void
6719_elm_genlist_item_show(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item, Elm_Genlist_Item_Scrollto_Type type)
6720{
6605 Evas_Coord x, y, w, h; 6721 Evas_Coord x, y, w, h;
6606 6722
6607 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6723 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item);
@@ -6616,6 +6732,12 @@ EAPI void
6616elm_genlist_item_bring_in(Elm_Object_Item *item, 6732elm_genlist_item_bring_in(Elm_Object_Item *item,
6617 Elm_Genlist_Item_Scrollto_Type type) 6733 Elm_Genlist_Item_Scrollto_Type type)
6618{ 6734{
6735 eo_do((Eo *)item, elm_obj_genlist_item_bring_in(type));
6736}
6737
6738EOLIAN static void
6739_elm_genlist_item_bring_in(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item, Elm_Genlist_Item_Scrollto_Type type)
6740{
6619 Evas_Coord x, y, w, h; 6741 Evas_Coord x, y, w, h;
6620 6742
6621 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6743 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item);
@@ -6629,11 +6751,17 @@ EAPI void
6629elm_genlist_item_all_contents_unset(Elm_Object_Item *it, 6751elm_genlist_item_all_contents_unset(Elm_Object_Item *it,
6630 Eina_List **l) 6752 Eina_List **l)
6631{ 6753{
6754 eo_do((Eo *)it, elm_obj_genlist_item_all_contents_unset(l));
6755}
6756
6757EOLIAN static void
6758_elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_List **l)
6759{
6632 Evas_Object *content; 6760 Evas_Object *content;
6633 6761
6634 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6762 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6635 6763
6636 EINA_LIST_FREE(((Elm_Gen_Item *)it)->content_objs, content) 6764 EINA_LIST_FREE(it->content_objs, content)
6637 { 6765 {
6638 elm_widget_sub_object_del(WIDGET(it), content); 6766 elm_widget_sub_object_del(WIDGET(it), content);
6639 evas_object_smart_member_del(content); 6767 evas_object_smart_member_del(content);
@@ -6645,9 +6773,13 @@ elm_genlist_item_all_contents_unset(Elm_Object_Item *it,
6645EAPI void 6773EAPI void
6646elm_genlist_item_update(Elm_Object_Item *item) 6774elm_genlist_item_update(Elm_Object_Item *item)
6647{ 6775{
6648 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6776 eo_do((Eo *)item, elm_obj_genlist_item_update());
6777}
6649 6778
6650 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6779EOLIAN static void
6780_elm_genlist_item_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6781{
6782 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6651 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6783 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6652 6784
6653 if (!it->item->block) return; 6785 if (!it->item->block) return;
@@ -6664,9 +6796,15 @@ elm_genlist_item_fields_update(Elm_Object_Item *item,
6664 const char *parts, 6796 const char *parts,
6665 Elm_Genlist_Item_Field_Type itf) 6797 Elm_Genlist_Item_Field_Type itf)
6666{ 6798{
6667 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6799 eo_do((Eo *)item, elm_obj_genlist_item_fields_update(parts, itf));
6800}
6668 6801
6669 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6802EOLIAN static void
6803_elm_genlist_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
6804 const char *parts,
6805 Elm_Genlist_Item_Field_Type itf)
6806{
6807 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6670 6808
6671 if (!it->item->block) return; 6809 if (!it->item->block) return;
6672 if (it->generation < GL_IT(it)->wsd->generation) return; 6810 if (it->generation < GL_IT(it)->wsd->generation) return;
@@ -6733,16 +6871,21 @@ elm_genlist_item_fields_update(Elm_Object_Item *item,
6733 if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_STATE)) 6871 if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_STATE))
6734 _item_state_realize(it, VIEW(it), &it->states, parts); 6872 _item_state_realize(it, VIEW(it), &it->states, parts);
6735 if (!it->item->mincalcd) 6873 if (!it->item->mincalcd)
6736 elm_genlist_item_update(item); 6874 elm_genlist_item_update((Elm_Object_Item *)eo_item);
6737} 6875}
6738 6876
6739EAPI void 6877EAPI void
6740elm_genlist_item_item_class_update(Elm_Object_Item *item, 6878elm_genlist_item_item_class_update(Elm_Object_Item *item,
6741 const Elm_Genlist_Item_Class *itc) 6879 const Elm_Genlist_Item_Class *itc)
6742{ 6880{
6743 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6881 eo_do((Eo *)item, elm_obj_genlist_item_class_update(itc));
6882}
6744 6883
6745 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 6884EOLIAN static void
6885_elm_genlist_item_item_class_update(Eo *eo_it, Elm_Gen_Item *it,
6886 const Elm_Genlist_Item_Class *itc)
6887{
6888 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6746 6889
6747 if (!it->item->block) return; 6890 if (!it->item->block) return;
6748 EINA_SAFETY_ON_NULL_RETURN(itc); 6891 EINA_SAFETY_ON_NULL_RETURN(itc);
@@ -6774,15 +6917,19 @@ elm_genlist_item_item_class_update(Elm_Object_Item *item,
6774 it->item->deco_all_contents = NULL; 6917 it->item->deco_all_contents = NULL;
6775 } 6918 }
6776 6919
6777 elm_genlist_item_update(item); 6920 elm_genlist_item_update((Elm_Object_Item *)eo_it);
6778} 6921}
6779 6922
6780EAPI const Elm_Genlist_Item_Class * 6923EAPI const Elm_Genlist_Item_Class *
6781elm_genlist_item_item_class_get(const Elm_Object_Item *item) 6924elm_genlist_item_item_class_get(const Elm_Object_Item *item)
6782{ 6925{
6783 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6926 return eo_do((Eo *)item, elm_obj_genlist_item_class_get());
6927}
6784 6928
6785 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, NULL); 6929EOLIAN static const Elm_Genlist_Item_Class *
6930_elm_genlist_item_item_class_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6931{
6932 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
6786 if (it->generation < GL_IT(it)->wsd->generation) return NULL; 6933 if (it->generation < GL_IT(it)->wsd->generation) return NULL;
6787 6934
6788 return it->itc; 6935 return it->itc;
@@ -6817,11 +6964,17 @@ EAPI void
6817elm_genlist_item_tooltip_text_set(Elm_Object_Item *it, 6964elm_genlist_item_tooltip_text_set(Elm_Object_Item *it,
6818 const char *text) 6965 const char *text)
6819{ 6966{
6967 eo_do((Eo *)it, elm_wdg_item_tooltip_text_set(text));
6968}
6969
6970EOLIAN static void
6971_elm_genlist_item_elm_widget_item_tooltip_text_set(Eo *eo_it, Elm_Gen_Item *it, const char *text)
6972{
6820 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6973 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6821 6974
6822 text = eina_stringshare_add(text); 6975 text = eina_stringshare_add(text);
6823 elm_genlist_item_tooltip_content_cb_set 6976 elm_genlist_item_tooltip_content_cb_set
6824 (it, _elm_genlist_item_label_create, text, 6977 ((Elm_Object_Item *)eo_it, _elm_genlist_item_label_create, text,
6825 _elm_genlist_item_label_del_cb); 6978 _elm_genlist_item_label_del_cb);
6826} 6979}
6827 6980
@@ -6831,26 +6984,35 @@ elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *item,
6831 const void *data, 6984 const void *data,
6832 Evas_Smart_Cb del_cb) 6985 Evas_Smart_Cb del_cb)
6833{ 6986{
6834 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 6987 eo_do((Eo *)item, elm_wdg_item_tooltip_content_cb_set(func, data, del_cb));
6835 6988}
6836 ELM_GENLIST_ITEM_CHECK_OR_GOTO(item, error);
6837 6989
6838 if ((it->tooltip.content_cb == func) && (it->tooltip.data == data)) 6990EOLIAN static void
6839 return; 6991_elm_genlist_item_elm_widget_item_tooltip_content_cb_set(Eo *eo_it, Elm_Gen_Item *it,
6992 Elm_Tooltip_Item_Content_Cb func,
6993 const void *data,
6994 Evas_Smart_Cb del_cb)
6995{
6996 ELM_GENLIST_ITEM_CHECK_OR_GOTO(it, error);
6840 6997
6841 if (it->tooltip.del_cb) 6998 if ((it->tooltip.content_cb != func) || (it->tooltip.data != data))
6842 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it); 6999 {
7000 if (it->tooltip.del_cb)
7001 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
6843 7002
6844 it->tooltip.content_cb = func; 7003 it->tooltip.content_cb = func;
6845 it->tooltip.data = data; 7004 it->tooltip.data = data;
6846 it->tooltip.del_cb = del_cb; 7005 it->tooltip.del_cb = del_cb;
7006 }
6847 7007
6848 if (VIEW(it)) 7008 if (VIEW(it))
6849 { 7009 {
6850 elm_widget_item_tooltip_content_cb_set 7010 eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
6851 (it, it->tooltip.content_cb, it->tooltip.data, NULL); 7011 elm_wdg_item_tooltip_content_cb_set
6852 elm_widget_item_tooltip_style_set(it, it->tooltip.style); 7012 (it->tooltip.content_cb, it->tooltip.data, NULL));
6853 elm_widget_item_tooltip_window_mode_set(it, it->tooltip.free_size); 7013 eo_do(eo_it,
7014 elm_wdg_item_tooltip_style_set(it->tooltip.style),
7015 elm_wdg_item_tooltip_window_mode_set(it->tooltip.free_size));
6854 } 7016 }
6855 7017
6856 return; 7018 return;
@@ -6862,12 +7024,17 @@ error:
6862EAPI void 7024EAPI void
6863elm_genlist_item_tooltip_unset(Elm_Object_Item *item) 7025elm_genlist_item_tooltip_unset(Elm_Object_Item *item)
6864{ 7026{
6865 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7027 eo_do((Eo *)item, elm_wdg_item_tooltip_unset());
7028}
6866 7029
6867 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7030EOLIAN static void
7031_elm_genlist_item_elm_widget_item_tooltip_unset(Eo *eo_it, Elm_Gen_Item *it)
7032{
7033 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6868 7034
6869 if ((VIEW(it)) && (it->tooltip.content_cb)) 7035 if ((VIEW(it)) && (it->tooltip.content_cb))
6870 elm_widget_item_tooltip_unset(it); 7036 eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
7037 elm_wdg_item_tooltip_unset());
6871 7038
6872 if (it->tooltip.del_cb) 7039 if (it->tooltip.del_cb)
6873 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it); 7040 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
@@ -6876,110 +7043,139 @@ elm_genlist_item_tooltip_unset(Elm_Object_Item *item)
6876 it->tooltip.data = NULL; 7043 it->tooltip.data = NULL;
6877 it->tooltip.free_size = EINA_FALSE; 7044 it->tooltip.free_size = EINA_FALSE;
6878 if (it->tooltip.style) 7045 if (it->tooltip.style)
6879 elm_genlist_item_tooltip_style_set(item, NULL); 7046 eo_do(eo_it, elm_wdg_item_tooltip_style_set(NULL));
6880} 7047}
6881 7048
6882EAPI void 7049EAPI void
6883elm_genlist_item_tooltip_style_set(Elm_Object_Item *item, 7050elm_genlist_item_tooltip_style_set(Elm_Object_Item *item,
6884 const char *style) 7051 const char *style)
6885{ 7052{
6886 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7053 eo_do((Eo *)item, elm_wdg_item_tooltip_style_set(style));
7054}
6887 7055
6888 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7056EOLIAN static void
7057_elm_genlist_item_elm_widget_item_tooltip_style_set(Eo *eo_it, Elm_Gen_Item *it,
7058 const char *style)
7059{
7060 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6889 7061
6890 eina_stringshare_replace(&it->tooltip.style, style); 7062 eina_stringshare_replace(&it->tooltip.style, style);
6891 if (VIEW(it)) elm_widget_item_tooltip_style_set(it, style); 7063 if (VIEW(it)) eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
7064 elm_wdg_item_tooltip_style_set(style));
6892} 7065}
6893 7066
6894EAPI const char * 7067EAPI const char *
6895elm_genlist_item_tooltip_style_get(const Elm_Object_Item *it) 7068elm_genlist_item_tooltip_style_get(const Elm_Object_Item *it)
6896{ 7069{
6897 return elm_object_item_tooltip_style_get(it); 7070 return eo_do((Eo *)it, elm_wdg_item_tooltip_style_get());
6898} 7071}
6899 7072
6900EAPI Eina_Bool 7073EAPI Eina_Bool
6901elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *item, 7074elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *item,
6902 Eina_Bool disable) 7075 Eina_Bool disable)
6903{ 7076{
6904 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7077 return eo_do((Eo *)item, elm_wdg_item_tooltip_window_mode_set(disable));
7078}
6905 7079
6906 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); 7080EOLIAN static Eina_Bool
7081_elm_genlist_item_elm_widget_item_tooltip_window_mode_set(Eo *eo_it, Elm_Gen_Item *it,
7082 Eina_Bool disable)
7083{
7084 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
6907 7085
6908 it->tooltip.free_size = disable; 7086 it->tooltip.free_size = disable;
6909 if (VIEW(it)) return elm_widget_item_tooltip_window_mode_set(it, disable); 7087 if (VIEW(it))
7088 return eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
7089 elm_wdg_item_tooltip_window_mode_set(disable));
6910 7090
6911 return EINA_TRUE; 7091 return EINA_TRUE;
6912} 7092}
6913 7093
6914EAPI Eina_Bool 7094EAPI Eina_Bool
6915elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *it) 7095elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *eo_it)
6916{ 7096{
6917 return elm_object_tooltip_window_mode_get(VIEW(it)); 7097 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
7098 return eo_do(VIEW(it), elm_wdg_item_tooltip_window_mode_get());
6918} 7099}
6919 7100
6920EAPI void 7101EAPI void
6921elm_genlist_item_cursor_set(Elm_Object_Item *item, 7102elm_genlist_item_cursor_set(Elm_Object_Item *item,
6922 const char *cursor) 7103 const char *cursor)
6923{ 7104{
6924 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7105 eo_do((Eo *)item, elm_wdg_item_cursor_set(cursor));
7106}
6925 7107
6926 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7108EOLIAN static void
7109_elm_genlist_item_elm_widget_item_cursor_set(Eo *eo_it, Elm_Gen_Item *it,
7110 const char *cursor)
7111{
7112 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6927 eina_stringshare_replace(&it->mouse_cursor, cursor); 7113 eina_stringshare_replace(&it->mouse_cursor, cursor);
6928 if (VIEW(it)) elm_widget_item_cursor_set(it, cursor); 7114 if (VIEW(it)) eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
7115 elm_wdg_item_cursor_set(cursor));
6929} 7116}
6930 7117
6931EAPI const char * 7118EAPI const char *
6932elm_genlist_item_cursor_get(const Elm_Object_Item *it) 7119elm_genlist_item_cursor_get(const Elm_Object_Item *eo_it)
6933{ 7120{
6934 return elm_widget_item_cursor_get(it); 7121 return eo_do((Eo *)eo_it, elm_wdg_item_cursor_get());
6935} 7122}
6936 7123
6937EAPI void 7124EAPI void
6938elm_genlist_item_cursor_unset(Elm_Object_Item *item) 7125elm_genlist_item_cursor_unset(Elm_Object_Item *item)
6939{ 7126{
6940 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7127 eo_do((Eo *)item, elm_wdg_item_cursor_unset());
7128}
6941 7129
6942 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7130EOLIAN static void
7131_elm_genlist_item_elm_widget_item_cursor_unset(Eo *eo_it, Elm_Gen_Item *it)
7132{
7133 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6943 7134
6944 if (!it->mouse_cursor) return; 7135 if (!it->mouse_cursor) return;
6945 7136
6946 if (VIEW(it)) elm_widget_item_cursor_unset(it); 7137 if (VIEW(it)) eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS,
7138 elm_wdg_item_cursor_unset());
6947 7139
6948 ELM_SAFE_FREE(it->mouse_cursor, eina_stringshare_del); 7140 ELM_SAFE_FREE(it->mouse_cursor, eina_stringshare_del);
6949} 7141}
6950 7142
6951EAPI void 7143EAPI void
6952elm_genlist_item_cursor_style_set(Elm_Object_Item *it, 7144elm_genlist_item_cursor_style_set(Elm_Object_Item *eo_it,
6953 const char *style) 7145 const char *style)
6954{ 7146{
6955 elm_widget_item_cursor_style_set(it, style); 7147 eo_do((Eo *)eo_it, elm_wdg_item_cursor_style_set(style));
6956} 7148}
6957 7149
6958EAPI const char * 7150EAPI const char *
6959elm_genlist_item_cursor_style_get(const Elm_Object_Item *it) 7151elm_genlist_item_cursor_style_get(const Elm_Object_Item *eo_it)
6960{ 7152{
6961 return elm_widget_item_cursor_style_get(it); 7153 return eo_do((Eo *) eo_it, elm_wdg_item_cursor_style_get());
6962} 7154}
6963 7155
6964EAPI void 7156EAPI void
6965elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *it, 7157elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *eo_it,
6966 Eina_Bool engine_only) 7158 Eina_Bool engine_only)
6967{ 7159{
6968 elm_widget_item_cursor_engine_only_set(it, engine_only); 7160 eo_do((Eo *)eo_it, elm_wdg_item_cursor_engine_only_set(engine_only));
6969} 7161}
6970 7162
6971EAPI Eina_Bool 7163EAPI Eina_Bool
6972elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it) 7164elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
6973{ 7165{
6974 return elm_widget_item_cursor_engine_only_get(it); 7166 return eo_do((Eo *) eo_it, elm_wdg_item_cursor_engine_only_get());
6975} 7167}
6976 7168
6977EAPI int 7169EAPI int
6978elm_genlist_item_index_get(const Elm_Object_Item *item) 7170elm_genlist_item_index_get(const Elm_Object_Item *item)
6979{ 7171{
6980 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7172 return eo_do((Eo *)item, elm_obj_genlist_item_index_get());
7173}
6981 7174
6982 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, -1); 7175EOLIAN static int
7176_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7177{
7178 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1);
6983 7179
6984 if (it->item->block) 7180 if (it->item->block)
6985 return it->position + (it->item->block->position * 7181 return it->position + (it->item->block->position *
@@ -7131,17 +7327,24 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *item,
7131 const char *decorate_it_type, 7327 const char *decorate_it_type,
7132 Eina_Bool decorate_it_set) 7328 Eina_Bool decorate_it_set)
7133{ 7329{
7134 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7330 eo_do((Eo *)item, elm_obj_genlist_item_decorate_mode_set(decorate_it_type, decorate_it_set));
7331}
7332
7333EOLIAN static void
7334_elm_genlist_item_decorate_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7335 const char *decorate_it_type,
7336 Eina_Bool decorate_it_set)
7337{
7135 Elm_Genlist_Data *sd; 7338 Elm_Genlist_Data *sd;
7136 Elm_Object_Item *it2;
7137 Eina_List *l; 7339 Eina_List *l;
7340 Elm_Object_Item *eo_it2 = NULL;
7138 7341
7139 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7342 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
7140 sd = GL_IT(it)->wsd; 7343 sd = GL_IT(it)->wsd;
7141 7344
7142 if (!decorate_it_type) return; 7345 if (!decorate_it_type) return;
7143 if ((it->generation < sd->generation) || 7346 if ((it->generation < sd->generation) ||
7144 elm_widget_item_disabled_get(it)) return; 7347 eo_do(eo_it, elm_wdg_item_disabled_get())) return;
7145 if (sd->decorate_all_mode) return; 7348 if (sd->decorate_all_mode) return;
7146 7349
7147 if ((sd->mode_item == it) && 7350 if ((sd->mode_item == it) &&
@@ -7153,15 +7356,20 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *item,
7153 7356
7154 if (sd->multi) 7357 if (sd->multi)
7155 { 7358 {
7156 EINA_LIST_FOREACH(sd->selected, l, it2) 7359 EINA_LIST_FOREACH(sd->selected, l, eo_it2)
7157 if (((Elm_Gen_Item *)it2)->realized) 7360 {
7158 elm_genlist_item_selected_set(it2, EINA_FALSE); 7361 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
7362 if (it2->realized)
7363 elm_genlist_item_selected_set(eo_it2, EINA_FALSE);
7364 }
7159 } 7365 }
7160 else 7366 else
7161 { 7367 {
7162 it2 = elm_genlist_selected_item_get(sd->obj); 7368 Elm_Gen_Item *it2 = NULL;
7163 if ((it2) && (((Elm_Gen_Item *)it2)->realized)) 7369 eo_it2 = elm_genlist_selected_item_get(sd->obj);
7164 elm_genlist_item_selected_set(it2, EINA_FALSE); 7370 if (eo_it2) it2 = eo_data_scope_get((Eo *)eo_it2, ELM_GENLIST_ITEM_CLASS);
7371 if (it2 && it2->realized)
7372 elm_genlist_item_selected_set(eo_it2, EINA_FALSE);
7165 } 7373 }
7166 7374
7167 if (((sd->decorate_it_type) 7375 if (((sd->decorate_it_type)
@@ -7176,16 +7384,21 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *item,
7176EAPI const char * 7384EAPI const char *
7177elm_genlist_item_decorate_mode_get(const Elm_Object_Item *item) 7385elm_genlist_item_decorate_mode_get(const Elm_Object_Item *item)
7178{ 7386{
7179 Elm_Gen_Item *i = (Elm_Gen_Item *)item; 7387 return eo_do((Eo *)item, elm_obj_genlist_item_decorate_mode_get());
7388}
7180 7389
7181 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, NULL); 7390EOLIAN static const char *
7391_elm_genlist_item_decorate_mode_get(Eo *eo_i EINA_UNUSED, Elm_Gen_Item *i)
7392{
7393 ELM_GENLIST_ITEM_CHECK_OR_RETURN(i, NULL);
7182 return GL_IT(i)->wsd->decorate_it_type; 7394 return GL_IT(i)->wsd->decorate_it_type;
7183} 7395}
7184 7396
7185EOLIAN static Elm_Object_Item* 7397EOLIAN static Elm_Object_Item *
7186_elm_genlist_decorated_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd) 7398_elm_genlist_decorated_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
7187{ 7399{
7188 return (Elm_Object_Item *)sd->mode_item; 7400 Elm_Gen_Item *it = sd->mode_item;
7401 return it?(Elm_Object_Item *)EO_OBJ(it):NULL;
7189} 7402}
7190 7403
7191EOLIAN static Eina_Bool 7404EOLIAN static Eina_Bool
@@ -7197,7 +7410,7 @@ _elm_genlist_decorate_mode_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
7197EOLIAN static void 7410EOLIAN static void
7198_elm_genlist_decorate_mode_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Bool decorated) 7411_elm_genlist_decorate_mode_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Bool decorated)
7199{ 7412{
7200 Elm_Gen_Item *it; 7413 Elm_Object_Item *eo_it;
7201 Eina_List *list; 7414 Eina_List *list;
7202 Elm_Object_Item *deco_it; 7415 Elm_Object_Item *deco_it;
7203 7416
@@ -7211,8 +7424,9 @@ _elm_genlist_decorate_mode_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Bool decorate
7211 list = elm_genlist_realized_items_get(obj); 7424 list = elm_genlist_realized_items_get(obj);
7212 if (!sd->decorate_all_mode) 7425 if (!sd->decorate_all_mode)
7213 { 7426 {
7214 EINA_LIST_FREE(list, it) 7427 EINA_LIST_FREE(list, eo_it)
7215 { 7428 {
7429 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
7216 if (it->item->type != ELM_GENLIST_ITEM_GROUP) 7430 if (it->item->type != ELM_GENLIST_ITEM_GROUP)
7217 _decorate_all_item_unrealize(it); 7431 _decorate_all_item_unrealize(it);
7218 } 7432 }
@@ -7230,8 +7444,9 @@ _elm_genlist_decorate_mode_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Bool decorate
7230 _decorate_item_finished_signal_cb(deco_it, obj, NULL, NULL); 7444 _decorate_item_finished_signal_cb(deco_it, obj, NULL, NULL);
7231 } 7445 }
7232 7446
7233 EINA_LIST_FREE(list, it) 7447 EINA_LIST_FREE(list, eo_it)
7234 { 7448 {
7449 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
7235 if (it->item->type != ELM_GENLIST_ITEM_GROUP) 7450 if (it->item->type != ELM_GENLIST_ITEM_GROUP)
7236 { 7451 {
7237 if (it->itc->decorate_all_item_style) 7452 if (it->itc->decorate_all_item_style)
@@ -7248,13 +7463,14 @@ EOLIAN static void
7248_elm_genlist_reorder_mode_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool reorder_mode) 7463_elm_genlist_reorder_mode_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool reorder_mode)
7249{ 7464{
7250 Eina_List *realized; 7465 Eina_List *realized;
7251 Elm_Gen_Item *it; 7466 Elm_Object_Item *eo_it;
7252 7467
7253 if (sd->reorder_mode == !!reorder_mode) return; 7468 if (sd->reorder_mode == !!reorder_mode) return;
7254 sd->reorder_mode = !!reorder_mode; 7469 sd->reorder_mode = !!reorder_mode;
7255 realized = elm_genlist_realized_items_get(obj); 7470 realized = elm_genlist_realized_items_get(obj);
7256 EINA_LIST_FREE(realized, it) 7471 EINA_LIST_FREE(realized, eo_it)
7257 { 7472 {
7473 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
7258 if (it->item->type != ELM_GENLIST_ITEM_GROUP) 7474 if (it->item->type != ELM_GENLIST_ITEM_GROUP)
7259 { 7475 {
7260 Evas_Object *view; 7476 Evas_Object *view;
@@ -7280,9 +7496,13 @@ _elm_genlist_reorder_mode_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
7280EAPI Elm_Genlist_Item_Type 7496EAPI Elm_Genlist_Item_Type
7281elm_genlist_item_type_get(const Elm_Object_Item *item) 7497elm_genlist_item_type_get(const Elm_Object_Item *item)
7282{ 7498{
7283 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7499 return eo_do((Eo *)item, elm_obj_genlist_item_type_get());
7500}
7284 7501
7285 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, ELM_GENLIST_ITEM_MAX); 7502EOLIAN static Elm_Genlist_Item_Type
7503_elm_genlist_item_type_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7504{
7505 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, ELM_GENLIST_ITEM_MAX);
7286 7506
7287 return it->item->type; 7507 return it->item->type;
7288} 7508}
@@ -7358,9 +7578,13 @@ EAPI void
7358elm_genlist_item_flip_set(Elm_Object_Item *item, 7578elm_genlist_item_flip_set(Elm_Object_Item *item,
7359 Eina_Bool flip) 7579 Eina_Bool flip)
7360{ 7580{
7361 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7581 eo_do((Eo *)item, elm_obj_genlist_item_flip_set(flip));
7582}
7362 7583
7363 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7584EOLIAN static void
7585_elm_genlist_item_flip_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bool flip)
7586{
7587 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
7364 7588
7365 flip = !!flip; 7589 flip = !!flip;
7366 if (it->flipped == flip) return; 7590 if (it->flipped == flip) return;
@@ -7373,7 +7597,7 @@ elm_genlist_item_flip_set(Elm_Object_Item *item,
7373 { 7597 {
7374 it->flipped = flip; 7598 it->flipped = flip;
7375 _item_cache_zero(GL_IT(it)->wsd); 7599 _item_cache_zero(GL_IT(it)->wsd);
7376 elm_genlist_item_update(item); 7600 elm_genlist_item_update((Elm_Object_Item *)eo_it);
7377 it->item->nocache = EINA_FALSE; 7601 it->item->nocache = EINA_FALSE;
7378 } 7602 }
7379} 7603}
@@ -7381,9 +7605,13 @@ elm_genlist_item_flip_set(Elm_Object_Item *item,
7381EAPI Eina_Bool 7605EAPI Eina_Bool
7382elm_genlist_item_flip_get(const Elm_Object_Item *item) 7606elm_genlist_item_flip_get(const Elm_Object_Item *item)
7383{ 7607{
7384 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7608 return eo_do((Eo *)item, elm_obj_genlist_item_flip_get());
7609}
7385 7610
7386 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); 7611EOLIAN static Eina_Bool
7612_elm_genlist_item_flip_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7613{
7614 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
7387 7615
7388 return it->flipped; 7616 return it->flipped;
7389} 7617}
@@ -7420,9 +7648,14 @@ EAPI void
7420elm_genlist_item_select_mode_set(Elm_Object_Item *item, 7648elm_genlist_item_select_mode_set(Elm_Object_Item *item,
7421 Elm_Object_Select_Mode mode) 7649 Elm_Object_Select_Mode mode)
7422{ 7650{
7423 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7651 eo_do((Eo *)item, elm_obj_genlist_item_select_mode_set(mode));
7652}
7424 7653
7425 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); 7654EOLIAN static void
7655_elm_genlist_item_select_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7656 Elm_Object_Select_Mode mode)
7657{
7658 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
7426 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 7659 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
7427 7660
7428 if (it->generation < sd->generation) return; 7661 if (it->generation < sd->generation) return;
@@ -7453,8 +7686,13 @@ elm_genlist_item_select_mode_set(Elm_Object_Item *item,
7453EAPI Elm_Object_Select_Mode 7686EAPI Elm_Object_Select_Mode
7454elm_genlist_item_select_mode_get(const Elm_Object_Item *item) 7687elm_genlist_item_select_mode_get(const Elm_Object_Item *item)
7455{ 7688{
7456 Elm_Gen_Item *it = (Elm_Gen_Item *)item; 7689 return eo_do((Eo *)item, elm_obj_genlist_item_select_mode_get());
7457 ELM_GENLIST_ITEM_CHECK_OR_RETURN(item, ELM_OBJECT_SELECT_MODE_MAX); 7690}
7691
7692EOLIAN static Elm_Object_Select_Mode
7693_elm_genlist_item_select_mode_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7694{
7695 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, ELM_OBJECT_SELECT_MODE_MAX);
7458 7696
7459 return it->select_mode; 7697 return it->select_mode;
7460} 7698}
@@ -7500,7 +7738,7 @@ elm_genlist_nth_item_get(const Evas_Object *obj, unsigned int nth)
7500 if (eina_accessor_data_get(a, nth, &data)) 7738 if (eina_accessor_data_get(a, nth, &data))
7501 it = ELM_GEN_ITEM_FROM_INLIST(data); 7739 it = ELM_GEN_ITEM_FROM_INLIST(data);
7502 eina_accessor_free(a); 7740 eina_accessor_free(a);
7503 return (Elm_Object_Item *)it; 7741 return EO_OBJ(it);
7504} 7742}
7505 7743
7506EOLIAN static void 7744EOLIAN static void
@@ -7564,17 +7802,17 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
7564#endif 7802#endif
7565 7803
7566 start = (item_to_search_from) ? 7804 start = (item_to_search_from) ?
7567 EINA_INLIST_GET((Elm_Gen_Item *)item_to_search_from) : 7805 EINA_INLIST_GET((Elm_Gen_Item *)eo_data_scope_get((Eo *)item_to_search_from, ELM_GENLIST_ITEM_CLASS)) :
7568 sd->items; 7806 sd->items;
7569 EINA_INLIST_FOREACH(start, it) 7807 EINA_INLIST_FOREACH(start, it)
7570 { 7808 {
7571 if (!it->itc->func.text_get) continue; 7809 if (!it->itc->func.text_get) continue;
7572 str = it->itc->func.text_get((void *)it->base.data, WIDGET(it), part_name); 7810 str = it->itc->func.text_get((void *)it->base->data, WIDGET(it), part_name);
7573 if (!str) continue; 7811 if (!str) continue;
7574 if (!fnmatch(pattern, str, fnflags)) 7812 if (!fnmatch(pattern, str, fnflags))
7575 { 7813 {
7576 free(str); 7814 free(str);
7577 return (Elm_Object_Item *)it; 7815 return EO_OBJ(it);
7578 } 7816 }
7579 free(str); 7817 free(str);
7580 } 7818 }
@@ -7584,7 +7822,7 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
7584EOLIAN static Elm_Object_Item* 7822EOLIAN static Elm_Object_Item*
7585_elm_genlist_elm_widget_focused_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd) 7823_elm_genlist_elm_widget_focused_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
7586{ 7824{
7587 return sd->focused_item; 7825 return EO_OBJ(sd->focused_item);
7588} 7826}
7589 7827
7590EOLIAN static void 7828EOLIAN static void
@@ -7638,3 +7876,4 @@ _elm_genlist_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUS
7638} 7876}
7639 7877
7640#include "elm_genlist.eo.c" 7878#include "elm_genlist.eo.c"
7879#include "elm_genlist_item.eo.c"
diff --git a/src/lib/elm_genlist_common.h b/src/lib/elm_genlist_common.h
index 20df24dd7..40cd95954 100644
--- a/src/lib/elm_genlist_common.h
+++ b/src/lib/elm_genlist_common.h
@@ -69,162 +69,24 @@ typedef Elm_Gen_Item_State_Get_Cb Elm_Genlist_Item_State_Get_Cb;
69 */ 69 */
70typedef Elm_Gen_Item_Del_Cb Elm_Genlist_Item_Del_Cb; 70typedef Elm_Gen_Item_Del_Cb Elm_Genlist_Item_Del_Cb;
71 71
72/**
73 * Get the @b next item in a genlist widget's internal list of items,
74 * given a handle to one of those items.
75 *
76 * @param it The genlist item to fetch next from
77 * @return The item after @p item, or @c NULL if there's none (and
78 * on errors)
79 *
80 * This returns the item placed after the @p item, on the container
81 * genlist.
82 *
83 * @see elm_genlist_item_prev_get()
84 *
85 * @ingroup Genlist
86 */
87EAPI Elm_Object_Item *elm_genlist_item_next_get(const Elm_Object_Item *it); 72EAPI Elm_Object_Item *elm_genlist_item_next_get(const Elm_Object_Item *it);
88 73
89/**
90 * Get the @b previous item in a genlist widget's internal list of items,
91 * given a handle to one of those items.
92 *
93 * @param it The genlist item to fetch previous from
94 * @return The item before @p item, or @c NULL if there's none (and
95 * on errors)
96 *
97 * This returns the item placed before the @p item, on the container
98 * genlist.
99 *
100 * @see elm_genlist_item_next_get()
101 *
102 * @ingroup Genlist
103 */
104EAPI Elm_Object_Item *elm_genlist_item_prev_get(const Elm_Object_Item *it); 74EAPI Elm_Object_Item *elm_genlist_item_prev_get(const Elm_Object_Item *it);
105 75
106/**
107 * Set whether a given genlist item is selected or not
108 *
109 * @param it The item
110 * @param selected Use @c EINA_TRUE, to make it selected, @c
111 * EINA_FALSE to make it unselected
112 *
113 * This sets the selected state of an item. If multi selection is
114 * not enabled on the containing genlist and @p selected is @c
115 * EINA_TRUE, any other previously selected items will get
116 * unselected in favor of this new one.
117 *
118 * @see elm_genlist_item_selected_get()
119 *
120 * @ingroup Genlist
121 */
122EAPI void elm_genlist_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); 76EAPI void elm_genlist_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
123 77
124/**
125 * Get whether a given genlist item is selected or not
126 *
127 * @param it The item
128 * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
129 *
130 * @see elm_genlist_item_selected_set() for more details
131 *
132 * @ingroup Genlist
133 */
134EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Object_Item *it); 78EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Object_Item *it);
135 79
136/**
137 * Show the portion of a genlist's internal list containing a given
138 * item, immediately.
139 *
140 * @param it The item to display
141 * @param type The position to bring in, the given item to.
142 * @ref Elm_Genlist_Item_Scrollto_Type
143 *
144 * This causes genlist to jump to the given item @p it and show it (by
145 * jumping to that position), if it is not fully visible.
146 *
147 * @see elm_genlist_item_bring_in()
148 *
149 * @ingroup Genlist
150 */
151EAPI void elm_genlist_item_show(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type); 80EAPI void elm_genlist_item_show(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type);
152 81
153/**
154 * Animatedly bring in, to the visible area of a genlist, a given
155 * item on it.
156 *
157 * @param it The item to display
158 * @param type The position to bring in, the given item to.
159 * @ref Elm_Genlist_Item_Scrollto_Type
160 *
161 * This causes genlist to jump to the given item @p it and show it (by
162 * animatedly scrolling), if it is not fully visible.
163 * This may use animation and take a some time to do so.
164 *
165 * @see elm_genlist_item_show()
166 *
167 * @ingroup Genlist
168 */
169EAPI void elm_genlist_item_bring_in(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type); 82EAPI void elm_genlist_item_bring_in(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type);
170 83
171/**
172 * Update all the contents of an item
173 *
174 * @param it The item
175 *
176 * This updates an item by calling all the item class functions again
177 * to get the contents, texts and states. Use this when the original
178 * item data has changed and the changes are desired to be reflected.
179 *
180 * Use elm_genlist_realized_items_update() to update all already realized
181 * items.
182 *
183 * @note This also updates internal genlist item object(edje_object as of now).
184 * So when this is called between mouse down and mouse up, mouse up event will
185 * be ignored because edje_object is deleted and created again by this API. If
186 * you want to avoid this, please use @ref elm_genlist_item_fields_update.
187 *
188 * @see elm_genlist_realized_items_update()
189 *
190 * @ingroup Genlist
191 */
192EAPI void elm_genlist_item_update(Elm_Object_Item *it); 84EAPI void elm_genlist_item_update(Elm_Object_Item *it);
193 85
194/**
195 * Update the item class of an item
196 *
197 * @param it The item
198 * @param itc The item class for the item
199 *
200 * This sets another class of the item, changing the way that it is
201 * displayed. After changing the item class, elm_genlist_item_update() is
202 * called on the item @p it.
203 *
204 * @ingroup Genlist
205 */
206EAPI void elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc); 86EAPI void elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc);
207 87
208/**
209 * Get the Genlist Item class for the given Genlist Item.
210 *
211 * @param it The genlist item
212 *
213 * This returns the Genlist_Item_Class for the given item. It can be used to
214 * examine the function pointers and item_style.
215 *
216 * @ingroup Genlist
217 */
218EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it); 88EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it);
219 89
220/**
221 * Get the index of the item. It is only valid once displayed.
222 *
223 * @param it a genlist item
224 * @return the position inside the list of item.
225 *
226 * @ingroup Genlist
227 */
228EAPI int elm_genlist_item_index_get(const Elm_Object_Item *it); 90EAPI int elm_genlist_item_index_get(const Elm_Object_Item *it);
229 91
230/** 92/**
@@ -545,304 +407,41 @@ EAPI void elm_genlist_item_cursor_engine_only_set(Elm_O
545 */ 407 */
546EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it); 408EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it);
547 409
548/**
549 * Get the parent item of the given item
550 *
551 * @param it The item
552 * @return The parent of the item or @c NULL if it has no parent.
553 *
554 * This returns the item that was specified as parent of the item @p it on
555 * elm_genlist_item_append() and insertion related functions.
556 *
557 * @ingroup Genlist
558 */
559EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_Item *it); 410EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_Item *it);
560 411
561/**
562 * Get the number of subitems of a given item
563 *
564 * @param it The item
565 * @return The number of subitems, 0 on error
566 *
567 * This returns the number of subitems that an item possesses.
568 *
569 * @since 1.9
570 * @ingroup Genlist
571 */
572EAPI unsigned int elm_genlist_item_subitems_count(const Elm_Object_Item *it); 412EAPI unsigned int elm_genlist_item_subitems_count(const Elm_Object_Item *it);
573 413
574/**
575 * Get the list of subitems of a given item
576 *
577 * @param it The item
578 * @return The list of subitems, @c NULL on error
579 *
580 * This returns the list of subitems that an item possesses. It cannot be changed.
581 *
582 * @since 1.9
583 * @ingroup Genlist
584 */
585EAPI const Eina_List *elm_genlist_item_subitems_get(const Elm_Object_Item *it); 414EAPI const Eina_List *elm_genlist_item_subitems_get(const Elm_Object_Item *it);
586/**
587 * Remove all sub-items (children) of the given item
588 *
589 * @param it The item
590 *
591 * This removes all items that are children (and their descendants) of the
592 * given item @p it.
593 *
594 * @see elm_genlist_clear()
595 * @see elm_object_item_del()
596 *
597 * @ingroup Genlist
598 */
599EAPI void elm_genlist_item_subitems_clear(Elm_Object_Item *it); 415EAPI void elm_genlist_item_subitems_clear(Elm_Object_Item *it);
600 416
601/**
602 * Sets the expanded state of an item.
603 *
604 * @param it The item
605 * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded).
606 *
607 * This function flags the item of type #ELM_GENLIST_ITEM_TREE as
608 * expanded or not.
609 *
610 * The theme will respond to this change visually, and a signal "expanded" or
611 * "contracted" will be sent from the genlist with a pointer to the item that
612 * has been expanded/contracted.
613 *
614 * Calling this function won't show or hide any child of this item (if it is
615 * a parent). You must manually delete and create them on the callbacks of
616 * the "expanded" or "contracted" signals.
617 *
618 * @see elm_genlist_item_expanded_get()
619 *
620 * @ingroup Genlist
621 */
622EAPI void elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded); 417EAPI void elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded);
623 418
624/**
625 * Get the expanded state of an item
626 *
627 * @param it The item
628 * @return The expanded state
629 *
630 * This gets the expanded state of an item.
631 *
632 * @see elm_genlist_item_expanded_set()
633 *
634 * @ingroup Genlist
635 */
636EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Object_Item *it); 419EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Object_Item *it);
637 420
638/**
639 * Get the depth of expanded item
640 *
641 * @param it The genlist item object
642 * @return The depth of expanded item
643 *
644 * @ingroup Genlist
645 */
646EAPI int elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it); 421EAPI int elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it);
647 422
648/**
649 * Unset all contents fetched by the item class
650 *
651 * @param it The item
652 * @param l The contents list to return
653 *
654 * This instructs genlist to release references to contents in the item,
655 * meaning that they will no longer be managed by genlist and are
656 * floating "orphans" that can be re-used elsewhere if the user wants
657 * to.
658 *
659 * @ingroup Genlist
660 */
661EAPI void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l); 423EAPI void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l);
662 424
663/**
664 * Promote an item to the top of the list
665 *
666 * @param it The item
667 *
668 * @ingroup Genlist
669 */
670EAPI void elm_genlist_item_promote(Elm_Object_Item *it); 425EAPI void elm_genlist_item_promote(Elm_Object_Item *it);
671 426
672/**
673 * Demote an item to the end of the list
674 *
675 * @param it The item
676 *
677 * @ingroup Genlist
678 */
679EAPI void elm_genlist_item_demote(Elm_Object_Item *it); 427EAPI void elm_genlist_item_demote(Elm_Object_Item *it);
680 428
681/**
682 * Update the part of an item
683 *
684 * @param it The item
685 * @param parts The name of item's part
686 * @param itf The type of item's part type
687 *
688 * This updates an item's part by calling item's fetching functions again
689 * to get the contents, texts and states. Use this when the original
690 * item data has changed and the changes are desired to be reflected.
691 * Second parts argument is used for globbing to match '*', '?', and '.'
692 * It can be used at updating multi fields.
693 *
694 * Use elm_genlist_realized_items_update() to update an item's all
695 * property.
696 *
697 * @see elm_genlist_item_update()
698 *
699 * @ingroup Genlist
700 */
701EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Type itf); 429EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Type itf);
702 430
703/**
704 * Activate a genlist mode on an item
705 *
706 * @param it The genlist item
707 * @param decorate_it_type Mode name
708 * @param decorate_it_set Boolean to define set or unset mode.
709
710 *
711 * A genlist mode is a different way of selecting an item. Once a mode is
712 * activated on an item, any other selected item is immediately unselected.
713 * This feature provides an easy way of implementing a new kind of animation
714 * for selecting an item, without having to entirely rewrite the item style
715 * theme. However, the elm_genlist_selected_* API can't be used to get what
716 * item is activate for a mode.
717 *
718 * The current item style will still be used, but applying a genlist mode to
719 * an item will select it using a different kind of animation.
720 *
721 * The current active item for a mode can be found by
722 * elm_genlist_decorated_item_get().
723 *
724 * The characteristics of genlist mode are:
725 * - Only one mode can be active at any time, and for only one item.
726 * - Genlist handles deactivating other items when one item is activated.
727 * - A mode is defined in the genlist theme (edc), and more modes can easily
728 * be added.
729 * - A mode style and the genlist item style are different things. They
730 * can be combined to provide a default style to the item, with some kind
731 * of animation for that item when the mode is activated.
732 *
733 * When a mode is activated on an item, a new view for that item is created.
734 * The theme of this mode defines the animation that will be used to transit
735 * the item from the old view to the new view. This second (new) view will be
736 * active for that item while the mode is active on the item, and will be
737 * destroyed after the mode is totally deactivated from that item.
738 *
739 * @see elm_genlist_mode_get()
740 * @see elm_genlist_decorated_item_get()
741 *
742 * @ingroup Genlist
743 */
744EAPI void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *decorate_it_type, Eina_Bool decorate_it_set); 431EAPI void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *decorate_it_type, Eina_Bool decorate_it_set);
745 432
746/**
747 * Get the item's decorate mode.
748 *
749 * @param it The genlist item
750 *
751 * This function just returns the name of the item's decorate mode.
752 *
753 * @see elm_genlist_item_decorate_mode_set()
754 * @see elm_genlist_decorated_item_get()
755 *
756 * @ingroup Genlist
757 */
758EAPI const char *elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it); 433EAPI const char *elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it);
759 434
760/**
761 * Get the Item's Type
762 *
763 * @param it The genlist item
764 * @return The item type.
765 *
766 * This function returns the item's type. Normally the item's type.
767 * If it failed, return value is ELM_GENLIST_ITEM_MAX
768 *
769 * @ingroup Genlist
770 */
771EAPI Elm_Genlist_Item_Type elm_genlist_item_type_get(const Elm_Object_Item *it); 435EAPI Elm_Genlist_Item_Type elm_genlist_item_type_get(const Elm_Object_Item *it);
772 436
773/**
774 * Set the flip state of a given genlist item.
775 *
776 * @param it The genlist item object
777 * @param flip The flip mode
778 * (@c EINA_TRUE = on, @c EINA_FALSE = off)
779 *
780 * This function sets the flip state of a given genlist item.
781 * Flip mode overrides current item object.
782 * It can be used for on-the-fly item replace.
783 * Flip mode can be used with/without decorate mode.
784 *
785 * @see elm_genlist_item_flip_get()
786 *
787 * @ingroup Genlist
788 */
789EAPI void elm_genlist_item_flip_set(Elm_Object_Item *it, Eina_Bool flip); 437EAPI void elm_genlist_item_flip_set(Elm_Object_Item *it, Eina_Bool flip);
790 438
791/**
792 * Get the flip state of a given genlist item.
793 *
794 * @param it The genlist item object
795 *
796 * This function returns the flip state of a given genlist item.
797 * If the parameter is invalid, it returns @c EINA_FALSE.
798 *
799 * @see elm_genlist_item_flip_set()
800 *
801 * @ingroup Genlist
802 */
803EAPI Eina_Bool elm_genlist_item_flip_get(const Elm_Object_Item *it); 439EAPI Eina_Bool elm_genlist_item_flip_get(const Elm_Object_Item *it);
804 440
805/**
806 * Set the genlist item's select mode.
807 *
808 * @param it The genlist item object
809 * @param mode The select mode
810 *
811 * elm_genlist_select_mode_set() changes item's select mode.
812 * - ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
813 * callback when first becoming selected. Any further clicks will
814 * do nothing, unless you set always select mode.
815 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
816 * every click will make the selected callbacks be called.
817 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
818 * entirely and they will neither appear selected nor call selected
819 * callback functions.
820 * - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
821 * with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
822 * smaller than lower limit. Clickable objects should be bigger than
823 * human touch point device (your finger) for some touch or
824 * small screen devices. So it is enabled, the item can be shrink than
825 * predefined finger-size value. And the item will be updated.
826 *
827 * @see elm_genlist_item_select_mode_get()
828 *
829 * @ingroup Genlist
830 */
831EAPI void 441EAPI void
832elm_genlist_item_select_mode_set(Elm_Object_Item *it, 442elm_genlist_item_select_mode_set(Elm_Object_Item *it,
833 Elm_Object_Select_Mode mode); 443 Elm_Object_Select_Mode mode);
834 444
835/**
836 * Get the genlist item's select mode.
837 *
838 * @param it The genlist item object
839 * @return The select mode
840 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
841 *
842 * @see elm_genlist_item_select_mode_set()
843 *
844 * @ingroup Genlist
845 */
846EAPI Elm_Object_Select_Mode 445EAPI Elm_Object_Select_Mode
847elm_genlist_item_select_mode_get(const Elm_Object_Item *it); 446elm_genlist_item_select_mode_get(const Elm_Object_Item *it);
848 447
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
new file mode 100644
index 000000000..95177b447
--- /dev/null
+++ b/src/lib/elm_genlist_item.eo
@@ -0,0 +1,509 @@
1class Elm_Genlist_Item(Elm_Widget_Item)
2{
3 legacy_prefix: null;