Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_part_set(o, ELM_BUBBLE_CONTENT_ICON, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_part_set(o, ELM_BUBBLE_CONTENT_ICON, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_set(o, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_set(o, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_set(o, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
Evas_Object *o2 = elm_icon_add(win);
elm_icon_standard_set(o2, "home");
-elm_object_content_set(o, o2);
+elm_object_content_part_set(o, "icon", o2);
evas_object_show(o2);
#include "widget_preview_tmpl_foot.c"
evas_object_size_hint_weight_set(bt, 1.0, 1.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
evas_object_show(bt);
-elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
+elm_object_content_part_set(panes, "left", bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Right");
evas_object_size_hint_weight_set(bt, 1.0, 1.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
evas_object_show(bt);
-elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, bt);
+elm_object_content_part_set(panes, "right", bt);
#include "widget_preview_tmpl_foot.c"
pb = elm_progressbar_add(win);
elm_object_text_set(pb, "Label");
elm_progressbar_span_size_set(pb, 100);
-elm_object_content_set(pb, ic);
+elm_object_content_part_set(pb, "icon", ic);
elm_progressbar_unit_format_set(pb, "%1.1f units");
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), t->icon);
elm_icon_file_set(ic, buf, NULL);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_show(ic);
}
elm_box_pack_end(tbx2, bt);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 3");
elm_object_text_part_set(bb, "info", "10:32 4/11/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 2");
elm_object_text_part_set(bb, "info", "7:16 27/10/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 1");
elm_object_text_part_set(bb, "info", "20:47 18/6/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
parent = elm_object_parent_widget_get(o_bg);
over = edje_object_add(evas_object_evas_get(parent));
edje_object_file_set(over, buff, "bg_overlay");
- elm_object_content_set(o_bg, over);
+ elm_object_content_part_set(o_bg, "overlay", over);
}
else
- elm_object_content_set(o_bg, NULL);
+ elm_object_content_part_set(o_bg, "overlay", NULL);
}
static void
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 1");
elm_object_text_part_set(bb, "info", "Corner: bottom_right");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
elm_bubble_corner_set(bb, "bottom_right");
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Icon sized to button");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)1);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)1);
elm_box_pack_end(bx, bt);
elm_icon_scale_set(ic, 0, 0);
bt = elm_button_add(win);
elm_object_text_set(bt, "Icon no scale");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)2);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)2);
elm_box_pack_end(bx, bt);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Disabled Button");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_disabled_set(bt, 1);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)3);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)3);
elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(win);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_disabled_set(bt, 1);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)4);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)4);
elm_icon_file_set(ic, buf, NULL);
elm_icon_scale_set(ic, 0, 0);
bt = elm_button_add(win);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)6);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)6);
elm_box_pack_end(bx, bt);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(win);
elm_object_style_set(bt, "anchor");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)8);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)8);
elm_box_pack_end(bx, bt);
bt = elm_button_add(win);
elm_object_access_info_set(bt, "This is some custom text describing this widget");
elm_object_style_set(bt, "anchor");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_disabled_set(bt, 1);
evas_object_smart_callback_add(bt, "clicked", _bt_clicked, (void *)9);
evas_object_smart_callback_add(bt, "unpressed", _bt_unpressed, (void *)9);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
elm_object_text_set(ck, "Icon sized to check");
- elm_object_content_set(ck, ic);
+ elm_object_content_part_set(ck, "icon", ic);
elm_check_state_set(ck, 1);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
elm_icon_scale_set(ic, 0, 0);
ck = elm_check_add(win);
elm_object_text_set(ck, "Icon no scale");
- elm_object_content_set(ck, ic);
+ elm_object_content_part_set(ck, "icon", ic);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
evas_object_show(ic);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
elm_object_text_set(ck, "Disabled check");
- elm_object_content_set(ck, ic);
+ elm_object_content_part_set(ck, "icon", ic);
elm_check_state_set(ck, 1);
elm_box_pack_end(bx, ck);
elm_object_disabled_set(ck, 1);
elm_icon_file_set(ic, buf, NULL);
elm_icon_scale_set(ic, 0, 0);
ck = elm_check_add(win);
- elm_object_content_set(ck, ic);
+ elm_object_content_part_set(ck, "icon", ic);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
evas_object_show(ic);
evas_object_show(icon);
Evas_Object *o = elm_button_add(obj);
- elm_object_content_set(o, icon);
+ elm_object_content_part_set(o, "icon", icon);
evas_object_show(o);
elm_box_pack_end(bx, o);
}
bt = elm_button_add(nf);
evas_object_smart_callback_add(bt, "clicked", _page5, nf);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
content = _content_new(nf, img4);
elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_object_item_content_part_set(it, ELM_NAVIFRAME_ITEM_CONTENT_ICON, ic);
+ elm_object_item_content_part_set(it, "icon", ic);
elm_naviframe_item_title_visible_set(it, EINA_FALSE);
evas_object_smart_callback_add(content, "clicked", _title_visible, it);
}
elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_object_item_content_part_set(it, ELM_NAVIFRAME_ITEM_CONTENT_ICON, ic);
+ elm_object_item_content_part_set(it, "icon", ic);
}
void
elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
content = _content_new(nf, img2);
it = elm_naviframe_item_push(nf, "Page 2", NULL, bt, content, NULL);
- elm_object_item_text_part_set(it, ELM_NAVIFRAME_ITEM_TEXT_SUBTITLE,
- "Here is sub-title part!");
+ elm_object_item_text_part_set(it, "subtitle", "Here is sub-title part!");
}
void
evas_object_size_hint_weight_set(bt, 1.0, 1.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
evas_object_show(bt);
- elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
+ elm_object_content_part_set(panes, "left", bt);
//
//
evas_object_smart_callback_add(panes_h, "press", _press, panes_h);
evas_object_smart_callback_add(panes_h, "unpress", _unpress, panes_h);
- elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, panes_h);
+ elm_object_content_part_set(panes, "right", panes_h);
//
//
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bt);
- elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_LEFT, bt);
+ elm_object_content_part_set(panes_h, "left", bt);
//
//
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bt);
- elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_RIGHT, bt);
+ elm_object_content_part_set(panes_h, "right", bt);
//
pb = elm_progressbar_add(win);
elm_object_text_set(pb, "Label");
- elm_object_content_set(pb, ic1);
+ elm_object_content_part_set(pb, "icon", ic1);
elm_progressbar_inverted_set(pb, 1);
elm_progressbar_unit_format_set(pb, "%1.1f units");
elm_progressbar_span_size_set(pb, 200);
pb = elm_progressbar_add(win);
elm_progressbar_horizontal_set(pb, EINA_FALSE);
elm_object_text_set(pb, "Label");
- elm_object_content_set(pb, ic2);
+ elm_object_content_part_set(pb, "icon", ic2);
elm_progressbar_inverted_set(pb, 1);
elm_progressbar_unit_format_set(pb, "%1.2f%%");
elm_progressbar_span_size_set(pb, 200);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
elm_object_text_set(rd, "Icon sized to radio");
- elm_object_content_set(rd, ic);
+ elm_object_content_part_set(rd, "icon", ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
evas_object_show(ic);
elm_radio_state_value_set(rd, 1);
elm_radio_group_add(rd, rdg);
elm_object_text_set(rd, "Icon no scale");
- elm_object_content_set(rd, ic);
+ elm_object_content_part_set(rd, "icon", ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
evas_object_show(ic);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 4);
elm_radio_group_add(rd, rdg);
- elm_object_content_set(rd, ic);
+ elm_object_content_part_set(rd, "icon", ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
evas_object_show(ic);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 5);
elm_radio_group_add(rd, rdg);
- elm_object_content_set(rd, ic);
+ elm_object_content_part_set(rd, "icon", ic);
elm_object_disabled_set(rd, 1);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
sl = elm_slider_add(win);
sl1 = sl;
elm_object_text_set(sl, "Horizontal");
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
+ elm_object_content_part_set(sl, "icon", ic);
elm_slider_unit_format_set(sl, "%1.1f units");
elm_slider_span_size_set(sl, 120);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Disabled");
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
+ elm_object_content_part_set(sl, "icon", ic);
elm_slider_unit_format_set(sl, "%1.1f units");
elm_slider_span_size_set(sl, 120);
elm_slider_min_max_set(sl, 50, 150);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Horizontal inverted");
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_END, ic);
+ elm_object_content_part_set(sl, "end", ic);
elm_slider_span_size_set(sl, 80);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Disabled inverted");
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_END, ic);
+ elm_object_content_part_set(sl, "end", ic);
elm_slider_span_size_set(sl, 80);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
sl = elm_slider_add(win);
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
+ elm_object_content_part_set(sl, "icon", ic);
elm_object_text_set(sl, "Vertical inverted");
elm_slider_inverted_set(sl, EINA_TRUE);
elm_slider_unit_format_set(sl, "units");
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
sl = elm_slider_add(win);
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
+ elm_object_content_part_set(sl, "icon", ic);
elm_object_text_set(sl, "Disabled vertical");
elm_slider_inverted_set(sl, EINA_TRUE);
elm_slider_unit_format_set(sl, "units");
evas_object_size_hint_weight_set(tg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(tg, EVAS_HINT_FILL, 0.5);
elm_object_text_set(tg, "Icon sized to toggle");
- elm_object_content_set(tg, ic);
+ elm_object_content_part_set(tg, "icon", ic);
elm_check_state_set(tg, 1);
elm_object_text_part_set(tg, "on", "Yes");
elm_object_text_part_set(tg, "off", "No");
tg = elm_check_add(win);
elm_object_style_set(tg, "toggle");
elm_object_text_set(tg, "Icon no scale");
- elm_object_content_set(tg, ic);
+ elm_object_content_part_set(tg, "icon", ic);
elm_box_pack_end(bx, tg);
evas_object_show(tg);
evas_object_show(ic);
tg = elm_check_add(win);
elm_object_style_set(tg, "toggle");
elm_object_text_set(tg, "Icon no scale");
- elm_object_content_set(tg, ic);
+ elm_object_content_part_set(tg, "icon", ic);
elm_object_disabled_set(tg, 1);
elm_box_pack_end(bx, tg);
evas_object_show(tg);
tg = elm_check_add(win);
elm_object_style_set(tg, "toggle");
- elm_object_content_set(tg, ic);
+ elm_object_content_part_set(tg, "icon", ic);
elm_box_pack_end(bx, tg);
evas_object_show(tg);
evas_object_show(ic);
bt = elm_button_add(win);
elm_object_text_set(bt, "ImageAnimation Effect");
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
evas_object_show(ic);
evas_object_size_hint_max_set(ic, 50, 50);
bt = elm_button_add(win);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_text_set(bt, "Before Button - Blend Effect");
evas_object_move(bt, 25, 125);
evas_object_resize(bt, 250, 50);
evas_object_size_hint_max_set(ic, 50, 50);
bt2 = elm_button_add(win);
- elm_object_content_set(bt2, ic);
+ elm_object_content_part_set(bt2, "icon", ic);
elm_object_text_set(bt2, "After Button - Blend Effect");
evas_object_move(bt2, 25, 125);
evas_object_resize(bt2, 250, 50);
evas_object_size_hint_max_set(ic, 50, 50);
bt = elm_button_add(win);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_text_set(bt, "Before Button - Fade Effect");
evas_object_move(bt, 25, 125);
evas_object_resize(bt, 250, 50);
evas_object_size_hint_max_set(ic, 50, 50);
bt2 = elm_button_add(win);
- elm_object_content_set(bt2, ic);
+ elm_object_content_part_set(bt2, "icon", ic);
elm_object_text_set(bt2, "After Button - Fade Effect");
evas_object_move(bt2, 25, 125);
evas_object_resize(bt2, 250, 50);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 3");
elm_object_text_part_set(bb, "info", "10:32 4/11/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 2");
elm_object_text_part_set(bb, "info", "7:16 27/10/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
bb = elm_bubble_add(win);
elm_object_text_set(bb, "Message 1");
elm_object_text_part_set(bb, "info", "20:47 18/6/2008");
- elm_object_content_part_set(bb, ELM_BUBBLE_CONTENT_ICON, ic);
+ elm_object_content_part_set(bb, "icon", ic);
evas_object_show(ic);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
if (p->label) elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_part_set(obj, ELM_BUBBLE_CONTENT_ICON, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->info) elm_object_text_part_set(obj, "info", p->info);
if (p->content) elm_object_content_set(obj, p->content);
}
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_part_set(obj, ELM_BUBBLE_CONTENT_ICON,
- icon);
- return EINA_TRUE;
+ elm_object_content_part_set(obj, "icon", icon);
+ return EINA_TRUE;
}
}
else if (!strcmp(param->name, "info"))
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_set(obj, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
}
static Eina_Bool
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_set(obj, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->state_exists)
elm_check_state_set(obj, p->state);
}
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
else return;
if (p->content_left)
- elm_object_content_part_set(obj, ELM_PANES_CONTENT_LEFT, p->content_left);
+ elm_object_content_part_set(obj, "left", p->content_left);
if (p->content_right)
- elm_object_content_part_set(obj, ELM_PANES_CONTENT_RIGHT, p->content_right);
+ elm_object_content_part_set(obj, "right", p->content_right);
if (p->is_left_size)
elm_panes_content_left_size_set(obj, p->left_size);
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
return EINA_FALSE;
- elm_object_content_part_set(obj, ELM_PANES_CONTENT_LEFT, content);
+ elm_object_content_part_set(obj, "left", content);
return EINA_TRUE;
}
else if ((!strcmp(param->name, "content right"))
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
return EINA_FALSE;
- elm_object_content_part_set(obj, ELM_PANES_CONTENT_RIGHT, content);
+ elm_object_content_part_set(obj, "right", content);
return EINA_TRUE;
}
else if ((!strcmp(param->name, "horizontal"))
const char *content)
{
if (!strcmp(content, "left"))
- return elm_object_content_part_get(obj, ELM_PANES_CONTENT_LEFT);
+ return elm_object_content_part_get(obj, "left");
else if (!strcmp(content, "right"))
- return elm_object_content_part_get(obj, ELM_PANES_CONTENT_RIGHT);
+ return elm_object_content_part_get(obj, "right");
ERR("unknown content '%s'", content);
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_set(obj, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->span_exists)
elm_progressbar_span_size_set(obj, p->span);
if (p->value_exists)
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_set(obj, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->value_exists)
elm_radio_state_value_set(obj, p->value);
if (p->group_name)
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_part_set(obj, ELM_SLIDER_CONTENT_ICON, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->span_exists)
elm_slider_span_size_set(obj, p->span);
if ((p->min_exists) && (p->max_exists))
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_part_set(obj, ELM_SLIDER_CONTENT_ICON, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
if (p->label)
elm_object_text_set(obj, p->label);
if (p->icon)
- elm_object_content_set(obj, p->icon);
+ elm_object_content_part_set(obj, "icon", p->icon);
if (p->on)
elm_object_text_part_set(obj, "on", p->on);
{
Evas_Object *icon = external_common_param_icon_get(obj, param);
if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
return EINA_TRUE;
}
}
parent = elm_object_parent_widget_get(o_bg);
over = edje_object_add(evas_object_evas_get(parent));
edje_object_file_set(over, buff, "bg_overlay");
- elm_object_content_set(o_bg, over);
+ elm_object_content_part_set(o_bg, "overlay", over);
}
else
- elm_object_content_set(o_bg, NULL);
+ elm_object_content_part_set(o_bg, "overlay", NULL);
}
static void
evas_object_show(icon);
bubble = elm_bubble_add(win);
- elm_object_content_part_set(bubble, ELM_BUBBLE_CONTENT_ICON, icon);
+ elm_object_content_part_set(bubble, "icon", icon);
elm_bubble_info_set(bubble, "INFO");
elm_object_text_set(bubble, "LABEL");
elm_bubble_content_set(bubble, label);
_btn_cursors_release_cb(void *data, Evas_Object *btn __UNUSED__, void *ev __UNUSED__)
{
App_Data *app = data;
- elm_object_content_set(app->mid, app->icon_still);
+ elm_object_content_part_set(app->mid, "icon", app->icon_still);
app->icon_still = NULL;
}
app->icon_still = elm_object_content_unset(app->mid);
icon = elm_icon_add(app->mid);
elm_icon_standard_set(icon, "chat");
- elm_object_content_set(app->mid, icon);
+ elm_object_content_part_set(app->mid, "icon", icon);
}
evas_object_size_hint_align_get(app->mid, &ax, &ay);
icon = elm_icon_add(win);
elm_icon_standard_set(icon, "arrow_up");
- elm_object_content_set(btn, icon);
+ elm_object_content_part_set(btn, "icon", icon);
data.cursors.up = btn;
icon = elm_icon_add(win);
elm_icon_standard_set(icon, "arrow_left");
- elm_object_content_set(btn, icon);
+ elm_object_content_part_set(btn, "icon", icon);
data.cursors.left = btn;
icon = elm_icon_add(win);
elm_icon_standard_set(icon, "close");
- elm_object_content_set(btn, icon);
+ elm_object_content_part_set(btn, "icon", icon);
data.mid = btn;
icon = elm_icon_add(win);
elm_icon_standard_set(icon, "arrow_right");
- elm_object_content_set(btn, icon);
+ elm_object_content_part_set(btn, "icon", icon);
data.cursors.right = btn;
icon = elm_icon_add(win);
elm_icon_standard_set(icon, "arrow_down");
- elm_object_content_set(btn, icon);
+ elm_object_content_part_set(btn, "icon", icon);
data.cursors.down = btn;
cb2 = elm_check_add(win);
elm_object_text_set(cb2, "another checkbox");
elm_check_state_set(cb2, EINA_TRUE);
- elm_object_content_set(cb2, icon);
+ elm_object_content_part_set(cb2, "icon", icon);
evas_object_move(cb2, 10, 50);
evas_object_resize(cb2, 200, 30);
evas_object_show(cb2);
icon = elm_layout_add(win);
elm_layout_theme_set(icon, "entry", "emoticon/haha", "default");
- elm_object_content_set(o, icon);
+ elm_object_content_part_set(o, "icon", icon);
evas_object_smart_callback_add(o, "clicked", _image_insert_cb, &app);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bt);
- elm_object_content_part_set(panes, ELM_PANES_CONTENT_LEFT, bt);
+ elm_object_content_part_set(panes, "left", bt);
panes_h = elm_panes_add(win);
elm_panes_horizontal_set(panes_h, EINA_TRUE);
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(panes_h);
- elm_object_content_part_set(panes, ELM_PANES_CONTENT_RIGHT, panes_h);
+ elm_object_content_part_set(panes, "right", panes_h);
bt = elm_button_add(win);
elm_object_text_set(bt, "Up");
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bt);
- elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_LEFT, bt);
+ elm_object_content_part_set(panes_h, "left", bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Down");
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bt);
- elm_object_content_part_set(panes_h, ELM_PANES_CONTENT_RIGHT, bt);
+ elm_object_content_part_set(panes_h, "right", bt);
evas_object_smart_callback_add(panes, "clicked", _clicked, panes);
evas_object_smart_callback_add(panes, "clicked,double", _clicked_double,
/* pb with label, icon, custom unit label and span size set */
pb = elm_progressbar_add(win);
elm_object_text_set(pb, "Label");
- elm_object_content_set(pb, ic1);
+ elm_object_content_part_set(pb, "icon", ic1);
elm_progressbar_inverted_set(pb, EINA_TRUE);
elm_progressbar_unit_format_set(pb, "%1.1f units");
elm_progressbar_span_size_set(pb, 200);
pb = elm_progressbar_add(win);
elm_progressbar_horizontal_set(pb, EINA_FALSE);
elm_object_text_set(pb, "Label");
- elm_object_content_set(pb, ic2);
+ elm_object_content_part_set(pb, "icon", ic2);
elm_progressbar_inverted_set(pb, EINA_TRUE);
elm_progressbar_unit_format_set(pb, "%1.2f%%");
elm_progressbar_span_size_set(pb, 200);
elm_radio_value_pointer_set(radio, &val);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "home");
- elm_object_content_set(radio, ic);
+ elm_object_content_part_set(radio, "icon", ic);
elm_box_pack_end(bx, radio);
evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_radio_group_add(radio, group);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "file");
- elm_object_content_set(radio, ic);
+ elm_object_content_part_set(radio, "icon", ic);
elm_box_pack_end(bx, radio);
evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "home");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
+ elm_object_content_part_set(sl, "icon", ic);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "folder");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
- elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_END, ic);
+ elm_object_content_part_set(sl, "end", ic);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
{
/* hide the object clipping it from the left to the right */
elm_transit_effect_wipe_add(trans,
- ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE,
- ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT);
+ ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE,
+ ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT);
}
static void
int i;
struct Context *ctxt = data;
Evas_Object *obj = ctxt->obj; // the object on which the transition will be
- // applied
+ // applied
// FIXME: Should check if there's another transit going before starting a new
// one
* checked and use its callback to add this transition to trans */
for (i = 0; _transitions[i].label; i++)
{
- if (_transitions[i].checked)
- _transitions[i].transition_add_cb(trans);
+ if (_transitions[i].checked)
+ _transitions[i].transition_add_cb(trans);
}
/* get the various options for this transition from the context structure */
icon = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/icon_07.png", PACKAGE_DATA_DIR);
elm_icon_file_set(icon, buf, NULL);
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
evas_object_move(obj, 160, 60);
evas_object_resize(obj, 250, 100);
evas_object_show(obj);
* array */
for (i = 0; _transitions[i].label; i++)
_checkbox_transition_add(vbox, _transitions[i].label,
- &_transitions[i].checked);
+ &_transitions[i].checked);
elm_box_pack_end(hbox, vbox);
evas_object_show(vbox);
icon = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/icon_07.png", PACKAGE_DATA_DIR);
elm_icon_file_set(icon, buf, NULL);
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
evas_object_move(obj, 160, 60);
evas_object_resize(obj, 250, 100);
evas_object_show(obj);
icon = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/icon_08.png", PACKAGE_DATA_DIR);
elm_icon_file_set(icon, buf, NULL);
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
evas_object_move(obj, 160, 60);
evas_object_resize(obj, 250, 100);
ic = elm_icon_add(ad->win);
elm_icon_standard_set(ic, "arrow_up");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _search_prev_cb, ad);
ic = elm_icon_add(ad->win);
elm_icon_standard_set(ic, "arrow_down");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _search_next_cb, ad);
ic = elm_icon_add(ad->win);
elm_icon_standard_set(ic, "close");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _search_close_cb, ad);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "arrow_left");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _nav_back_cb, ad);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "refresh");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _nav_refresh_cb, ad);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "arrow_right");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _nav_fwd_cb, ad);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "file");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
evas_object_smart_callback_add(btn, "clicked", _add_tab_cb, ad);
ic = elm_icon_add(win);
elm_icon_standard_set(ic, "close");
- elm_object_content_set(btn, ic);
+ elm_object_content_part_set(btn, "icon", ic);
pager = elm_pager_add(win);
evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
* centered, scaled or stretched.
*
* Default contents parts of the bg widget that you can use for are:
- * @li "elm.swallow.content" - overlay of the bg
+ * @li "overlay" - overlay of the bg
*
* Here is some sample code using it:
* @li @ref bg_01_example_page
* deleted, even if you set the new one to NULL. If you want to keep that
* old content object, use the elm_bg_overlay_unset() function.
*
- * @deprecated use elm_object_content_set() instead
+ * @deprecated use elm_object_content_part_set() instead
*
* @ingroup Bg
*/
*
* Return the content object which is set for this widget
*
- * @deprecated use elm_object_content_get() instead
+ * @deprecated use elm_object_content_part_get() instead
*
* @ingroup Bg
*/
*
* Unparent and return the overlay object which was set for this widget
*
- * @deprecated use elm_object_content_unset() instead
+ * @deprecated use elm_object_content_part_unset() instead
*
* @ingroup Bg
*/
* @li hoversel_vertical_entry: Another internal for @ref Hoversel.
*
* Default contents parts of the button widget that you can use for are:
- * @li "elm.swallow.content" - A icon of the button
+ * @li "icon" - A icon of the button
*
* Default text parts of the button widget that you can use for are:
- * @li "elm.text" - Label of the button
+ * @li "default" - Label of the button
*
* Follow through a complete example @ref button_example_01 "here".
* @{
*
* @param obj The button object
* @param icon The icon object for the button
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*/
EINA_DEPRECATED EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
* @param obj The button object
* @return The icon object that is being used
*
- * @deprecated use elm_button_icon_unset() instead
+ * @deprecated use elm_object_content_part_get() instead
*/
EINA_DEPRECATED EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
*
* @param obj The button object
* @return The icon object that was being used
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*/
EINA_DEPRECATED EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @note When Elementary is in desktop mode the thumbscroll(a.k.a.
* fingerscroll) won't work.
*
- * To set/get/unset the content of the panel, you can use
- * elm_object_content_set/get/unset APIs.
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_object_content_unset() function
+ * Default contents parts of the scroller widget that you can use for are:
+ * @li "default" - A content of the scroller
*
* In @ref tutorial_scroller you'll find an example of how to use most of
* this API.
* Of all this styles only default shows the title. Frame emits no signals.
*
* Default contents parts of the frame widget that you can use for are:
- * @li "elm.swallow.content" - A content of the frame
+ * @li "default" - A content of the frame
*
* Default text parts of the frame widget that you can use for are:
* @li "elm.text" - Label of the frame
* @li "block,clicked" - when a click outside of the notify happens
*
* Default contents parts of the notify widget that you can use for are:
- * @li "elm.swallow.content" - A content of the notify
+ * @li "default" - A content of the notify
*
* @ref tutorial_notify show usage of the API.
*
* Signals that you can add callbacks for are:
* @li "clicked" - This is called when a user has clicked the bubble.
*
- * For an example of using a buble see @ref bubble_01_example_page "this".
+ * Default contents parts of the bubble that you can use for are:
+ * @li "default" - A content of the bubble
+ * @li "icon" - An icon of the bubble
+ *
+ * Default text parts of the button widget that you can use for are:
+ * @li NULL - Label of the bubble
+ *
+ * For an example of using a buble see @ref bubble_01_example_page "this".
*
* @{
*/
-#define ELM_BUBBLE_CONTENT_ICON "elm.swallow.icon"
-
/**
* Add a new bubble to the parent
*
* - @c "default"
*
* Default contents parts of the slider widget that you can use for are:
- * @li "elm.swallow.icon" - A icon of the slider
- * @li "elm.swallow.end" - A end part content of the slider
+ * @li "icon" - A icon of the slider
+ * @li "end" - A end part content of the slider
*
+ * Default text parts of the silder widget that you can use for are:
+ * @li "default" - Label of the silder
* Here is an example on its usage:
* @li @ref slider_example
*/
-#define ELM_SLIDER_CONTENT_ICON "elm.swallow.icon"
-#define ELM_SLIDER_CONTENT_END "elm.swallow.end"
-
/**
* @addtogroup Slider
* @{
* it won't get properly displayed.
*
* @ingroup Slider
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*/
EINA_DEPRECATED EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
*
* @see elm_slider_icon_set() for more details
* @see elm_slider_icon_get()
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*
* @ingroup Slider
*/
* @see elm_slider_icon_set() for more details
* @see elm_slider_icon_unset()
*
- * @deprecated use elm_object_content_get() instead.
+ * @deprecated use elm_object_content_part_get() instead.
*
* @ingroup Slider
*/
* @warning If the object being set does not have minimum size hints set,
* it won't get properly displayed.
*
- * @deprecated use elm_object_content_part_set(obj, "elm.swallow.end", end) instead.
+ * @deprecated use elm_object_content_part_set() instead.
*
* @ingroup Slider
*/
* @see elm_slider_end_set() for more details.
* @see elm_slider_end_get()
*
- * @deprecated use elm_object_content_part_unset(obj, "elm.swallow.end")
+ * @deprecated use elm_object_content_part_unset() instead
* instead.
*
* @ingroup Slider
* @see elm_slider_end_unset()
*
*
- * @deprecated use elm_object_content_part_unset(obj, "elm.swallow.end")
+ * @deprecated use elm_object_content_part_get() instead
* instead.
*
* @ingroup Slider
* the check object(event_info is NULL).
*
* Default contents parts of the check widget that you can use for are:
- * @li "elm.swallow.content" - A icon of the check
+ * @li "icon" - A icon of the check
*
* Default text parts of the check widget that you can use for are:
* @li "elm.text" - Label of the check
* If you want to keep that old content object, use the
* elm_object_content_unset() function.
*
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*
*/
EINA_DEPRECATED EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
* @param obj The check object
* @return The icon object
*
- * @deprecated use elm_object_content_get() instead.
+ * @deprecated use elm_object_content_part_get() instead.
*
*/
EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
*
* Unparent and return the icon object which was set for this widget.
*
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*
*/
EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
* the radio objects within the group of radio objects that work together.
*
* Default contents parts of the radio widget that you can use for are:
- * @li "elm.swallow.content" - A icon of the radio
+ * @li "icon" - A icon of the radio
*
* @ref tutorial_radio show most of this API in action.
* @{
* want to keep that old content object, use the elm_radio_icon_unset()
* function.
*
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*
*/
EINA_DEPRECATED EAPI void elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
*
* @see elm_radio_icon_set()
*
- * @deprecated use elm_object_content_get() instead.
+ * @deprecated use elm_object_content_part_get() instead.
*
*/
EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
* Unparent and return the icon object which was set for this widget.
*
* @see elm_radio_icon_set()
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*
*/
EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
* "pulse" effect is available)
*
* Default contents parts of the progressbar widget that you can use for are:
- * @li "elm.swallow.content" - A icon of the progressbar
+ * @li "icon" - A icon of the progressbar
*
* Here is an example on its usage:
* @li @ref progressbar_example
* elm_progressbar_icon_unset() function.
*
* @see elm_progressbar_icon_get()
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*
* @ingroup Progressbar
*/
* otherwise (and on errors)
*
* @see elm_progressbar_icon_set() for more details
- * @deprecated use elm_object_content_get() instead.
+ * @deprecated use elm_object_content_part_get() instead.
*
* @ingroup Progressbar
*/
* for this widget, previously, on success.
*
* @see elm_progressbar_icon_set() for more details
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*
* @ingroup Progressbar
*/
* @li ELM_PANEL_ORIENT_LEFT
* @li ELM_PANEL_ORIENT_RIGHT
*
- * To set/get/unset the content of the panel, you can use
- * elm_object_content_set/get/unset APIs.
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_object_content_unset() function
+ * Default contents parts of the panel widget that you can use for are:
+ * @li "default" - A content of the panel
*
* @ref tutorial_panel shows one way to use this widget.
* @{
* - @c "default"
*
* Default contents parts of the panes widget that you can use for are:
- * @li "elm.swallow.left" - A leftside content of the panes
- * @li "elm.swallow.right" - A rightside content of the panes
+ * @li "left" - A leftside content of the panes
+ * @li "right" - A rightside content of the panes
*
* If panes is displayed vertically, left content will be displayed at
* top.
* @li @ref panes_example
*/
-#define ELM_PANES_CONTENT_LEFT "elm.swallow.left"
-#define ELM_PANES_CONTENT_RIGHT "elm.swallow.right"
-
/**
* @addtogroup Panes
* @{
* - @c "default"
*
* Default contents parts of the conformant widget that you can use for are:
- * @li "elm.swallow.content" - A content of the conformant
+ * @li "default" - A content of the conformant
*
* See how to use this widget in this example:
* @ref conformant_example
* need to resize or move it frequently (the content object and its
* children).
*
- * To set/get/unset the content of the mapbuf, you can use
- * elm_object_content_set/get/unset APIs.
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_object_content_unset() function.
+ * Default contents parts of the mapbuf widget that you can use for are:
+ * @li "default" - A content of the mapbuf
*
* To enable map, elm_mapbuf_enabled_set() should be used.
*
* "dismissed" - the ctxpopup was dismissed
*
* Default contents parts of the ctxpopup widget that you can use for are:
- * @li "elm.swallow.content" - A content of the ctxpopup
+ * @li "default" - A content of the ctxpopup
*
* @ref tutorial_ctxpopup shows the usage of a good deal of the API.
* @{
* "rewind,clicked" - the user clicked the rewind button.
* "stop,clicked" - the user clicked the stop button.
*
- * To set the video of the player, you can use elm_object_content_set() API.
+ * Default contents parts of the player widget that you can use for are:
+ * @li "video" - A video of the player
*
*/
*
* This function inserts a new player widget on the canvas.
*
- * @see elm_object_content_set()
+ * @see elm_object_content_part_set()
*
* @ingroup Video
*/
*
* @see elm_player_add()
* @see elm_video_add()
- * @deprecated use elm_object_content_set() instead
+ * @deprecated use elm_object_content_part_set() instead
*
* @ingroup Video
*/
* @li "title,clicked" - User clicked title area
*
* Default contents parts of the naviframe items that you can use for are:
- * @li "elm.swallow.content" - A main content of the page
- * @li "elm.swallow.icon" - A icon in the title area
- * @li "elm.swallow.prev_btn" - A button to go to the previous page
- * @li "elm.swallow.next_btn" - A button to go to the next page
+ * @li "default" - A main content of the page
+ * @li "icon" - A icon in the title area
+ * @li "prev_btn" - A button to go to the previous page
+ * @li "next_btn" - A button to go to the next page
*
* Default text parts of the naviframe items that you can use for are:
- * @li "elm.text.title" - Title label in the title area
- * @li "elm.text.subtitle" - Sub-title label in the title area
+ * @li "default" - Title label in the title area
+ * @li "subtitle" - Sub-title label in the title area
*
* @ref tutorial_naviframe gives a good overview of the usage of the API.
*/
-#define ELM_NAVIFRAME_ITEM_CONTENT_ICON "elm.swallow.icon"
-#define ELM_NAVIFRAME_ITEM_CONTENT_PREV_BTN "elm.swallow.prev_btn"
-#define ELM_NAVIFRAME_ITEM_CONTNET_NEXT_BTN "elm.swallow.next_btn"
-#define ELM_NAVIFRAME_ITEM_TEXT_SUBTITLE "elm.text.subtitle"
-
/**
* @addtogroup Naviframe
* @{
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__,
+_content_set_hook(Evas_Object *obj, const char *part,
Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
+ if (part && strcmp(part, "default")) return;
+
wd = elm_widget_data_get(obj);
if ((!wd) || (!content)) return;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
Evas_Object *content;
-
+ if (part && strcmp(part, "default")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(parent);
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("Up"));
evas_object_size_hint_align_set(bt, 0.0, 0.0);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(parent);
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("Home"));
evas_object_size_hint_align_set(bt, 0.0, 0.0);
evas_object_del(icon);
return;
}
- elm_object_content_set(wd->btn, icon);
+ elm_object_content_part_set(wd->btn, "icon", icon);
}
EAPI Evas_Object *
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- return elm_object_content_get(wd->btn);
+ return elm_object_content_part_get(wd->btn, "icon");
}
EAPI Evas_Object *
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- return elm_object_content_unset(wd->btn);
+ return elm_object_content_part_unset(wd->btn, "icon");
}
elm_icon_file_set(ic, item->icon_file, item->icon_group);
else if (item->icon_type == ELM_ICON_STANDARD)
elm_icon_standard_set(ic, item->icon_file);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_show(ic);
}
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- elm_object_content_set(wd->btn, icon);
+ elm_object_content_part_set(wd->btn, "icon", icon);
}
EAPI Evas_Object *
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->btn)) return NULL;
- return elm_object_content_get(wd->btn);
+ return elm_object_content_part_get(wd->btn, "icon");
}
EAPI Evas_Object *
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->btn)) return NULL;
- return elm_object_content_unset(wd->btn);
+ return elm_object_content_part_unset(wd->btn, "icon");
}
EAPI void
Evas_Object *content;
Evas_Object *title_prev_btn;
Evas_Object *title_next_btn;
+ Evas_Object *icon;
const char *style;
Eina_Bool back_btn: 1;
Eina_Bool title_visible: 1;
Evas *e,
Evas_Object *obj,
void *event_info);
+static void _title_icon_del(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info);
static void _title_content_set(Elm_Naviframe_Item *it,
Elm_Naviframe_Content_Item_Pair *pair,
const char *part,
Evas_Object *btn,
Eina_Bool back_btn);
static void _title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn);
+static void _title_icon_set(Elm_Naviframe_Item *it, Evas_Object *icon);
static void _item_del(Elm_Naviframe_Item *it);
static void _pushed_finished(void *data,
Evas_Object *obj,
Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
char buf[1024];
- if (!part)
+ if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
+ else if(!strcmp("subtitle", part))
+ snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
char buf[1024];
- if (!part)
+ if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
+ else if(!strcmp("subtitle", part))
+ snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
//specified parts
- if ((!part) || (!strcmp(part, "elm.swallow.content")))
+ if (!part || !strcmp("default", part))
{
_item_content_set(navi_it, content);
return;
}
- else if (!strcmp(part, "elm.swallow.prev_btn"))
+ else if (!strcmp(part, "prev_btn"))
{
_title_prev_btn_set(navi_it, content, EINA_FALSE);
return;
}
- else if(!strcmp(part, "elm.swallow.next_btn"))
+ else if (!strcmp(part, "next_btn"))
{
_title_next_btn_set(navi_it, content);
return;
}
+ else if (!strcmp(part, "icon"))
+ {
+ _title_icon_set(navi_it, content);
+ return;
+ }
//common part
_title_content_set(navi_it, pair, part, content);
Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
//specified parts
- if ((!part) || (!strcmp(part, "elm.swallow.content")))
+ if (!part || !strcmp("default", part))
return navi_it->content;
- else if (!strcmp(part, "elm.swallow.prev_btn"))
+ else if (!strcmp(part, "prev_btn"))
return navi_it->title_prev_btn;
- else if(!strcmp(part, "elm.swallow.next_btn"))
+ else if (!strcmp(part, "next_btn"))
return navi_it->title_next_btn;
+ else if (!strcmp(part, "icon"))
+ return navi_it->icon;
//common parts
EINA_INLIST_FOREACH(navi_it->content_list, pair)
//specified parts
//FIXME: could be unset the below specified contents also.
if (!part ||
- !strcmp(part, "elm.swallow.content") ||
- !strcmp(part, "elm.swallow.prev_btn") ||
- !strcmp(part, "elm.swallow.next_btn"))
+ !strcmp(part, "default") ||
+ !strcmp(part, "prev_btn") ||
+ !strcmp(part, "next_btn") ||
+ !strcmp(part, "icon"))
{
WRN("You can not unset the content! : naviframe=%p",
WIDGET(navi_it));
edje_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
}
+static void
+_title_icon_del(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
+{
+ Elm_Naviframe_Item *it = data;
+ it->icon = NULL;
+ edje_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
+}
+
static void
_item_content_del(void *data,
Evas *e __UNUSED__,
_item_sizing_eval(it);
}
+static void
+_title_icon_set(Elm_Naviframe_Item *it, Evas_Object *icon)
+{
+ if (it->icon == icon) return;
+
+ if (it->icon)
+ evas_object_del(it->icon);
+
+ it->icon = icon;
+
+ if (!icon)
+ {
+ edje_object_signal_emit(VIEW(it),
+ "elm,state,icon,hide",
+ "elm");
+ return;
+ }
+
+ elm_widget_sub_object_add(WIDGET(it), icon);
+ evas_object_event_callback_add(icon,
+ EVAS_CALLBACK_DEL,
+ _title_icon_del,
+ it);
+ edje_object_part_swallow(VIEW(it), "elm.swallow.icon", icon);
+ edje_object_signal_emit(VIEW(it), "elm,state,icon,show", "elm");
+
+ _item_sizing_eval(it);
+}
+
+
static void
_item_del(Elm_Naviframe_Item *it)
{
evas_object_del(it->title_prev_btn);
if (it->title_next_btn)
evas_object_del(it->title_next_btn);
+ if (it->icon)
+ evas_object_del(it->icon);
if ((it->content) && (!wd->preserve))
evas_object_del(it->content);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bt = elm_button_add(parent);
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
- elm_object_content_set(bt, ic);
+ elm_object_content_part_set(bt, "icon", ic);
evas_object_size_hint_align_set(bt, 0.0, 0.0);
elm_object_style_set(bt, "anchor");
evas_object_smart_callback_add(bt, "clicked", func, obj);
#endif
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
+ if (!part || strcmp(part, "video")) return;
#ifdef HAVE_EMOTION
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+
double pos, length;
Eina_Bool seekable;
- if (!_elm_video_check(content)) return ;
+ if (!_elm_video_check(content)) return;
_cleanup_callback(wd);
EAPI void
elm_player_video_set(Evas_Object *player, Evas_Object *video)
{
- _content_set_hook(player, NULL, video);
+ _content_set_hook(player, "video", video);
}
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part || strcmp(part, "overlay")) return;
+
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->overlay)
{
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (!part || strcmp(part, "overlay")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->overlay;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *overlay;
- if (!wd) return NULL;
- if (!wd->overlay) return NULL;
+ if (!part || strcmp(part, "overlay")) return NULL;
+ wd = elm_widget_data_get(obj);
+ if (!wd || !wd->overlay) return NULL;
overlay = wd->overlay;
elm_widget_sub_object_del(obj, wd->overlay);
edje_object_part_unswallow(wd->base, wd->overlay);
EAPI void
elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay)
{
- _content_set_hook(obj, NULL, overlay);
+ _content_set_hook(obj, "overlay", overlay);
}
EAPI Evas_Object *
elm_bg_overlay_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "overlay");
}
EAPI Evas_Object *
elm_bg_overlay_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "overlay");
}
EAPI void
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if ((!part) || !strcmp(part, "elm.swallow.content"))
+ if (!part || !strcmp(part, "default"))
_content_set(obj, content);
- else if(!strcmp(part, "elm.swallow.icon"))
+ else if(!strcmp(part, "icon"))
_icon_set(obj, content);
}
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if ((!part) || !strcmp(part, "elm.swallow.content"))
+ if (!part || !strcmp(part, "default"))
return wd->content;
- else if(!strcmp(part, "elm.swallow.icon"))
+ else if(!strcmp(part, "icon"))
return wd->icon;
return NULL;
}
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if ((!part) || !strcmp(part, "elm.swallow.content"))
+ if (!part || !strcmp(part, "default"))
return _content_unset(obj);
- else if(!strcmp(part, "elm.swallow.icon"))
+ else if(!strcmp(part, "icon"))
return _icon_unset(obj);
return NULL;
}
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+ if (!part || strcmp(part, "icon")) return;
if (wd->icon == content) return;
if (wd->icon) evas_object_del(wd->icon);
wd->icon = content;
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
Evas_Object *icon = wd->icon;
EAPI void
elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- _content_set_hook(obj, NULL, icon);
+ _content_set_hook(obj, "icon", icon);
}
EAPI Evas_Object *
elm_button_icon_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "icon");
}
EAPI Evas_Object *
elm_button_icon_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "icon");
}
EAPI void
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (strcmp(part, "icon")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
if (wd->icon) evas_object_del(wd->icon);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
Evas_Object *icon = wd->icon;
EAPI void
elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- _content_set_hook(obj, NULL, icon);
+ _content_set_hook(obj, "icon", icon);
}
EAPI Evas_Object *
elm_check_icon_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "icon");
}
EAPI Evas_Object *
elm_check_icon_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "icon");
}
EAPI void
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
-
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content) evas_object_del(wd->content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
-
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->content)) return NULL;
content = wd->content;
elm_widget_sub_object_del(obj, wd->content);
static void _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_change(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
-static void _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content);
-static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__);
+static void _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
static const char SIG_REALIZE[] = "realize";
static const char SIG_UNREALIZE[] = "unrealize";
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content)
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content) evas_object_del(wd->content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->content) return NULL;
content = wd->content;
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content) evas_object_del(wd->content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
+
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->content) return NULL;
content = wd->content;
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part ,"default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content) evas_object_del(wd->content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
-
+ Widget_Data *wd;
+ if (part && strcmp(part ,"default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
+ if (part && strcmp(part ,"default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->content) return NULL;
content = wd->content;
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content)
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->content) return NULL;
content = wd->content;
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
+ Widget_Data *wd;
- if ((!part) || (!strcmp(part, "elm.swallow.right")))
+ if (!part) return;
+ wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (!strcmp(part, "right"))
_content_right_set(obj, content);
- else if(!strcmp(part, "elm.swallow.left"))
+ else if(!strcmp(part, "left"))
_content_left_set(obj, content);
}
_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if ((!part) || (!strcmp(part, "elm.swallow.right")))
+ if (!strcmp(part, "right"))
return wd->contents.left;
- else if (!strcmp(part, "elm.swallow.left"))
+ else if (!strcmp(part, "left"))
return wd->contents.right;
return NULL;
}
_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
+ Widget_Data *wd;
- if ((!part) || (!strcmp(part, "elm.swallow.right")))
+ if (!part) return NULL;
+ wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ if (!strcmp(part, "right"))
_content_right_unset(obj);
- else if (!strcmp(part, "elm.swallow.left"))
+ else if (!strcmp(part, "left"))
_content_left_unset(obj);
-
return NULL;
}
EAPI void
elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
{
- _content_set_hook(obj, "elm.swallow.left", content);
+ _content_set_hook(obj, "left", content);
}
EAPI void
elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
{
- _content_set_hook(obj, NULL, content);
+ _content_set_hook(obj, "right", content);
}
EAPI Evas_Object *
elm_panes_content_left_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, "elm.swallow.left");
+ return _content_get_hook(obj, "left");
}
EAPI Evas_Object *
elm_panes_content_right_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "right");
}
EAPI Evas_Object *
elm_panes_content_left_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, "elm.swallow.left");
+ return _content_unset_hook(obj, "left");
}
EAPI Evas_Object *
elm_panes_content_right_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, "elm.swallow.right");
+ return _content_unset_hook(obj, "right");
}
EAPI double
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (!part || strcmp(part, "icon")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
if (wd->icon) evas_object_del(wd->icon);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ Evas_Object *icon;
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
- Evas_Object *icon = wd->icon;
+ icon = wd->icon;
elm_widget_sub_object_del(obj, wd->icon);
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
EAPI void
elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- _content_set_hook(obj, NULL, icon);
+ _content_set_hook(obj, "icon", icon);
}
EAPI Evas_Object *
elm_progressbar_icon_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "icon");
}
EAPI Evas_Object *
elm_progressbar_icon_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "icon");
}
EAPI void
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part || strcmp(part, "icon")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
if (wd->icon) evas_object_del(wd->icon);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ Evas_Object *icon;
+ if (!part || strcmp(part, "icon")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
- Evas_Object *icon = wd->icon;
+ icon = wd->icon;
elm_widget_sub_object_del(obj, wd->icon);
evas_object_event_callback_del_full(wd->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
EAPI void
elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- _content_set_hook(obj, NULL, icon);
+ _content_set_hook(obj, "icon", icon);
}
EAPI Evas_Object *
elm_radio_icon_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "icon");
}
EAPI Evas_Object *
elm_radio_icon_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "icon");
}
EAPI void
}
static void
-_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return;
+ wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return;
if (wd->content) evas_object_del(wd->content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->content;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
Evas_Object *content;
+ if (part && strcmp(part, "default")) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->content) return NULL;
content = wd->content;
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- if ((!part) || (!strcmp(part, "elm.swallow.icon")))
+ if (!part) return;
+ if (!strcmp(part, "icon"))
_icon_set(obj, content);
- else if (!strcmp(part, "elm.swallow.end"))
+ else if (!strcmp(part, "end"))
_end_set(obj, content);
}
static Evas_Object *
-_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
+ Widget_Data *wd;
+ if (!part) return NULL;
+ wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if ((!part) || (!strcmp(part, "elm.swallow.icon")))
+ if (!strcmp(part, "icon"))
return wd->icon;
- else if (!strcmp(part, "elm.swallow.end"))
+ else if (!strcmp(part, "end"))
return wd->end;
return NULL;
}
static Evas_Object *
-_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- if ((!part) || (!strcmp(part, "elm.swallow.icon")))
+ if (!part) return NULL;
+ if (!strcmp(part, "icon"))
return _icon_unset(obj);
- else if (!strcmp(part, "elm.swallow.end"))
+ else if (!strcmp(part, "end"))
return _end_unset(obj);
return NULL;
}
EAPI void
elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- _content_set_hook(obj, NULL, icon);
+ _content_set_hook(obj, "icon", icon);
}
EAPI Evas_Object *
elm_slider_icon_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, NULL);
+ return _content_unset_hook(obj, "icon");
}
EAPI Evas_Object *
elm_slider_icon_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, NULL);
+ return _content_get_hook(obj, "icon");
}
EAPI void
EAPI void
elm_slider_end_set(Evas_Object *obj, Evas_Object *end)
{
- _content_set_hook(obj, "elm.swallow.end", end);
+ _content_set_hook(obj, "end", end);
}
EAPI Evas_Object *
elm_slider_end_unset(Evas_Object *obj)
{
- return _content_unset_hook(obj, "elm.swallow.end");
+ return _content_unset_hook(obj, "end");
}
EAPI Evas_Object *
elm_slider_end_get(const Evas_Object *obj)
{
- return _content_get_hook(obj, "elm.swallow.end");
+ return _content_get_hook(obj, "end");
}
EAPI void
EAPI void
elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
{
- elm_object_content_set(obj, icon);
+ elm_object_content_part_set(obj, "icon", icon);
}
EAPI Evas_Object *
elm_toggle_icon_get(const Evas_Object *obj)
{
- return elm_object_content_get(obj);
+ return elm_object_content_part_get(obj, "icon");
}
EAPI Evas_Object *
elm_toggle_icon_unset(Evas_Object *obj)
{
- return elm_object_content_unset(obj);
+ return elm_object_content_part_unset(obj, "icon");
}
EAPI void