add VIEW() and WIDGET() macros
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Oct 2011 01:08:01 +0000 (01:08 +0000)
committerMike McCormack <mj.mccormack@samsung.com>
Tue, 8 Nov 2011 06:50:33 +0000 (15:50 +0900)
For use with Elm_Widget_Items to create more consistency, reduce typing, and increase readability

  VIEW(X) = X->base.view (visible evas object)
  WIDGET(X) = X->base.widget (owner widget)

also a demo of the oxford comma for seoz

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@64220 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

14 files changed:
src/lib/elc_ctxpopup.c
src/lib/elc_hoversel.c
src/lib/elc_naviframe.c
src/lib/elm_diskselector.c
src/lib/elm_flipselector.c
src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_index.c
src/lib/elm_list.c
src/lib/elm_menu.c
src/lib/elm_segment_control.c
src/lib/elm_slideshow.c
src/lib/elm_toolbar.c
src/lib/elm_widget.h

index c8f7a6b..5cadf25 100644 (file)
@@ -250,10 +250,10 @@ _item_sizing_eval(Elm_Ctxpopup_Item *item)
 
    if (!item) return;
 
-   edje_object_size_min_restricted_calc(item->base.view, &min_w, &min_h, min_w,
+   edje_object_size_min_restricted_calc(VIEW(item), &min_w, &min_h, min_w,
                                         min_h);
-   evas_object_size_hint_min_set(item->base.view, min_w, min_h);
-   evas_object_size_hint_max_set(item->base.view, max_w, max_h);
+   evas_object_size_hint_min_set(VIEW(item), min_w, min_h);
+   evas_object_size_hint_max_set(VIEW(item), max_w, max_h);
 }
 
 static void
