elementary - modified content_set/get/unset part names to be simple names.
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 16 Nov 2011 12:51:53 +0000 (12:51 +0000)
committerMike McCormack <mj.mccormack@samsung.com>
Fri, 18 Nov 2011 06:42:53 +0000 (15:42 +0900)
Previous part names are just the swallow part names
but in modified version, the part names chaned to simpler meaning names to use.

i.e for button

elm_object_content_part_set(button, "elm.swallow.icon", icon);
-> elm_object_content_part_set(button, "icon", icon);

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

66 files changed:
doc/widgets/widget_preview_bubble2.c
doc/widgets/widget_preview_bubble3.c
doc/widgets/widget_preview_button2.c
doc/widgets/widget_preview_button3.c
doc/widgets/widget_preview_check2.c
doc/widgets/widget_preview_check3.c
doc/widgets/widget_preview_panes.c
doc/widgets/widget_preview_progressbar.c
src/bin/test.c
src/bin/test_anchorblock.c
src/bin/test_bg.c
src/bin/test_bubble.c
src/bin/test_button.c
src/bin/test_check.c
src/bin/test_map.c
src/bin/test_naviframe.c
src/bin/test_panes.c
src/bin/test_progressbar.c
src/bin/test_radio.c
src/bin/test_slider.c
src/bin/test_toggle.c
src/bin/test_transit.c
src/bin/test_win_inline.c
src/edje_externals/elm_bubble.c
src/edje_externals/elm_button.c
src/edje_externals/elm_check.c
src/edje_externals/elm_panes.c
src/edje_externals/elm_progressbar.c
src/edje_externals/elm_radio.c
src/edje_externals/elm_slider.c
src/edje_externals/elm_toggle.c
src/examples/bg_example_03.c
src/examples/bubble_example_01.c
src/examples/button_example_01.c
src/examples/check_example_01.c
src/examples/entry_example.c
src/examples/panes_example.c
src/examples/progressbar_example.c
src/examples/radio_example_01.c
src/examples/slider_example.c
src/examples/transit_example_03.c
src/examples/transit_example_04.c
src/examples/web_example.c
src/lib/Elementary.h.in
src/lib/elc_ctxpopup.c
src/lib/elc_fileselector.c
src/lib/elc_fileselector_button.c
src/lib/elc_hoversel.c
src/lib/elc_naviframe.c
src/lib/elc_player.c
src/lib/elm_bg.c
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_check.c
src/lib/elm_conform.c
src/lib/elm_factory.c
src/lib/elm_frame.c
src/lib/elm_mapbuf.c
src/lib/elm_notify.c
src/lib/elm_panel.c
src/lib/elm_panes.c
src/lib/elm_progressbar.c
src/lib/elm_radio.c
src/lib/elm_scroller.c
src/lib/elm_slider.c
src/lib/elm_toggle.c

index c2bf0ea..d032a71 100644 (file)
@@ -9,7 +9,7 @@ elm_object_text_set(o, "Bubble");
 
 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"
index bcd9a0c..ddf99b7 100644 (file)
@@ -7,7 +7,7 @@ evas_object_show(o);
 
 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"
index 08ed5f0..87b40b0 100644 (file)
@@ -9,7 +9,7 @@ elm_object_text_set(o, "Button");
 
 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"
index 1a020fd..764bdca 100644 (file)
@@ -7,7 +7,7 @@ evas_object_show(o);
 
 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"
index d62cc3b..ff9143d 100644 (file)
@@ -9,7 +9,7 @@ elm_object_text_set(o, "Check");
 
 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"
index 6e4ab64..05b4298 100644 (file)
@@ -7,7 +7,7 @@ evas_object_show(o);
 
 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"
index 081c43b..1759c87 100644 (file)
@@ -10,13 +10,13 @@ elm_object_text_set(bt, "Left");
 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"
index 90c225e..b508423 100644 (file)
@@ -15,7 +15,7 @@ evas_object_show(ic);
 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);
index b1ac43f..649d180 100644 (file)
@@ -546,7 +546,7 @@ add_tests:
                   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);
