summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-23 15:52:31 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-27 09:26:41 +0900
commit254ff7926b271ca8825dae7f370544f9c669df1a (patch)
tree3ad3371f0a19c75f633c01c6dd41214f02ff1df4 /src/lib/elementary
parent473d4312416fb4e512de60b0bcf3014d7e4f85a1 (diff)
genlist: Remove macro GL_IT()
It was used to hide "it->item"... but was used less than it->item itself. Explicit code here is not longer, and just as readable. This macro I think was harmful to readability. Simple sed, no real change at all.
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_genlist.c152
-rw-r--r--src/lib/elementary/elm_widget_genlist.h4
2 files changed, 77 insertions, 79 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 1e4df6d8e1..7d6370a355 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -551,7 +551,7 @@ static Evas_Object *
551_view_create(Elm_Gen_Item *it, const char *style) 551_view_create(Elm_Gen_Item *it, const char *style)
552{ 552{
553 Evas_Object *view = edje_object_add(evas_object_evas_get(WIDGET(it))); 553 Evas_Object *view = edje_object_add(evas_object_evas_get(WIDGET(it)));
554 evas_object_smart_member_add(view, GL_IT(it)->wsd->pan_obj); 554 evas_object_smart_member_add(view, it->item->wsd->pan_obj);
555 elm_widget_sub_object_add(WIDGET(it), view); 555 elm_widget_sub_object_add(WIDGET(it), view);
556 edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) * 556 edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
557 elm_config_scale_get()); 557 elm_config_scale_get());
@@ -647,7 +647,7 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it,
647 Eina_Bool calc) 647 Eina_Bool calc)
648{ 648{
649 if (!it->realized) return; 649 if (!it->realized) return;
650 if (GL_IT(it)->wsd->reorder_it == it) 650 if (it->item->wsd->reorder_it == it)
651 { 651 {
652 WRN("reordering item should not be unrealized"); 652 WRN("reordering item should not be unrealized");
653 return; 653 return;
@@ -684,7 +684,7 @@ _item_block_unrealize(Item_Block *itb)
684 684
685 EINA_LIST_FOREACH(itb->items, l, it) 685 EINA_LIST_FOREACH(itb->items, l, it)
686 { 686 {
687 if (itb->must_recalc || !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)) 687 if (itb->must_recalc || !(it->item->type & ELM_GENLIST_ITEM_GROUP))
688 { 688 {
689 if (it->dragging) 689 if (it->dragging)
690 { 690 {
@@ -1141,7 +1141,7 @@ _item_tree_effect_finish(Elm_Genlist_Data *sd)
1141 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 1141 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
1142 it->item->tree_effect_finished = EINA_TRUE; 1142 it->item->tree_effect_finished = EINA_TRUE;
1143 it->item->old_scrl_y = it->item->scrl_y; 1143 it->item->old_scrl_y = it->item->scrl_y;
1144 if (GL_IT(it)->wsd->move_effect_mode == 1144 if (it->item->wsd->move_effect_mode ==
1145 ELM_GENLIST_TREE_EFFECT_EXPAND) 1145 ELM_GENLIST_TREE_EFFECT_EXPAND)
1146 { 1146 {
1147 //XXX: for compat 1147 //XXX: for compat
@@ -1349,7 +1349,7 @@ _view_inflate(Evas_Object *view, Elm_Gen_Item *it, Eina_List **sources, Eina_Lis
1349static void 1349static void
1350_elm_genlist_item_index_update(Elm_Gen_Item *it) 1350_elm_genlist_item_index_update(Elm_Gen_Item *it)
1351{ 1351{
1352 if (it->position_update || GL_IT(it)->block->position_update) 1352 if (it->position_update || it->item->block->position_update)
1353 { 1353 {
1354 efl_event_callback_legacy_call 1354 efl_event_callback_legacy_call
1355 (WIDGET(it), ELM_GENLIST_EVENT_INDEX_UPDATE, EO_OBJ(it)); 1355 (WIDGET(it), ELM_GENLIST_EVENT_INDEX_UPDATE, EO_OBJ(it));
@@ -1362,7 +1362,7 @@ _decorate_all_item_position(Elm_Gen_Item *it,
1362 int itx, 1362 int itx,
1363 int ity) 1363 int ity)
1364{ 1364{
1365 if ((!it) || (!GL_IT(it)->wsd->decorate_all_mode)) return; 1365 if ((!it) || (!it->item->wsd->decorate_all_mode)) return;
1366 evas_object_resize(it->deco_all_view, it->item->w, it->item->h); 1366 evas_object_resize(it->deco_all_view, it->item->w, it->item->h);
1367 evas_object_move(it->deco_all_view, itx, ity); 1367 evas_object_move(it->deco_all_view, itx, ity);
1368} 1368}
@@ -1412,7 +1412,7 @@ _decorate_all_item_realize(Elm_Gen_Item *it,
1412 _elm_genlist_item_position_state_update(it); 1412 _elm_genlist_item_position_state_update(it);
1413 _elm_genlist_item_state_update(it); 1413 _elm_genlist_item_state_update(it);
1414 1414
1415 if (GL_IT(it)->wsd->reorder_mode) 1415 if (it->item->wsd->reorder_mode)
1416 { 1416 {
1417 edje_object_signal_emit(it->deco_all_view, SIGNAL_REORDER_MODE_UNSET, 1417 edje_object_signal_emit(it->deco_all_view, SIGNAL_REORDER_MODE_UNSET,
1418 "elm"); 1418 "elm");
@@ -1431,7 +1431,7 @@ _decorate_all_item_realize(Elm_Gen_Item *it,
1431 if (it->flipped) 1431 if (it->flipped)
1432 edje_object_signal_emit 1432 edje_object_signal_emit
1433 (it->deco_all_view, SIGNAL_FLIP_ENABLED, "elm"); 1433 (it->deco_all_view, SIGNAL_FLIP_ENABLED, "elm");
1434 _view_inflate(it->deco_all_view, it, NULL, &(GL_IT(it)->deco_all_contents)); 1434 _view_inflate(it->deco_all_view, it, NULL, &(it->item->deco_all_contents));
1435 edje_object_part_swallow 1435 edje_object_part_swallow
1436 (it->deco_all_view, "elm.swallow.decorate.content", VIEW(it)); 1436 (it->deco_all_view, "elm.swallow.decorate.content", VIEW(it));
1437 1437
@@ -1886,8 +1886,8 @@ _item_realize(Elm_Gen_Item *it,
1886 /* homogeneous genlist shortcut */ 1886 /* homogeneous genlist shortcut */
1887 if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) && size) 1887 if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) && size)
1888 { 1888 {
1889 GL_IT(it)->w = GL_IT(it)->minw = size->minw; 1889 it->item->w = it->item->minw = size->minw;
1890 GL_IT(it)->h = GL_IT(it)->minh = size->minh; 1890 it->item->h = it->item->minh = size->minh;
1891 size->expanded_depth = it->item->expanded_depth; 1891 size->expanded_depth = it->item->expanded_depth;
1892 it->item->mincalcd = EINA_TRUE; 1892 it->item->mincalcd = EINA_TRUE;
1893 } 1893 }
@@ -1904,7 +1904,7 @@ _item_realize(Elm_Gen_Item *it,
1904 if (it->flipped) 1904 if (it->flipped)
1905 { 1905 {
1906 edje_object_signal_emit(VIEW(it), SIGNAL_FLIP_ENABLED, "elm"); 1906 edje_object_signal_emit(VIEW(it), SIGNAL_FLIP_ENABLED, "elm");
1907 _item_content_realize(it, VIEW(it), &GL_IT(it)->flip_contents, 1907 _item_content_realize(it, VIEW(it), &it->item->flip_contents,
1908 "flips", NULL); 1908 "flips", NULL);
1909 } 1909 }
1910 1910
@@ -1916,11 +1916,11 @@ _item_realize(Elm_Gen_Item *it,
1916 { 1916 {
1917 if (sd->homogeneous && size) 1917 if (sd->homogeneous && size)
1918 { 1918 {
1919 GL_IT(it)->w = GL_IT(it)->minw = size->minw; 1919 it->item->w = it->item->minw = size->minw;
1920 GL_IT(it)->h = GL_IT(it)->minh = size->minh; 1920 it->item->h = it->item->minh = size->minh;
1921 it->item->mincalcd = EINA_TRUE; 1921 it->item->mincalcd = EINA_TRUE;
1922 if (GL_IT(it)->block->realized) 1922 if (it->item->block->realized)
1923 GL_IT(it)->w = GL_IT(it)->block->w; 1923 it->item->w = it->item->block->w;
1924 } 1924 }
1925 else 1925 else
1926 { 1926 {
@@ -2007,11 +2007,11 @@ _item_realize(Elm_Gen_Item *it,
2007 } 2007 }
2008 2008
2009 //Send a signal so that an item changes its style according to its expand depth 2009 //Send a signal so that an item changes its style according to its expand depth
2010 if (GL_IT(it)->expanded_depth > 0) 2010 if (it->item->expanded_depth > 0)
2011 { 2011 {
2012 char buf[126]; 2012 char buf[126];
2013 snprintf(buf, sizeof(buf), "elm,state,expanded_depth,%d", 2013 snprintf(buf, sizeof(buf), "elm,state,expanded_depth,%d",
2014 GL_IT(it)->expanded_depth); 2014 it->item->expanded_depth);
2015 edje_object_signal_emit(VIEW(it), buf, "elm"); 2015 edje_object_signal_emit(VIEW(it), buf, "elm");
2016 } 2016 }
2017 2017
@@ -2332,7 +2332,7 @@ _item_block_position(Item_Block *itb,
2332 2332
2333 EINA_LIST_FOREACH(itb->items, l, it) 2333 EINA_LIST_FOREACH(itb->items, l, it)
2334 { 2334 {
2335 sd = GL_IT(it)->wsd; 2335 sd = it->item->wsd;
2336 if (sd->reorder_it == it) continue; 2336 if (sd->reorder_it == it) continue;
2337 2337
2338 if (!it->filtered) _item_filtered_get(it); 2338 if (!it->filtered) _item_filtered_get(it);
@@ -2350,7 +2350,7 @@ _item_block_position(Item_Block *itb,
2350 vis = (ELM_RECTS_INTERSECT 2350 vis = (ELM_RECTS_INTERSECT
2351 (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h, 2351 (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
2352 cvx, cvy, cvw, cvh)); 2352 cvx, cvy, cvw, cvh));
2353 if (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)) 2353 if (!(it->item->type & ELM_GENLIST_ITEM_GROUP))
2354 { 2354 {
2355 if ((itb->realized) && (!it->realized)) 2355 if ((itb->realized) && (!it->realized))
2356 { 2356 {
@@ -2861,7 +2861,7 @@ _elm_genlist_item_content_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
2861 Eina_List *l; 2861 Eina_List *l;
2862 if (!it) return; 2862 if (!it) return;
2863 2863
2864 if (!GL_IT(it)->wsd->focus_on_selection_enabled) return; 2864 if (!it->item->wsd->focus_on_selection_enabled) return;
2865 2865
2866 if (!it->item_focus_chain) 2866 if (!it->item_focus_chain)
2867 { 2867 {
@@ -3683,7 +3683,7 @@ _decorate_all_item_unrealize(Elm_Gen_Item *it)
3683 if ((!it) || (!it->item->decorate_all_item_realized)) return; 3683 if ((!it) || (!it->item->decorate_all_item_realized)) return;
3684 3684
3685 edje_object_part_unswallow(it->deco_all_view, VIEW(it)); 3685 edje_object_part_unswallow(it->deco_all_view, VIEW(it));
3686 evas_object_smart_member_add(VIEW(it), GL_IT(it)->wsd->pan_obj); 3686 evas_object_smart_member_add(VIEW(it), it->item->wsd->pan_obj);
3687 elm_widget_sub_object_add(WIDGET(it), VIEW(it)); 3687 elm_widget_sub_object_add(WIDGET(it), VIEW(it));
3688 _elm_genlist_item_position_state_update(it); 3688 _elm_genlist_item_position_state_update(it);
3689 _elm_genlist_item_state_update(it); 3689 _elm_genlist_item_state_update(it);
@@ -3695,8 +3695,8 @@ _decorate_all_item_unrealize(Elm_Gen_Item *it)
3695 "elm"); 3695 "elm");
3696 } 3696 }
3697 3697
3698 _view_clear(it->deco_all_view, &(GL_IT(it)->deco_all_texts), 3698 _view_clear(it->deco_all_view, &(it->item->deco_all_texts),
3699 &(GL_IT(it)->deco_all_contents)); 3699 &(it->item->deco_all_contents));
3700 3700
3701 edje_object_signal_emit(VIEW(it), SIGNAL_DECORATE_DISABLED, "elm"); 3701 edje_object_signal_emit(VIEW(it), SIGNAL_DECORATE_DISABLED, "elm");
3702 3702
@@ -3748,7 +3748,7 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
3748 if (it->tooltip.del_cb) 3748 if (it->tooltip.del_cb)
3749 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it); 3749 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
3750 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 3750 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
3751 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) 3751 if (it->item->type & ELM_GENLIST_ITEM_GROUP)
3752 sd->group_items = eina_list_remove(sd->group_items, it); 3752 sd->group_items = eina_list_remove(sd->group_items, it);
3753 3753
3754 ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free); 3754 ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
@@ -3827,7 +3827,7 @@ _item_unselect(Elm_Gen_Item *it)
3827 _item_unhighlight(it); /* unhighlight the item first */ 3827 _item_unhighlight(it); /* unhighlight the item first */
3828 if (!it->selected) return; /* then check whether the item is selected */ 3828 if (!it->selected) return; /* then check whether the item is selected */
3829 3829
3830 if (GL_IT(it)->wsd->focus_on_selection_enabled) 3830 if (it->item->wsd->focus_on_selection_enabled)
3831 { 3831 {
3832 Evas_Object* eobj; 3832 Evas_Object* eobj;
3833 Eina_List* l; 3833 Eina_List* l;
@@ -4030,7 +4030,7 @@ _long_press_cb(void *data)
4030 sd->longpressed = EINA_TRUE; 4030 sd->longpressed = EINA_TRUE;
4031 efl_event_callback_legacy_call 4031 efl_event_callback_legacy_call
4032 (WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it)); 4032 (WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it));
4033 if ((sd->reorder_mode) && !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)) 4033 if ((sd->reorder_mode) && !(it->item->type & ELM_GENLIST_ITEM_GROUP))
4034 { 4034 {
4035 sd->reorder_it = it; 4035 sd->reorder_it = it;
4036 sd->reorder_start_y = 0; 4036 sd->reorder_start_y = 0;
@@ -5108,8 +5108,8 @@ _decorate_item_unrealize(Elm_Gen_Item *it)
5108 5108
5109 evas_event_freeze(evas_object_evas_get(obj)); 5109 evas_event_freeze(evas_object_evas_get(obj));
5110 5110
5111 _view_clear(GL_IT(it)->deco_it_view, &(GL_IT(it)->deco_it_texts), 5111 _view_clear(it->item->deco_it_view, &(it->item->deco_it_texts),
5112 &(GL_IT(it)->deco_it_contents)); 5112 &(it->item->deco_it_contents));
5113 5113
5114 edje_object_part_unswallow(it->item->deco_it_view, VIEW(it)); 5114 edje_object_part_unswallow(it->item->deco_it_view, VIEW(it));
5115 evas_object_smart_member_add(VIEW(it), sd->pan_obj); 5115 evas_object_smart_member_add(VIEW(it), sd->pan_obj);
@@ -5167,7 +5167,7 @@ _item_unrealize(Elm_Gen_Item *it)
5167 5167
5168 // unswallow VIEW(it) first then manipulate VIEW(it) 5168 // unswallow VIEW(it) first then manipulate VIEW(it)
5169 _decorate_item_unrealize(it); 5169 _decorate_item_unrealize(it);
5170 if (GL_IT(it)->wsd->decorate_all_mode) _decorate_all_item_unrealize(it); 5170 if (it->item->wsd->decorate_all_mode) _decorate_all_item_unrealize(it);
5171 5171
5172 if (!_item_cache_add(it, _content_cache_add(it, &cache))) 5172 if (!_item_cache_add(it, _content_cache_add(it, &cache)))
5173 { 5173 {
@@ -5449,29 +5449,29 @@ _decorate_item_realize(Elm_Gen_Item *it)
5449 Evas_Object *obj = sd->obj; 5449 Evas_Object *obj = sd->obj;
5450 char buf[1024]; 5450 char buf[1024];
5451 5451
5452 if (GL_IT(it)->deco_it_view) return; 5452 if (it->item->deco_it_view) return;
5453 5453
5454 evas_event_freeze(evas_object_evas_get(obj)); 5454 evas_event_freeze(evas_object_evas_get(obj));
5455 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style); 5455 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style);
5456 5456
5457 /* signal callback add */ 5457 /* signal callback add */
5458 evas_object_event_callback_add 5458 evas_object_event_callback_add
5459 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, 5459 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb,
5460 it); 5460 it);
5461 evas_object_event_callback_add 5461 evas_object_event_callback_add
5462 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it); 5462 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
5463 evas_object_event_callback_add 5463 evas_object_event_callback_add
5464 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, 5464 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb,
5465 it); 5465 it);
5466 5466
5467 _view_inflate(it->item->deco_it_view, it, &GL_IT(it)->deco_it_texts, 5467 _view_inflate(it->item->deco_it_view, it, &it->item->deco_it_texts,
5468 &GL_IT(it)->deco_it_contents); 5468 &it->item->deco_it_contents);
5469 edje_object_part_swallow 5469 edje_object_part_swallow
5470 (it->item->deco_it_view, 5470 (it->item->deco_it_view,
5471 edje_object_data_get(it->item->deco_it_view, "mode_part"), VIEW(it)); 5471 edje_object_data_get(it->item->deco_it_view, "mode_part"), VIEW(it));
5472 5472
5473 snprintf(buf, sizeof(buf), "elm,state,%s,active", sd->decorate_it_type); 5473 snprintf(buf, sizeof(buf), "elm,state,%s,active", sd->decorate_it_type);
5474 edje_object_signal_emit(GL_IT(it)->deco_it_view, buf, "elm"); 5474 edje_object_signal_emit(it->item->deco_it_view, buf, "elm");
5475 edje_object_signal_emit(VIEW(it), buf, "elm"); 5475 edje_object_signal_emit(VIEW(it), buf, "elm");
5476 5476
5477 it->want_unrealize = EINA_FALSE; 5477 it->want_unrealize = EINA_FALSE;
@@ -5968,7 +5968,7 @@ _elm_genlist_item_elm_widget_item_disable(Eo *eo_it, Elm_Gen_Item *it)
5968 Evas_Object *obj; 5968 Evas_Object *obj;
5969 5969
5970 _item_unselect(it); 5970 _item_unselect(it);
5971 if (eo_it == GL_IT(it)->wsd->focused_item) 5971 if (eo_it == it->item->wsd->focused_item)
5972 _elm_genlist_item_unfocused(eo_it); 5972 _elm_genlist_item_unfocused(eo_it);
5973 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 5973 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
5974 5974
@@ -6148,22 +6148,22 @@ _elm_genlist_item_new(Elm_Genlist_Data *sd,
6148 it->func.func = func; 6148 it->func.func = func;
6149 it->func.data = func_data; 6149 it->func.data = func_data;
6150 6150
6151 GL_IT(it) = ELM_NEW(Elm_Gen_Item_Type); 6151 it->item = ELM_NEW(Elm_Gen_Item_Type);
6152 GL_IT(it)->wsd = sd; 6152 it->item->wsd = sd;
6153 GL_IT(it)->type = type; 6153 it->item->type = type;
6154 6154
6155 if (it->parent) 6155 if (it->parent)
6156 { 6156 {
6157 if (GL_IT(it->parent)->type & ELM_GENLIST_ITEM_GROUP) 6157 if (it->parent->item->type & ELM_GENLIST_ITEM_GROUP)
6158 GL_IT(it)->group_item = parent; 6158 it->item->group_item = parent;
6159 else if (GL_IT(it->parent)->group_item) 6159 else if (it->parent->item->group_item)
6160 GL_IT(it)->group_item = GL_IT(it->parent)->group_item; 6160 it->item->group_item = it->parent->item->group_item;
6161 } 6161 }
6162 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent) 6162 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent)
6163 { 6163 {
6164 if (!(GL_IT(it2->parent)->type & ELM_GENLIST_ITEM_GROUP)) depth += 1; 6164 if (!(it2->parent->item->type & ELM_GENLIST_ITEM_GROUP)) depth += 1;
6165 } 6165 }
6166 GL_IT(it)->expanded_depth = depth; 6166 it->item->expanded_depth = depth;
6167 sd->item_count++; 6167 sd->item_count++;
6168 6168
6169 return it; 6169 return it;
@@ -6177,7 +6177,7 @@ _elm_genlist_item_compare(const void *data,
6177 6177
6178 it = ELM_GEN_ITEM_FROM_INLIST(data); 6178 it = ELM_GEN_ITEM_FROM_INLIST(data);
6179 item1 = ELM_GEN_ITEM_FROM_INLIST(data1); 6179 item1 = ELM_GEN_ITEM_FROM_INLIST(data1);
6180 return GL_IT(it)->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1)); 6180 return it->item->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1));
6181} 6181}
6182 6182
6183static int 6183static int
@@ -6187,7 +6187,7 @@ _elm_genlist_item_list_compare(const void *data,
6187 const Elm_Gen_Item *it = data; 6187 const Elm_Gen_Item *it = data;
6188 const Elm_Gen_Item *item1 = data1; 6188 const Elm_Gen_Item *item1 = data1;
6189 6189
6190 return GL_IT(it)->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1)); 6190 return it->item->wsd->item_compare_cb(EO_OBJ(it), EO_OBJ(item1));
6191} 6191}
6192 6192
6193static int 6193static int
@@ -6198,7 +6198,7 @@ _elm_genlist_eo_item_list_compare(const void *data,
6198 const Elm_Object_Item *eo_item1 = data1; 6198 const Elm_Object_Item *eo_item1 = data1;
6199 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 6199 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
6200 6200
6201 return GL_IT(it)->wsd->item_compare_cb(eo_it, eo_item1); 6201 return it->item->wsd->item_compare_cb(eo_it, eo_item1);
6202} 6202}
6203 6203
6204EOLIAN static unsigned int 6204EOLIAN static unsigned int
@@ -6249,7 +6249,7 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Ge
6249 6249
6250 if (!it->parent) 6250 if (!it->parent)
6251 { 6251 {
6252 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) 6252 if (it->item->type & ELM_GENLIST_ITEM_GROUP)
6253 sd->group_items = eina_list_append(sd->group_items, it); 6253 sd->group_items = eina_list_append(sd->group_items, it);
6254 sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it)); 6254 sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it));
6255 it->item->rel = NULL; 6255 it->item->rel = NULL;
@@ -6303,7 +6303,7 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_G
6303 6303
6304 if (!it->parent) 6304 if (!it->parent)
6305 { 6305 {
6306 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) 6306 if (it->item->type & ELM_GENLIST_ITEM_GROUP)
6307 sd->group_items = eina_list_prepend(sd->group_items, it); 6307 sd->group_items = eina_list_prepend(sd->group_items, it);
6308 sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it)); 6308 sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it));
6309 it->item->rel = NULL; 6309 it->item->rel = NULL;
@@ -6358,11 +6358,11 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
6358 6358
6359 if (!it->parent) 6359 if (!it->parent)
6360 { 6360 {
6361 if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && 6361 if ((it->item->type & ELM_GENLIST_ITEM_GROUP) &&
6362 (GL_IT(after)->type & ELM_GENLIST_ITEM_GROUP)) 6362 (after->item->type & ELM_GENLIST_ITEM_GROUP))
6363 sd->group_items = eina_list_append_relative 6363 sd->group_items = eina_list_append_relative
6364 (sd->group_items, it, after); 6364 (sd->group_items, it, after);
6365 else if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) 6365 else if (it->item->type & ELM_GENLIST_ITEM_GROUP)
6366 CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!"); 6366 CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!");
6367 } 6367 }
6368 else 6368 else
@@ -6421,11 +6421,11 @@ _elm_genlist_item_insert_before(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
6421 6421
6422 if (!it->parent) 6422 if (!it->parent)
6423 { 6423 {
6424 if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && 6424 if ((it->item->type & ELM_GENLIST_ITEM_GROUP) &&
6425 (GL_IT(before)->type & ELM_GENLIST_ITEM_GROUP)) 6425 (before->item->type & ELM_GENLIST_ITEM_GROUP))
6426 sd->group_items = 6426 sd->group_items =
6427 eina_list_prepend_relative(sd->group_items, it, before); 6427 eina_list_prepend_relative(sd->group_items, it, before);
6428 else if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) 6428 else if (it->item->type & ELM_GENLIST_ITEM_GROUP)
6429 CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!"); 6429 CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!");
6430 } 6430 }
6431 else 6431 else
@@ -6440,7 +6440,7 @@ _elm_genlist_item_insert_before(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
6440 (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(before)); 6440 (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(before));
6441 6441
6442 it->item->rel = before; 6442 it->item->rel = before;
6443 GL_IT(before)->rel_revs = eina_list_append(GL_IT(before)->rel_revs, it); 6443 before->item->rel_revs = eina_list_append(before->item->rel_revs, it);
6444 it->item->before = EINA_TRUE; 6444 it->item->before = EINA_TRUE;
6445 _item_queue(sd, it, NULL); 6445 _item_queue(sd, it, NULL);
6446 6446
@@ -6532,7 +6532,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
6532 sd->requeued = EINA_FALSE; 6532 sd->requeued = EINA_FALSE;
6533 } 6533 }
6534 6534
6535 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 6535 if (it->item->type == ELM_GENLIST_ITEM_GROUP)
6536 sd->group_items = eina_list_append(sd->group_items, it); 6536 sd->group_items = eina_list_append(sd->group_items, it);
6537 6537
6538 if (!sd->top_level_parent_items) 6538 if (!sd->top_level_parent_items)
@@ -6600,7 +6600,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
6600 6600
6601 if (rel) 6601 if (rel)
6602 { 6602 {
6603 GL_IT(it)->rel = rel; 6603 it->item->rel = rel;
6604 rel->item->rel_revs = eina_list_append(rel->item->rel_revs, it); 6604 rel->item->rel_revs = eina_list_append(rel->item->rel_revs, it);
6605 } 6605 }
6606 6606
@@ -7063,7 +7063,7 @@ _elm_genlist_item_expanded_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
7063{ 7063{
7064 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); 7064 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
7065 7065
7066 return GL_IT(it)->expanded; 7066 return it->item->expanded;
7067} 7067}
7068 7068
7069EOLIAN static int 7069EOLIAN static int
@@ -7071,7 +7071,7 @@ _elm_genlist_item_expanded_depth_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
7071{ 7071{
7072 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0); 7072 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0);
7073 7073
7074 return GL_IT(it)->expanded_depth; 7074 return it->item->expanded_depth;
7075} 7075}
7076 7076
7077static Eina_Bool 7077static Eina_Bool
@@ -7248,19 +7248,19 @@ _elm_genlist_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
7248 _item_content_realize(it, VIEW(it), &it->contents, "contents", parts); 7248 _item_content_realize(it, VIEW(it), &it->contents, "contents", parts);
7249 if (it->flipped) 7249 if (it->flipped)
7250 { 7250 {
7251 _item_content_realize(it, VIEW(it), &GL_IT(it)->flip_contents, 7251 _item_content_realize(it, VIEW(it), &it->item->flip_contents,
7252 "flips", parts); 7252 "flips", parts);
7253 } 7253 }
7254 if (GL_IT(it)->deco_it_view) 7254 if (it->item->deco_it_view)
7255 { 7255 {
7256 _item_content_realize(it, GL_IT(it)->deco_it_view, 7256 _item_content_realize(it, it->item->deco_it_view,
7257 &GL_IT(it)->deco_it_contents, 7257 &it->item->deco_it_contents,
7258 "contents", parts); 7258 "contents", parts);
7259 } 7259 }
7260 if (GL_IT(it)->wsd->decorate_all_mode) 7260 if (it->item->wsd->decorate_all_mode)
7261 { 7261 {
7262 _item_content_realize(it, it->deco_all_view, 7262 _item_content_realize(it, it->deco_all_view,
7263 &GL_IT(it)->deco_all_contents, 7263 &it->item->deco_all_contents,
7264 "contents", parts); 7264 "contents", parts);
7265 } 7265 }
7266 if (it->has_contents != (!!it->contents)) 7266 if (it->has_contents != (!!it->contents))
@@ -7303,8 +7303,8 @@ _elm_genlist_item_item_class_update(Eo *eo_it, Elm_Gen_Item *it,
7303 it->item->nocache_once = EINA_TRUE; 7303 it->item->nocache_once = EINA_TRUE;
7304 7304
7305 ELM_SAFE_FREE(it->texts, elm_widget_stringlist_free); 7305 ELM_SAFE_FREE(it->texts, elm_widget_stringlist_free);
7306 ELM_SAFE_FREE(GL_IT(it)->deco_it_texts, elm_widget_stringlist_free); 7306 ELM_SAFE_FREE(it->item->deco_it_texts, elm_widget_stringlist_free);
7307 ELM_SAFE_FREE(GL_IT(it)->deco_all_texts, elm_widget_stringlist_free); 7307 ELM_SAFE_FREE(it->item->deco_all_texts, elm_widget_stringlist_free);
7308 7308
7309 elm_genlist_item_update(eo_it); 7309 elm_genlist_item_update(eo_it);
7310} 7310}
@@ -7563,7 +7563,7 @@ _elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7563 Elm_Gen_Item *tmp; 7563 Elm_Gen_Item *tmp;
7564 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1); 7564 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1);
7565 7565
7566 EINA_INLIST_FOREACH(GL_IT(it)->wsd->items, tmp) 7566 EINA_INLIST_FOREACH(it->item->wsd->items, tmp)
7567 { 7567 {
7568 if (tmp == it) break; 7568 if (tmp == it) break;
7569 cnt++; 7569 cnt++;
@@ -7966,7 +7966,7 @@ _elm_genlist_item_decorate_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7966 Elm_Object_Item *eo_it2 = NULL; 7966 Elm_Object_Item *eo_it2 = NULL;
7967 7967
7968 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 7968 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
7969 sd = GL_IT(it)->wsd; 7969 sd = it->item->wsd;
7970 7970
7971 if (!decorate_it_type) return; 7971 if (!decorate_it_type) return;
7972 if (elm_wdg_item_disabled_get(eo_it)) return; 7972 if (elm_wdg_item_disabled_get(eo_it)) return;
@@ -8010,7 +8010,7 @@ EOLIAN static const char *
8010_elm_genlist_item_decorate_mode_get(Eo *eo_i EINA_UNUSED, Elm_Gen_Item *i) 8010_elm_genlist_item_decorate_mode_get(Eo *eo_i EINA_UNUSED, Elm_Gen_Item *i)
8011{ 8011{
8012 ELM_GENLIST_ITEM_CHECK_OR_RETURN(i, NULL); 8012 ELM_GENLIST_ITEM_CHECK_OR_RETURN(i, NULL);
8013 return GL_IT(i)->wsd->decorate_it_type; 8013 return i->item->wsd->decorate_it_type;
8014} 8014}
8015 8015
8016EOLIAN static Elm_Object_Item * 8016EOLIAN static Elm_Object_Item *
@@ -8124,7 +8124,7 @@ _elm_genlist_item_type_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
8124{ 8124{
8125 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, ELM_GENLIST_ITEM_MAX); 8125 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, ELM_GENLIST_ITEM_MAX);
8126 8126
8127 return GL_IT(it)->type; 8127 return it->item->type;
8128} 8128}
8129 8129
8130EAPI Elm_Genlist_Item_Class * 8130EAPI Elm_Genlist_Item_Class *
@@ -8206,12 +8206,12 @@ _elm_genlist_item_flip_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bool flip)
8206 else 8206 else
8207 { 8207 {
8208 edje_object_signal_emit(VIEW(it), SIGNAL_FLIP_DISABLED, "elm"); 8208 edje_object_signal_emit(VIEW(it), SIGNAL_FLIP_DISABLED, "elm");
8209 if (GL_IT(it)->wsd->decorate_all_mode) 8209 if (it->item->wsd->decorate_all_mode)
8210 edje_object_signal_emit(it->deco_all_view, SIGNAL_FLIP_DISABLED, 8210 edje_object_signal_emit(it->deco_all_view, SIGNAL_FLIP_DISABLED,
8211 "elm"); 8211 "elm");
8212 8212
8213 it->flipped = flip; 8213 it->flipped = flip;
8214 _item_cache_zero(GL_IT(it)->wsd); 8214 _item_cache_zero(it->item->wsd);
8215 elm_genlist_item_update(eo_it); 8215 elm_genlist_item_update(eo_it);
8216 it->item->nocache = EINA_FALSE; 8216 it->item->nocache = EINA_FALSE;
8217 } 8217 }
diff --git a/src/lib/elementary/elm_widget_genlist.h b/src/lib/elementary/elm_widget_genlist.h
index b913da3ca3..f215d8dd5b 100644
--- a/src/lib/elementary/elm_widget_genlist.h
+++ b/src/lib/elementary/elm_widget_genlist.h
@@ -320,13 +320,11 @@ struct _Elm_Genlist_Filter
320 * @} 320 * @}
321 */ 321 */
322 322
323#define GL_IT(_it) (_it->item)
324
325#define ELM_GENLIST_DATA_GET(o, sd) \ 323#define ELM_GENLIST_DATA_GET(o, sd) \
326 Elm_Genlist_Data * sd = efl_data_scope_get(o, ELM_GENLIST_CLASS) 324 Elm_Genlist_Data * sd = efl_data_scope_get(o, ELM_GENLIST_CLASS)
327 325
328#define ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd) \ 326#define ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd) \
329 Elm_Genlist_Data * sd = GL_IT(it)->wsd 327 Elm_Genlist_Data * sd = it->item->wsd
330 328
331#define ELM_GENLIST_PAN_DATA_GET(o, sd) \ 329#define ELM_GENLIST_PAN_DATA_GET(o, sd) \
332 Elm_Genlist_Pan_Data * sd = efl_data_scope_get(o, ELM_GENLIST_PAN_CLASS) 330 Elm_Genlist_Pan_Data * sd = efl_data_scope_get(o, ELM_GENLIST_PAN_CLASS)