@@ -643,7 +643,7 @@ _sizing_eval(Evas_Object *obj)
    EINA_LIST_FOREACH(wd->items, elist, item)
      {
         _item_sizing_eval(item);
-        evas_object_size_hint_min_get(item->base.view, &_box_size.x, &_box_size.y);
+        evas_object_size_hint_min_get(VIEW(item), &_box_size.x, &_box_size.y);
         if (!wd->horizontal)
           {
              if (_box_size.x > box_size.x)
@@ -755,20 +755,20 @@ _theme_hook(Evas_Object *obj)
    EINA_LIST_FOREACH(wd->items, elist, item)
      {
         if (item->label && item->icon)
-          _elm_theme_object_set(obj, item->base.view, "ctxpopup",
+          _elm_theme_object_set(obj, VIEW(item), "ctxpopup",
                                 "icon_text_style_item",
                                 elm_widget_style_get(obj));
         else if (item->label)
-          _elm_theme_object_set(obj, item->base.view, "ctxpopup", "text_style_item",
+          _elm_theme_object_set(obj, VIEW(item), "ctxpopup", "text_style_item",
                                 elm_widget_style_get(obj));
         else if (item->icon)
-          _elm_theme_object_set(obj, item->base.view, "ctxpopup", "icon_style_item",
+          _elm_theme_object_set(obj, VIEW(item), "ctxpopup", "icon_style_item",
                                 elm_widget_style_get(obj));
         if (item->label)
-          edje_object_part_text_set(item->base.view, "elm.text", item->label);
+          edje_object_part_text_set(VIEW(item), "elm.text", item->label);
 
         if (item->disabled)
-          edje_object_signal_emit(item->base.view, "elm,state,disabled", "elm");
+          edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
 
        /*
         *  For separator, if the first item has visible separator,
@@ -777,16 +777,16 @@ _theme_hook(Evas_Object *obj)
         *  So the first item separator should be invisible.
         */
        if ((idx++) == 0)
-         edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+         edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
        else
          {
            if(!wd->horizontal)
-             edje_object_signal_emit(item->base.view, "elm,state,vertical", "elm");
+             edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
            else
-             edje_object_signal_emit(item->base.view, "elm,state,horizontal", "elm");
+             edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
          }
 
-        edje_object_message_signal_process(item->base.view);
+        edje_object_message_signal_process(VIEW(item));
      }
 
    _elm_theme_object_set(obj, wd->bg, "ctxpopup", "bg",
@@ -864,13 +864,13 @@ _ctxpopup_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
    EINA_LIST_FOREACH(wd->items, elist, item)
      {
        if (idx++ == 0)
-         edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+         edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
        else
          {
            if(!wd->horizontal)
-             edje_object_signal_emit(item->base.view, "elm,state,vertical", "elm");
+             edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
            else
-             edje_object_signal_emit(item->base.view, "elm,state,horizontal", "elm");
+             edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
          }
      }
 
@@ -966,7 +966,7 @@ _item_select_cb(void *data, Evas_Object *obj __UNUSED__,
    if (item->disabled) return;
 
    if (item->func)
-      item->func((void*) item->base.data, item->base.widget, data);
+     item->func((void*) item->base.data, WIDGET(item), data);
 }
 
 static void
@@ -974,15 +974,15 @@ _item_icon_set(Elm_Ctxpopup_Item *item, Evas_Object *icon)
 {
    if (item->icon)
      {
-        elm_widget_sub_object_del(item->base.view, item->icon);
+        elm_widget_sub_object_del(VIEW(item), item->icon);
         evas_object_del(item->icon);
      }
 
    item->icon = icon;
    if (!icon) return;
 
-   edje_object_part_swallow(item->base.view, "elm.swallow.icon", item->icon);
-   edje_object_message_signal_process(item->base.view);
+   edje_object_part_swallow(VIEW(item), "elm.swallow.icon", item->icon);
+   edje_object_message_signal_process(VIEW(item));
 }
 
 static void
@@ -991,8 +991,8 @@ _item_label_set(Elm_Ctxpopup_Item *item, const char *label)
    if (!eina_stringshare_replace(&item->label, label))
      return;
 
-   edje_object_part_text_set(item->base.view, "elm.text", label);
-   edje_object_message_signal_process(item->base.view);
+   edje_object_part_text_set(VIEW(item), "elm.text", label);
+   edje_object_message_signal_process(VIEW(item));
 }
 
 static void
@@ -1000,16 +1000,16 @@ _item_new(Elm_Ctxpopup_Item *item, char *group_name)
 {
    Widget_Data *wd;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
-   item->base.view = edje_object_add(evas_object_evas_get(wd->base));
-   _elm_theme_object_set(item->base.widget, item->base.view, "ctxpopup", group_name,
-                         elm_widget_style_get(item->base.widget));
-   edje_object_signal_callback_add(item->base.view, "elm,action,click", "",
+   VIEW(item) = edje_object_add(evas_object_evas_get(wd->base));
+   _elm_theme_object_set(WIDGET(item), VIEW(item), "ctxpopup", group_name,
+                         elm_widget_style_get(WIDGET(item)));
+   edje_object_signal_callback_add(VIEW(item), "elm,action,click", "",
                                    _item_select_cb, item);
-   evas_object_size_hint_align_set(item->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   evas_object_show(item->base.view);
+   evas_object_size_hint_align_set(VIEW(item), EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_show(VIEW(item));
 }
 
 static void
@@ -1156,7 +1156,7 @@ elm_ctxpopup_item_icon_set(Elm_Object_Item *it, Evas_Object *icon)
    Widget_Data *wd;
    Elm_Ctxpopup_Item *item = (Elm_Ctxpopup_Item *) it;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    _item_icon_set(item, icon);
@@ -1164,7 +1164,7 @@ elm_ctxpopup_item_icon_set(Elm_Object_Item *it, Evas_Object *icon)
    if (wd->visible)
      {
         _scroller_size_reset(wd);
-        _sizing_eval(item->base.widget);
+        _sizing_eval(WIDGET(item));
      }
 }
 
@@ -1184,7 +1184,7 @@ elm_ctxpopup_item_label_set(Elm_Object_Item *it, const char *label)
    Widget_Data *wd;
    Elm_Ctxpopup_Item *item = (Elm_Ctxpopup_Item *) it;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    _item_label_set(item, label);
@@ -1192,7 +1192,7 @@ elm_ctxpopup_item_label_set(Elm_Object_Item *it, const char *label)
    if (wd->visible)
      {
         _scroller_size_reset(wd);
-        _sizing_eval(item->base.widget);
+        _sizing_eval(WIDGET(item));
      }
 }
 
@@ -1278,9 +1278,9 @@ elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
         EINA_LIST_FOREACH(wd->items, elist, item)
           {
              if (idx++ == 0)
-               edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+               edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
              else
-               edje_object_signal_emit(item->base.view, "elm,state,vertical", "elm");
+               edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
           }
      }
    else
@@ -1291,9 +1291,9 @@ elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
         EINA_LIST_FOREACH(wd->items, elist, item)
           {
              if (idx++ == 0)
-               edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+               edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
              else
-               edje_object_signal_emit(item->base.view, "elm,state,horizontal", "elm");
+               edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
           }
      }
 
@@ -1349,7 +1349,7 @@ elm_ctxpopup_item_append(Evas_Object *obj, const char *label,
 
    _item_icon_set(item, icon);
    _item_label_set(item, label);
-   elm_box_pack_end(wd->box, item->base.view);
+   elm_box_pack_end(wd->box, VIEW(item));
    wd->items = eina_list_append(wd->items, item);
 
    if (wd->visible)
@@ -1369,13 +1369,13 @@ elm_ctxpopup_item_del(Elm_Object_Item *it)
    Widget_Data *wd;
    Elm_Ctxpopup_Item *item = (Elm_Ctxpopup_Item *) it;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    if (item->icon)
      evas_object_del(item->icon);
-   if (item->base.view)
-     evas_object_del(item->base.view);
+   if (VIEW(item))
+     evas_object_del(VIEW(item));
 
    eina_stringshare_del(item->label);
 
@@ -1385,7 +1385,7 @@ elm_ctxpopup_item_del(Elm_Object_Item *it)
      wd->items = NULL;
 
    if (wd->visible)
-     _sizing_eval(item->base.widget);
+     _sizing_eval(WIDGET(item));
 
    free(item);
 }
@@ -1398,16 +1398,16 @@ elm_ctxpopup_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled)
    Widget_Data *wd;
    Elm_Ctxpopup_Item *item = (Elm_Ctxpopup_Item *) it;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    if (disabled == item->disabled)
      return;
 
    if (disabled)
-     edje_object_signal_emit(item->base.view, "elm,state,disabled", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
    else
-     edje_object_signal_emit(item->base.view, "elm,state,enabled", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,enabled", "elm");
 
    item->disabled = !!disabled;
 }
index 493fd41..772ca10 100644 (file)
@@ -141,7 +141,7 @@ static void
 _item_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Elm_Hoversel_Item *item = data;
-   Evas_Object *obj2 = item->base.widget;
+   Evas_Object *obj2 = WIDGET(item);
 
    elm_hoversel_hover_end(obj2);
    if (item->func) item->func((void *)item->base.data, obj2, item);
@@ -466,9 +466,9 @@ EAPI void
 elm_hoversel_item_del(Elm_Hoversel_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
-   elm_hoversel_hover_end(item->base.widget);
+   elm_hoversel_hover_end(WIDGET(item));
    wd->items = eina_list_remove(wd->items, item);
    elm_widget_item_pre_notify_del(item);
    eina_stringshare_del(item->label);
index 8032efe..ef38103 100644 (file)
@@ -216,7 +216,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
    if (!wd) return;
 
    EINA_INLIST_FOREACH(wd->stack, it)
-     edje_object_mirrored_set(it->base.view, rtl);
+     edje_object_mirrored_set(VIEW(it), rtl);
    edje_object_mirrored_set(wd->base, rtl);
 }
 
@@ -245,7 +245,7 @@ _item_text_set_hook(Elm_Object_Item *it,
         if (!pair)
           {
              ERR("Failed to allocate new text part of the item! : naviframe=%p",
-             navi_it->base.widget);
+             WIDGET(navi_it));
              return;
           }
         eina_stringshare_replace(&pair->part, buf);
@@ -254,17 +254,17 @@ _item_text_set_hook(Elm_Object_Item *it,
      }
 
    eina_stringshare_replace(&pair->text, label);
-   edje_object_part_text_set(navi_it->base.view, buf, label);
+   edje_object_part_text_set(VIEW(navi_it), buf, label);
 
    if (label)
      {
         snprintf(buf, sizeof(buf), "elm,state,%s,show", buf);
-        edje_object_signal_emit(navi_it->base.view, buf, "elm");
+        edje_object_signal_emit(VIEW(navi_it), buf, "elm");
      }
    else
      {
         snprintf(buf, sizeof(buf), "elm,state,%s,hide", buf);
-        edje_object_signal_emit(navi_it->base.view, buf, "elm");
+        edje_object_signal_emit(VIEW(navi_it), buf, "elm");
      }
 
    _item_sizing_eval(navi_it);
@@ -363,7 +363,7 @@ _item_content_unset_hook(Elm_Object_Item *it, const char *part)
        !strcmp(part, "elm.swallow.next_btn"))
      {
         WRN("You can not unset the content! : naviframe=%p",
-            navi_it->base.widget);
+            WIDGET(navi_it));
         return NULL;
      }
 
@@ -383,10 +383,10 @@ _item_content_unset_hook(Elm_Object_Item *it, const char *part)
 
    if (!content) return NULL;
 
-   elm_widget_sub_object_del(navi_it->base.widget, content);
-   edje_object_part_unswallow(navi_it->base.view, content);
+   elm_widget_sub_object_del(WIDGET(navi_it), content);
+   edje_object_part_unswallow(VIEW(navi_it), content);
    snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
-   edje_object_signal_emit(navi_it->base.view, buf, "elm");
+   edje_object_signal_emit(VIEW(navi_it), buf, "elm");
    evas_object_event_callback_del(content,
                                   EVAS_CALLBACK_DEL,
                                   _title_content_del);
@@ -402,16 +402,16 @@ _item_signal_emit_hook(Elm_Object_Item *it,
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
    Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
-   edje_object_signal_emit(navi_it->base.view, emission, source);
+   edje_object_signal_emit(VIEW(navi_it), emission, source);
 }
 
 static void
 _item_title_visible_update(Elm_Naviframe_Item *navi_it)
 {
    if (navi_it->title_visible)
-     edje_object_signal_emit(navi_it->base.view, "elm,state,title,show", "elm");
+     edje_object_signal_emit(VIEW(navi_it), "elm,state,title,show", "elm");
    else
-     edje_object_signal_emit(navi_it->base.view, "elm,state,title,hide", "elm");
+     edje_object_signal_emit(VIEW(navi_it), "elm,state,title,hide", "elm");
 }
 
 static void
@@ -433,12 +433,12 @@ _item_sizing_eval(Elm_Naviframe_Item *it)
    Evas_Coord x, y, w, h;
    if (!it) return;
 
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
-   evas_object_geometry_get(it->base.widget, &x, &y, &w, &h);
-   evas_object_move(it->base.view, x, y);
-   evas_object_resize(it->base.view, w, h);
+   evas_object_geometry_get(WIDGET(it), &x, &y, &w, &h);
+   evas_object_move(VIEW(it), x, y);
+   evas_object_resize(VIEW(it), w, h);
 }
 
 static void
@@ -492,7 +492,7 @@ _title_clicked(void *data,
                const char *source __UNUSED__)
 {
    Elm_Naviframe_Item *it = data;
-   evas_object_smart_callback_call(it->base.widget, SIG_TITLE_CLICKED, it);
+   evas_object_smart_callback_call(WIDGET(it), SIG_TITLE_CLICKED, it);
 }
 
 static void
@@ -530,7 +530,7 @@ _title_content_del(void *data,
    Elm_Naviframe_Content_Item_Pair *pair = data;
    Elm_Naviframe_Item *it = pair->it;
    snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
-   edje_object_signal_emit(it->base.view, buf, "elm");
+   edje_object_signal_emit(VIEW(it), buf, "elm");
    it->content_list = eina_inlist_remove(it->content_list,
                                          EINA_INLIST_GET(pair));
    eina_stringshare_del(pair->part);
@@ -546,7 +546,7 @@ _title_prev_btn_del(void *data,
    Elm_Naviframe_Item *it = data;
    it->back_btn = EINA_FALSE;
    it->title_prev_btn = NULL;
-   edje_object_signal_emit(it->base.view, "elm,state,prev_btn,hide", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
 }
 
 static void
@@ -557,7 +557,7 @@ _title_next_btn_del(void *data,
 {
    Elm_Naviframe_Item *it = data;
    it->title_next_btn = NULL;
-   edje_object_signal_emit(it->base.view, "elm,state,next_btn,hide", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
 }
 
 static void
@@ -568,7 +568,7 @@ _item_content_del(void *data,
 {
    Elm_Naviframe_Item *it = data;
    it->content = NULL;
-   edje_object_signal_emit(it->base.view, "elm,state,content,hide", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
 }
 
 static void
@@ -587,7 +587,7 @@ _title_content_set(Elm_Naviframe_Item *it,
         pair = ELM_NEW(Elm_Naviframe_Content_Item_Pair);
         if (!pair)
           {
-             ERR("Failed to allocate new content part of the item! : naviframe=%p", it->base.widget);
+             ERR("Failed to allocate new content part of the item! : naviframe=%p", WIDGET(it));
              return;
           }
         pair->it = it;
@@ -607,7 +607,7 @@ _title_content_set(Elm_Naviframe_Item *it,
      }
    if (content)
      {
-        elm_widget_sub_object_add(it->base.widget, content);
+        elm_widget_sub_object_add(WIDGET(it), content);
         evas_object_event_callback_add(content,
                                        EVAS_CALLBACK_DEL,
                                        _title_content_del,
@@ -640,19 +640,19 @@ _title_prev_btn_set(Elm_Naviframe_Item *it,
 
    if (!btn)
      {
-        edje_object_signal_emit(it->base.view,
+        edje_object_signal_emit(VIEW(it),
                                 "elm,state,prev_btn,hide",
                                 "elm");
         return;
      }
 
-   elm_widget_sub_object_add(it->base.widget, btn);
+   elm_widget_sub_object_add(WIDGET(it), btn);
    evas_object_event_callback_add(btn,
                                   EVAS_CALLBACK_DEL,
                                   _title_prev_btn_del,
                                   it);
-   edje_object_part_swallow(it->base.view, "elm.swallow.prev_btn", btn);
-   edje_object_signal_emit(it->base.view, "elm,state,prev_btn,show", "elm");
+   edje_object_part_swallow(VIEW(it), "elm.swallow.prev_btn", btn);
+   edje_object_signal_emit(VIEW(it), "elm,state,prev_btn,show", "elm");
    it->back_btn = back_btn;
 
    _item_sizing_eval(it);
@@ -670,19 +670,19 @@ _title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn)
 
    if (!btn)
      {
-        edje_object_signal_emit(it->base.view,
+        edje_object_signal_emit(VIEW(it),
                                 "elm,state,next_btn,hide",
                                 "elm");
         return;
      }
 
-   elm_widget_sub_object_add(it->base.widget, btn);
+   elm_widget_sub_object_add(WIDGET(it), btn);
    evas_object_event_callback_add(btn,
                                   EVAS_CALLBACK_DEL,
                                   _title_next_btn_del,
                                   it);
-   edje_object_part_swallow(it->base.view, "elm.swallow.next_btn", btn);
-   edje_object_signal_emit(it->base.view, "elm,state,next_btn,show", "elm");
+   edje_object_part_swallow(VIEW(it), "elm.swallow.next_btn", btn);
+   edje_object_signal_emit(VIEW(it), "elm,state,next_btn,show", "elm");
 
    _item_sizing_eval(it);
 }
@@ -696,7 +696,7 @@ _item_del(Elm_Naviframe_Item *it)
 
    if (!it) return;
 
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
    if (it->title_prev_btn)
@@ -744,8 +744,8 @@ _pushed_finished(void *data,
 {
    Elm_Naviframe_Item *it = data;
    if (!it) return;
-   evas_object_hide(it->base.view);
-   evas_object_smart_callback_call(it->base.widget,
+   evas_object_hide(VIEW(it));
+   evas_object_smart_callback_call(WIDGET(it),
                                    SIG_PUSH_FINISHED,
                                    data);
 }
@@ -758,7 +758,7 @@ _popped_finished(void *data,
 {
    Elm_Naviframe_Item *it = data;
    if (!it) return;
-   evas_object_smart_callback_call(it->base.widget,
+   evas_object_smart_callback_call(WIDGET(it),
                                    SIG_POP_FINISHED,
                                    data);
    _item_del(data);
@@ -775,10 +775,10 @@ _show_finished(void *data,
 
    it = data;
    if (!it) return;
-   wd =  elm_widget_data_get(it->base.widget);
+   wd =  elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
-   evas_object_smart_callback_call(it->base.widget,
+   evas_object_smart_callback_call(WIDGET(it),
                                    SIG_TRANSITION_FINISHED,
                                    data);
    if (wd->freeze_events)
@@ -790,16 +790,16 @@ _item_content_set(Elm_Naviframe_Item *navi_it, Evas_Object *content)
 {
    if (navi_it->content == content) return;
    if (navi_it->content) evas_object_del(navi_it->content);
-   elm_widget_sub_object_add(navi_it->base.widget, content);
-   edje_object_part_swallow(navi_it->base.view,
+   elm_widget_sub_object_add(WIDGET(navi_it), content);
+   edje_object_part_swallow(VIEW(navi_it),
                             "elm.swallow.content",
                             content);
    if (content)
-     edje_object_signal_emit(navi_it->base.view,
+     edje_object_signal_emit(VIEW(navi_it),
                              "elm,state,content,show",
                              "elm");
    else
-     edje_object_signal_emit(navi_it->base.view,
+     edje_object_signal_emit(VIEW(navi_it),
                              "elm,state,content,hide",
                              "elm");
    evas_object_event_callback_add(content,
@@ -828,15 +828,15 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
    else
      {
         if (strlen(item_style) > sizeof(buf))
-          WRN("too much long style name! : naviframe=%p", navi_it->base.widget);
+          WRN("too much long style name! : naviframe=%p", WIDGET(navi_it));
         sprintf(buf, "item/%s", item_style);
         eina_stringshare_replace(&navi_it->style, item_style);
      }
-   _elm_theme_object_set(navi_it->base.widget,
-                         navi_it->base.view,
+   _elm_theme_object_set(WIDGET(navi_it),
+                         VIEW(navi_it),
                          "naviframe",
                          buf,
-                         elm_widget_style_get(navi_it->base.widget));
+                         elm_widget_style_get(WIDGET(navi_it)));
    //recover item
    EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
       _item_text_set_hook((Elm_Object_Item *) navi_it,
@@ -851,10 +851,10 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
    //content
    if (navi_it->content)
      {
-        edje_object_part_swallow(navi_it->base.view,
+        edje_object_part_swallow(VIEW(navi_it),
                                  "elm.swallow.content",
                                  navi_it->content);
-        edje_object_signal_emit(navi_it->base.view,
+        edje_object_signal_emit(VIEW(navi_it),
                                 "elm,state,content,show",
                                 "elm");
      }
@@ -862,10 +862,10 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
    //prev button
    if (navi_it->title_prev_btn)
      {
-        edje_object_part_swallow(navi_it->base.view,
+        edje_object_part_swallow(VIEW(navi_it),
                                  "elm.swallow.prev_btn",
                                  navi_it->title_prev_btn);
-        edje_object_signal_emit(navi_it->base.view,
+        edje_object_signal_emit(VIEW(navi_it),
                                 "elm,state,prev_btn,show",
                                 "elm");
      }
@@ -873,10 +873,10 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
    //next button
    if (navi_it->title_next_btn)
      {
-        edje_object_part_swallow(navi_it->base.view,
+        edje_object_part_swallow(VIEW(navi_it),
                                  "elm.swallow.next_btn",
                                  navi_it->title_next_btn);
-        edje_object_signal_emit(navi_it->base.view,
+        edje_object_signal_emit(VIEW(navi_it),
                                 "elm,state,next_btn,show",
                                 "elm");
      }
@@ -884,7 +884,7 @@ _item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
    navi_it->title_visible = EINA_TRUE;
    _item_sizing_eval(navi_it);
 
-   wd = elm_widget_data_get(navi_it->base.widget);
+   wd = elm_widget_data_get(WIDGET(navi_it));
    if (wd && wd->freeze_events)
      evas_object_hide(wd->rect);
 }
@@ -959,23 +959,23 @@ elm_naviframe_item_push(Evas_Object *obj,
    elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);
 
    //item base layout
-   it->base.view = edje_object_add(evas_object_evas_get(obj));
-   edje_object_mirrored_set(it->base.view, elm_widget_mirrored_get(obj));
-   evas_object_smart_member_add(it->base.view, wd->base);
-   elm_widget_sub_object_add(obj, it->base.view);
-   edje_object_signal_callback_add(it->base.view,
+   VIEW(it) = edje_object_add(evas_object_evas_get(obj));
+   edje_object_mirrored_set(VIEW(it), elm_widget_mirrored_get(obj));
+   evas_object_smart_member_add(VIEW(it), wd->base);
+   elm_widget_sub_object_add(obj, VIEW(it));
+   edje_object_signal_callback_add(VIEW(it),
                                    "elm,action,show,finished",
                                    "",
                                    _show_finished, it);
-   edje_object_signal_callback_add(it->base.view,
+   edje_object_signal_callback_add(VIEW(it),
                                    "elm,action,pushed,finished",
                                    "",
                                    _pushed_finished, it);
-   edje_object_signal_callback_add(it->base.view,
+   edje_object_signal_callback_add(VIEW(it),
                                    "elm,action,popped,finished",
                                    "",
                                    _popped_finished, it);
-   edje_object_signal_callback_add(it->base.view,
+   edje_object_signal_callback_add(VIEW(it),
                                    "elm,action,title,clicked",
                                    "",
                                    _title_clicked, it);
@@ -998,18 +998,17 @@ elm_naviframe_item_push(Evas_Object *obj,
    _item_content_set(it, content);
 
    _item_sizing_eval(it);
-   evas_object_show(it->base.view);
+   evas_object_show(VIEW(it));
 
    prev_it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
    if (prev_it)
      {
         if (wd->freeze_events)
           evas_object_show(wd->rect);
-
-        edje_object_signal_emit(prev_it->base.view,
+        edje_object_signal_emit(VIEW(prev_it),
                                 "elm,state,cur,pushed",
                                 "elm");
-        edje_object_signal_emit(it->base.view,
+        edje_object_signal_emit(VIEW(it),
                                 "elm,state,new,pushed",
                                 "elm");
      }
@@ -1043,10 +1042,10 @@ elm_naviframe_item_pop(Evas_Object *obj)
      {
         if (wd->freeze_events)
           evas_object_show(wd->rect);
-        edje_object_signal_emit(it->base.view, "elm,state,cur,popped", "elm");
-        evas_object_show(prev_it->base.view);
-        evas_object_raise(prev_it->base.view);
-        edje_object_signal_emit(prev_it->base.view,
+        edje_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm");
+        evas_object_show(VIEW(prev_it));
+        evas_object_raise(VIEW(prev_it));
+        edje_object_signal_emit(VIEW(prev_it),
                                 "elm,state,prev,popped",
                                 "elm");
      }
@@ -1061,10 +1060,10 @@ elm_naviframe_item_pop_to(Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
    Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
-   Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(navi_it));
    Eina_Inlist *l, *prev_l;
 
-   if (it == elm_naviframe_top_item_get(navi_it->base.widget)) return;
+   if (it == elm_naviframe_top_item_get(WIDGET(navi_it))) return;
 
    l = wd->stack->last->prev;
 
@@ -1077,7 +1076,7 @@ elm_naviframe_item_pop_to(Elm_Object_Item *it)
         _item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
         l = prev_l;
      }
-   elm_naviframe_item_pop(navi_it->base.widget);
+   elm_naviframe_item_pop(WIDGET(navi_it));
 }
 
 EAPI void
@@ -1109,16 +1108,16 @@ elm_naviframe_item_del(Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
    Elm_Naviframe_Item *navi_it =(Elm_Naviframe_Item *) it;
-   Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
-   if (it == elm_naviframe_top_item_get(navi_it->base.widget))
+   Widget_Data *wd = elm_widget_data_get(WIDGET(navi_it));
+   if (it == elm_naviframe_top_item_get(WIDGET(navi_it)))
      {
         wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
         _item_del(navi_it);
         navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
                                             Elm_Naviframe_Item);
-        evas_object_show(navi_it->base.view);
-        evas_object_raise(navi_it->base.view);
-        edje_object_signal_emit(navi_it->base.view, "elm,state,visible", "elm");
+        evas_object_show(VIEW(navi_it));
+        evas_object_raise(VIEW(navi_it));
+        edje_object_signal_emit(VIEW(navi_it), "elm,state,visible", "elm");
      }
    else
      {
index 1a76271..453732d 100644 (file)
@@ -52,7 +52,7 @@ static const char *widtype = NULL;
 
 #define ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, ...)                  \
    ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \
-   ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__;
+   ELM_CHECK_WIDTYPE(WIDGET(it), widtype) __VA_ARGS__;
 
 static Eina_Bool _move_scroller(void *data);
 static void _del_hook(Evas_Object * obj);
@@ -116,24 +116,24 @@ _item_new(Evas_Object *obj, Evas_Object *icon, const char *label, Evas_Smart_Cb
    it->icon = icon;
    it->func = func;
    it->base.data = data;
-   it->base.view = edje_object_add(evas_object_evas_get(obj));
-   _elm_theme_object_set(obj, it->base.view, "diskselector", "item", style);
-   evas_object_size_hint_weight_set(it->base.view, EVAS_HINT_EXPAND,
+   VIEW(it) = edje_object_add(evas_object_evas_get(obj));
+   _elm_theme_object_set(obj, VIEW(it), "diskselector", "item", style);
+   evas_object_size_hint_weight_set(VIEW(it), EVAS_HINT_EXPAND,
                                     EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(it->base.view, EVAS_HINT_FILL,
+   evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL,
                                    EVAS_HINT_FILL);
-   evas_object_show(it->base.view);
+   evas_object_show(VIEW(it));
 
    if (it->label)
      {
-        edje_object_part_text_set(it->base.view, "elm.text", it->label);
-        edje_object_signal_callback_add(it->base.view, "elm,action,click", "", _item_click_cb, it);
+        edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+        edje_object_signal_callback_add(VIEW(it), "elm,action,click", "", _item_click_cb, it);
      }
    if (it->icon)
      {
         evas_object_size_hint_min_set(it->icon, 24, 24);
         evas_object_size_hint_max_set(it->icon, 40, 40);
-        edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
+        edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
         evas_object_show(it->icon);
         elm_widget_sub_object_add(obj, it->icon);
      }
@@ -213,25 +213,25 @@ _del_pre_hook(Evas_Object * obj)
    if (wd->last)
      {
         eina_stringshare_del(wd->last->label);
-        evas_object_del(wd->last->base.view);
+        evas_object_del(wd->VIEW(last));
         free(wd->last);
      }
    if (wd->s_last)
      {
         eina_stringshare_del(wd->s_last->label);
-        evas_object_del(wd->s_last->base.view);
+        evas_object_del(wd->VIEW(s_last));
         free(wd->s_last);
      }
    if (wd->second)
      {
         eina_stringshare_del(wd->second->label);
-        evas_object_del(wd->second->base.view);
+        evas_object_del(wd->VIEW(second));
         free(wd->second);
      }
    if (wd->first)
      {
         eina_stringshare_del(wd->first->label);
-        evas_object_del(wd->first->base.view);
+        evas_object_del(wd->VIEW(first));
         free(wd->first);
      }
 
@@ -240,7 +240,7 @@ _del_pre_hook(Evas_Object * obj)
         if (it)
           {
              eina_stringshare_del(it->label);
-             evas_object_del(wd->first->base.view);
+             evas_object_del(VIEW(wd->first));
              free(it);
           }
      }
@@ -250,7 +250,7 @@ _del_pre_hook(Evas_Object * obj)
      if (it)
         {
            eina_stringshare_del(it->label);
-           evas_object_del(wd->first->base.view);
+           evas_object_del(VIEW(wd->first));
            free(it);
         }
    }
@@ -282,18 +282,18 @@ _theme_hook(Evas_Object * obj)
      {
         EINA_LIST_FOREACH(wd->r_items, l, it)
           {
-             _elm_theme_object_set(obj, it->base.view, "diskselector", "item",
+             _elm_theme_object_set(obj, VIEW(it), "diskselector", "item",
                                    elm_widget_style_get(obj));
-             edje_object_part_text_set(it->base.view, "elm.text", it->label);
+             edje_object_part_text_set(VIEW(it), "elm.text", it->label);
           }
      }
    else
      {
         EINA_LIST_FOREACH(wd->items, l, it)
           {
-             _elm_theme_object_set(obj, it->base.view, "diskselector", "item",
+             _elm_theme_object_set(obj, VIEW(it), "diskselector", "item",
                                    elm_widget_style_get(obj));
-             edje_object_part_text_set(it->base.view, "elm.text", it->label);
+             edje_object_part_text_set(VIEW(it), "elm.text", it->label);
           }
      }
    _elm_theme_object_set(obj, wd->right_blank, "diskselector", "item",
@@ -332,11 +332,11 @@ static void
 _select_item(Elm_Diskselector_Item *it)
 {
    if (!it) return;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    wd->selected_item = it;
    _selected_item_indicate(wd->selected_item);
-   if (it->func) it->func((void *)it->base.data, it->base.widget, it);
-   evas_object_smart_callback_call(it->base.widget, SIG_SELECTED, it);
+   if (it->func) it->func((void *)it->base.data, WIDGET(it), it);
+   evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, it);
 }
 
 static void
@@ -463,7 +463,7 @@ _check_string(void *data)
      {
         Evas_Coord x, w;
         int len;
-        evas_object_geometry_get(it->base.view, &x, NULL, &w, NULL);
+        evas_object_geometry_get(VIEW(it), &x, NULL, &w, NULL);
         /* item not visible */
         if ((x + w <= ox) || (x >= ox + ow))
           continue;
@@ -473,18 +473,18 @@ _check_string(void *data)
 //        len = eina_stringshare_strlen(it->label);
 
         if (x <= ox + 5)
-          edje_object_signal_emit(it->base.view, "elm,state,left_side",
+          edje_object_signal_emit(VIEW(it), "elm,state,left_side",
                                   "elm");
         else if (x + w >= ox + ow - 5)
-          edje_object_signal_emit(it->base.view, "elm,state,right_side",
+          edje_object_signal_emit(VIEW(it), "elm,state,right_side",
                                   "elm");
         else
           {
              if ((wd->len_threshold) && (len > wd->len_threshold))
-               edje_object_signal_emit(it->base.view, "elm,state,center_small",
+               edje_object_signal_emit(VIEW(it), "elm,state,center_small",
                                        "elm");
              else
-               edje_object_signal_emit(it->base.view, "elm,state,center",
+               edje_object_signal_emit(VIEW(it), "elm,state,center",
                                        "elm");
           }
 
@@ -506,7 +506,7 @@ _check_string(void *data)
         // cut it off at byte mark returned form _check_letter
         strncpy(buf, it->label, length);
         buf[length] = '\0';
-        edje_object_part_text_set(it->base.view, "elm.text", buf);
+        edje_object_part_text_set(VIEW(it), "elm.text", buf);
      }
 
    if (wd->check_idler)
@@ -521,15 +521,15 @@ _selected_item_indicate(Elm_Diskselector_Item *it)
    Elm_Diskselector_Item *item;
    Eina_List *l;
    Widget_Data *wd;
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
 
    if (!wd) return;
 
    EINA_LIST_FOREACH(wd->r_items, l, item)
      {
-        if (!strcmp(item->label, it->label)) edje_object_signal_emit(item->base.view, "elm,state,selected", "elm");
+        if (!strcmp(item->label, it->label)) edje_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
         else
-           edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+           edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
      }
 }
 
@@ -542,7 +542,7 @@ _item_click_cb(void *data, Evas_Object *obj __UNUSED__,
    if (!it) return;
 
    Widget_Data *wd;
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
 
    if (!wd) return;
 
@@ -552,7 +552,7 @@ _item_click_cb(void *data, Evas_Object *obj __UNUSED__,
         _selected_item_indicate(wd->selected_item);
      }
 
-   if (it->func) it->func((void *)it->base.data, it->base.widget, it);
+   if (it->func) it->func((void *)it->base.data, WIDGET(it), it);
 }
 
 static void
@@ -597,7 +597,7 @@ _scroller_stop_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
    evas_object_geometry_get(wd->scroller, NULL, NULL, &ow, NULL);
    EINA_LIST_FOREACH(list, l, it)
      {
-        evas_object_geometry_get(it->base.view, &x, NULL, &w, NULL);
+        evas_object_geometry_get(VIEW(it), &x, NULL, &w, NULL);
         if (abs((int)(ow / 2 - (int)(x + w / 2))) < 10)
           break;
      }
@@ -661,10 +661,10 @@ static void
 _round_item_del(Widget_Data *wd, Elm_Diskselector_Item *it)
 {
    if (!it) return;
-   elm_box_unpack(wd->main_box, it->base.view);
+   elm_box_unpack(wd->main_box, VIEW(it));
    wd->r_items = eina_list_remove(wd->r_items, it);
    eina_stringshare_del(it->label);
-   evas_object_del(it->base.view);
+   evas_object_del(VIEW(it));
    free(it);
 }
 
@@ -708,7 +708,7 @@ _round_items_add(Widget_Data *wd)
 
    if (!wd->first)
      {
-        wd->first = _item_new(it->base.widget, it->icon, it->label, it->func,
+        wd->first = _item_new(WIDGET(it), it->icon, it->label, it->func,
                               it->base.data);
         wd->first->node = it->node;
         wd->r_items = eina_list_append(wd->r_items, wd->first);
@@ -719,7 +719,7 @@ _round_items_add(Widget_Data *wd)
      it = dit;
    if (!wd->second)
      {
-        wd->second = _item_new(it->base.widget, it->icon, it->label, it->func,
+        wd->second = _item_new(WIDGET(it), it->icon, it->label, it->func,
                                it->base.data);
         wd->second->node = it->node;
         wd->r_items = eina_list_append(wd->r_items, wd->second);
@@ -730,7 +730,7 @@ _round_items_add(Widget_Data *wd)
      {
         it = eina_list_nth(wd->items, i);
         if (!it) it = dit;
-        temp_it = _item_new(it->base.widget, it->icon, it->label, it->func, it->base.data);
+        temp_it = _item_new(WIDGET(it), it->icon, it->label, it->func, it->base.data);
         wd->over_items = eina_list_append(wd->over_items, temp_it);
         wd->r_items = eina_list_append(wd->r_items, temp_it);
      }
@@ -740,7 +740,7 @@ _round_items_add(Widget_Data *wd)
      it = dit;
    if (!wd->last)
      {
-        wd->last = _item_new(it->base.widget, it->icon, it->label, it->func,
+        wd->last = _item_new(WIDGET(it), it->icon, it->label, it->func,
                              it->base.data);
         wd->last->node = it->node;
         wd->r_items = eina_list_prepend(wd->r_items, wd->last);
@@ -751,7 +751,7 @@ _round_items_add(Widget_Data *wd)
      it = dit;
    if (!wd->s_last)
      {
-        wd->s_last = _item_new(it->base.widget, it->icon, it->label, it->func,
+        wd->s_last = _item_new(WIDGET(it), it->icon, it->label, it->func,
                                it->base.data);
         wd->s_last->node = it->node;
         wd->r_items = eina_list_prepend(wd->r_items, wd->s_last);
@@ -762,7 +762,7 @@ _round_items_add(Widget_Data *wd)
      {
         it = eina_list_nth(wd->items, wd->item_count - i);
         if (!it) it = dit;
-        temp_it = _item_new(it->base.widget, it->icon, it->label, it->func, it->base.data);
+        temp_it = _item_new(WIDGET(it), it->icon, it->label, it->func, it->base.data);
         wd->under_items = eina_list_append(wd->under_items, temp_it);
         wd->r_items = eina_list_prepend(wd->r_items, temp_it);
      }
@@ -888,22 +888,22 @@ elm_diskselector_round_set(Evas_Object * obj, Eina_Bool round)
         _round_items_add(wd);
 
         if (wd->last)
-          elm_box_pack_start(wd->main_box, wd->last->base.view);
+          elm_box_pack_start(wd->main_box, wd->VIEW(last));
         if (wd->s_last)
-          elm_box_pack_start(wd->main_box, wd->s_last->base.view);
+          elm_box_pack_start(wd->main_box, wd->VIEW(s_last));
 
         // if more than 3 items should be displayed
         EINA_LIST_FOREACH(wd->under_items, elist, it)
-           elm_box_pack_start(wd->main_box, it->base.view);
+           elm_box_pack_start(wd->main_box, VIEW(it));
 
         if (wd->first)
-          elm_box_pack_end(wd->main_box, wd->first->base.view);
+          elm_box_pack_end(wd->main_box, wd->VIEW(first));
         if (wd->second)
-          elm_box_pack_end(wd->main_box, wd->second->base.view);
+          elm_box_pack_end(wd->main_box, wd->VIEW(second));
 
         // if more than 3 items should be displayed
         EINA_LIST_FOREACH(wd->over_items, elist, it)
-           elm_box_pack_end(wd->main_box, it->base.view);
+           elm_box_pack_end(wd->main_box, VIEW(it));
      }
    else
      {
@@ -1032,19 +1032,19 @@ elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *i
         wd->r_items = eina_list_append(wd->r_items, it);
         _round_items_add(wd);
         if (wd->last)
-          elm_box_pack_start(wd->main_box, wd->last->base.view);
+          elm_box_pack_start(wd->main_box, wd->VIEW(last));
         if (wd->s_last)
-          elm_box_pack_start(wd->main_box, wd->s_last->base.view);
-        elm_box_pack_end(wd->main_box, it->base.view);
+          elm_box_pack_start(wd->main_box, wd->VIEW(s_last));
+        elm_box_pack_end(wd->main_box, VIEW(it));
         if (wd->first)
-          elm_box_pack_end(wd->main_box, wd->first->base.view);
+          elm_box_pack_end(wd->main_box, wd->VIEW(first));
         if (wd->second)
-          elm_box_pack_end(wd->main_box, wd->second->base.view);
+          elm_box_pack_end(wd->main_box, wd->VIEW(second));
      }
    else
      {
         elm_box_unpack(wd->main_box, wd->right_blank);
-        elm_box_pack_end(wd->main_box, it->base.view);
+        elm_box_pack_end(wd->main_box, VIEW(it));
         elm_box_pack_end(wd->main_box, wd->right_blank);
      }
    if (!wd->selected_item)
@@ -1063,10 +1063,10 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
    Elm_Diskselector_Item *item;
    Eina_List *l;
    int i = 0;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
-   elm_box_unpack(wd->main_box, it->base.view);
+   elm_box_unpack(wd->main_box, VIEW(it));
 
    if (wd->round)
      wd->r_items = eina_list_remove(wd->r_items, it);
@@ -1091,16 +1091,16 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
      {
         if (!wd->item_count)
           {
-             evas_object_hide(wd->first->base.view);
-             evas_object_hide(wd->second->base.view);
-             evas_object_hide(wd->last->base.view);
-             evas_object_hide(wd->s_last->base.view);
+             evas_object_hide(wd->VIEW(first));
+             evas_object_hide(wd->VIEW(second));
+             evas_object_hide(wd->VIEW(last));
+             evas_object_hide(wd->VIEW(s_last));
 
              EINA_LIST_FOREACH(wd->under_items, l, item)
-                evas_object_hide(item->base.view);
+                evas_object_hide(VIEW(item));
 
              EINA_LIST_FOREACH(wd->over_items, l, item)
-                evas_object_hide(item->base.view);
+                evas_object_hide(VIEW(item));
           }
         else
           {
@@ -1108,14 +1108,14 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
              if (dit)
                {
                   eina_stringshare_replace(&wd->first->label, dit->label);
-                  edje_object_part_text_set(wd->first->base.view, "elm.text",
+                  edje_object_part_text_set(wd->VIEW(first), "elm.text",
                                             wd->first->label);
                }
              dit = eina_list_nth(wd->items, 1);
              if (dit)
                {
                   eina_stringshare_replace(&wd->second->label, dit->label);
-                  edje_object_part_text_set(wd->second->base.view, "elm.text",
+                  edje_object_part_text_set(wd->VIEW(second), "elm.text",
                                             wd->second->label);
                }
              // if more than 3 itmes should be displayed
@@ -1124,21 +1124,21 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
                   dit = eina_list_nth(wd->items, i);
                   item = eina_list_nth(wd->over_items, i - 2);
                   eina_stringshare_replace(&item->label, dit->label);
-                  edje_object_part_text_set(item->base.view, "elm.text", item->label);
+                  edje_object_part_text_set(VIEW(item), "elm.text", item->label);
                }
 
              dit = eina_list_nth(wd->items, eina_list_count(wd->items) - 1);
              if (dit)
                {
                   eina_stringshare_replace(&wd->last->label, dit->label);
-                  edje_object_part_text_set(wd->last->base.view, "elm.text",
+                  edje_object_part_text_set(wd->VIEW(last), "elm.text",
                                             wd->last->label);
                }
              dit = eina_list_nth(wd->items, eina_list_count(wd->items) - 2);
              if (dit)
                {
                   eina_stringshare_replace(&wd->s_last->label, dit->label);
-                  edje_object_part_text_set(wd->s_last->base.view, "elm.text",
+                  edje_object_part_text_set(wd->VIEW(s_last), "elm.text",
                                             wd->s_last->label);
                }
              // if more than 3 itmes should be displayed
@@ -1147,7 +1147,7 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
                   dit = eina_list_nth(wd->items, wd->item_count - i);
                   item = eina_list_nth(wd->under_items, i - 3);
                   eina_stringshare_replace(&item->label, dit->label);
-                  edje_object_part_text_set(item->base.view, "elm.text", item->label);
+                  edje_object_part_text_set(VIEW(item), "elm.text", item->label);
                }
           }
      }
@@ -1167,7 +1167,7 @@ elm_diskselector_item_label_set(Elm_Diskselector_Item * it, const char *label)
 {
    ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it);
    eina_stringshare_replace(&it->label, label);
-   edje_object_part_text_set(it->base.view, "elm.text", it->label);
+   edje_object_part_text_set(VIEW(it), "elm.text", it->label);
 }
 
 EAPI Elm_Diskselector_Item *
@@ -1184,7 +1184,7 @@ elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected
 {
    ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it);
    Widget_Data *wd;
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
    if ((wd->selected_item == it) && (selected))
@@ -1199,7 +1199,7 @@ elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected
      }
 
    if (!wd->idler)
-     ecore_idler_add(_move_scroller, it->base.widget);
+     ecore_idler_add(_move_scroller, WIDGET(it));
 }
 
 EAPI Eina_Bool
@@ -1208,7 +1208,7 @@ elm_diskselector_item_selected_get(const Elm_Diskselector_Item *it)
    ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
    Widget_Data *wd;
 
-   wd = elm_widget_data_get(it->base.widget);
+   wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return EINA_FALSE;
    return (wd->selected_item == it);
 }
index 60c0e1f..ffbbc63 100644 (file)
@@ -377,7 +377,7 @@ _changed(Widget_Data *wd)
      return;
 
    if (item->func)
-     item->func((void *)item->base.data, item->base.widget, item);
+     item->func((void *)item->base.data, WIDGET(item), item);
    if (!item->deleted)
      evas_object_smart_callback_call(wd->self, SIG_SELECTED, item);
 }
@@ -770,7 +770,7 @@ elm_flipselector_item_selected_set(Elm_Flipselector_Item *item, Eina_Bool select
    Widget_Data *wd;
    Eina_List *l;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd)
      return;
 
@@ -817,7 +817,7 @@ elm_flipselector_item_selected_get(const Elm_Flipselector_Item *item)
    ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
    Widget_Data *wd;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return EINA_FALSE;
    return (eina_list_data_get(wd->current) == item);
 }
@@ -829,7 +829,7 @@ elm_flipselector_item_del(Elm_Flipselector_Item *item)
 
    Widget_Data *wd;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd)
      return;
 
@@ -857,7 +857,7 @@ elm_flipselector_item_label_get(const Elm_Flipselector_Item *item)
    Widget_Data *wd;
    Eina_List *l;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if ((!wd) || (!wd->items))
      return NULL;
 
@@ -879,7 +879,7 @@ elm_flipselector_item_label_set(Elm_Flipselector_Item *item, const char *label)
    if ((!item) || (!label))
      return;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if ((!wd) || (!wd->items))
      return;
 
@@ -896,7 +896,7 @@ elm_flipselector_item_label_set(Elm_Flipselector_Item *item, const char *label)
 
    if (wd->current == l)
      {
-        _update_view(item->base.widget);
+        _update_view(WIDGET(item));
         _sizing_eval(wd->self);
      }
 
@@ -912,7 +912,7 @@ elm_flipselector_item_prev_get(Elm_Flipselector_Item *item)
    Widget_Data *wd;
    Eina_List *l;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if ((!wd) || (!wd->items))
      return NULL;
 
@@ -937,7 +937,7 @@ elm_flipselector_item_next_get(Elm_Flipselector_Item *item)
    Widget_Data *wd;
    Eina_List *l;
 
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if ((!wd) || (!wd->items))
      return NULL;
 
index 5d7827a..7cdd2f8 100644 (file)
@@ -570,7 +570,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
 
    while (item)
      {
-        edje_object_mirrored_set(item->base.view, rtl);
+        edje_object_mirrored_set(VIEW(item), rtl);
         elm_gengrid_item_update(item);
         item = ELM_GENGRID_ITEM_FROM_INLIST(EINA_INLIST_GET(item)->next);
      }
@@ -751,10 +751,10 @@ _long_press(void *data)
    if (item->wd->reorder_mode)
      {
         item->wd->reorder_item = item;
-        evas_object_raise(item->base.view);
+        evas_object_raise(VIEW(item));
         elm_smart_scroller_hold_set(item->wd->scr, EINA_TRUE);
         elm_smart_scroller_bounce_allow_set(item->wd->scr, EINA_FALSE, EINA_FALSE);
-        edje_object_signal_emit(item->base.view, "elm,state,reorder,enabled", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,reorder,enabled", "elm");
      }
    return ECORE_CALLBACK_CANCEL;
 }
@@ -831,7 +831,7 @@ _mouse_up(void            *data,
 
         elm_smart_scroller_hold_set(item->wd->scr, EINA_FALSE);
         elm_smart_scroller_bounce_allow_set(item->wd->scr, item->wd->h_bounce, item->wd->v_bounce);
-        edje_object_signal_emit(item->base.view, "elm,state,reorder,disabled", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,reorder,disabled", "elm");
      }
    if (item->wd->longpressed)
      {
@@ -878,7 +878,7 @@ static void
 _item_hilight(Elm_Gengrid_Item *item)
 {
    if ((item->wd->no_select) || (item->delete_me) || (item->hilighted)) return;
-   edje_object_signal_emit(item->base.view, "elm,state,selected", "elm");
+   edje_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
    item->hilighted = EINA_TRUE;
 }
 
@@ -889,22 +889,23 @@ _item_realize(Elm_Gengrid_Item *item)
    char style[1024];
 
    if ((item->realized) || (item->delete_me)) return;
-   item->base.view = edje_object_add(evas_object_evas_get(item->wd->self));
-   edje_object_scale_set(item->base.view, elm_widget_scale_get(item->wd->self) *
+   VIEW(item) = edje_object_add(evas_object_evas_get(item->wd->self));
+   edje_object_scale_set(VIEW(item), elm_widget_scale_get(item->wd->self) *
                          _elm_config->scale);
-   edje_object_mirrored_set(item->base.view, elm_widget_mirrored_get(item->base.widget));
-   evas_object_smart_member_add(item->base.view, item->wd->pan_smart);
-   elm_widget_sub_object_add(item->wd->self, item->base.view);
+   edje_object_mirrored_set(VIEW(item), elm_widget_mirrored_get(WIDGET(item)));
+   edje_object_mirrored_set(VIEW(item), elm_widget_mirrored_get(WIDGET(item)));
+   evas_object_smart_member_add(VIEW(item), item->wd->pan_smart);
+   elm_widget_sub_object_add(item->wd->self, VIEW(item));
    snprintf(style, sizeof(style), "item/%s",
             item->gic->item_style ? item->gic->item_style : "default");
-   _elm_theme_object_set(item->wd->self, item->base.view, "gengrid", style,
+   _elm_theme_object_set(item->wd->self, VIEW(item), "gengrid", style,
                          elm_widget_style_get(item->wd->self));
    item->spacer =
       evas_object_rectangle_add(evas_object_evas_get(item->wd->self));
    evas_object_color_set(item->spacer, 0, 0, 0, 0);
    elm_widget_sub_object_add(item->wd->self, item->spacer);
    evas_object_size_hint_min_set(item->spacer, 2 * _elm_config->scale, 1);
-   edje_object_part_swallow(item->base.view, "elm.swallow.pad", item->spacer);
+   edje_object_part_swallow(VIEW(item), "elm.swallow.pad", item->spacer);
 
    if (item->gic->func.label_get)
      {
@@ -912,7 +913,7 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->labels =
-           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+           elm_widget_stringlist_get(edje_object_data_get(VIEW(item),
                                                           "labels"));
         EINA_LIST_FOREACH(item->labels, l, key)
           {
@@ -920,7 +921,7 @@ _item_realize(Elm_Gengrid_Item *item)
                 ((void *)item->base.data, item->wd->self, l->data);
              if (s)
                {
-                  edje_object_part_text_set(item->base.view, l->data, s);
+                  edje_object_part_text_set(VIEW(item), l->data, s);
                   free(s);
                }
           }
@@ -932,7 +933,7 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->icons =
-           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+           elm_widget_stringlist_get(edje_object_data_get(VIEW(item),
                                                           "icons"));
         EINA_LIST_FOREACH(item->icons, l, key)
           {
@@ -941,7 +942,7 @@ _item_realize(Elm_Gengrid_Item *item)
              if (ic)
                {
                   item->icon_objs = eina_list_append(item->icon_objs, ic);
-                  edje_object_part_swallow(item->base.view, key, ic);
+                  edje_object_part_swallow(VIEW(item), key, ic);
                   evas_object_show(ic);
                   elm_widget_sub_object_add(item->wd->self, ic);
                }
@@ -954,7 +955,7 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->states =
-           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+           elm_widget_stringlist_get(edje_object_data_get(VIEW(item),
                                                           "states"));
         EINA_LIST_FOREACH(item->states, l, key)
           {
@@ -963,14 +964,14 @@ _item_realize(Elm_Gengrid_Item *item)
              if (on)
                {
                   snprintf(buf, sizeof(buf), "elm,state,%s,active", key);
-                  edje_object_signal_emit(item->base.view, buf, "elm");
+                  edje_object_signal_emit(VIEW(item), buf, "elm");
                }
           }
      }
 
    if ((!item->wd->item_width) && (!item->wd->item_height))
      {
-        edje_object_size_min_restricted_calc(item->base.view,
+        edje_object_size_min_restricted_calc(VIEW(item),
                                              &item->wd->item_width,
                                              &item->wd->item_height,
                                              item->wd->item_width,
@@ -979,19 +980,19 @@ _item_realize(Elm_Gengrid_Item *item)
                                       1, &item->wd->item_height);
      }
 
-   evas_object_event_callback_add(item->base.view, EVAS_CALLBACK_MOUSE_DOWN,
+   evas_object_event_callback_add(VIEW(item), EVAS_CALLBACK_MOUSE_DOWN,
                                   _mouse_down, item);
-   evas_object_event_callback_add(item->base.view, EVAS_CALLBACK_MOUSE_UP,
+   evas_object_event_callback_add(VIEW(item), EVAS_CALLBACK_MOUSE_UP,
                                   _mouse_up, item);
-   evas_object_event_callback_add(item->base.view, EVAS_CALLBACK_MOUSE_MOVE,
+   evas_object_event_callback_add(VIEW(item), EVAS_CALLBACK_MOUSE_MOVE,
                                   _mouse_move, item);
 
    if (item->selected)
-     edje_object_signal_emit(item->base.view, "elm,state,selected", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
    if (item->disabled)
-     edje_object_signal_emit(item->base.view, "elm,state,disabled", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
 
-   evas_object_show(item->base.view);
+   evas_object_show(VIEW(item));
 
    if (item->tooltip.content_cb)
      {
@@ -1019,8 +1020,8 @@ _item_unrealize(Elm_Gengrid_Item *item)
         ecore_timer_del(item->long_timer);
         item->long_timer = NULL;
      }
-   evas_object_del(item->base.view);
-   item->base.view = NULL;
+   evas_object_del(VIEW(item));
+   VIEW(item) = NULL;
    evas_object_del(item->spacer);
    item->spacer = NULL;
    elm_widget_stringlist_free(item->labels);
@@ -1063,15 +1064,15 @@ _reorder_item_moving_effect_timer_cb(void *data)
    if ((((dx > 0) && (item->rx >= item->tx)) || ((dx <= 0) && (item->rx <= item->tx))) &&
        (((dy > 0) && (item->ry >= item->ty)) || ((dy <= 0) && (item->ry <= item->ty))))
      {
-        evas_object_move(item->base.view, item->tx, item->ty);
-        evas_object_resize(item->base.view, item->wd->item_width, item->wd->item_height);
+        evas_object_move(VIEW(item), item->tx, item->ty);
+        evas_object_resize(VIEW(item), item->wd->item_width, item->wd->item_height);
         item->moving = EINA_FALSE;
         item->item_moving_effect_timer = NULL;
         return ECORE_CALLBACK_CANCEL;
      }
 
-   evas_object_move(item->base.view, item->rx, item->ry);
-   evas_object_resize(item->base.view, item->wd->item_width, item->wd->item_height);
+   evas_object_move(VIEW(item), item->rx, item->ry);
+   evas_object_resize(VIEW(item), item->wd->item_width, item->wd->item_height);
 
    return ECORE_CALLBACK_RENEW;
 }
@@ -1172,9 +1173,9 @@ _item_place(Elm_Gengrid_Item *item,
                     }
                   if (item->wd->reorder_item == item)
                     {
-                       evas_object_move(item->base.view,
+                       evas_object_move(VIEW(item),
                                         item->wd->reorder_item_x, item->wd->reorder_item_y);
-                       evas_object_resize(item->base.view,
+                       evas_object_resize(VIEW(item),
                                           item->wd->item_width, item->wd->item_height);
                        return;
                     }
@@ -1245,8 +1246,8 @@ _item_place(Elm_Gengrid_Item *item,
                   item->moving = EINA_FALSE;
                }
           }
-        evas_object_move(item->base.view, x, y);
-        evas_object_resize(item->base.view, item->wd->item_width,
+        evas_object_move(VIEW(item), x, y);
+        evas_object_resize(VIEW(item), item->wd->item_width,
                            item->wd->item_height);
      }
    else
@@ -1291,7 +1292,7 @@ _item_del(Elm_Gengrid_Item *item)
    item->wd->items = eina_inlist_remove(item->wd->items, EINA_INLIST_GET(item));
    if (item->long_timer) ecore_timer_del(item->long_timer);
    if (item->tooltip.del_cb)
-     item->tooltip.del_cb((void *)item->tooltip.data, item->base.widget, item);
+     item->tooltip.del_cb((void *)item->tooltip.data, WIDGET(item), item);
    item->wd->walking -= item->walking;
    item->wd->count--;
    if (item->wd->calc_job) ecore_job_del(item->wd->calc_job);
@@ -1321,7 +1322,7 @@ call:
    item->wd->walking--;
    item->wd->last_selected_item = item;
    if ((item->wd->clear_me) && (!item->wd->walking))
-     elm_gengrid_clear(item->base.widget);
+     elm_gengrid_clear(WIDGET(item));
    else
      {
         if ((!item->walking) && (item->delete_me))
@@ -1333,7 +1334,7 @@ static void
 _item_unselect(Elm_Gengrid_Item *item)
 {
    if ((item->delete_me) || (!item->hilighted)) return;
-   edje_object_signal_emit(item->base.view, "elm,state,unselected", "elm");
+   edje_object_signal_emit(VIEW(item), "elm,state,unselected", "elm");
    item->hilighted = EINA_FALSE;
    if (item->selected)
      {
@@ -2005,7 +2006,7 @@ EAPI const Evas_Object *
 elm_gengrid_item_object_get(const Elm_Gengrid_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   return item->base.view;
+   return VIEW(item);
 }
 
 EAPI void
@@ -2145,9 +2146,9 @@ elm_gengrid_item_disabled_set(Elm_Gengrid_Item *item,
    if (item->realized)
      {
         if (item->disabled)
-          edje_object_signal_emit(item->base.view, "elm,state,disabled", "elm");
+          edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
         else
-          edje_object_signal_emit(item->base.view, "elm,state,enabled", "elm");
+          edje_object_signal_emit(VIEW(item), "elm,state,enabled", "elm");
      }
 }
 
@@ -2204,11 +2205,11 @@ elm_gengrid_item_tooltip_content_cb_set(Elm_Gengrid_Item           *item,
 
    if (item->tooltip.del_cb)
      item->tooltip.del_cb((void *)item->tooltip.data,
-                          item->base.widget, item);
+                          WIDGET(item), item);
    item->tooltip.content_cb = func;
    item->tooltip.data = data;
    item->tooltip.del_cb = del_cb;
-   if (item->base.view)
+   if (VIEW(item))
      {
         elm_widget_item_tooltip_content_cb_set(item,
                                                item->tooltip.content_cb,
@@ -2226,11 +2227,11 @@ EAPI void
 elm_gengrid_item_tooltip_unset(Elm_Gengrid_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   if ((item->base.view) && (item->tooltip.content_cb))
+   if ((VIEW(item)) && (item->tooltip.content_cb))
      elm_widget_item_tooltip_unset(item);
 
    if (item->tooltip.del_cb)
-     item->tooltip.del_cb((void *)item->tooltip.data, item->base.widget, item);
+     item->tooltip.del_cb((void *)item->tooltip.data, WIDGET(item), item);
    item->tooltip.del_cb = NULL;
    item->tooltip.content_cb = NULL;
    item->tooltip.data = NULL;
@@ -2244,7 +2245,7 @@ elm_gengrid_item_tooltip_style_set(Elm_Gengrid_Item *item,
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
    eina_stringshare_replace(&item->tooltip.style, style);
-   if (item->base.view) elm_widget_item_tooltip_style_set(item, style);
+   if (VIEW(item)) elm_widget_item_tooltip_style_set(item, style);
 }
 
 EAPI const char *
@@ -2260,7 +2261,7 @@ elm_gengrid_item_cursor_set(Elm_Gengrid_Item *item,
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
    eina_stringshare_replace(&item->mouse_cursor, cursor);
-   if (item->base.view) elm_widget_item_cursor_set(item, cursor);
+   if (VIEW(item)) elm_widget_item_cursor_set(item, cursor);
 }
 
 EAPI const char *
@@ -2277,7 +2278,7 @@ elm_gengrid_item_cursor_unset(Elm_Gengrid_Item *item)
    if (!item->mouse_cursor)
      return;
 
-   if (item->base.view)
+   if (VIEW(item))
      elm_widget_item_cursor_unset(item);
 
    eina_stringshare_del(item->mouse_cursor);
@@ -2492,7 +2493,7 @@ EAPI Evas_Object *
 elm_gengrid_item_gengrid_get(const Elm_Gengrid_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   return item->base.widget;
+   return WIDGET(item);
 }
 
 EAPI void
index 2b90946..97b1974 100644 (file)
@@ -450,7 +450,7 @@ _event_hook(Evas_Object       *obj,
         it = elm_genlist_selected_item_get(obj);
         elm_genlist_item_expanded_set(it,
                                       !elm_genlist_item_expanded_get(it));
-        evas_object_smart_callback_call(it->base.widget, SIG_ACTIVATED, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
      }
    else if (!strcmp(ev->keyname, "Escape"))
      {
@@ -753,15 +753,15 @@ _item_highlight(Elm_Genlist_Item *it)
    if ((it->wd->no_select) || (it->delete_me) || (it->highlighted) ||
        (it->disabled) || (it->display_only) || (it->mode_view))
      return;
-   edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
    if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,selected", "elm");
-   selectraise = edje_object_data_get(it->base.view, "selectraise");
+   selectraise = edje_object_data_get(VIEW(it), "selectraise");
    if ((selectraise) && (!strcmp(selectraise, "on")))
      {
         if (it->edit_obj) evas_object_raise(it->edit_obj);
-        else evas_object_raise(it->base.view);
+        else evas_object_raise(VIEW(it));
         if ((it->group_item) && (it->group_item->realized))
-          evas_object_raise(it->group_item->base.view);
+          evas_object_raise(it->VIEW(group_item));
      }
    it->highlighted = EINA_TRUE;
 }
@@ -863,7 +863,7 @@ _item_del(Elm_Genlist_Item *it)
    if (it->effect_item_realized) _effect_item_unrealize(it);
    if (it->block) _item_block_del(it);
    if ((!it->delete_me) && (it->itc->func.del))
-     it->itc->func.del((void *)it->base.data, it->base.widget);
+     it->itc->func.del((void *)it->base.data, WIDGET(it));
    it->delete_me = EINA_TRUE;
    if (it->queued)
      it->wd->queue = eina_list_remove(it->wd->queue, it);
@@ -884,7 +884,7 @@ _item_del(Elm_Genlist_Item *it)
    if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
 
    if (it->tooltip.del_cb)
-     it->tooltip.del_cb((void *)it->tooltip.data, it->base.widget, it);
+     it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
 
    evas_event_thaw(evas_object_evas_get(tob));
    evas_event_thaw_eval(evas_object_evas_get(tob));
@@ -897,7 +897,8 @@ _item_select(Elm_Genlist_Item *it)
 {
    Eina_List *l;
    Evas_Object *obj;
-   Evas_Object *parent = it->base.widget;
+   Evas_Object *parent = WIDGET(it);
+
    if ((it->wd->no_select) || (it->delete_me) || (it->mode_view)) return;
    if (it->selected)
      {
@@ -944,21 +945,21 @@ _item_unselect(Elm_Genlist_Item *it)
    const char *stacking, *selectraise;
 
    if ((it->delete_me) || (!it->highlighted)) return;
-   edje_object_signal_emit(it->base.view, "elm,state,unselected", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
    if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,unselected", "elm");
-   stacking = edje_object_data_get(it->base.view, "stacking");
-   selectraise = edje_object_data_get(it->base.view, "selectraise");
+   stacking = edje_object_data_get(VIEW(it), "stacking");
+   selectraise = edje_object_data_get(VIEW(it), "selectraise");
    if ((selectraise) && (!strcmp(selectraise, "on")))
      {
         if ((stacking) && (!strcmp(stacking, "below")))
-          evas_object_lower(it->base.view);
+          evas_object_lower(VIEW(it));
      }
    it->highlighted = EINA_FALSE;
    if (it->selected)
      {
         it->selected = EINA_FALSE;
         it->wd->selected = eina_list_remove(it->wd->selected, it);
-        evas_object_smart_callback_call(it->base.widget, SIG_UNSELECTED, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_UNSELECTED, it);
      }
 }
 
@@ -1006,7 +1007,7 @@ _mouse_move(void        *data,
              ecore_timer_del(it->long_timer);
              it->long_timer = NULL;
           }
-        evas_object_smart_callback_call(it->base.widget, SIG_DRAG, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_DRAG, it);
         return;
      }
    if ((!it->down) /* || (it->wd->on_hold)*/ || (it->wd->longpressed))
@@ -1034,7 +1035,8 @@ _mouse_move(void        *data,
              if (it->edit_obj)
                _item_position(it, it->edit_obj, it->scrl_x, y_pos);
              else
-               _item_position(it, it->base.view, it->scrl_x, y_pos);
+               _item_position(it, VIEW(it), it->scrl_x, y_pos);
+
              if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
              it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
           }
@@ -1066,30 +1068,30 @@ _mouse_move(void        *data,
         if (dy < 0)
           {
              if ((ady > adx) && (!it->wd->drag_started))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_DRAG_START_UP, it);
              else
                {
                   if (dx < 0)
-                    evas_object_smart_callback_call(it->base.widget,
+                    evas_object_smart_callback_call(WIDGET(it),
                                                     SIG_DRAG_START_LEFT, it);
                   else
-                    evas_object_smart_callback_call(it->base.widget,
+                    evas_object_smart_callback_call(WIDGET(it),
                                                     SIG_DRAG_START_RIGHT, it);
                }
           }
         else
           {
              if ((ady > adx) && (!it->wd->drag_started))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_DRAG_START_DOWN, it);
              else
                {
                   if (dx < 0)
-                    evas_object_smart_callback_call(it->base.widget,
+                    evas_object_smart_callback_call(WIDGET(it),
                                                     SIG_DRAG_START_LEFT, it);
                   else
-                    evas_object_smart_callback_call(it->base.widget,
+                    evas_object_smart_callback_call(WIDGET(it),
                                                     SIG_DRAG_START_RIGHT, it);
                }
           }
@@ -1106,7 +1108,7 @@ _long_press(void *data)
    if ((it->disabled) || (it->dragging) || (it->display_only) || (it->wd->focused_rename_it))
      return ECORE_CALLBACK_CANCEL;
    it->wd->longpressed = EINA_TRUE;
-   evas_object_smart_callback_call(it->base.widget, SIG_LONGPRESSED, it);
+   evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it);
    if ((it->wd->reorder_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP))
      {
         it->wd->reorder_it = it;
@@ -1114,7 +1116,8 @@ _long_press(void *data)
         if (it->edit_obj)
           evas_object_raise(it->edit_obj);
         else
-          evas_object_raise(it->base.view);
+          evas_object_raise(VIEW(it));
+
         elm_smart_scroller_hold_set(it->wd->scr, EINA_TRUE);
         elm_smart_scroller_bounce_allow_set(it->wd->scr, EINA_FALSE, EINA_FALSE);
 
@@ -1142,7 +1145,7 @@ _long_press(void *data)
         if (it->edit_obj)
           edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_start", "elm");
         else
-          edje_object_signal_emit(it->base.view, "elm,state,reorder,enabled", "elm");
+          edje_object_signal_emit(VIEW(it), "elm,state,reorder,enabled", "elm");
      }
    return ECORE_CALLBACK_CANCEL;
 }
@@ -1163,7 +1166,7 @@ _swipe(Elm_Genlist_Item *it)
 
    sum /= it->wd->movements;
    if (abs(sum - it->wd->history[0].x) <= 10) return;
-   evas_object_smart_callback_call(it->base.widget, SIG_SWIPE, it);
+   evas_object_smart_callback_call(WIDGET(it), SIG_SWIPE, it);
 }
 
 static Eina_Bool
@@ -1218,31 +1221,31 @@ _multi_touch_gesture_eval(void *data)
         if ((off_x + off_mx) > (off_y + off_my))
           {
              if ((it->wd->cur_x > it->wd->prev_x) && (it->wd->cur_mx > it->wd->prev_mx))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_SWIPE_RIGHT, it);
              else if ((it->wd->cur_x < it->wd->prev_x) && (it->wd->cur_mx < it->wd->prev_mx))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_SWIPE_LEFT, it);
              else if (abs(it->wd->cur_x - it->wd->cur_mx) > abs(it->wd->prev_x - it->wd->prev_mx))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_PINCH_OUT, it);
              else
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_PINCH_IN, it);
           }
         else
           {
              if ((it->wd->cur_y > it->wd->prev_y) && (it->wd->cur_my > it->wd->prev_my))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_SWIPE_DOWN, it);
              else if ((it->wd->cur_y < it->wd->prev_y) && (it->wd->cur_my < it->wd->prev_my))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_SWIPE_UP, it);
              else if (abs(it->wd->cur_y - it->wd->cur_my) > abs(it->wd->prev_y - it->wd->prev_my))
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_PINCH_OUT, it);
              else
-               evas_object_smart_callback_call(it->base.widget,
+               evas_object_smart_callback_call(WIDGET(it),
                                                SIG_MULTI_PINCH_IN, it);
           }
      }
@@ -1275,7 +1278,7 @@ _multi_down(void        *data,
    if (it->dragging)
      {
         it->dragging = EINA_FALSE;
-        evas_object_smart_callback_call(it->base.widget, SIG_DRAG_STOP, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it);
      }
    if (it->swipe_timer)
      {
@@ -1358,8 +1361,8 @@ _mouse_down(void        *data,
    if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
      if ((!it->disabled) && (!it->display_only))
        {
-          evas_object_smart_callback_call(it->base.widget, SIG_CLICKED_DOUBLE, it);
-          evas_object_smart_callback_call(it->base.widget, SIG_ACTIVATED, it);
+          evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it);
+          evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
        }
    if (it->long_timer) ecore_timer_del(it->long_timer);
    if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
@@ -1405,7 +1408,7 @@ _mouse_up(void        *data,
    if (it->dragging)
      {
         it->dragging = EINA_FALSE;
-        evas_object_smart_callback_call(it->base.widget, SIG_DRAG_STOP, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it);
         dragged = 1;
      }
    if (it->swipe_timer)
@@ -1570,9 +1573,9 @@ _signal_expand_toggle(void        *data,
    Elm_Genlist_Item *it = data;
 
    if (it->expanded)
-     evas_object_smart_callback_call(it->base.widget, SIG_CONTRACT_REQUEST, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it);
    else
-     evas_object_smart_callback_call(it->base.widget, SIG_EXPAND_REQUEST, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it);
 }
 
 static void
@@ -1584,7 +1587,7 @@ _signal_expand(void        *data,
    Elm_Genlist_Item *it = data;
 
    if (!it->expanded)
-     evas_object_smart_callback_call(it->base.widget, SIG_EXPAND_REQUEST, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it);
 }
 
 static void
@@ -1596,7 +1599,7 @@ _signal_contract(void        *data,
    Elm_Genlist_Item *it = data;
 
    if (it->expanded)
-     evas_object_smart_callback_call(it->base.widget, SIG_CONTRACT_REQUEST, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it);
 }
 
 static Eina_Bool
@@ -1626,7 +1629,7 @@ _mode_finished_signal_cb(void        *data,
    it->nocache = EINA_FALSE;
    _mode_item_unrealize(it);
    if (it->group_item)
-     evas_object_raise(it->group_item->base.view);
+     evas_object_raise(it->VIEW(group_item));
    snprintf(buf, sizeof(buf), "elm,state,%s,passive,finished", it->wd->mode_type);
    edje_object_signal_callback_del_full(obj, buf, "elm", _mode_finished_signal_cb, it);
    evas_event_thaw(te);
@@ -1671,8 +1674,8 @@ _item_cache_add(Elm_Genlist_Item *it)
    evas_event_freeze(evas_object_evas_get(it->wd->obj));
    if (it->wd->item_cache_max <= 0)
      {
-        evas_object_del(it->base.view);
-        it->base.view = NULL;
+        evas_object_del(VIEW(it));
+        VIEW(it) = NULL;
         evas_object_del(it->spacer);
         it->spacer = NULL;
         evas_event_thaw(evas_object_evas_get(it->wd->obj));
@@ -1692,8 +1695,8 @@ _item_cache_add(Elm_Genlist_Item *it)
                                             EINA_INLIST_GET(itc));
    itc->spacer = it->spacer;
    it->spacer = NULL;
-   itc->base_view = it->base.view;
-   it->base.view = NULL;
+   itc->base_view = VIEW(it);
+   VIEW(it) = NULL;
    evas_object_hide(itc->base_view);
    evas_object_move(itc->base_view, -9999, -9999);
    itc->item_style = eina_stringshare_add(it->itc->item_style);
@@ -1778,7 +1781,7 @@ static const char *
 _item_label_hook(Elm_Genlist_Item *it, const char *part)
 {
    if (!it->itc->func.label_get) return NULL;
-   return edje_object_part_text_get(it->base.view, part);
+   return edje_object_part_text_get(VIEW(it), part);
 }
 
 static void
@@ -1824,7 +1827,7 @@ _item_label_realize(Elm_Genlist_Item *it,
                continue;
 
              char *s = it->itc->func.label_get
-                ((void *)it->base.data, it->base.widget, key);
+                ((void *)it->base.data, WIDGET(it), key);
 
              if (s)
                {
@@ -1894,14 +1897,14 @@ _item_icon_realize(Elm_Genlist_Item *it,
                continue;
 
              Evas_Object *ic = it->itc->func.icon_get
-                ((void *)it->base.data, it->base.widget, key);
+                ((void *)it->base.data, WIDGET(it), key);
 
              if (ic)
                {
                   res = eina_list_append(res, ic);
                   edje_object_part_swallow(target, key, ic);
                   evas_object_show(ic);
-                  elm_widget_sub_object_add(it->base.widget, ic);
+                  elm_widget_sub_object_add(WIDGET(it), ic);
                   evas_object_event_callback_add(ic, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
                   if (it->disabled)
                     elm_widget_disabled_set(ic, EINA_TRUE);
@@ -1931,7 +1934,7 @@ _item_state_realize(Elm_Genlist_Item *it,
                continue;
 
              Eina_Bool on = it->itc->func.state_get
-                ((void *)it->base.data, it->base.widget, key);
+                ((void *)it->base.data, WIDGET(it), key);
 
              if (on)
                {
@@ -1969,19 +1972,19 @@ _item_realize(Elm_Genlist_Item *it,
      itc = _item_cache_find(it);
    if (itc && (!it->wd->effect_mode))
      {
-        it->base.view = itc->base_view;
+        VIEW(it) = itc->base_view;
         itc->base_view = NULL;
         it->spacer = itc->spacer;
         itc->spacer = NULL;
      }
    else
      {
-        it->base.view = edje_object_add(evas_object_evas_get(it->base.widget));
-        edje_object_scale_set(it->base.view,
-                              elm_widget_scale_get(it->base.widget) *
+        VIEW(it) = edje_object_add(evas_object_evas_get(WIDGET(it)));
+        edje_object_scale_set(VIEW(it),
+                              elm_widget_scale_get(WIDGET(it)) *
                               _elm_config->scale);
-        evas_object_smart_member_add(it->base.view, it->wd->pan_smart);
-        elm_widget_sub_object_add(it->base.widget, it->base.view);
+        evas_object_smart_member_add(VIEW(it), it->wd->pan_smart);
+        elm_widget_sub_object_add(WIDGET(it), VIEW(it));
 
         if (it->flags & ELM_GENLIST_ITEM_SUBITEMS)
           strncpy(buf, "tree", sizeof(buf));
@@ -1993,52 +1996,52 @@ _item_realize(Elm_Genlist_Item *it,
         strncat(buf, "/", sizeof(buf) - strlen(buf));
         strncat(buf, it->itc->item_style, sizeof(buf) - strlen(buf));
 
-        _elm_theme_object_set(it->base.widget, it->base.view, "genlist", buf,
-                              elm_widget_style_get(it->base.widget));
-        edje_object_mirrored_set(it->base.view,
-                                 elm_widget_mirrored_get(it->base.widget));
+        _elm_theme_object_set(WIDGET(it), VIEW(it), "genlist", buf,
+                              elm_widget_style_get(WIDGET(it)));
+        edje_object_mirrored_set(VIEW(it),
+                                 elm_widget_mirrored_get(WIDGET(it)));
         it->spacer =
-          evas_object_rectangle_add(evas_object_evas_get(it->base.widget));
+          evas_object_rectangle_add(evas_object_evas_get(WIDGET(it)));
         evas_object_color_set(it->spacer, 0, 0, 0, 0);
-        elm_widget_sub_object_add(it->base.widget, it->spacer);
+        elm_widget_sub_object_add(WIDGET(it), it->spacer);
      }
    for (it2 = it, depth = 0; it2->parent; it2 = it2->parent)
      {
         if (it2->parent->flags != ELM_GENLIST_ITEM_GROUP) depth += 1;
      }
    it->expanded_depth = depth;
-   treesize = edje_object_data_get(it->base.view, "treesize");
+   treesize = edje_object_data_get(VIEW(it), "treesize");
    if (treesize) tsize = atoi(treesize);
    evas_object_size_hint_min_set(it->spacer,
                                  (depth * tsize) * _elm_config->scale, 1);
-   edje_object_part_swallow(it->base.view, "elm.swallow.pad", it->spacer);
+   edje_object_part_swallow(VIEW(it), "elm.swallow.pad", it->spacer);
    if (!calc)
      {
-        edje_object_signal_callback_add(it->base.view,
+        edje_object_signal_callback_add(VIEW(it),
                                         "elm,action,expand,toggle",
                                         "elm", _signal_expand_toggle, it);
-        edje_object_signal_callback_add(it->base.view, "elm,action,expand",
+        edje_object_signal_callback_add(VIEW(it), "elm,action,expand",
                                         "elm", _signal_expand, it);
-        edje_object_signal_callback_add(it->base.view, "elm,action,contract",
+        edje_object_signal_callback_add(VIEW(it), "elm,action,contract",
                                         "elm", _signal_contract, it);
-        stacking = edje_object_data_get(it->base.view, "stacking");
+        stacking = edje_object_data_get(VIEW(it), "stacking");
         if (stacking)
           {
-             if (!strcmp(stacking, "below")) evas_object_lower(it->base.view);
+             if (!strcmp(stacking, "below")) evas_object_lower(VIEW(it));
              else if (!strcmp(stacking, "above"))
-               evas_object_raise(it->base.view);
+               evas_object_raise(VIEW(it));
           }
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_DOWN,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_DOWN,
                                        _mouse_down, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_UP,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_UP,
                                        _mouse_up, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_MOVE,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_MOVE,
                                        _mouse_move, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MULTI_DOWN,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MULTI_DOWN,
                                        _multi_down, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MULTI_UP,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MULTI_UP,
                                        _multi_up, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MULTI_MOVE,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MULTI_MOVE,
                                        _multi_move, it);
 
         if ((!it->edit_obj) &&(it->wd->edit_mode) &&
@@ -2049,7 +2052,7 @@ _item_realize(Elm_Genlist_Item *it,
           {
              if ((it->selected) && (it->selected != itc->selected))
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,selected", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2057,7 +2060,7 @@ _item_realize(Elm_Genlist_Item *it,
                }
              if ((it->disabled) && (it->disabled != itc->disabled))
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,disabled", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2065,7 +2068,7 @@ _item_realize(Elm_Genlist_Item *it,
                }
              if ((it->expanded) && (it->expanded != itc->expanded))
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,expanded", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2076,7 +2079,7 @@ _item_realize(Elm_Genlist_Item *it,
           {
              if (it->selected)
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,selected", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2084,7 +2087,7 @@ _item_realize(Elm_Genlist_Item *it,
                }
              if (it->disabled)
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,disabled", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2092,7 +2095,7 @@ _item_realize(Elm_Genlist_Item *it,
                }
              if (it->expanded)
                {
-                  edje_object_signal_emit(it->base.view,
+                  edje_object_signal_emit(VIEW(it),
                                           "elm,state,expanded", "elm");
                   if (it->edit_obj)
                     edje_object_signal_emit(it->edit_obj,
@@ -2123,28 +2126,28 @@ _item_realize(Elm_Genlist_Item *it,
      }
    else
      {
-        _item_label_realize(it, it->base.view, &it->labels, NULL);
-        it->icon_objs = _item_icon_realize(it, it->base.view, &it->icons, NULL);
-        _item_state_realize(it, it->base.view, &it->states, NULL);
+        _item_label_realize(it, VIEW(it), &it->labels, NULL);
+        it->icon_objs = _item_icon_realize(it, VIEW(it), &it->icons, NULL);
+        _item_state_realize(it, VIEW(it), &it->states, NULL);
         if (it->itc->func.icon_get) // for rename mode
           {
              const Eina_List *l;
              const char *key;
              if (it->renamed)
                {
-                  edje_object_signal_emit(it->base.view, "elm,state,rename,enabled", "elm");
+                  edje_object_signal_emit(VIEW(it), "elm,state,rename,enabled", "elm");
                   it->icons =
-                     elm_widget_stringlist_get(edje_object_data_get(it->base.view, "renames"));
+                     elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "renames"));
                   EINA_LIST_FOREACH(it->icons, l, key)
                     {
                        Evas_Object *ic = it->itc->func.icon_get
-                          ((void *)it->base.data, it->base.widget, l->data);
+                          ((void *)it->base.data, WIDGET(it), l->data);
                        if (ic)
                          {
                             it->icon_objs = eina_list_append(it->icon_objs, ic);
-                            edje_object_part_swallow(it->base.view, key, ic);
+                            edje_object_part_swallow(VIEW(it), key, ic);
                             evas_object_show(ic);
-                            elm_widget_sub_object_add(it->base.widget, ic);
+                            elm_widget_sub_object_add(WIDGET(it), ic);
                             // FIXME: if entry calcuates its cursor position correctly and conformant works,
                             //        genlist does not need to handle this focus thing.
                             evas_object_smart_callback_add(ic, "focused", _icon_focused, it);
@@ -2162,7 +2165,7 @@ _item_realize(Elm_Genlist_Item *it,
              if (!it->display_only)
                elm_coords_finger_size_adjust(1, &mw, 1, &mh);
              if (it->wd->height_for_width) mw = it->wd->prev_viewport_w;
-             edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw,
+             edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw,
                                                   mh);
              if (!it->display_only)
                elm_coords_finger_size_adjust(1, &mw, 1, &mh);
@@ -2181,7 +2184,7 @@ _item_realize(Elm_Genlist_Item *it,
                   it->wd->item_height = mh;
                }
           }
-        if (!calc) evas_object_show(it->base.view);
+        if (!calc) evas_object_show(VIEW(it));
      }
 
    if (it->tooltip.content_cb)
@@ -2202,7 +2205,7 @@ _item_realize(Elm_Genlist_Item *it,
    evas_event_thaw(evas_object_evas_get(it->wd->obj));
    evas_event_thaw_eval(evas_object_evas_get(it->wd->obj));
    if (!calc)
-     evas_object_smart_callback_call(it->base.widget, SIG_REALIZED, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_REALIZED, it);
    if ((!calc) && (it->wd->edit_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP))
      {
         if (it->itc->edit_item_style)
@@ -2211,7 +2214,7 @@ _item_realize(Elm_Genlist_Item *it,
              edje_object_message_signal_process(it->edit_obj);
           }
      }
-   edje_object_message_signal_process(it->base.view);
+   edje_object_message_signal_process(VIEW(it));
 }
 
 static void
@@ -2225,7 +2228,7 @@ _item_unrealize(Elm_Genlist_Item *it,
    if (it->defer_unrealize && !it->updateme) return;
    evas_event_freeze(evas_object_evas_get(it->wd->obj));
    if (!calc)
-     evas_object_smart_callback_call(it->base.widget, SIG_UNREALIZED, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it);
    if (it->long_timer)
      {
         ecore_timer_del(it->long_timer);
@@ -2233,17 +2236,17 @@ _item_unrealize(Elm_Genlist_Item *it,
      }
    if (it->nocache)
      {
-        evas_object_del(it->base.view);
-        it->base.view = NULL;
+        evas_object_del(VIEW(it));
+        VIEW(it) = NULL;
         evas_object_del(it->spacer);
         it->spacer = NULL;
      }
    else
      {
-        edje_object_mirrored_set(it->base.view,
-                                 elm_widget_mirrored_get(it->base.widget));
-        edje_object_scale_set(it->base.view,
-                              elm_widget_scale_get(it->base.widget)
+        edje_object_mirrored_set(VIEW(it),
+                                 elm_widget_mirrored_get(WIDGET(it)));
+        edje_object_scale_set(VIEW(it),
+                              elm_widget_scale_get(WIDGET(it))
                               * _elm_config->scale);
         _item_cache_add(it);
      }
@@ -2366,7 +2369,7 @@ _get_space_for_reorder_item(Elm_Genlist_Item *it)
    if (!reorder_it) return 0;
 
    evas_object_geometry_get(it->wd->pan_smart, NULL, &oy, NULL, &oh);
-   evas_object_geometry_get(it->wd->reorder_it->base.view, &rox, &roy, &row, &roh);
+   evas_object_geometry_get(it->wd->VIEW(reorder_it), &rox, &roy, &row, &roh);
 
    if ((it->wd->reorder_start_y < it->block->y) &&
        (roy - oy + (roh / 2) >= it->block->y - it->wd->pan_y))
@@ -2426,7 +2429,7 @@ _reorder_move_animator_cb(void *data)
    if (it->edit_obj)
      _item_position(it, it->edit_obj, it->scrl_x, it->old_scrl_y);
    else
-     _item_position(it, it->base.view, it->scrl_x, it->old_scrl_y);
+     _item_position(it, VIEW(it), it->scrl_x, it->old_scrl_y);
    _group_items_recalc(it->wd);
    if ((it->wd->reorder_pan_move) ||
        (down && it->old_scrl_y >= it->scrl_y) ||
@@ -2535,14 +2538,14 @@ _item_block_position(Item_Block *itb,
                                          _item_position(it, it->mode_view, it->scrl_x,
                                                         it->scrl_y);
                                        else
-                                         _item_position(it, it->base.view, it->scrl_x,
+                                         _item_position(it, VIEW(it), it->scrl_x,
                                                         it->scrl_y);
                                     }
                                   else
                                     {
-                                       evas_object_resize(it->base.view, it->w, it->h);
-                                       evas_object_move(it->base.view, it->scrl_x, it->scrl_y);
-                                       evas_object_hide(it->base.view);
+                                       evas_object_resize(VIEW(it), it->w, it->h);
+                                       evas_object_move(VIEW(it), it->scrl_x, it->scrl_y);
+                                       evas_object_hide(VIEW(it));
                                     }
                                }
                             }
@@ -2595,10 +2598,10 @@ _group_items_recalc(void *data)
           {
              if (!git->realized)
                _item_realize(git, 0, EINA_FALSE);
-             evas_object_resize(git->base.view, wd->minw, git->h);
-             evas_object_move(git->base.view, git->scrl_x, git->scrl_y);
-             evas_object_show(git->base.view);
-             evas_object_raise(git->base.view);
+             evas_object_resize(VIEW(git), wd->minw, git->h);
+             evas_object_move(VIEW(git), git->scrl_x, git->scrl_y);
+             evas_object_show(VIEW(git));
+             evas_object_raise(VIEW(git));
           }
         else if (!git->want_realize && git->realized)
           {
@@ -2856,7 +2859,7 @@ _changed_job(void *data)
                   if (!it->display_only)
                     elm_coords_finger_size_adjust(1, &mw, 1, &mh);
                   if (it->wd->height_for_width) mw = it->wd->prev_viewport_w;
-                  edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw, mh);
+                  edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
                   if (!it->display_only)
                     elm_coords_finger_size_adjust(1, &mw, 1, &mh);
                   it->w = it->minw = mw;
@@ -3280,12 +3283,12 @@ _mode_item_realize(Elm_Genlist_Item *it)
    if ((it->mode_view) || (it->delete_me)) return;
 
    evas_event_freeze(evas_object_evas_get(it->wd->obj));
-   it->mode_view = edje_object_add(evas_object_evas_get(it->base.widget));
+   it->mode_view = edje_object_add(evas_object_evas_get(WIDGET(it)));
    edje_object_scale_set(it->mode_view,
-                         elm_widget_scale_get(it->base.widget) *
+                         elm_widget_scale_get(WIDGET(it)) *
                          _elm_config->scale);
    evas_object_smart_member_add(it->mode_view, it->wd->pan_smart);
-   elm_widget_sub_object_add(it->base.widget, it->mode_view);
+   elm_widget_sub_object_add(WIDGET(it), it->mode_view);
 
    strncpy(buf, "item", sizeof(buf));
    if (it->wd->compress)
@@ -3295,10 +3298,10 @@ _mode_item_realize(Elm_Genlist_Item *it)
    strncat(buf, "/", sizeof(buf) - strlen(buf));
    strncat(buf, it->itc->mode_item_style, sizeof(buf) - strlen(buf));
 
-   _elm_theme_object_set(it->base.widget, it->mode_view, "genlist", buf,
-                         elm_widget_style_get(it->base.widget));
+   _elm_theme_object_set(WIDGET(it), it->mode_view, "genlist", buf,
+                         elm_widget_style_get(WIDGET(it)));
    edje_object_mirrored_set(it->mode_view,
-                            elm_widget_mirrored_get(it->base.widget));
+                            elm_widget_mirrored_get(WIDGET(it)));
 
    /* signal callback add */
    evas_object_event_callback_add(it->mode_view, EVAS_CALLBACK_MOUSE_DOWN,
@@ -3321,14 +3324,14 @@ _mode_item_realize(Elm_Genlist_Item *it)
         EINA_LIST_FOREACH(it->mode_icons, l, key)
          {
            Evas_Object *ic = it->itc->func.icon_get
-                ((void *)it->base.data, it->base.widget, l->data);
+                ((void *)it->base.data, WIDGET(it), l->data);
 
              if (ic)
                {
                   it->mode_icon_objs = eina_list_append(it->mode_icon_objs, ic);
                   edje_object_part_swallow(it->mode_view, key, ic);
                   evas_object_show(ic);
-                  elm_widget_sub_object_add(it->base.widget, ic);
+                  elm_widget_sub_object_add(WIDGET(it), ic);
                   if (it->disabled)
                     elm_widget_disabled_set(ic, EINA_TRUE);
                }
@@ -3337,7 +3340,7 @@ _mode_item_realize(Elm_Genlist_Item *it)
    _item_state_realize(it, it->mode_view, &it->mode_states, NULL);
    edje_object_part_swallow(it->mode_view,
                             edje_object_data_get(it->mode_view, "mode_part"),
-                            it->base.view);
+                            VIEW(it));
 
    it->want_unrealize = EINA_FALSE;
    evas_event_thaw(evas_object_evas_get(it->wd->obj));
@@ -3361,8 +3364,8 @@ _mode_item_unrealize(Elm_Genlist_Item *it)
    EINA_LIST_FREE(it->mode_icon_objs, icon)
      evas_object_del(icon);
 
-   edje_object_part_unswallow(it->mode_view, it->base.view);
-   evas_object_smart_member_add(it->base.view, wd->pan_smart);
+   edje_object_part_unswallow(it->mode_view, VIEW(it));
+   evas_object_smart_member_add(VIEW(it), wd->pan_smart);
    evas_object_del(it->mode_view);
    it->mode_view = NULL;
 
@@ -3394,7 +3397,7 @@ _item_mode_set(Elm_Genlist_Item *it)
    evas_event_freeze(evas_object_evas_get(it->wd->obj));
    _mode_item_realize(it);
    if (it->group_item)
-     evas_object_raise(it->group_item->base.view);
+     evas_object_raise(it->VIEW(group_item));
    _item_position(it, it->mode_view, it->scrl_x, it->scrl_y);
    evas_event_thaw(evas_object_evas_get(it->wd->obj));
    evas_event_thaw_eval(evas_object_evas_get(it->wd->obj));
@@ -3844,7 +3847,7 @@ _item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after)
 
    // TODO: change this to smart callback
    if (it->itc->func.moved)
-     it->itc->func.moved(it->base.widget, it, after, EINA_TRUE);
+     it->itc->func.moved(WIDGET(it), it, after, EINA_TRUE);
 }
 
 static void
@@ -3865,7 +3868,7 @@ _item_move_before(Elm_Genlist_Item *it, Elm_Genlist_Item *before)
 
    // TODO: change this to smart callback
    if (it->itc->func.moved)
-     it->itc->func.moved(it->base.widget, it, before, EINA_FALSE);
+     it->itc->func.moved(WIDGET(it), it, before, EINA_FALSE);
 }
 
 EAPI Elm_Genlist_Item *
@@ -4073,7 +4076,7 @@ elm_genlist_clear(Evas_Object *obj)
         elm_widget_item_pre_notify_del(it);
         if (it->realized) _item_unrealize(it, EINA_FALSE);
         if (((wd->clear_me) || (!it->delete_me)) && (it->itc->func.del))
-          it->itc->func.del((void *)it->base.data, it->base.widget);
+          it->itc->func.del((void *)it->base.data, WIDGET(it));
         if (it->long_timer) ecore_timer_del(it->long_timer);
         if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
         elm_widget_item_del(it);
@@ -4314,7 +4317,7 @@ EAPI Evas_Object *
 elm_genlist_item_genlist_get(const Elm_Genlist_Item *it)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
-   return it->base.widget;
+   return WIDGET(it);
 }
 
 EAPI Elm_Genlist_Item *
@@ -4340,7 +4343,7 @@ elm_genlist_item_subitems_clear(Elm_Genlist_Item *it)
           {
              it->wd->expand_item = it;
              _item_flip_effect_show(it);
-             evas_object_geometry_get(it->base.view, NULL, &y, NULL, &h);
+             evas_object_geometry_get(VIEW(it), NULL, &y, NULL, &h);
              it->wd->expand_item_end = y + h;
 
               it2= it;
@@ -4369,7 +4372,7 @@ elm_genlist_item_selected_set(Elm_Genlist_Item *it,
                               Eina_Bool         selected)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
    if ((it->delete_me) || (it->disabled)) return;
    selected = !!selected;
@@ -4407,22 +4410,22 @@ elm_genlist_item_expanded_set(Elm_Genlist_Item *it,
    it->wd->expand_item = it;
 
    if (it->wd->effect_mode && !it->wd->alpha_bg)
-      it->wd->alpha_bg = _create_tray_alpha_bg(it->base.widget);
+      it->wd->alpha_bg = _create_tray_alpha_bg(WIDGET(it));
 
    if (it->expanded)
      {
         it->wd->auto_scrolled = EINA_FALSE;
         it->wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND;
         if (it->realized)
-          edje_object_signal_emit(it->base.view, "elm,state,expanded", "elm");
-        evas_object_smart_callback_call(it->base.widget, "expanded", it);
+          edje_object_signal_emit(VIEW(it), "elm,state,expanded", "elm");
+        evas_object_smart_callback_call(WIDGET(it), "expanded", it);
      }
    else
      {
         it->wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT;
         if (it->realized)
-          edje_object_signal_emit(it->base.view, "elm,state,contracted", "elm");
-        evas_object_smart_callback_call(it->base.widget, "contracted", it);
+          edje_object_signal_emit(VIEW(it), "elm,state,contracted", "elm");
+        evas_object_smart_callback_call(WIDGET(it), "contracted", it);
      }
 }
 
@@ -4456,13 +4459,13 @@ elm_genlist_item_disabled_set(Elm_Genlist_Item *it,
      {
         if (it->disabled)
           {
-             edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+             edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
              if (it->edit_obj)
                edje_object_signal_emit(it->edit_obj, "elm,state,disabled", "elm");
           }
         else
           {
-             edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+             edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
              if (it->edit_obj)
                edje_object_signal_emit(it->edit_obj, "elm,state,enabled", "elm");
           }
@@ -4683,7 +4686,7 @@ elm_genlist_item_del(Elm_Genlist_Item *it)
              it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
           }
         if (it->itc->func.del)
-          it->itc->func.del((void *)it->base.data, it->base.widget);
+          it->itc->func.del((void *)it->base.data, WIDGET(it));
         return;
      }
    _item_del(it);
@@ -4712,7 +4715,7 @@ elm_genlist_item_icons_orphan(Elm_Genlist_Item *it)
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
    EINA_LIST_FREE(it->icon_objs, icon)
      {
-        elm_widget_sub_object_del(it->base.widget, icon);
+        elm_widget_sub_object_del(WIDGET(it), icon);
         evas_object_smart_member_del(icon);
         evas_object_hide(icon);
      }
@@ -4722,7 +4725,7 @@ EAPI const Evas_Object *
 elm_genlist_item_object_get(const Elm_Genlist_Item *it)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
-   return it->base.view;
+   return VIEW(it);
 }
 
 EAPI void
@@ -4749,16 +4752,16 @@ elm_genlist_item_fields_update(Elm_Genlist_Item *it,
    if (it->delete_me) return;
 
    if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_LABEL))
-     _item_label_realize(it, it->base.view, &it->labels, parts);
+     _item_label_realize(it, VIEW(it), &it->labels, parts);
    if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_ICON))
      {
-        it->icon_objs = _item_icon_unrealize(it, it->base.view,
+        it->icon_objs = _item_icon_unrealize(it, VIEW(it),
                                              &it->icons, parts);
-        it->icon_objs = _item_icon_realize(it, it->base.view,
+        it->icon_objs = _item_icon_realize(it, VIEW(it),
                                            &it->icons, parts);
      }
    if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_STATE))
-     _item_state_realize(it, it->base.view, &it->states, parts);
+     _item_state_realize(it, VIEW(it), &it->states, parts);
 }
 
 EAPI void
@@ -4832,7 +4835,7 @@ elm_genlist_item_tooltip_content_cb_set(Elm_Genlist_Item           *item,
    item->tooltip.data = data;
    item->tooltip.del_cb = del_cb;
 
-   if (item->base.view)
+   if (VIEW(item))
      {
         elm_widget_item_tooltip_content_cb_set(item,
                                                item->tooltip.content_cb,
@@ -4901,7 +4904,7 @@ elm_genlist_item_cursor_unset(Elm_Genlist_Item *item)
    if (!item->mouse_cursor)
      return;
 
-   if (item->base.view)
+   if (VIEW(item))
      elm_widget_item_cursor_unset(item);
 
    eina_stringshare_del(item->mouse_cursor);
@@ -5373,10 +5376,10 @@ _item_moving_effect_timer_cb(void *data)
                             if (wd->edit_mode) _effect_item_controls(it, it->scrl_x, it->old_scrl_y + y);
                             else
                               {
-                                 evas_object_resize(it->base.view, it->w, it->h);
-                                 evas_object_move(it->base.view, it->scrl_x, it->old_scrl_y + y);
-                                 evas_object_show(it->base.view);
-                                 evas_object_raise(it->base.view);
+                                 evas_object_resize(VIEW(it), it->w, it->h);
+                                 evas_object_move(VIEW(it), it->scrl_x, it->old_scrl_y + y);
+                                 evas_object_show(VIEW(it));
+                                 evas_object_raise(VIEW(it));
                               }
 
                             if (it->group_item) evas_object_raise(it->group_item->base.view);
@@ -5395,8 +5398,8 @@ _item_moving_effect_timer_cb(void *data)
                     {
                        if (!it->effect_done)
                          {
-                            edje_object_signal_emit(it->base.view, "flip_item", "");
-                            evas_object_show(it->base.view);
+                            edje_object_signal_emit(VIEW(it), "flip_item", "");
+                            evas_object_show(VIEW(it));
                             it->effect_done = EINA_TRUE;
                          }
                     }
@@ -5412,7 +5415,7 @@ _item_moving_effect_timer_cb(void *data)
                     {
                        if (!it->effect_done)
                          {
-                            edje_object_signal_emit(it->base.view, "elm,state,hide", "");
+                            edje_object_signal_emit(VIEW(it), "elm,state,hide", "");
                             it->effect_done = EINA_TRUE;
                          }
                     }
@@ -5443,8 +5446,8 @@ _item_moving_effect_timer_cb(void *data)
                     {
                        if (t >= (((expand_order - 1) * time) / expand_num))
                          {
-                            edje_object_signal_emit(it->base.view, "flip_item", "");
-                            evas_object_show(it->base.view);
+                            edje_object_signal_emit(VIEW(it), "flip_item", "");
+                            evas_object_show(VIEW(it));
                             it->effect_done = EINA_TRUE;
                          }
                     }
@@ -5491,7 +5494,7 @@ _emit_contract(Elm_Genlist_Item *it)
    Eina_List *l;
 
    //   printf("%p is emited contract\n", it);
-   edje_object_signal_emit(it->base.view, "elm,state,contract_flip", "");
+   edje_object_signal_emit(VIEW(it), "elm,state,contract_flip", "");
    it->effect_done = EINA_FALSE;
 
    EINA_LIST_FOREACH(it->items, l, it2)
@@ -5595,11 +5598,11 @@ _effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on)
    if (it->mode_view)
      _mode_finished_signal_cb(it, (Evas_Object *)elm_genlist_item_object_get(it), NULL, NULL);
 
-   it->edit_obj = edje_object_add(evas_object_evas_get(it->base.widget));
-   edje_object_scale_set(it->edit_obj, elm_widget_scale_get(it->base.widget) *
+   it->edit_obj = edje_object_add(evas_object_evas_get(WIDGET(it)));
+   edje_object_scale_set(it->edit_obj, elm_widget_scale_get(WIDGET(it)) *
                          _elm_config->scale);
    evas_object_smart_member_add(it->edit_obj, it->wd->pan_smart);
-   elm_widget_sub_object_add(it->base.widget, it->edit_obj);
+   elm_widget_sub_object_add(WIDGET(it), it->edit_obj);
 
    if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) strncpy(buf, "tree", sizeof(buf));
    else strncpy(buf, "item", sizeof(buf));
@@ -5610,11 +5613,11 @@ _effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on)
    if (it->itc->edit_item_style && strcmp(it->itc->edit_item_style, "default"))
      {
         strncat(buf, it->itc->edit_item_style, sizeof(buf) - strlen(buf));
-        _elm_theme_object_set(it->base.widget, it->edit_obj, "genlist", buf, elm_widget_style_get(it->base.widget));
+        _elm_theme_object_set(WIDGET(it), it->edit_obj, "genlist", buf, elm_widget_style_get(WIDGET(it)));
      }
    else
      {
-        _elm_theme_object_set(it->base.widget, it->edit_obj, "genlist", "item/edit_default", elm_widget_style_get(it->base.widget));
+        _elm_theme_object_set(WIDGET(it), it->edit_obj, "genlist", "item/edit_default", elm_widget_style_get(WIDGET(it)));
      }
 
    if (it->wd->reorder_mode)
@@ -5641,21 +5644,21 @@ _effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on)
              EINA_LIST_FOREACH(it->icons, l, key)
                {
                   Evas_Object *ic = it->itc->func.icon_get
-                     ((void *)it->base.data, it->base.widget, l->data);
+                     ((void *)it->base.data, WIDGET(it), l->data);
 
                   if (ic)
                     {
                        it->edit_icon_objs = eina_list_append(it->edit_icon_objs, ic);
                        edje_object_part_swallow(it->edit_obj, key, ic);
                        evas_object_show(ic);
-                       elm_widget_sub_object_add(it->base.widget, ic);
+                       elm_widget_sub_object_add(WIDGET(it), ic);
                        if (it->disabled)
                          elm_widget_disabled_set(ic, EINA_TRUE);
                     }
                }
           }
      }
-   edje_object_part_swallow(it->edit_obj, "original_edc", it->base.view);
+   edje_object_part_swallow(it->edit_obj, "original_edc", VIEW(it));
    _effect_item_controls(it,it->scrl_x, it->scrl_y);
    evas_object_show(it->edit_obj);
 
@@ -5674,9 +5677,9 @@ _effect_item_unrealize(Elm_Genlist_Item *it)
    edje_object_signal_emit(it->edit_obj, "elm,state,reorder_disable_effect", "elm");
    edje_object_signal_emit(it->edit_obj, "elm,state,sel,disable", "elm");
    edje_object_message_signal_process(it->edit_obj);
-   edje_object_part_unswallow(it->edit_obj, it->base.view);
-   evas_object_smart_member_add(it->base.view, it->wd->pan_smart);
-   elm_widget_sub_object_add(it->base.widget, it->base.view);
+   edje_object_part_unswallow(it->edit_obj, VIEW(it));
+   evas_object_smart_member_add(VIEW(it), it->wd->pan_smart);
+   elm_widget_sub_object_add(WIDGET(it), VIEW(it));
    //   evas_object_smart_callback_call(it->edit_obj, "unrealized", it);
    //   _item_cache_add(it);
    evas_object_del(it->edit_obj);
index b2d98c0..59536b4 100644 (file)
@@ -265,8 +265,7 @@ _item_find(Evas_Object *obj, const void *item)
 static void
 _item_free(Elm_Index_Item *it)
 {
-/* Automatically filling the box with index item*/
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    if (!wd) return;
 
    wd->items = eina_list_remove(wd->items, it);
@@ -299,8 +298,8 @@ _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level)
         if(i > wd->max_supp_items_count) break;
 
         o = edje_object_add(evas_object_evas_get(obj));
-        it->base.view = o;
-        edje_object_mirrored_set(it->base.view, rtl);
+        VIEW(it) = o;
+        edje_object_mirrored_set(VIEW(it), rtl);
         if (i & 0x1)
           _elm_theme_object_set(obj, o, "index", "item_odd/vertical", elm_widget_style_get(obj));
         else
@@ -352,10 +351,10 @@ _index_box_clear(Evas_Object *obj, Evas_Object *box __UNUSED__, int level)
    if (!wd->level_active[level]) return;
    EINA_LIST_FOREACH(wd->items, l, it)
      {
-        if (!it->base.view) continue;
+        if (!VIEW(it)) continue;
         if (it->level != level) continue;
-        evas_object_del(it->base.view);
-        it->base.view = NULL;
+        evas_object_del(VIEW(it));
+        VIEW(it) = NULL;
      }
    wd->level_active[level] = 0;
 }
@@ -403,13 +402,13 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
         dmax = 1.0-dmin-0.08;
         EINA_LIST_FOREACH(wd->items, l, it)
           {
-             if (!((it->level == i) && (it->base.view))) continue;
+             if (!((it->level == i) && (VIEW(it)))) continue;
              if (it->selected)
                {
                   it_last = it;
                   it->selected = 0;
                }
-             evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+             evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
              xx = x + (w / 2);
              yy = y + (h / 2);
              x = evx - xx;
@@ -454,13 +453,13 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
 
                   it = it_last;
                   if(view_level == it->level)
-                  edje_object_signal_emit(it->base.view, "elm,state,inactive", "elm");
-                  stacking = edje_object_data_get(it->base.view, "stacking");
-                  selectraise = edje_object_data_get(it->base.view, "selectraise");
+                  edje_object_signal_emit(VIEW(it), "elm,state,inactive", "elm");
+                  stacking = edje_object_data_get(VIEW(it), "stacking");
+                  selectraise = edje_object_data_get(VIEW(it), "selectraise");
                   if ((selectraise) && (!strcmp(selectraise, "on")))
                     {
                        if ((stacking) && (!strcmp(stacking, "below")))
-                         evas_object_lower(it->base.view);
+                         evas_object_lower(VIEW(it));
                     }
                }
              if (it_closest)
@@ -469,10 +468,10 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
 
                   it = it_closest;
                   if(view_level == it->level)
-                  edje_object_signal_emit(it->base.view, "elm,state,active", "elm");
-                  selectraise = edje_object_data_get(it->base.view, "selectraise");
+                  edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
+                  selectraise = edje_object_data_get(VIEW(it), "selectraise");
                   if ((selectraise) && (!strcmp(selectraise, "on")))
-                    evas_object_raise(it->base.view);
+                    evas_object_raise(VIEW(it));
                   evas_object_smart_callback_call((void *)obj, SIG_CHANGED, (void *)it->base.data);
                   if (wd->delay) ecore_timer_del(wd->delay);
                   wd->delay = ecore_timer_add(0.2, _delay_change, obj);
index 197ed6d..44cdec4 100644 (file)
@@ -111,21 +111,21 @@ static inline void
 _elm_list_item_free(Elm_List_Item *it)
 {
    evas_object_event_callback_del_full
-      (it->base.view, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it);
+      (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it);
    evas_object_event_callback_del_full
-      (it->base.view, EVAS_CALLBACK_MOUSE_UP, _mouse_up, it);
+      (VIEW(it), EVAS_CALLBACK_MOUSE_UP, _mouse_up, it);
    evas_object_event_callback_del_full
-      (it->base.view, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, it);
+      (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, it);
 
    if (it->icon)
      evas_object_event_callback_del_full
         (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-         _changed_size_hints, it->base.widget);
+         _changed_size_hints, WIDGET(it));
 
    if (it->end)
      evas_object_event_callback_del_full
         (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-         _changed_size_hints, it->base.widget);
+         _changed_size_hints, WIDGET(it));
 
    eina_stringshare_del(it->label);
 
@@ -576,7 +576,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
      elm_smart_scroller_mirrored_set(wd->scr, rtl);
 
    EINA_LIST_FOREACH(wd->items, n, it)
-      edje_object_mirrored_set(it->base.view, rtl);
+      edje_object_mirrored_set(VIEW(it), rtl);
 }
 
 static void
@@ -608,7 +608,7 @@ _theme_hook(Evas_Object *obj)
      }
    EINA_LIST_FOREACH(wd->items, n, it)
      {
-        edje_object_scale_set(it->base.view, elm_widget_scale_get(obj) * _elm_config->scale);
+        edje_object_scale_set(VIEW(it), elm_widget_scale_get(obj) * _elm_config->scale);
         it->fixed = 0;
      }
    _fix_items(obj);
@@ -680,7 +680,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
 static void
 _item_hilight(Elm_List_Item *it)
 {
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
    const char *selectraise;
 
@@ -691,10 +691,10 @@ _item_hilight(Elm_List_Item *it)
    evas_object_ref(obj);
    _elm_list_walk(wd);
 
-   edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
-   selectraise = edje_object_data_get(it->base.view, "selectraise");
+   edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
+   selectraise = edje_object_data_get(VIEW(it), "selectraise");
    if ((selectraise) && (!strcmp(selectraise, "on")))
-     evas_object_raise(it->base.view);
+     evas_object_raise(VIEW(it));
    it->hilighted = EINA_TRUE;
 
    _elm_list_unwalk(wd);
@@ -704,7 +704,7 @@ _item_hilight(Elm_List_Item *it)
 static void
 _item_select(Elm_List_Item *it)
 {
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
@@ -721,7 +721,7 @@ call:
    evas_object_ref(obj);
    _elm_list_walk(wd);
 
-   if (it->func) it->func((void *)it->base.data, it->base.widget, it);
+   if (it->func) it->func((void *)it->base.data, WIDGET(it), it);
    evas_object_smart_callback_call(obj, SIG_SELECTED, it);
    it->wd->last_selected_item = it;
 
@@ -732,7 +732,7 @@ call:
 static void
 _item_unselect(Elm_List_Item *it)
 {
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
    const char *stacking, *selectraise;
 
@@ -743,20 +743,20 @@ _item_unselect(Elm_List_Item *it)
    evas_object_ref(obj);
    _elm_list_walk(wd);
 
-   edje_object_signal_emit(it->base.view, "elm,state,unselected", "elm");
-   stacking = edje_object_data_get(it->base.view, "stacking");
-   selectraise = edje_object_data_get(it->base.view, "selectraise");
+   edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
+   stacking = edje_object_data_get(VIEW(it), "stacking");
+   selectraise = edje_object_data_get(VIEW(it), "selectraise");
    if ((selectraise) && (!strcmp(selectraise, "on")))
      {
         if ((stacking) && (!strcmp(stacking, "below")))
-          evas_object_lower(it->base.view);
+          evas_object_lower(VIEW(it));
      }
    it->hilighted = EINA_FALSE;
    if (it->selected)
      {
         it->selected = EINA_FALSE;
         wd->selected = eina_list_remove(wd->selected, it);
-        evas_object_smart_callback_call(it->base.widget, SIG_UNSELECTED, it);
+        evas_object_smart_callback_call(WIDGET(it), SIG_UNSELECTED, it);
      }
 
    _elm_list_unwalk(wd);
@@ -767,7 +767,7 @@ static Eina_Bool
 _swipe_cancel(void *data)
 {
    Elm_List_Item *it = data;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
 
    if (!wd) return ECORE_CALLBACK_CANCEL;
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ECORE_CALLBACK_CANCEL);
@@ -780,7 +780,7 @@ static void
 _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
 {
    Elm_List_Item *it = data;
-   Evas_Object *obj2 = it->base.widget;
+   Evas_Object *obj2 = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj2);
    Evas_Event_Mouse_Move *ev = event_info;
 
@@ -851,7 +851,7 @@ static Eina_Bool
 _long_press(void *data)
 {
    Elm_List_Item *it = data;
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) goto end;
@@ -861,7 +861,7 @@ _long_press(void *data)
    if (it->disabled) goto end;
 
    wd->longpressed = EINA_TRUE;
-   evas_object_smart_callback_call(it->base.widget, SIG_LONGPRESSED, it);
+   evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it);
 
 end:
    return ECORE_CALLBACK_CANCEL;
@@ -871,7 +871,7 @@ static void
 _swipe(Elm_List_Item *it)
 {
    int i, sum = 0;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
 
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
    if (!wd) return;
@@ -884,14 +884,14 @@ _swipe(Elm_List_Item *it)
 
    sum /= wd->movements;
    if (abs(sum - wd->history[0].x) <= 10) return;
-   evas_object_smart_callback_call(it->base.widget, "swipe", it);
+   evas_object_smart_callback_call(WIDGET(it), "swipe", it);
 }
 
 static void
 _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
 {
    Elm_List_Item *it = data;
-   Evas_Object *obj2 = it->base.widget;
+   Evas_Object *obj2 = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj2);
    Evas_Event_Mouse_Down *ev = event_info;
 
@@ -914,7 +914,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
    it->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it);
    /* Always call the callbacks last - the user may delete our context! */
    if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
-     evas_object_smart_callback_call(it->base.widget, SIG_CLICKED_DOUBLE, it);
+     evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it);
    wd->swipe = EINA_FALSE;
    wd->movements = 0;
 
@@ -926,7 +926,7 @@ static void
 _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
 {
    Elm_List_Item *it = data;
-   Evas_Object *obj2 = it->base.widget;
+   Evas_Object *obj2 = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj2);
    Evas_Event_Mouse_Up *ev = event_info;
 
@@ -1014,16 +1014,16 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
    it->end = end;
    it->func = func;
    it->base.data = data;
-   it->base.view = edje_object_add(evas_object_evas_get(obj));
-   edje_object_mirrored_set(it->base.view, elm_widget_mirrored_get(obj));
-   evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_DOWN,
+   VIEW(it) = edje_object_add(evas_object_evas_get(obj));
+   edje_object_mirrored_set(VIEW(it), elm_widget_mirrored_get(obj));
+   evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_DOWN,
                                   _mouse_down, it);
-   evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_UP,
+   evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_UP,
                                   _mouse_up, it);
-   evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_MOVE,
+   evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_MOVE,
                                   _mouse_move, it);
-   evas_object_size_hint_weight_set(it->base.view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(it->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(VIEW(it), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL);
    if (it->icon)
      {
         elm_widget_sub_object_add(obj, it->icon);
@@ -1136,46 +1136,46 @@ _fix_items(Evas_Object *obj)
 
              /* FIXME: separators' themes seem to be b0rked */
              if (it->is_separator)
-               _elm_theme_object_set(obj, it->base.view, "separator",
+               _elm_theme_object_set(obj, VIEW(it), "separator",
                                      wd->h_mode ? "horizontal" : "vertical",
                                      style);
              else if (wd->mode == ELM_LIST_COMPRESS)
                {
                   if (it->even)
-                    _elm_theme_object_set(obj, it->base.view, "list",
+                    _elm_theme_object_set(obj, VIEW(it), "list",
                                           it_compress, style);
                   else
-                    _elm_theme_object_set(obj, it->base.view, "list",
+                    _elm_theme_object_set(obj, VIEW(it), "list",
                                           it_compress_odd, style);
                }
              else
                {
                   if (it->even)
-                    _elm_theme_object_set(obj, it->base.view, "list", it_plain,
+                    _elm_theme_object_set(obj, VIEW(it), "list", it_plain,
                                           style);
                   else
-                    _elm_theme_object_set(obj, it->base.view, "list", it_odd,
+                    _elm_theme_object_set(obj, VIEW(it), "list", it_odd,
                                           style);
                }
-             stacking = edje_object_data_get(it->base.view, "stacking");
+             stacking = edje_object_data_get(VIEW(it), "stacking");
              if (stacking)
                {
                   if (!strcmp(stacking, "below"))
-                    evas_object_lower(it->base.view);
+                    evas_object_lower(VIEW(it));
                   else if (!strcmp(stacking, "above"))
-                    evas_object_raise(it->base.view);
+                    evas_object_raise(VIEW(it));
                }
-             edje_object_part_text_set(it->base.view, "elm.text", it->label);
+             edje_object_part_text_set(VIEW(it), "elm.text", it->label);
 
              if ((!it->icon) && (minh[0] > 0))
                {
-                  it->icon = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
+                  it->icon = evas_object_rectangle_add(evas_object_evas_get(VIEW(it)));
                   evas_object_color_set(it->icon, 0, 0, 0, 0);
                   it->dummy_icon = EINA_TRUE;
                }
              if ((!it->end) && (minh[1] > 0))
                {
-                  it->end = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
+                  it->end = evas_object_rectangle_add(evas_object_evas_get(VIEW(it)));
                   evas_object_color_set(it->end, 0, 0, 0, 0);
                   it->dummy_end = EINA_TRUE;
                }
@@ -1183,28 +1183,28 @@ _fix_items(Evas_Object *obj)
                {
                   evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
                   evas_object_size_hint_max_set(it->icon, 99999, 99999);
-                  edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
+                  edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
                }
              if (it->end)
                {
                   evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
                   evas_object_size_hint_max_set(it->end, 99999, 99999);
-                  edje_object_part_swallow(it->base.view, "elm.swallow.end", it->end);
+                  edje_object_part_swallow(VIEW(it), "elm.swallow.end", it->end);
                }
              if (!it->fixed)
                {
                   // this may call up user and it may modify the list item
                   // but we're safe as we're flagged as walking.
                   // just don't process further
-                  edje_object_message_signal_process(it->base.view);
+                  edje_object_message_signal_process(VIEW(it));
                   if (it->deleted)
                     continue;
                   mw = mh = -1;
                   elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-                  edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw, mh);
+                  edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
                   elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-                  evas_object_size_hint_min_set(it->base.view, mw, mh);
-                  evas_object_show(it->base.view);
+                  evas_object_size_hint_min_set(VIEW(it), mw, mh);
+                  evas_object_show(VIEW(it));
                }
              if ((it->selected) || (it->hilighted))
                {
@@ -1213,16 +1213,16 @@ _fix_items(Evas_Object *obj)
                   // this may call up user and it may modify the list item
                   // but we're safe as we're flagged as walking.
                   // just don't process further
-                  edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
+                  edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
                   if (it->deleted)
                     continue;
 
-                  selectraise = edje_object_data_get(it->base.view, "selectraise");
+                  selectraise = edje_object_data_get(VIEW(it), "selectraise");
                   if ((selectraise) && (!strcmp(selectraise, "on")))
-                    evas_object_raise(it->base.view);
+                    evas_object_raise(VIEW(it));
                }
              if (it->disabled)
-               edje_object_signal_emit(it->base.view, "elm,state,disabled",
+               edje_object_signal_emit(VIEW(it), "elm,state,disabled",
                                        "elm");
 
              it->fixed = EINA_TRUE;
@@ -1363,7 +1363,7 @@ elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Eva
 
    wd->items = eina_list_append(wd->items, it);
    it->node = eina_list_last(wd->items);
-   elm_box_pack_end(wd->box, it->base.view);
+   elm_box_pack_end(wd->box, VIEW(it));
    return it;
 }
 
@@ -1376,7 +1376,7 @@ elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Ev
 
    wd->items = eina_list_prepend(wd->items, it);
    it->node = wd->items;
-   elm_box_pack_start(wd->box, it->base.view);
+   elm_box_pack_start(wd->box, VIEW(it));
    return it;
 }
 
@@ -1396,7 +1396,7 @@ elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char
    it = _item_new(obj, label, icon, end, func, data);
    wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
    it->node = before->node->prev;
-   elm_box_pack_before(wd->box, it->base.view, before->base.view);
+   elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
    return it;
 }
 
@@ -1416,7 +1416,7 @@ elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *l
    it = _item_new(obj, label, icon, end, func, data);
    wd->items = eina_list_append_relative_list(wd->items, it, after->node);
    it->node = after->node->next;
-   elm_box_pack_after(wd->box, it->base.view, after->base.view);
+   elm_box_pack_after(wd->box, VIEW(it), VIEW(after));
    return it;
 }
 
@@ -1434,13 +1434,13 @@ elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *ic
    if (!l)
      {
         it->node = eina_list_last(wd->items);
-        elm_box_pack_end(wd->box, it->base.view);
+        elm_box_pack_end(wd->box, VIEW(it));
      }
    else
      {
         Elm_List_Item *before = eina_list_data_get(l);
         it->node = before->node->prev;
-        elm_box_pack_before(wd->box, it->base.view, before->base.view);
+        elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
      }
    return it;
 }
@@ -1652,7 +1652,7 @@ EAPI void
 elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
 
@@ -1690,12 +1690,12 @@ EAPI void
 elm_list_item_show(Elm_List_Item *it)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    Evas_Coord bx, by, bw, bh;
    Evas_Coord x, y, w, h;
 
    evas_object_geometry_get(wd->box, &bx, &by, &bw, &bh);
-   evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+   evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
    x -= bx;
    y -= by;
    if (wd->scr)
@@ -1706,12 +1706,12 @@ EAPI void
 elm_list_item_bring_in(Elm_List_Item *it)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    Evas_Coord bx, by, bw, bh;
    Evas_Coord x, y, w, h;
 
    evas_object_geometry_get(wd->box, &bx, &by, &bw, &bh);
-   evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+   evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
    x -= bx;
    y -= by;
    if (wd->scr)
@@ -1722,7 +1722,7 @@ EAPI void
 elm_list_item_del(Elm_List_Item *it)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
-   Evas_Object *obj = it->base.widget;
+   Evas_Object *obj = WIDGET(it);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
 
@@ -1783,7 +1783,7 @@ elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
      }
    if (!icon)
      {
-        icon = evas_object_rectangle_add(evas_object_evas_get(it->base.widget));
+        icon = evas_object_rectangle_add(evas_object_evas_get(WIDGET(it)));
         evas_object_color_set(icon, 0, 0, 0, 0);
         it->dummy_icon = EINA_TRUE;
      }
@@ -1793,8 +1793,8 @@ elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
         it->icon = NULL;
      }
    it->icon = icon;
-   if (it->base.view)
-     edje_object_part_swallow(it->base.view, "elm.swallow.icon", icon);
+   if (VIEW(it))
+     edje_object_part_swallow(VIEW(it), "elm.swallow.icon", icon);
 }
 
 EAPI Evas_Object *
@@ -1818,7 +1818,7 @@ elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
      }
    if (!end)
      {
-        end = evas_object_rectangle_add(evas_object_evas_get(it->base.widget));
+        end = evas_object_rectangle_add(evas_object_evas_get(WIDGET(it)));
         evas_object_color_set(end, 0, 0, 0, 0);
         it->dummy_end = EINA_TRUE;
      }
@@ -1828,15 +1828,15 @@ elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
         it->end = NULL;
      }
    it->end = end;
-   if (it->base.view)
-     edje_object_part_swallow(it->base.view, "elm.swallow.end", end);
+   if (VIEW(it))
+     edje_object_part_swallow(VIEW(it), "elm.swallow.end", end);
 }
 
 EAPI Evas_Object *
 elm_list_item_base_get(const Elm_List_Item *it)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
-   return it->base.view;
+   return VIEW(it);
 }
 
 EAPI const char *
@@ -1851,8 +1851,8 @@ elm_list_item_label_set(Elm_List_Item *it, const char *text)
 {
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
    if (!eina_stringshare_replace(&it->label, text)) return;
-   if (it->base.view)
-     edje_object_part_text_set(it->base.view, "elm.text", it->label);
+   if (VIEW(it))
+     edje_object_part_text_set(VIEW(it), "elm.text", it->label);
 }
 
 EAPI Elm_List_Item *
@@ -2009,9 +2009,9 @@ elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
    it->disabled = !!disabled;
 
    if (it->disabled)
-     edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
    else
-     edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
 }
 
 EAPI Eina_Bool
index 492fecd..e5a2bfd 100644 (file)
@@ -104,34 +104,34 @@ _theme_hook(Evas_Object *obj)
      {
         EINA_LIST_FOREACH(l, _l, item)
           {
-             edje_object_mirrored_set(item->base.view, elm_widget_mirrored_get(obj));
+             edje_object_mirrored_set(VIEW(item), elm_widget_mirrored_get(obj));
              ll = eina_list_append(ll, item->submenu.items);
              if (item->separator)
-               _elm_theme_object_set(obj, item->base.view, "menu", "separator",
+               _elm_theme_object_set(obj, VIEW(item), "menu", "separator",
                                      elm_widget_style_get(obj));
              else if (item->submenu.bx)
                {
                   _elm_theme_object_set
-                     (obj, item->base.view, "menu", "item_with_submenu",
+                     (obj, VIEW(item), "menu", "item_with_submenu",
                       elm_widget_style_get(obj));
                   elm_menu_item_label_set(item, item->label);
                   elm_menu_item_icon_set(item, item->icon_str);
                }
              else
                {
-                  _elm_theme_object_set(obj, item->base.view, "menu", "item",
+                  _elm_theme_object_set(obj, VIEW(item), "menu", "item",
                                         elm_widget_style_get(obj));
                   elm_menu_item_label_set(item, item->label);
                   elm_menu_item_icon_set(item, item->icon_str);
                }
              if (item->disabled)
                edje_object_signal_emit
-                  (item->base.view, "elm,state,disabled", "elm");
+                  (VIEW(item), "elm,state,disabled", "elm");
              else
                edje_object_signal_emit
-                  (item->base.view, "elm,state,enabled", "elm");
-             edje_object_message_signal_process(item->base.view);
-             edje_object_scale_set(item->base.view, elm_widget_scale_get(obj) *
+                  (VIEW(item), "elm,state,enabled", "elm");
+             edje_object_message_signal_process(VIEW(item));
+             edje_object_scale_set(VIEW(item), elm_widget_scale_get(obj) *
                                    _elm_config->scale);
           }
      }
@@ -182,11 +182,11 @@ _submenu_sizing_eval(Elm_Menu_Item *parent)
    Eina_List *l;
    Elm_Menu_Item *item;
    Evas_Coord x_p, y_p, w_p, h_p, x2, y2, w2, h2, bx, by, bw, bh, px, py, pw, ph;
-   Widget_Data *wd = elm_widget_data_get(parent->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(parent));
    if (!wd) return;
    EINA_LIST_FOREACH(parent->submenu.items, l, item) _item_sizing_eval(item);
    evas_object_geometry_get(parent->submenu.location, &x_p, &y_p, &w_p, &h_p);
-   evas_object_geometry_get(parent->base.view, &x2, &y2, &w2, &h2);
+   evas_object_geometry_get(VIEW(parent), &x2, &y2, &w2, &h2);
    evas_object_geometry_get(parent->submenu.bx, &bx, &by, &bw, &bh);
    evas_object_geometry_get(wd->parent, &px, &py, &pw, &ph);
 
@@ -194,7 +194,7 @@ _submenu_sizing_eval(Elm_Menu_Item *parent)
    y_p = y2;
 
    /* If it overflows on the right, adjust the x */
-   if ((x_p + bw > px + pw) || elm_widget_mirrored_get(parent->base.widget))
+   if ((x_p + bw > px + pw) || elm_widget_mirrored_get(WIDGET(parent)))
      x_p = x2-bw;
 
    /* If it overflows on the left, adjust the x - usually only happens
@@ -230,11 +230,11 @@ _item_sizing_eval(Elm_Menu_Item *item)
    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
    if (!item->separator)
      elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   edje_object_size_min_restricted_calc(item->base.view, &minw, &minh, minw, minh);
+   edje_object_size_min_restricted_calc(VIEW(item), &minw, &minh, minw, minh);
    if (!item->separator)
      elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   evas_object_size_hint_min_set(item->base.view, minw, minh);
-   evas_object_size_hint_max_set(item->base.view, maxw, maxh);
+   evas_object_size_hint_min_set(VIEW(item), minw, minh);
+   evas_object_size_hint_max_set(VIEW(item), maxw, maxh);
 }
 
 static void
@@ -310,9 +310,9 @@ _menu_item_select(void *data, Evas_Object *obj __UNUSED__, const char *emission
         else _submenu_hide(item);
      }
    else
-     _menu_hide(item->base.widget, NULL, NULL);
+     _menu_hide(WIDGET(item), NULL, NULL);
 
-   if (item->func) item->func((void *)(item->base.data), item->base.widget, item);
+   if (item->func) item->func((void *)(item->base.data), WIDGET(item), item);
 }
 
 static void
@@ -331,7 +331,7 @@ _menu_item_activate(void *data, Evas_Object *obj __UNUSED__, const char *emissio
      }
    else
      {
-        Widget_Data *wd = elm_widget_data_get(item->base.widget);
+        Widget_Data *wd = elm_widget_data_get(WIDGET(item));
         EINA_LIST_FOREACH(wd->items, l, item2)
           {
              if (item2 != item) elm_menu_item_selected_set(item2, 0);
@@ -353,7 +353,7 @@ _submenu_open(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
    Elm_Menu_Item *item = data;
    item->submenu.open = EINA_TRUE;
    evas_object_show(item->submenu.hv);
-   _sizing_eval(item->base.widget);
+   _sizing_eval(WIDGET(item));
 }
 
 static void
@@ -367,40 +367,40 @@ _show(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 static void
 _item_obj_create(Elm_Menu_Item *item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
-   item->base.view = edje_object_add(evas_object_evas_get(wd->bx));
-   edje_object_mirrored_set(item->base.view, elm_widget_mirrored_get(item->base.widget));
-   evas_object_size_hint_weight_set(item->base.view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   evas_object_size_hint_fill_set(item->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   _elm_theme_object_set(item->base.widget, item->base.view, "menu", "item",  elm_widget_style_get(item->base.widget));
-   edje_object_signal_callback_add(item->base.view, "elm,action,click", "",
+   VIEW(item) = edje_object_add(evas_object_evas_get(wd->bx));
+   edje_object_mirrored_set(VIEW(item), elm_widget_mirrored_get(WIDGET(item)));
+   evas_object_size_hint_weight_set(VIEW(item), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_fill_set(VIEW(item), EVAS_HINT_FILL, EVAS_HINT_FILL);
+   _elm_theme_object_set(WIDGET(item), VIEW(item), "menu", "item",  elm_widget_style_get(WIDGET(item)));
+   edje_object_signal_callback_add(VIEW(item), "elm,action,click", "",
                                    _menu_item_select, item);
-   edje_object_signal_callback_add(item->base.view, "elm,action,activate", "",
+   edje_object_signal_callback_add(VIEW(item), "elm,action,activate", "",
                                    _menu_item_activate, item);
-   edje_object_signal_callback_add(item->base.view, "elm,action,inactivate", "",
+   edje_object_signal_callback_add(VIEW(item), "elm,action,inactivate", "",
                                    _menu_item_inactivate, item);
-   evas_object_show(item->base.view);
+   evas_object_show(VIEW(item));
 }
 
 static void
 _item_separator_obj_create(Elm_Menu_Item *item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
-   item->base.view = edje_object_add(evas_object_evas_get(wd->bx));
-   evas_object_size_hint_weight_set(item->base.view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   evas_object_size_hint_fill_set(item->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   _elm_theme_object_set(item->base.widget, item->base.view, "menu", "separator",  elm_widget_style_get(item->base.widget));
-   edje_object_signal_callback_add(item->base.view, "elm,action,activate", "",
+   VIEW(item) = edje_object_add(evas_object_evas_get(wd->bx));
+   evas_object_size_hint_weight_set(VIEW(item), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_fill_set(VIEW(item), EVAS_HINT_FILL, EVAS_HINT_FILL);
+   _elm_theme_object_set(WIDGET(item), VIEW(item), "menu", "separator",  elm_widget_style_get(WIDGET(item)));
+   edje_object_signal_callback_add(VIEW(item), "elm,action,activate", "",
                                    _menu_item_activate, item);
-   evas_object_show(item->base.view);
+   evas_object_show(VIEW(item));
 }
 
 static void
 _item_submenu_obj_create(Elm_Menu_Item *item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
    item->submenu.location = elm_icon_add(wd->bx);
    item->submenu.hv = elm_hover_add(wd->bx);
@@ -415,17 +415,17 @@ _item_submenu_obj_create(Elm_Menu_Item *item)
    evas_object_show(item->submenu.bx);
    elm_hover_content_set(item->submenu.hv, elm_hover_best_content_location_get(item->submenu.hv, ELM_HOVER_AXIS_VERTICAL), item->submenu.bx);
 
-   edje_object_mirrored_set(item->base.view, elm_widget_mirrored_get(item->base.widget));
-   _elm_theme_object_set(item->base.widget, item->base.view, "menu", "item_with_submenu",  elm_widget_style_get(item->base.widget));
+   edje_object_mirrored_set(VIEW(item), elm_widget_mirrored_get(WIDGET(item)));
+   _elm_theme_object_set(WIDGET(item), VIEW(item), "menu", "item_with_submenu",  elm_widget_style_get(WIDGET(item)));
    elm_menu_item_label_set(item, item->label);
    elm_menu_item_icon_set(item, item->icon_str);
 
-   edje_object_signal_callback_add(item->base.view, "elm,action,open", "",
+   edje_object_signal_callback_add(VIEW(item), "elm,action,open", "",
                                    _submenu_open, item);
-   evas_object_event_callback_add(item->base.view, EVAS_CALLBACK_MOVE, _item_move_resize, item);
-   evas_object_event_callback_add(item->base.view, EVAS_CALLBACK_RESIZE, _item_move_resize, item);
+   evas_object_event_callback_add(VIEW(item), EVAS_CALLBACK_MOVE, _item_move_resize, item);
+   evas_object_event_callback_add(VIEW(item), EVAS_CALLBACK_RESIZE, _item_move_resize, item);
 
-   evas_object_event_callback_add(item->submenu.bx, EVAS_CALLBACK_RESIZE, _menu_resize, item->base.widget);
+   evas_object_event_callback_add(item->submenu.bx, EVAS_CALLBACK_RESIZE, _menu_resize, WIDGET(item));
 }
 
 EAPI Evas_Object *
@@ -546,7 +546,7 @@ EAPI Evas_Object *
 elm_menu_item_object_get(const Elm_Menu_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   return item->base.view;
+   return VIEW(item);
 }
 
 static void
@@ -604,19 +604,19 @@ elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, const char *icon, con
    _item_obj_create(subitem);
    elm_menu_item_label_set(subitem, label);
 
-   elm_widget_sub_object_add(subitem->base.widget, subitem->icon);
-   edje_object_part_swallow(subitem->base.view, "elm.swallow.content", subitem->icon);
+   elm_widget_sub_object_add(WIDGET(subitem), subitem->icon);
+   edje_object_part_swallow(VIEW(subitem), "elm.swallow.content", subitem->icon);
    if (icon) elm_menu_item_icon_set(subitem, icon);
 
    if (parent)
      {
         if (!parent->submenu.bx) _item_submenu_obj_create(parent);
-        elm_box_pack_end(parent->submenu.bx, subitem->base.view);
+        elm_box_pack_end(parent->submenu.bx, VIEW(subitem));
         parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
      }
    else
      {
-        elm_box_pack_end(wd->bx, subitem->base.view);
+        elm_box_pack_end(wd->bx, VIEW(subitem));
         wd->items = eina_list_append(wd->items, subitem);
      }
 
@@ -631,13 +631,13 @@ elm_menu_item_label_set(Elm_Menu_Item *item, const char *label)
    eina_stringshare_replace(&item->label, label);
 
    if (label)
-     edje_object_signal_emit(item->base.view, "elm,state,text,visible", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,text,visible", "elm");
    else
-     edje_object_signal_emit(item->base.view, "elm,state,text,hidden", "elm");
+     edje_object_signal_emit(VIEW(item), "elm,state,text,hidden", "elm");
 
-   edje_object_message_signal_process(item->base.view);
-   edje_object_part_text_set(item->base.view, "elm.text", label);
-   _sizing_eval(item->base.widget);
+   edje_object_message_signal_process(VIEW(item));
+   edje_object_part_text_set(VIEW(item), "elm.text", label);
+   _sizing_eval(WIDGET(item));
 }
 
 EAPI const char *
@@ -659,12 +659,12 @@ elm_menu_item_icon_set(Elm_Menu_Item *item, const char *icon)
        (elm_icon_standard_set(item->icon, icon_tmp)))
      {
         eina_stringshare_replace(&item->icon_str, icon);
-        edje_object_signal_emit(item->base.view, "elm,state,icon,visible", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,icon,visible", "elm");
      }
    else
-     edje_object_signal_emit(item->base.view, "elm,state,icon,hidden", "elm");
-   edje_object_message_signal_process(item->base.view);
-   _sizing_eval(item->base.widget);
+     edje_object_signal_emit(VIEW(item), "elm,state,icon,hidden", "elm");
+   edje_object_message_signal_process(VIEW(item));
+   _sizing_eval(WIDGET(item));
 }
 
 EAPI void
@@ -675,12 +675,12 @@ elm_menu_item_disabled_set(Elm_Menu_Item *item, Eina_Bool disabled)
    item->disabled = !!disabled;
    if (disabled)
      {
-        edje_object_signal_emit(item->base.view, "elm,state,disabled", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
         if (item->submenu.open) _submenu_hide(item);
      }
    else
-     edje_object_signal_emit(item->base.view, "elm,state,enabled", "elm");
-   edje_object_message_signal_process(item->base.view);
+     edje_object_signal_emit(VIEW(item), "elm,state,enabled", "elm");
+   edje_object_message_signal_process(VIEW(item));
 }
 
 EAPI Eina_Bool
@@ -706,18 +706,18 @@ elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent)
 
    subitem = elm_widget_item_new(obj, Elm_Menu_Item);
    if (!subitem) return NULL;
-   subitem->base.widget = obj;
+   WIDGET(subitem) = obj;
    subitem->separator = 1;
    _item_separator_obj_create(subitem);
    if (!parent)
      {
-        elm_box_pack_end(wd->bx, subitem->base.view);
+        elm_box_pack_end(wd->bx, VIEW(subitem));
         wd->items = eina_list_append(wd->items, subitem);
      }
    else
      {
         if (!parent->submenu.bx) _item_submenu_obj_create(parent);
-        elm_box_pack_end(parent->submenu.bx, subitem->base.view);
+        elm_box_pack_end(parent->submenu.bx, VIEW(subitem));
         parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
      }
    _sizing_eval(obj);
@@ -763,7 +763,7 @@ elm_menu_item_del(Elm_Menu_Item *item)
      item->parent->submenu.items = eina_list_remove(item->parent->submenu.items, item);
    else
      {
-        Widget_Data *wd = elm_widget_data_get(item->base.widget);
+        Widget_Data *wd = elm_widget_data_get(WIDGET(item));
         wd->items = eina_list_remove(wd->items, item);
      }
 
@@ -814,15 +814,15 @@ elm_menu_item_selected_set(Elm_Menu_Item *item, Eina_Bool selected)
    item->selected = selected;
    if (selected)
      {
-        edje_object_signal_emit(item->base.view, "elm,state,selected", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
         _menu_item_activate(item, NULL, NULL, NULL);
      }
    else
      {
-        edje_object_signal_emit(item->base.view, "elm,state,unselected", "elm");
+        edje_object_signal_emit(VIEW(item), "elm,state,unselected", "elm");
         _menu_item_inactivate(item, NULL, NULL, NULL);
      }
-   edje_object_message_signal_process(item->base.view);
+   edje_object_message_signal_process(VIEW(item));
 }
 
 EAPI Eina_Bool
@@ -845,7 +845,7 @@ elm_menu_item_prev_get(const Elm_Menu_Item *it)
      }
    else
      {
-        Widget_Data *wd = elm_widget_data_get(it->base.widget);
+        Widget_Data *wd = elm_widget_data_get(WIDGET(it));
         if (!wd | !wd->items) return NULL;
         Eina_List *l = eina_list_data_find_list(wd->items, it);
         l = eina_list_prev(l);
@@ -868,7 +868,7 @@ elm_menu_item_next_get(const Elm_Menu_Item *it)
      }
    else
      {
-        Widget_Data *wd = elm_widget_data_get(it->base.widget);
+        Widget_Data *wd = elm_widget_data_get(WIDGET(it));
         if (!wd | !wd->items) return NULL;
         Eina_List *l = eina_list_data_find_list(wd->items, it);
         l = eina_list_next(l);
index f4ea621..b4b5780 100644 (file)
@@ -105,11 +105,11 @@ _theme_hook(Evas_Object *obj)
 
    EINA_LIST_FOREACH(wd->seg_items, l, it)
      {
-        _elm_theme_object_set(obj, it->base.view, "segment_control",
+        _elm_theme_object_set(obj, VIEW(it), "segment_control",
                               "item", elm_widget_style_get(obj));
-        edje_object_scale_set(it->base.view, elm_widget_scale_get(it->base.view)
+        edje_object_scale_set(VIEW(it), elm_widget_scale_get(VIEW(it))
                               *_elm_config->scale);
-        edje_object_mirrored_set(it->base.view, rtl);
+        edje_object_mirrored_set(VIEW(it), rtl);
      }
 
    _update_list(wd);
@@ -136,8 +136,8 @@ _elm_list_data_get(const Eina_List *list)
 
    if (it) return NULL;
 
-   edje_object_signal_emit(it->base.view, "elm,state,segment,selected", "elm");
-   return it->base.view;
+   edje_object_signal_emit(VIEW(it), "elm,state,segment,selected", "elm");
+   return VIEW(it);
 }
 
 static Eina_Bool
@@ -197,7 +197,7 @@ _segment_off(Elm_Segment_Item *it)
    wd = elm_widget_item_data_get(it);
    if (!wd) return;
 
-   edje_object_signal_emit(it->base.view, "elm,state,segment,normal", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,segment,normal", "elm");
 
    if (wd->selected_item == it) wd->selected_item = NULL;
 }
@@ -215,7 +215,7 @@ _segment_on(Elm_Segment_Item *it)
 
    if (wd->selected_item) _segment_off(wd->selected_item);
 
-   edje_object_signal_emit(it->base.view, "elm,state,segment,selected", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,segment,selected", "elm");
 
    wd->selected_item = it;
    evas_object_smart_callback_call(wd->obj, SIG_CHANGED,
@@ -244,8 +244,8 @@ _position_items(Widget_Data *wd)
 
    EINA_LIST_FOREACH(wd->seg_items, l, it)
      {
-        evas_object_move(it->base.view, pos, by);
-        evas_object_resize(it->base.view, wd->item_width, bh);
+        evas_object_move(VIEW(it), pos, by);
+        evas_object_resize(VIEW(it), wd->item_width, bh);
         if (rtl)
           pos -= wd->item_width;
         else
@@ -292,13 +292,13 @@ _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
    if (it == wd->selected_item) return;
 
    ev = event_info;
-   evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+   evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
 
    if ((ev->canvas.x >= x) && (ev->output.x <= (x + w)) && (ev->canvas.y >= y)
        && (ev->canvas.y <= (y + h)))
      _segment_on(it);
    else
-     edje_object_signal_emit(it->base.view, "elm,state,segment,normal", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,segment,normal", "elm");
 }
 
 static void
@@ -318,7 +318,7 @@ _mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
 
    if (it == wd->selected_item) return;
 
-   edje_object_signal_emit(it->base.view, "elm,state,segment,pressed", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,segment,pressed", "elm");
 }
 
 static void
@@ -328,20 +328,20 @@ _swallow_item_objects(Elm_Segment_Item *it)
 
    if (it->icon)
      {
-        edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
-        edje_object_signal_emit(it->base.view, "elm,state,icon,visible", "elm");
+        edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
+        edje_object_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
      }
    else
-     edje_object_signal_emit(it->base.view, "elm,state,icon,hidden", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm");
 
    if (it->label)
      {
-        edje_object_part_text_set(it->base.view, "elm.text", it->label);
-        edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
+        edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+        edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
      }
    else
-     edje_object_signal_emit(it->base.view, "elm,state,text,hidden", "elm");
-   edje_object_message_signal_process(it->base.view);
+     edje_object_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
+   edje_object_message_signal_process(VIEW(it));
 }
 
 static void
@@ -360,21 +360,21 @@ _update_list(Widget_Data *wd)
         it->seg_index = 0;
 
         //Set the segment type
-        edje_object_signal_emit(it->base.view,
+        edje_object_signal_emit(VIEW(it),
                                 "elm,type,segment,single", "elm");
 
         //Set the segment state
         if (wd->selected_item == it)
-          edje_object_signal_emit(it->base.view,
+          edje_object_signal_emit(VIEW(it),
                                   "elm,state,segment,selected", "elm");
         else
-          edje_object_signal_emit(it->base.view,
+          edje_object_signal_emit(VIEW(it),
                                   "elm,state,segment,normal", "elm");
 
         if (elm_widget_disabled_get(wd->obj))
-          edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+          edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
         else
-          edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+          edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
 
         _swallow_item_objects(it);
         return;
@@ -389,37 +389,37 @@ _update_list(Widget_Data *wd)
         if (idx == 0)
           {
              if (rtl)
-               edje_object_signal_emit(it->base.view,
+               edje_object_signal_emit(VIEW(it),
                                        "elm,type,segment,right", "elm");
              else
-               edje_object_signal_emit(it->base.view,
+               edje_object_signal_emit(VIEW(it),
                                        "elm,type,segment,left", "elm");
           }
         else if (idx == (wd->item_count - 1))
           {
              if (rtl)
-               edje_object_signal_emit(it->base.view,
+               edje_object_signal_emit(VIEW(it),
                                        "elm,type,segment,left", "elm");
              else
-               edje_object_signal_emit(it->base.view,
+               edje_object_signal_emit(VIEW(it),
                                        "elm,type,segment,right", "elm");
           }
         else
-          edje_object_signal_emit(it->base.view,
+          edje_object_signal_emit(VIEW(it),
                                   "elm,type,segment,middle", "elm");
 
         //Set the segment state
         if (wd->selected_item == it)
-          edje_object_signal_emit(it->base.view,
+          edje_object_signal_emit(VIEW(it),
                                   "elm,state,segment,selected", "elm");
         else
-          edje_object_signal_emit(it->base.view,
+          edje_object_signal_emit(VIEW(it),
                                   "elm,state,segment,normal", "elm");
 
         if (elm_widget_disabled_get(wd->obj))
-          edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+          edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
         else
-          edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+          edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
 
         _swallow_item_objects(it);
         idx++;
@@ -452,34 +452,34 @@ _item_new(Evas_Object *obj, Evas_Object *icon, const char *label)
    if (!it) return NULL;
    elm_widget_item_data_set(it, wd);
 
-   it->base.view = edje_object_add(evas_object_evas_get(obj));
-   edje_object_scale_set(it->base.view, elm_widget_scale_get(it->base.view)
+   VIEW(it) = edje_object_add(evas_object_evas_get(obj));
+   edje_object_scale_set(VIEW(it), elm_widget_scale_get(VIEW(it))
                          *_elm_config->scale);
-   evas_object_smart_member_add(it->base.view, obj);
-   elm_widget_sub_object_add(obj, it->base.view);
-   evas_object_clip_set(it->base.view, evas_object_clip_get(obj));
+   evas_object_smart_member_add(VIEW(it), obj);
+   elm_widget_sub_object_add(obj, VIEW(it));
+   evas_object_clip_set(VIEW(it), evas_object_clip_get(obj));
 
-   _elm_theme_object_set(obj, it->base.view, "segment_control", "item",
+   _elm_theme_object_set(obj, VIEW(it), "segment_control", "item",
                          elm_object_style_get(obj));
-   edje_object_mirrored_set(it->base.view,
-                            elm_widget_mirrored_get(it->base.widget));
+   edje_object_mirrored_set(VIEW(it),
+                            elm_widget_mirrored_get(WIDGET(it)));
 
    if (label)
      eina_stringshare_replace(&it->label, label);
    if (it->label)
-     edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
    else
-     edje_object_signal_emit(it->base.view, "elm,state,text,hidden", "elm");
-   edje_object_message_signal_process(it->base.view);
-   edje_object_part_text_set(it->base.view, "elm.text", label);
+     edje_object_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
+   edje_object_message_signal_process(VIEW(it));
+   edje_object_part_text_set(VIEW(it), "elm.text", label);
 
    it->icon = icon;
-   if (it->icon) elm_widget_sub_object_add(it->base.view, it->icon);
-   evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_DOWN,
+   if (it->icon) elm_widget_sub_object_add(VIEW(it), it->icon);
+   evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_DOWN,
                                   _mouse_down, it);
-   evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_UP,
+   evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOUSE_UP,
                                   _mouse_up, it);
-   evas_object_show(it->base.view);
+   evas_object_show(VIEW(it));
 
    return it;
 }
@@ -621,12 +621,12 @@ elm_segment_control_item_label_set(Elm_Segment_Item* it, const char* label)
 
    eina_stringshare_replace(&it->label, label);
    if (it->label)
-     edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
    else
-     edje_object_signal_emit(it->base.view, "elm,state,text,hidden", "elm");
-   edje_object_message_signal_process(it->base.view);
+     edje_object_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
+   edje_object_message_signal_process(VIEW(it));
    //label can be NULL also.
-   edje_object_part_text_set(it->base.view, "elm.text", it->label);
+   edje_object_part_text_set(VIEW(it), "elm.text", it->label);
 }
 
 EAPI Evas_Object *
@@ -649,7 +649,7 @@ elm_segment_control_item_icon_set(Elm_Segment_Item *it, Evas_Object *icon)
    //Remove the existing icon
    if (it->icon)
      {
-        edje_object_part_unswallow(it->base.view, it->icon);
+        edje_object_part_unswallow(VIEW(it), it->icon);
         evas_object_del(it->icon);
         it->icon = NULL;
      }
@@ -657,12 +657,12 @@ elm_segment_control_item_icon_set(Elm_Segment_Item *it, Evas_Object *icon)
    it->icon = icon;
    if (it->icon)
      {
-        elm_widget_sub_object_add(it->base.view, it->icon);
-        edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
-        edje_object_signal_emit(it->base.view, "elm,state,icon,visible", "elm");
+        elm_widget_sub_object_add(VIEW(it), it->icon);
+        edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
+        edje_object_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
      }
    else
-     edje_object_signal_emit(it->base.view, "elm,state,icon,hidden", "elm");
+     edje_object_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm");
 }
 
 EAPI int
@@ -682,7 +682,7 @@ elm_segment_control_item_object_get(const Elm_Segment_Item *it)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
 
-   return it->base.view;
+   return VIEW(it);
 }
 
 EAPI Elm_Segment_Item*
index 5e8b653..3e26744 100644 (file)
@@ -163,7 +163,7 @@ _sizing_eval(Evas_Object *obj)
 
 static Elm_Slideshow_Item* _item_prev_get(Elm_Slideshow_Item* item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l));
    if ((!prev) && (wd->loop))
      prev = eina_list_data_get(eina_list_last(item->l));
@@ -172,7 +172,7 @@ static Elm_Slideshow_Item* _item_prev_get(Elm_Slideshow_Item* item)
 
 static Elm_Slideshow_Item* _item_next_get(Elm_Slideshow_Item* item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l));
    if ((!next) && (wd->loop))
      next = eina_list_data_get(wd->items);
@@ -195,18 +195,18 @@ static void
 _item_realize(Elm_Slideshow_Item *item)
 {
    Elm_Slideshow_Item *_item_prev, *_item_next;
-   Evas_Object *obj = item->base.widget;
+   Evas_Object *obj = WIDGET(item);
    Widget_Data *wd = elm_widget_data_get(obj);
    int ac, bc, lc;
 
    if (!wd) return;
-   if ((!item->base.view) && (item->itc->func.get))
+   if ((!VIEW(item)) && (item->itc->func.get))
      {
-        item->base.view = item->itc->func.get((void*)item->base.data, obj);
-        evas_object_smart_member_add(item->base.view, obj);
+        VIEW(item) = item->itc->func.get((void*)item->base.data, obj);
+        evas_object_smart_member_add(VIEW(item), obj);
         item->l_built = eina_list_append(NULL, item);
         wd->items_built = eina_list_merge(wd->items_built, item->l_built);
-        evas_object_hide(item->base.view);
+        evas_object_hide(VIEW(item));
      }
    else if (item->l_built)
      wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
@@ -227,17 +227,17 @@ _item_realize(Elm_Slideshow_Item *item)
                {
                   _item_next = _item_next_get(_item_next);
                   if ((_item_next)
-                      && (!_item_next->base.view)
+                      && (!VIEW(_item_next))
                       && (_item_next->itc->func.get))
                     {
-                       _item_next->base.view =
+                       VIEW(_item_next) =
                           _item_next->itc->func.get(
                              (void*)_item_next->base.data, obj);
-                       evas_object_smart_member_add(_item_next->base.view, obj);
+                       evas_object_smart_member_add(VIEW(_item_next), obj);
                        _item_next->l_built = eina_list_append(NULL, _item_next);
                        wd->items_built = eina_list_merge(wd->items_built,
                                                          _item_next->l_built);
-                       evas_object_hide(_item_next->base.view);
+                       evas_object_hide(VIEW(_item_next));
                     }
                   else if (_item_next && _item_next->l_built)
                     wd->items_built =
@@ -254,17 +254,17 @@ _item_realize(Elm_Slideshow_Item *item)
                {
                   _item_prev = _item_prev_get(_item_prev);
                   if ((_item_prev)
-                      && (!_item_prev->base.view)
+                      && (!VIEW(_item_prev))
                       && (_item_prev->itc->func.get))
                     {
-                       _item_prev->base.view =
+                       VIEW(_item_prev) =
                           _item_prev->itc->func.get(
                              (void*)_item_prev->base.data, obj);
-                       evas_object_smart_member_add(_item_prev->base.view, obj);
+                       evas_object_smart_member_add(VIEW(_item_prev), obj);
                        _item_prev->l_built = eina_list_append(NULL, _item_prev);
                        wd->items_built = eina_list_merge(wd->items_built,
                                                          _item_prev->l_built);
-                       evas_object_hide(_item_prev->base.view);
+                       evas_object_hide(VIEW(_item_prev));
                     }
                   else if (_item_prev && _item_prev->l_built)
                     wd->items_built =
@@ -282,9 +282,9 @@ _item_realize(Elm_Slideshow_Item *item)
         wd->items_built = eina_list_remove_list(wd->items_built,
                                                 wd->items_built);
         if (item->itc->func.del)
-          item->itc->func.del((void*)item->base.data, item->base.view);
-        evas_object_del(item->base.view);
-        item->base.view = NULL;
+          item->itc->func.del((void*)item->base.data, VIEW(item));
+        evas_object_del(VIEW(item));
+        VIEW(item) = NULL;
      }
 }
 
@@ -298,18 +298,18 @@ _end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, c
    item = wd->previous;
    if (item)
      {
-        edje_object_part_unswallow(NULL, item->base.view);
-        evas_object_hide(item->base.view);
+        edje_object_part_unswallow(NULL, VIEW(item));
+        evas_object_hide(VIEW(item));
         wd->previous = NULL;
      }
 
 
    item = wd->current;
-   if ((!item) || (!item->base.view)) return;
+   if ((!item) || (!VIEW(item))) return;
 
    _item_realize(item);
-   edje_object_part_unswallow(NULL, item->base.view);
-   evas_object_show(item->base.view);
+   edje_object_part_unswallow(NULL, VIEW(item));
+   evas_object_show(VIEW(item));
 
    edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
    edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->base.view);
@@ -423,26 +423,26 @@ elm_slideshow_show(Elm_Slideshow_Item *item)
    Elm_Slideshow_Item *next = NULL;
    Widget_Data *wd;
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd)
      return;
    if (item == wd->current)
      return;
 
    next = item;
-   _end(item->base.widget, item->base.widget, NULL, NULL);
+   _end(WIDGET(item), WIDGET(item), NULL, NULL);
 
    if (wd->timer) ecore_timer_del(wd->timer);
    if (wd->timeout > 0.0)
-     wd->timer = ecore_timer_add(wd->timeout, _timer_cb, item->base.widget);
+     wd->timer = ecore_timer_add(wd->timeout, _timer_cb, WIDGET(item));
    _item_realize(next);
-   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->base.view);
-   evas_object_show(next->base.view);
+   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", VIEW(next));
+   evas_object_show(VIEW(next));
    snprintf(buf, sizeof(buf), "%s,next", wd->transition);
    edje_object_signal_emit(wd->slideshow, buf, "slideshow");
    wd->previous = wd->current;
    wd->current = next;
-   evas_object_smart_callback_call(item->base.widget, SIG_CHANGED, wd->current);
+   evas_object_smart_callback_call(WIDGET(item), SIG_CHANGED, wd->current);
 }
 
 EAPI void
@@ -468,8 +468,8 @@ elm_slideshow_next(Evas_Object *obj)
 
    _item_realize(next);
 
-   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->base.view);
-   evas_object_show(next->base.view);
+   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", VIEW(next));
+   evas_object_show(VIEW(next));
 
    snprintf(buf, sizeof(buf), "%s,next", wd->transition);
    edje_object_signal_emit(wd->slideshow, buf, "slideshow");
@@ -502,8 +502,8 @@ elm_slideshow_previous(Evas_Object *obj)
 
    _item_realize(prev);
 
-   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", prev->base.view);
-   evas_object_show(prev->base.view);
+   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", VIEW(prev));
+   evas_object_show(VIEW(prev));
 
    snprintf(buf, 1024, "%s,previous", wd->transition);
    edje_object_signal_emit(wd->slideshow, buf, "slideshow");
@@ -623,9 +623,9 @@ elm_slideshow_clear(Evas_Object *obj)
    EINA_LIST_FREE(wd->items_built, item)
      {
         if (item->itc->func.del)
-          item->itc->func.del((void*)item->base.data, item->base.view);
-        evas_object_del(item->base.view);
-        item->base.view = NULL;
+          item->itc->func.del((void*)item->base.data, VIEW(item));
+        evas_object_del(VIEW(item));
+        VIEW(item) = NULL;
      }
 
    EINA_LIST_FREE(wd->items, item)
@@ -638,7 +638,7 @@ EAPI void
 elm_slideshow_item_del(Elm_Slideshow_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
    if (wd->previous == item) wd->previous = NULL;
    if (wd->current == item)
@@ -655,10 +655,10 @@ elm_slideshow_item_del(Elm_Slideshow_Item *item)
    wd->items = eina_list_remove_list(wd->items, item->l);
    wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
 
-   if ((item->base.view) && (item->itc->func.del))
-     item->itc->func.del((void*)item->base.data, item->base.view);
-   if (item->base.view)
-     evas_object_del(item->base.view);
+   if ((VIEW(item)) && (item->itc->func.del))
+     item->itc->func.del((void*)item->base.data, VIEW(item));
+   if (VIEW(item))
+     evas_object_del(VIEW(item));
    free(item);
 }
 
@@ -684,7 +684,7 @@ EAPI Evas_Object *
 elm_slideshow_item_object_get(const Elm_Slideshow_Item * item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   return item->base.view;
+   return VIEW(item);
 }
 
 EAPI void *
index e965981..d99762b 100644 (file)
@@ -110,12 +110,12 @@ _elm_toolbar_icon_size_get(Widget_Data *wd)
 static void
 _item_show(Elm_Toolbar_Item *it)
 {
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    Evas_Coord x, y, w, h, bx, by;
 
    if (!wd) return;
    evas_object_geometry_get(wd->bx, &bx, &by, NULL, NULL);
-   evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+   evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
    elm_smart_scroller_child_region_show(wd->scr, x - bx, y - by, w, h);
 }
 
@@ -124,11 +124,11 @@ _item_unselect(Elm_Toolbar_Item *item)
 {
    Widget_Data *wd;
    if ((!item) || (!item->selected)) return;
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
    item->selected = EINA_FALSE;
    wd->selected_item = NULL;
-   edje_object_signal_emit(item->base.view, "elm,state,unselected", "elm");
+   edje_object_signal_emit(VIEW(item), "elm,state,unselected", "elm");
    elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
 }
 
@@ -136,7 +136,7 @@ static void
 _item_select(Elm_Toolbar_Item *it)
 {
    Elm_Toolbar_Item *it2;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
    Evas_Object *obj2;
 
    if (!wd) return;
@@ -144,27 +144,27 @@ _item_select(Elm_Toolbar_Item *it)
 
    if (!wd->no_select)
      {
-        it2 = elm_toolbar_selected_item_get(it->base.widget);
+        it2 = elm_toolbar_selected_item_get(WIDGET(it));
         _item_unselect(it2);
 
         it->selected = EINA_TRUE;
         wd->selected_item = it;
-        edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
+        edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
         elm_widget_signal_emit(it->icon, "elm,state,selected", "elm");
         _item_show(it);
      }
-   obj2 = it->base.widget;
+   obj2 = WIDGET(it);
    if (it->menu)
      {
         evas_object_show(it->o_menu);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_RESIZE,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_RESIZE,
                                        _menu_move_resize, it);
-        evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOVE,
+        evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MOVE,
                                        _menu_move_resize, it);
 
         _menu_move_resize(it, NULL, NULL, NULL);
      }
-   if (it->func) it->func((void *)(it->base.data), it->base.widget, it);
+   if (it->func) it->func((void *)(it->base.data), WIDGET(it), it);
    evas_object_smart_callback_call(obj2, SIG_CLICKED, it);
 }
 
@@ -173,7 +173,7 @@ _menu_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *ev
 {
    Elm_Toolbar_Item *selected;
    Elm_Toolbar_Item *it = data;
-   selected = elm_toolbar_selected_item_get(it->base.widget);
+   selected = elm_toolbar_selected_item_get(WIDGET(it));
    _item_unselect(selected);
 }
 
@@ -190,29 +190,29 @@ _menu_move_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
 {
    Elm_Toolbar_Item *it = data;
    Evas_Coord x,y,w,h;
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
 
    if ((!wd) || (!wd->menu_parent)) return;
-   evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
+   evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
    elm_menu_move(it->o_menu, x, y+h);
 }
 
 static void
 _item_disable(Elm_Toolbar_Item *it, Eina_Bool disabled)
 {
-   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(it));
 
    if (!wd) return;
    if (it->disabled == disabled) return;
    it->disabled = !!disabled;
    if (it->disabled)
      {
-        edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+        edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
         elm_widget_signal_emit(it->icon, "elm,state,disabled", "elm");
      }
    else
      {
-        edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+        edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
         elm_widget_signal_emit(it->icon, "elm,state,enabled", "elm");
      }
 }
@@ -271,14 +271,14 @@ _del_hook(Evas_Object *obj)
 static void
 _mirrored_set_item(Evas_Object *obj __UNUSED__, Elm_Toolbar_Item *it, Eina_Bool mirrored)
 {
-   edje_object_mirrored_set(it->base.view, mirrored);
+   edje_object_mirrored_set(VIEW(it), mirrored);
    elm_widget_mirrored_set(it->o_menu, mirrored);
 }
 
 static void
 _theme_hook_item(Evas_Object *obj, Elm_Toolbar_Item *it, double scale, int icon_size)
 {
-   Evas_Object *view = it->base.view;
+   Evas_Object *view = VIEW(it);
    Evas_Coord mw, mh;
    const char *style = elm_widget_style_get(obj);
 
@@ -392,7 +392,7 @@ _sizing_eval(Evas_Object *obj)
 static void
 _item_menu_create(Widget_Data *wd, Elm_Toolbar_Item *item)
 {
-   item->o_menu = elm_menu_add(item->base.view);
+   item->o_menu = elm_menu_add(VIEW(item));
    if (wd->menu_parent)
      elm_menu_parent_set(item->o_menu, wd->menu_parent);
    evas_object_event_callback_add(item->o_menu, EVAS_CALLBACK_HIDE,
@@ -438,12 +438,12 @@ _fix_items_visibility(Widget_Data *wd, Evas_Coord *iw, Evas_Coord vw)
 
    if (wd->more_item)
      {
-        evas_object_geometry_get(wd->more_item->base.view, NULL, NULL, &ciw, NULL);
+        evas_object_geometry_get(wd->VIEW(more_item), NULL, NULL, &ciw, NULL);
         *iw += ciw;
      }
    EINA_LIST_FREE(sorted, it)
      {
-        evas_object_geometry_get(it->base.view, NULL, NULL, &ciw, NULL);
+        evas_object_geometry_get(VIEW(it), NULL, NULL, &ciw, NULL);
         *iw += ciw;
         it->prio.visible = (*iw <= vw);
      }
@@ -453,7 +453,7 @@ static void
 _elm_toolbar_item_menu_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Elm_Toolbar_Item *it = data;
-   if (it->func) it->func((void *)(it->base.data), it->base.widget, it);
+   if (it->func) it->func((void *)(it->base.data), WIDGET(it), it);
 }
 
 static void
@@ -475,7 +475,7 @@ _resize_job(void *data)
 
         evas_object_resize(wd->bx, vw, h);
         _fix_items_visibility(wd, &iw, vw);
-        evas_object_geometry_get(wd->more_item->base.view, NULL, NULL, &more_w, NULL);
+        evas_object_geometry_get(wd->VIEW(more_item), NULL, NULL, &more_w, NULL);
         if (iw - more_w <= vw)
           iw -= more_w;
 
@@ -504,17 +504,17 @@ _resize_job(void *data)
                             elm_menu_item_disabled_set(item, it->disabled);
                             if (it->o_menu) elm_menu_clone(it->o_menu, menu, item);
                          }
-                       evas_object_hide(it->base.view);
+                       evas_object_hide(VIEW(it));
                     }
                   else
                     {
-                       evas_object_box_append(wd->bx, it->base.view);
-                       evas_object_show(it->base.view);
+                       evas_object_box_append(wd->bx, VIEW(it));
+                       evas_object_show(VIEW(it));
                     }
                }
 
-             evas_object_box_append(wd->bx, wd->more_item->base.view);
-             evas_object_show(wd->more_item->base.view);
+             evas_object_box_append(wd->bx, wd->VIEW(more_item));
+             evas_object_show(wd->VIEW(more_item));
           }
         else
           {
@@ -522,10 +522,10 @@ _resize_job(void *data)
               * button, of course). */
              EINA_INLIST_FOREACH(wd->items, it)
                {
-                  evas_object_show(it->base.view);
-                  evas_object_box_append(wd->bx, it->base.view);
+                  evas_object_show(VIEW(it));
+                  evas_object_box_append(wd->bx, VIEW(it));
                }
-             evas_object_hide(wd->more_item->base.view);
+             evas_object_hide(wd->VIEW(more_item));
           }
      }
    else if (wd->shrink_mode == ELM_TOOLBAR_SHRINK_HIDE)
@@ -540,11 +540,11 @@ _resize_job(void *data)
              EINA_INLIST_FOREACH(wd->items, it)
                {
                   if (!it->prio.visible)
-                    evas_object_hide(it->base.view);
+                    evas_object_hide(VIEW(it));
                   else
                     {
-                       evas_object_box_append(wd->bx, it->base.view);
-                       evas_object_show(it->base.view);
+                       evas_object_box_append(wd->bx, VIEW(it));
+                       evas_object_show(VIEW(it));
                     }
                }
           }
@@ -553,8 +553,8 @@ _resize_job(void *data)
              /* All items are visible, show them all */
              EINA_INLIST_FOREACH(wd->items, it)
                {
-                  evas_object_show(it->base.view);
-                  evas_object_box_append(wd->bx, it->base.view);
+                  evas_object_show(VIEW(it));
+                  evas_object_box_append(wd->bx, VIEW(it));
                }
           }
      }
@@ -599,7 +599,7 @@ static void
 _mouse_in(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
 {
    Elm_Toolbar_Item *it = data;
-   edje_object_signal_emit(it->base.view, "elm,state,highlighted", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,highlighted", "elm");
    elm_widget_signal_emit(it->icon, "elm,state,highlighted", "elm");
 }
 
@@ -607,7 +607,7 @@ static void
 _mouse_out(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
 {
    Elm_Toolbar_Item *it = data;
-   edje_object_signal_emit(it->base.view, "elm,state,unhighlighted", "elm");
+   edje_object_signal_emit(VIEW(it), "elm,state,unhighlighted", "elm");
    elm_widget_signal_emit(it->icon, "elm,state,unhighlighted", "elm");
 }
 
@@ -643,7 +643,7 @@ _item_new(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb f
    it->func = func;
    it->separator = EINA_FALSE;
    it->base.data = data;
-   it->base.view = edje_object_add(evas_object_evas_get(obj));
+   VIEW(it) = edje_object_add(evas_object_evas_get(obj));
    if (_item_icon_set(icon_obj, "toolbar/", icon))
      {
         it->icon = icon_obj;
@@ -656,15 +656,15 @@ _item_new(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb f
         evas_object_del(icon_obj);
      }
 
-   _elm_theme_object_set(obj, it->base.view, "toolbar", "item",
+   _elm_theme_object_set(obj, VIEW(it), "toolbar", "item",
                          elm_widget_style_get(obj));
-   edje_object_signal_callback_add(it->base.view, "elm,action,click", "elm",
+   edje_object_signal_callback_add(VIEW(it), "elm,action,click", "elm",
                                    _select, it);
-   edje_object_signal_callback_add(it->base.view, "elm,mouse,in", "elm",
+   edje_object_signal_callback_add(VIEW(it), "elm,mouse,in", "elm",
                                    _mouse_in, it);
-   edje_object_signal_callback_add(it->base.view, "elm,mouse,out", "elm",
+   edje_object_signal_callback_add(VIEW(it), "elm,mouse,out", "elm",
                                    _mouse_out, it);
-   elm_widget_sub_object_add(obj, it->base.view);
+   elm_widget_sub_object_add(obj, VIEW(it));
    if (it->icon)
      {
         int ms = 0;
@@ -672,18 +672,18 @@ _item_new(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb f
         ms = ((double)wd->icon_size * _elm_config->scale);
         evas_object_size_hint_min_set(it->icon, ms, ms);
         evas_object_size_hint_max_set(it->icon, ms, ms);
-        edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
+        edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
         evas_object_show(it->icon);
         elm_widget_sub_object_add(obj, it->icon);
      }
-   edje_object_part_text_set(it->base.view, "elm.text", it->label);
+   edje_object_part_text_set(VIEW(it), "elm.text", it->label);
    mw = mh = -1;
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw, mh);
+   edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   evas_object_size_hint_weight_set(it->base.view, -1.0, EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(it->base.view, 0.5, EVAS_HINT_FILL);
-   evas_object_size_hint_min_set(it->base.view, mw, mh);
+   evas_object_size_hint_weight_set(VIEW(it), -1.0, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(VIEW(it), 0.5, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(VIEW(it), mw, mh);
    evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_RESIZE,
                                   _resize_item, obj);
    return it;
@@ -776,8 +776,8 @@ elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, E
    if (!it) return NULL;
 
    wd->items = eina_inlist_append(wd->items, EINA_INLIST_GET(it));
-   evas_object_box_append(wd->bx, it->base.view);
-   evas_object_show(it->base.view);
+   evas_object_box_append(wd->bx, VIEW(it));
+   evas_object_show(VIEW(it));
    _sizing_eval(obj);
 
    return it;
@@ -802,7 +802,7 @@ elm_toolbar_item_state_next(Elm_Toolbar_Item *item)
    Eina_List *next_state;
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
 
-   obj = item->base.widget;
+   obj = WIDGET(item);
    wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    if (!item->states) return NULL;
@@ -821,7 +821,7 @@ elm_toolbar_item_state_prev(Elm_Toolbar_Item *item)
    Eina_List *prev_state;
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
 
-   obj = item->base.widget;
+   obj = WIDGET(item);
    wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    if (!item->states) return NULL;
@@ -848,7 +848,7 @@ elm_toolbar_item_state_set(Elm_Toolbar_Item *it, Elm_Toolbar_Item_State *state)
    Evas_Object *obj;
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE);
 
-   obj = it->base.widget;
+   obj = WIDGET(it);
    wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
    if (!it->states) return EINA_FALSE;
@@ -916,8 +916,8 @@ elm_toolbar_item_state_add(Elm_Toolbar_Item *item, const char *icon, const char
    Evas_Object *obj;
    Widget_Data *wd;
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   obj = item->base.widget;
-   wd = elm_widget_data_get(item->base.widget);
+   obj = WIDGET(item);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return NULL;
 
    if (!item->states)
@@ -1003,8 +1003,8 @@ elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label,
    if (!it) return NULL;
 
    wd->items = eina_inlist_prepend(wd->items, EINA_INLIST_GET(it));
-   evas_object_box_prepend(wd->bx, it->base.view);
-   evas_object_show(it->base.view);
+   evas_object_box_prepend(wd->bx, VIEW(it));
+   evas_object_show(VIEW(it));
    _sizing_eval(obj);
 
    return it;
@@ -1023,8 +1023,8 @@ elm_toolbar_item_insert_before(Evas_Object *obj, Elm_Toolbar_Item *before, const
 
    wd->items = eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it),
                                             EINA_INLIST_GET(before));
-   evas_object_box_insert_before(wd->bx, it->base.view, before->base.view);
-   evas_object_show(it->base.view);
+   evas_object_box_insert_before(wd->bx, VIEW(it), VIEW(before));
+   evas_object_show(VIEW(it));
    _sizing_eval(obj);
 
    return it;
@@ -1043,8 +1043,8 @@ elm_toolbar_item_insert_after(Evas_Object *obj, Elm_Toolbar_Item *after, const c
 
    wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
                                            EINA_INLIST_GET(after));
-   evas_object_box_insert_after(wd->bx, it->base.view, after->base.view);
-   evas_object_show(it->base.view);
+   evas_object_box_insert_after(wd->bx, VIEW(it), VIEW(after));
+   evas_object_show(VIEW(it));
    _sizing_eval(obj);
 
    return it;
@@ -1092,7 +1092,7 @@ EAPI Evas_Object *
 elm_toolbar_item_toolbar_get(const Elm_Toolbar_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   return item->base.widget;
+   return WIDGET(item);
 }
 
 EAPI void
@@ -1101,7 +1101,7 @@ elm_toolbar_item_priority_set(Elm_Toolbar_Item *item, int priority)
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
    if (item->prio.priority == priority) return;
    item->prio.priority = priority;
-   _resize(item->base.widget, NULL, NULL, NULL);
+   _resize(WIDGET(item), NULL, NULL, NULL);
 }
 
 EAPI int
@@ -1129,14 +1129,14 @@ static void
 _elm_toolbar_item_label_update(Elm_Toolbar_Item *item)
 {
    Evas_Coord mw = -1, mh = -1;
-   edje_object_part_text_set(item->base.view, "elm.text", item->label);
+   edje_object_part_text_set(VIEW(item), "elm.text", item->label);
 
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   edje_object_size_min_restricted_calc(item->base.view, &mw, &mh, mw, mh);
+   edje_object_size_min_restricted_calc(VIEW(item), &mw, &mh, mw, mh);
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   evas_object_size_hint_weight_set(item->base.view, -1.0, EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(item->base.view, 0.5, EVAS_HINT_FILL);
-   evas_object_size_hint_min_set(item->base.view, mw, mh);
+   evas_object_size_hint_weight_set(VIEW(item), -1.0, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(VIEW(item), 0.5, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(VIEW(item), mw, mh);
 }
 
 static void
@@ -1146,7 +1146,7 @@ _elm_toolbar_item_label_set_cb (void *data, Evas_Object *obj, const char *emissi
    _elm_toolbar_item_label_update(item);
    edje_object_signal_callback_del(obj, emission, source,
                                    _elm_toolbar_item_label_set_cb);
-   edje_object_signal_emit (item->base.view, "elm,state,label,reset", "elm");
+   edje_object_signal_emit (VIEW(item), "elm,state,label,reset", "elm");
 }
 
 static void
@@ -1157,18 +1157,18 @@ _item_label_set(Elm_Toolbar_Item *item, const char *label, const char *signal)
    if ((label) && (item->label) && (!strcmp(label, item->label))) return;
 
    eina_stringshare_replace(&item->label, label);
-   s = edje_object_data_get(item->base.view, "transition_animation_on");
+   s = edje_object_data_get(VIEW(item), "transition_animation_on");
    if ((s) && (atoi(s)))
      {
-        edje_object_part_text_set(item->base.view, "elm.text_new", item->label);
-        edje_object_signal_emit (item->base.view, signal, "elm");
-        edje_object_signal_callback_add(item->base.view,
+        edje_object_part_text_set(VIEW(item), "elm.text_new", item->label);
+        edje_object_signal_emit (VIEW(item), signal, "elm");
+        edje_object_signal_callback_add(VIEW(item),
                                         "elm,state,label_set,done", "elm",
                                         _elm_toolbar_item_label_set_cb, item);
      }
    else
      _elm_toolbar_item_label_update(item);
-   _resize(item->base.widget, NULL, NULL, NULL);
+   _resize(WIDGET(item), NULL, NULL, NULL);
 }
 
 EAPI void
@@ -1184,17 +1184,17 @@ _elm_toolbar_item_icon_update(Elm_Toolbar_Item *item)
    Elm_Toolbar_Item_State *it_state;
    Eina_List *l;
    Evas_Coord mw = -1, mh = -1;
-   Evas_Object *old_icon = edje_object_part_swallow_get(item->base.view,
+   Evas_Object *old_icon = edje_object_part_swallow_get(VIEW(item),
                                                         "elm.swallow.icon");
-   elm_widget_sub_object_del(item->base.view, old_icon);
+   elm_widget_sub_object_del(VIEW(item), old_icon);
    evas_object_hide(old_icon);
-   edje_object_part_swallow(item->base.view, "elm.swallow.icon", item->icon);
+   edje_object_part_swallow(VIEW(item), "elm.swallow.icon", item->icon);
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   edje_object_size_min_restricted_calc(item->base.view, &mw, &mh, mw, mh);
+   edje_object_size_min_restricted_calc(VIEW(item), &mw, &mh, mw, mh);
    elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-   evas_object_size_hint_weight_set(item->base.view, -1.0, EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(item->base.view, 0.5, EVAS_HINT_FILL);
-   evas_object_size_hint_min_set(item->base.view, mw, mh);
+   evas_object_size_hint_weight_set(VIEW(item), -1.0, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(VIEW(item), 0.5, EVAS_HINT_FILL);
+   evas_object_size_hint_min_set(VIEW(item), mw, mh);
 
    EINA_LIST_FOREACH(item->states, l, it_state)
       if (it_state->icon == old_icon)
@@ -1213,7 +1213,7 @@ EAPI void
 elm_toolbar_item_selected_set(Elm_Toolbar_Item *item, Eina_Bool selected)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    if (item->selected == selected) return;
@@ -1237,11 +1237,11 @@ static void
 _elm_toolbar_item_icon_set_cb (void *data, Evas_Object *obj, const char *emission, const char *source)
 {
    Elm_Toolbar_Item *item = data;
-   edje_object_part_unswallow(item->base.view, item->icon);
+   edje_object_part_unswallow(VIEW(item), item->icon);
    _elm_toolbar_item_icon_update(item);
    edje_object_signal_callback_del(obj, emission, source,
                                    _elm_toolbar_item_icon_set_cb);
-   edje_object_signal_emit (item->base.view, "elm,state,icon,reset", "elm");
+   edje_object_signal_emit (VIEW(item), "elm,state,icon,reset", "elm");
 }
 
 static void
@@ -1267,20 +1267,20 @@ _elm_toolbar_item_icon_obj_set(Evas_Object *obj, Elm_Toolbar_Item *item, Evas_Ob
         evas_object_show(item->icon);
         elm_widget_sub_object_add(obj, item->icon);
      }
-   s = edje_object_data_get(item->base.view, "transition_animation_on");
+   s = edje_object_data_get(VIEW(item), "transition_animation_on");
    if ((s) && (atoi(s)))
      {
-        old_icon = edje_object_part_swallow_get(item->base.view,
+        old_icon = edje_object_part_swallow_get(VIEW(item),
                                                 "elm.swallow.icon_new");
         if (old_icon)
           {
-             elm_widget_sub_object_del(item->base.view, old_icon);
+             elm_widget_sub_object_del(VIEW(item), old_icon);
              evas_object_hide(old_icon);
           }
-        edje_object_part_swallow(item->base.view, "elm.swallow.icon_new",
+        edje_object_part_swallow(VIEW(item), "elm.swallow.icon_new",
                                  item->icon);
-        edje_object_signal_emit (item->base.view, signal, "elm");
-        edje_object_signal_callback_add(item->base.view,
+        edje_object_signal_emit (VIEW(item), signal, "elm");
+        edje_object_signal_callback_add(VIEW(item),
                                         "elm,state,icon_set,done", "elm",
                                         _elm_toolbar_item_icon_set_cb, item);
      }
@@ -1321,9 +1321,9 @@ elm_toolbar_item_del(Elm_Toolbar_Item *item)
    Evas_Object *obj2;
 
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   wd = elm_widget_data_get(item->base.widget);
+   wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
-   obj2 = item->base.widget;
+   obj2 = WIDGET(item);
    wd->items = eina_inlist_remove(wd->items, EINA_INLIST_GET(item));
    _item_del(item);
    _theme_hook(obj2);
@@ -1348,7 +1348,7 @@ elm_toolbar_item_disabled_set(Elm_Toolbar_Item *item, Eina_Bool disabled)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
    _item_disable(item, disabled);
-   _resize(item->base.widget, NULL, NULL, NULL);
+   _resize(WIDGET(item), NULL, NULL, NULL);
 }
 
 EAPI void
@@ -1500,7 +1500,7 @@ EAPI void
 elm_toolbar_item_menu_set(Elm_Toolbar_Item *item, Eina_Bool menu)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return;
 
    if (item->menu == menu) return;
@@ -1597,7 +1597,7 @@ EAPI Evas_Object *
 elm_toolbar_item_menu_get(Elm_Toolbar_Item *item)
 {
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, NULL);
-   Widget_Data *wd = elm_widget_data_get(item->base.widget);
+   Widget_Data *wd = elm_widget_data_get(WIDGET(item));
    if (!wd) return NULL;
    /* FIXME: It's not ok. This function needs to be reviewed. And should
     * receive a const item */
index ab5a806..f3af342 100644 (file)
@@ -206,6 +206,9 @@ struct _Elm_Widget_Item
 #define ELM_WIDGET_ITEM_MAGIC 0xef1e1301
    EINA_MAGIC;
 
+/* simple accessor macros */
+#define VIEW(X) X->base.view
+#define WIDGET(X) X->base.widget
    Evas_Object   *widget; /**< the owner widget that owns this item */
    Evas_Object   *view; /**< the base view object */
    const void    *data; /**< item specific data */