index 10c2447..aa27371 100644 (file)
@@ -149,7 +149,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    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);
@@ -176,7 +176,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    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);
@@ -213,7 +213,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    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);
index cc4dd3d..2f0c1be 100644 (file)
@@ -26,10 +26,10 @@ _cb_overlay_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
         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
index faea34e..af52928 100644 (file)
@@ -39,7 +39,7 @@ test_bubble(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
index 2b58806..0408ceb 100644 (file)
@@ -64,7 +64,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -77,7 +77,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -90,7 +90,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -103,7 +103,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -127,7 +127,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -148,7 +148,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -161,7 +161,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
    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);
index 0de6bdc..51afc6a 100644 (file)
@@ -31,7 +31,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -43,7 +43,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -61,7 +61,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -73,7 +73,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
index 42322f0..4bb21f8 100644 (file)
@@ -549,7 +549,7 @@ _marker_get(Evas_Object *obj, Elm_Map_Marker *marker __UNUSED__, void *data)
         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);
      }
index df4973d..37c5e77 100644 (file)
@@ -37,7 +37,11 @@ _page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", 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);
+
+   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_part_set(bt, "icon", ic);
 
    bt2 = elm_button_add(nf);
    evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -54,8 +58,12 @@ _page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
                                 bt,
                                 bt2,
                                 NULL);
-   elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
-   elm_object_item_content_part_set(it, "elm.swallow.icon", ic);
+   ic = elm_icon_add(nf);
+   snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
+            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, "icon", ic);
    elm_naviframe_item_title_visible_set(it, EINA_FALSE);
    evas_object_smart_callback_add(bt2, "clicked", _title_visible, it);
 }
@@ -86,14 +94,7 @@ _page3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
-   it = elm_naviframe_item_push(nf,
-                                "Page 3",
-                                bt,
-                                bt2,
-                                bt3,
-                                NULL);
-   elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
-   elm_object_item_content_part_set(it, "elm.swallow.icon", ic);
+   elm_object_item_content_part_set(it, "icon", ic);
 }
 
 void
@@ -115,15 +116,12 @@ _page2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", 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);
 
-   it = elm_naviframe_item_push(nf,
-                                "Page 2",
-                                NULL,
-                                bt,
-                                bt2,
-                                NULL);
-   elm_object_item_text_part_set(it, "elm.text.subtitle", "Here is sub-title part!");
+   content = _content_new(nf, img2);
+
+   it = elm_naviframe_item_push(nf, "Page 2", NULL, bt, content,  NULL);
+   elm_object_item_text_part_set(it, "subtitle", "Here is sub-title part!");
 }
 
 void
index 8217490..6e27afb 100644 (file)
@@ -73,7 +73,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
    //
 
    //
@@ -88,7 +88,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    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);
    //
 
    //
@@ -97,7 +97,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
    //
 
    //
@@ -106,7 +106,7 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
    //
 
 
index 370347d..73e5232 100644 (file)
@@ -115,7 +115,7 @@ test_progressbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
 
    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);
@@ -162,7 +162,7 @@ test_progressbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    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);
index 2d0351c..e222623 100644 (file)
@@ -33,7 +33,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -48,7 +48,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -76,7 +76,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -89,7 +89,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
index 17497dc..29abcf6 100644 (file)
@@ -39,7 +39,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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);
@@ -56,7 +56,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    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);
@@ -75,7 +75,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    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);
@@ -97,7 +97,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    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);
@@ -140,7 +140,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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");
@@ -178,7 +178,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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");
index 92c0ba0..78f14dd 100644 (file)
@@ -32,7 +32,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    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");
@@ -47,7 +47,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    tg = elm_toggle_add(win);
    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);
@@ -59,7 +59,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    tg = elm_toggle_add(win);
    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);
@@ -79,7 +79,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    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);
index 5c23418..559e521 100644 (file)
@@ -255,7 +255,7 @@ test_transit(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
 
    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);
