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
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)
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,
* 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",
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");
}
}
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
{
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
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
{
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
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);
if (wd->visible)
{
_scroller_size_reset(wd);
- _sizing_eval(item->base.widget);
+ _sizing_eval(WIDGET(item));
}
}
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);
if (wd->visible)
{
_scroller_size_reset(wd);
- _sizing_eval(item->base.widget);
+ _sizing_eval(WIDGET(item));
}
}
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
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");
}
}
_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)
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);
wd->items = NULL;
if (wd->visible)
- _sizing_eval(item->base.widget);
+ _sizing_eval(WIDGET(item));
free(item);
}
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;
}
_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);
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);
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);
}
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);
}
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);
!strcmp(part, "elm.swallow.next_btn"))
{
WRN("You can not unset the content! : naviframe=%p",
- navi_it->base.widget);
+ WIDGET(navi_it));
return NULL;
}
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);
{
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
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
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
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);
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
{
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
{
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
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;
}
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,
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);
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);
}
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)
{
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);
}
{
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);
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)
{
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,
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,
//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");
}
//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");
}
//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");
}
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);
}
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);
_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");
}
{
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");
}
{
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;
_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
{
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
{
#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);
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);
}
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);
}
if (it)
{
eina_stringshare_del(it->label);
- evas_object_del(wd->first->base.view);
+ evas_object_del(VIEW(wd->first));
free(it);
}
}
if (it)
{
eina_stringshare_del(it->label);
- evas_object_del(wd->first->base.view);
+ evas_object_del(VIEW(wd->first));
free(it);
}
}
{
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",
_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
{
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;
// 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");
}
// 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)
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");
}
}
if (!it) return;
Widget_Data *wd;
- wd = elm_widget_data_get(it->base.widget);
+ wd = elm_widget_data_get(WIDGET(it));
if (!wd) return;
_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
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;
}
_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);
}
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);
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);
{
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);
}
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);
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);
{
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);
}
_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
{
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)
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);
{
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
{
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
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
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);
}
}
}
{
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 *
{
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))
}
if (!wd->idler)
- ecore_idler_add(_move_scroller, it->base.widget);
+ ecore_idler_add(_move_scroller, WIDGET(it));
}
EAPI Eina_Bool
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);
}
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);
}
Widget_Data *wd;
Eina_List *l;
- wd = elm_widget_data_get(item->base.widget);
+ wd = elm_widget_data_get(WIDGET(item));
if (!wd)
return;
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);
}
Widget_Data *wd;
- wd = elm_widget_data_get(item->base.widget);
+ wd = elm_widget_data_get(WIDGET(item));
if (!wd)
return;
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;
if ((!item) || (!label))
return;
- wd = elm_widget_data_get(item->base.widget);
+ wd = elm_widget_data_get(WIDGET(item));
if ((!wd) || (!wd->items))
return;
if (wd->current == l)
{
- _update_view(item->base.widget);
+ _update_view(WIDGET(item));
_sizing_eval(wd->self);
}
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;
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;
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);
}
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;
}
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)
{
_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;
}
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)
{
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)
{
((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);
}
}
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)
{
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);
}
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)
{
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,
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)
{
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);
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;
}
}
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;
}
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
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);
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))
_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)
{
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
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");
}
}
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,
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;
{
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 *
{
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 *
if (!item->mouse_cursor)
return;
- if (item->base.view)
+ if (VIEW(item))
elm_widget_item_cursor_unset(item);
eina_stringshare_del(item->mouse_cursor);
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
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"))
{
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;
}
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);
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));
{
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)
{
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);
}
}
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))
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);
}
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);
}
}
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;
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);
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;
}
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
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);
}
}
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)
{
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);
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)
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
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
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
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);
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));
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);
_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
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)
{
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);
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)
{
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));
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) &&
{
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,
}
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,
}
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,
{
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,
}
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,
}
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,
}
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);
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);
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)
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)
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
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);
}
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);
}
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))
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) ||
_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));
}
}
}
{
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)
{
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;
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)
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,
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);
}
_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));
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;
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));
// 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
// 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 *
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);
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 *
{
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;
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;
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);
}
}
{
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");
}
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);
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);
}
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
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
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,
if (!item->mouse_cursor)
return;
- if (item->base.view)
+ if (VIEW(item))
elm_widget_item_cursor_unset(item);
eina_stringshare_del(item->mouse_cursor);
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);
{
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;
}
}
{
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;
}
}
{
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;
}
}
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)
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));
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)
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);
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);
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);
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
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;
}
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;
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)
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);
_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);
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
}
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);
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;
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);
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;
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;
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;
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);
_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);
_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;
_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;
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;
_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;
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;
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;
_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;
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);
/* 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;
}
{
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))
{
// 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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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)
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)
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;
}
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;
}
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 *
}
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;
}
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 *
{
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 *
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
{
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);
}
}
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);
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
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
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
}
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);
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
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);
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 *
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
_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);
}
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 *
(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
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
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);
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);
}
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
}
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);
}
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);
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);
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
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;
}
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,
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
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
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
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
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;
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++;
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;
}
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 *
//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;
}
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
{
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
- return it->base.view;
+ return VIEW(it);
}
EAPI Elm_Segment_Item*
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));
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);
_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);
{
_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 =
{
_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 =
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;
}
}
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);
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
_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");
_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");
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)
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)
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);
}
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 *
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);
}
{
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");
}
_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;
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);
}
{
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);
}
{
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");
}
}
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);
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,
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);
}
_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
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;
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
{
* 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)
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));
}
}
}
/* 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));
}
}
}
_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");
}
_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");
}
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;
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;
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;
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;
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;
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;
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;
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)
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;
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;
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;
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
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
_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
_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
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
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)
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;
_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
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);
}
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);
{
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
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;
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 */
#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 */