@@ -386,7 +386,7 @@ test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    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);
@@ -398,7 +398,7 @@ test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    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);
@@ -432,7 +432,7 @@ test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    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);
@@ -444,7 +444,7 @@ test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    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);
index 348c361..f7f99be 100644 (file)
@@ -55,7 +55,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    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);
@@ -79,7 +79,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    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);
@@ -114,7 +114,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    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);
index ed24354..7748457 100644 (file)
@@ -20,7 +20,7 @@ external_bubble_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f
 
    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_bubble_content_set(obj, p->content);
 }
@@ -42,9 +42,8 @@ external_bubble_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
          {
             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"))
index 2002602..08f8901 100644 (file)
@@ -19,7 +19,7 @@ external_button_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f
    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
@@ -39,7 +39,7 @@ external_button_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
          {
             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;
          }
      }
index 0c3fd0a..d150e13 100644 (file)
@@ -21,7 +21,7 @@ external_check_state_set(void *data __UNUSED__, Evas_Object *obj, const void *fr
    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);
 }
@@ -43,7 +43,7 @@ external_check_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
          {
             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;
          }
      }
index 1a7a8df..15d19ea 100644 (file)
@@ -27,10 +27,10 @@ static void external_panes_state_set(void *data __UNUSED__,
    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);
@@ -51,7 +51,7 @@ static Eina_Bool external_panes_param_set(void *data __UNUSED__,
       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"))
@@ -60,7 +60,7 @@ static Eina_Bool external_panes_param_set(void *data __UNUSED__,
       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"))
@@ -170,9 +170,9 @@ external_panes_content_get(void *data __UNUSED__, const Evas_Object *obj,
                            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);
 
index d32a7cb..e32cb2e 100644 (file)
@@ -28,7 +28,7 @@ external_progressbar_state_set(void *data __UNUSED__, Evas_Object *obj, const vo
    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)
@@ -58,7 +58,7 @@ external_progressbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Ed
          {
             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;
          }
      }
index 839326b..77ce14a 100644 (file)
@@ -22,7 +22,7 @@ external_radio_state_set(void *data __UNUSED__, Evas_Object *obj, const void *fr
    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)
@@ -50,7 +50,7 @@ external_radio_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
          {
             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;
          }
      }
index 67651ed..dcdd2bf 100644 (file)
@@ -33,7 +33,7 @@ external_slider_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f
    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))
@@ -80,7 +80,7 @@ external_slider_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
          {
             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;
          }
      }
index 4d0a29d..20fd782 100644 (file)
@@ -24,7 +24,7 @@ external_toggle_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f
    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);
@@ -52,7 +52,7 @@ external_toggle_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
          {
             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;
          }
      }
index b78139b..1139d10 100644 (file)
@@ -38,10 +38,10 @@ _cb_overlay_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
         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
index 9303d78..01970e8 100644 (file)
@@ -40,7 +40,7 @@ elm_main(int argc, char **argv)
    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);
index bd5a5b1..36e26de 100644 (file)
@@ -24,7 +24,7 @@ static void
 _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;
 }
 
@@ -40,7 +40,7 @@ _btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev __UNUSED__)
         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);
@@ -185,7 +185,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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;
 
@@ -210,7 +210,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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;
 
@@ -221,7 +221,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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;
 
@@ -239,7 +239,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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;
 
@@ -257,7 +257,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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;
 
index 2f5e99a..a559779 100644 (file)
@@ -40,7 +40,7 @@ elm_main(int argc, char **argv)
    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);
index e677c95..27e6fa5 100644 (file)
@@ -553,7 +553,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
 
index 354672b..5db8fd6 100644 (file)
@@ -86,7 +86,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    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);
@@ -94,21 +94,21 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
                                     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,
index 81f9216..12b2572 100644 (file)
@@ -143,7 +143,7 @@ elm_main(int    argc __UNUSED__,
    /* 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);
@@ -192,7 +192,7 @@ elm_main(int    argc __UNUSED__,
    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);
index 78fa010..05bf935 100644 (file)
@@ -37,7 +37,7 @@ elm_main(int argc, char **argv)
    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);
@@ -51,7 +51,7 @@ elm_main(int argc, char **argv)
    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);
index 53568cd..9e93031 100644 (file)
@@ -85,12 +85,12 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    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);
index 0af77be..702ccee 100644 (file)
@@ -47,8 +47,8 @@ _transit_wipe(Elm_Transit *trans)
 {
    /* 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
@@ -110,7 +110,7 @@ _transit_start(void *data, Evas_Object *o, void *event_info __UNUSED__)
    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
@@ -123,8 +123,8 @@ _transit_start(void *data, Evas_Object *o, void *event_info __UNUSED__)
     * 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 */
@@ -227,7 +227,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    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);
@@ -261,7 +261,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
     * 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);
index 8290fe5..9a1641c 100644 (file)
@@ -132,7 +132,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    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);
@@ -145,7 +145,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    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);
 
index 730951b..3e75382 100644 (file)
@@ -405,7 +405,7 @@ _win_search_trigger_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
 
    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);
 
@@ -415,7 +415,7 @@ _win_search_trigger_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
 
    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);
 
@@ -425,7 +425,7 @@ _win_search_trigger_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
 
    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);
 
@@ -523,7 +523,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
 
@@ -535,7 +535,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
 
@@ -547,7 +547,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
 
@@ -564,7 +564,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
 
@@ -586,7 +586,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    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);
index 0bbbabf..2913dc6 100644 (file)
@@ -4651,7 +4651,7 @@ extern "C" {
     * 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
     */
@@ -4680,7 +4680,7 @@ extern "C" {
     *
     * 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
     */
@@ -6231,10 +6231,10 @@ extern "C" {
     * @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".
     * @{
@@ -6319,7 +6319,7 @@ extern "C" {
     *
     * @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.
     */
    EAPI void         elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
    /**
@@ -6332,7 +6332,7 @@ extern "C" {
     * @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
     */
    EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
@@ -6345,7 +6345,7 @@ extern "C" {
     *
     * @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.
     */
    EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
@@ -10295,7 +10295,7 @@ extern "C" {
     * @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.
     *
@@ -12227,13 +12227,18 @@ extern "C" {
     * 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
     *
@@ -17218,16 +17223,15 @@ extern "C" {
     * - @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
     * @{
@@ -17285,7 +17289,7 @@ extern "C" {
     * it won't get properly displayed.
     *
     * @ingroup Slider
-    * @deprecated use elm_object_content_set() instead.
+    * @deprecated use elm_object_content_part_set() instead.
     */
    EAPI void               elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
 
@@ -17304,7 +17308,7 @@ extern "C" {
     *
     * @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
     */
@@ -17323,6 +17327,8 @@ extern "C" {
     * @see elm_slider_icon_set() for more details
     * @see elm_slider_icon_unset()
     *
+    * @deprecated use elm_object_content_part_get() instead.
+    *
     * @ingroup Slider
     */
    EAPI Evas_Object       *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
@@ -17343,6 +17349,8 @@ extern "C" {
     * @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() instead.
+    *
     * @ingroup Slider
     */
    EAPI void               elm_slider_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1);
@@ -17363,6 +17371,9 @@ extern "C" {
     * @see elm_slider_end_set() for more details.
     * @see elm_slider_end_get()
     *
+    * @deprecated use elm_object_content_part_unset() instead
+    * instead.
+    *
     * @ingroup Slider
     */
    EAPI Evas_Object       *elm_slider_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
@@ -17380,6 +17391,10 @@ extern "C" {
     * @see elm_slider_end_set() for more details.
     * @see elm_slider_end_unset()
     *
+    *
+    * @deprecated use elm_object_content_part_get() instead 
+    * instead.
+    *
     * @ingroup Slider
     */
    EAPI Evas_Object       *elm_slider_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
@@ -19686,7 +19701,7 @@ extern "C" {
     * If you want to keep that old content object, use the
     * elm_object_content_unset() function.
     *
-    * @deprecated use elm_object_part_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);
@@ -19696,7 +19711,7 @@ extern "C" {
     * @param obj The check object
     * @return The icon object
     *
-    * @deprecated use elm_object_part_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);
@@ -19708,7 +19723,7 @@ extern "C" {
     *
     * Unparent and return the icon object which was set for this widget.
     *
-    * @deprecated use elm_object_part_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);
@@ -19882,7 +19897,7 @@ extern "C" {
     * want to keep that old content object, use the elm_radio_icon_unset()
     * function.
     *
-    * @deprecated use elm_object_part_content_set() instead.
+    * @deprecated use elm_object_content_part_set() instead.
     *
     */
    EAPI void         elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
@@ -19893,6 +19908,9 @@ extern "C" {
     * @return The icon object
     *
     * @see elm_radio_icon_set()
+    *
+    * @deprecated use elm_object_content_part_get() instead.
+    *
     */
    EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
@@ -19904,7 +19922,8 @@ extern "C" {
     * 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.
+    *
     */
    EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
@@ -21129,7 +21148,7 @@ extern "C" {
     * 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
     */
@@ -21143,7 +21162,7 @@ extern "C" {
     * otherwise (and on errors)
     *
     * @see elm_progressbar_icon_set() for more details
-    * @deprecated use elm_object_content_set() instead.
+    * @deprecated use elm_object_content_part_get() instead.
     *
     * @ingroup Progressbar
     */
@@ -21160,7 +21179,7 @@ extern "C" {
     * 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
     */
@@ -23861,8 +23880,8 @@ extern "C" {
     * - @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.
@@ -23871,9 +23890,6 @@ extern "C" {
     * @li @ref panes_example
     */
 
-#define ELM_PANES_CONTENT_LEFT "elm.swallow.left"
-#define ELM_PANES_CONTENT_RIGHT "elm.swallow.right"
-
    /**
     * @addtogroup Panes
     * @{
@@ -26392,12 +26408,6 @@ extern "C" {
     * Default contents parts of the ctxpopup widget that you can use for are:
     * @li "default" - A content of the ctxpopup
     *
-    * Default contents parts of the naviframe items that you can use for are:
-    * @li "icon" - A icon in the title area
-    * 
-    * Default text parts of the naviframe items that you can use for are:
-    * @li "default" - Title label in the title area
-    *
     * @ref tutorial_ctxpopup shows the usage of a good deal of the API.
     * @{
     */
@@ -28078,7 +28088,7 @@ extern "C" {
     *
     * This function inserts a new player widget on the canvas.
     *
-    * @see elm_object_part_content_set()
+    * @see elm_object_content_part_set()
     *
     * @ingroup Video
     */
@@ -28096,7 +28106,7 @@ extern "C" {
     *
     * @see elm_player_add()
     * @see elm_video_add()
-    * @deprecated use elm_object_part_content_set() instead
+    * @deprecated use elm_object_content_part_set() instead
     *
     * @ingroup Video
     */
@@ -28485,41 +28495,18 @@ extern "C" {
     * @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.
     */
 
-  //Available commonly
-  #define ELM_NAVIFRAME_ITEM_CONTENT "elm.swallow.content"
-  #define ELM_NAVIFRAME_ITEM_ICON "elm.swallow.icon"
-  #define ELM_NAVIFRAME_ITEM_OPTIONHEADER "elm.swallow.optionheader"
-  #define ELM_NAVIFRAME_ITEM_TITLE_LABEL "elm.text.title"
-  #define ELM_NAVIFRAME_ITEM_PREV_BTN "elm.swallow.prev_btn"
-  #define ELM_NAVIFRAME_ITEM_NEXT_BTN "elm.swallow.next_btn"
-  #define ELM_NAVIFRAME_ITEM_TITLE_LEFT_BTN "elm.swallow.left_btn"
-  #define ELM_NAVIFRAME_ITEM_TITLE_RIGHT_BTN "elm.swallow.right_btn"
-  #define ELM_NAVIFRAME_ITEM_TITLE_MORE_BTN "elm.swallow.more_btn"
-  #define ELM_NAVIFRAME_ITEM_CONTROLBAR "elm.swallow.controlbar"
-  #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_CLOSE "elm,state,optionheader,close", ""
-  #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_OPEN "elm,state,optionheader,open", ""
-  #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_INSTANT_CLOSE "elm,state,optionheader,instant_close", ""
-  #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_INSTANT_OPEN "elm,state,optionheader,instant_open", ""
-
-   //Available only in a style - "2line"
-  #define ELM_NAVIFRAME_ITEM_OPTIONHEADER2 "elm.swallow.optionheader2"
-
-  //Available only in a style - "segment"
-  #define ELM_NAVIFRAME_ITEM_SEGMENT2 "elm.swallow.segment2"
-  #define ELM_NAVIFRAME_ITEM_SEGMENT3 "elm.swallow.segment3"
-
    /**
     * @addtogroup Naviframe
     * @{
index b4eeda4..95e84df 100644 (file)
@@ -828,13 +828,15 @@ _theme_hook(Evas_Object *obj)
 }
 
 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;
 
@@ -855,13 +857,13 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__,
 }
 
 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;
 
@@ -880,11 +882,12 @@ _content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
 }
 
 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;
 }
index 953293a..ac62492 100644 (file)
@@ -832,7 +832,7 @@ elm_fileselector_add(Evas_Object *parent)
    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);
 
@@ -847,7 +847,7 @@ elm_fileselector_add(Evas_Object *parent)
    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);
 
index d104736..10341e4 100644 (file)
@@ -512,7 +512,7 @@ elm_fileselector_button_icon_set(Evas_Object *obj,
         evas_object_del(icon);
         return;
      }
-   elm_object_content_set(wd->btn, icon);
+   elm_object_content_part_set(wd->btn, "icon", icon);
 }
 
 EAPI Evas_Object *
@@ -521,7 +521,7 @@ elm_fileselector_button_icon_get(const Evas_Object *obj)
    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 *
@@ -530,6 +530,6 @@ elm_fileselector_button_icon_unset(Evas_Object *obj)
    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");
 }
 
index 6cb93e2..b4a7625 100644 (file)
@@ -206,7 +206,7 @@ _activate(Evas_Object *obj)
                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);
@@ -374,7 +374,7 @@ elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon)
    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 *
@@ -383,7 +383,7 @@ elm_hoversel_icon_get(const Evas_Object *obj)
    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 *
@@ -392,7 +392,7 @@ elm_hoversel_icon_unset(Evas_Object *obj)
    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
index 3b865b9..94ebdd8 100644 (file)
@@ -40,6 +40,7 @@ struct _Elm_Naviframe_Item
    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;
@@ -112,6 +113,10 @@ static void _title_next_btn_del(void *data,
                                 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,
@@ -120,6 +125,7 @@ static void _title_prev_btn_set(Elm_Naviframe_Item *it,
                                 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,
@@ -237,8 +243,10 @@ _item_text_set_hook(Elm_Object_Item *it,
    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);
 
@@ -284,8 +292,10 @@ _item_text_get_hook(const Elm_Object_Item *it, const char *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);
 
@@ -308,21 +318,26 @@ _item_content_set_hook(Elm_Object_Item *it,
    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);
@@ -336,12 +351,14 @@ _item_content_get_hook(const Elm_Object_Item *it, const char *part)
    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)
@@ -364,9 +381,10 @@ _item_content_unset_hook(Elm_Object_Item *it, const char *part)
    //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));
@@ -567,6 +585,17 @@ _title_next_btn_del(void *data,
 }
 
 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__,
                   Evas_Object *obj __UNUSED__,
@@ -692,6 +721,36 @@ _title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn)
 }
 
 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)
 {
    Widget_Data *wd;
@@ -707,6 +766,8 @@ _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);
 
index dd071c7..e249954 100644 (file)
@@ -418,7 +418,7 @@ _player_button_add(Evas_Object *parent, Evas_Object *obj, Evas_Object *layout, c
    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);
@@ -454,15 +454,17 @@ _double_to_time(double value)
 #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);
 
@@ -585,5 +587,5 @@ elm_player_add(Evas_Object *parent)
 EAPI void
 elm_player_video_set(Evas_Object *player, Evas_Object *video)
 {
-   _content_set_hook(player, NULL, video);
+   _content_set_hook(player, "video", video);
 }
index 5261cd0..dd463e9 100644 (file)
@@ -117,10 +117,14 @@ _custom_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, 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, "overlay")) return;
+
+   wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->overlay)
      {
@@ -138,22 +142,25 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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);
@@ -294,19 +301,19 @@ elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b)
 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
index c80b232..dd3ad0f 100644 (file)
@@ -165,9 +165,9 @@ _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
    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);
 }
 
@@ -177,9 +177,9 @@ _content_get_hook(const Evas_Object *obj, const char *part)
    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;
 }
@@ -190,9 +190,9 @@ _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;
-   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;
 }
index 11a9a09..c79fad1 100644 (file)
@@ -209,11 +209,12 @@ _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *so
 }
 
 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;
@@ -231,19 +232,25 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
@@ -591,19 +598,19 @@ elm_button_label_get(const Evas_Object *obj)
 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
index 6c3ffd3..53765ea 100644 (file)
@@ -233,10 +233,13 @@ _activate_hook(Evas_Object *obj)
 }
 
 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);
@@ -255,19 +258,25 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
@@ -487,19 +496,19 @@ elm_check_states_labels_get(const Evas_Object *obj, const char **ontext, const c
 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
index e9f0255..715ad2a 100644 (file)
@@ -124,11 +124,12 @@ _theme_hook(Evas_Object *obj)
 }
 
 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);
@@ -145,21 +146,24 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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);
index 6d28488..286c00d 100644 (file)
@@ -26,8 +26,8 @@ static void _move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, v
 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";
@@ -212,10 +212,13 @@ _child_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __
 }
 
 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)
@@ -250,10 +253,12 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
 }
index 7dae02b..a8732da 100644 (file)
@@ -125,10 +125,13 @@ _elm_frame_label_get(const Evas_Object *obj, const char *item)
 }
 
 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);
@@ -144,20 +147,25 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
index 9e01249..05a0c92 100644 (file)
@@ -147,10 +147,13 @@ _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
 }
 
 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);
@@ -173,20 +176,26 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
index 2c04a67..bae56a3 100644 (file)
@@ -414,10 +414,12 @@ _elm_notify_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Eva
 }
 
 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);
@@ -437,21 +439,24 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
index 3da5b9e..b4de56d 100644 (file)
@@ -226,10 +226,13 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
 }
 
 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)
@@ -244,20 +247,25 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
index 68d6a76..484fe59 100644 (file)
@@ -277,12 +277,14 @@ static void
 _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);
 }
 
@@ -290,11 +292,14 @@ static Evas_Object *
 _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;
 }
@@ -303,14 +308,15 @@ static Evas_Object *
 _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;
 }
 
@@ -366,37 +372,37 @@ elm_panes_add(Evas_Object *parent)
 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
index a44c5f3..9ada9fb 100644 (file)
@@ -198,10 +198,12 @@ _elm_progressbar_label_get(const Evas_Object *obj, const char *item)
 }
 
 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);
@@ -220,22 +222,27 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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);
@@ -366,19 +373,19 @@ elm_progressbar_label_get(const Evas_Object *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
index 6504bd2..032e072 100644 (file)
@@ -272,10 +272,13 @@ _elm_radio_label_get(const Evas_Object *obj, const char *item)
 }
 
 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);
@@ -294,22 +297,28 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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);
@@ -380,19 +389,19 @@ elm_radio_label_get(const Evas_Object *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
index ea85b17..e984f93 100644 (file)
@@ -423,10 +423,12 @@ _elm_scroller_edje_object_get(Evas_Object *obj)
 }
 
 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);
@@ -445,20 +447,24 @@ _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *co
 }
 
 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;
index f67d36d..2407392 100644 (file)
@@ -602,32 +602,36 @@ static void
 _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;
 }
@@ -707,19 +711,19 @@ elm_slider_label_get(const Evas_Object *obj)
 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
@@ -927,19 +931,19 @@ elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(doubl
 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
index 39f6255..57a8599 100644 (file)
@@ -28,19 +28,19 @@ elm_toggle_label_get(const Evas_Object *obj)
 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