elementary - slider, scroller, progressbar, radio
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 31 Oct 2011 02:56:03 +0000 (02:56 +0000)
committerMike McCormack <mj.mccormack@samsung.com>
Tue, 8 Nov 2011 09:46:04 +0000 (18:46 +0900)
applied elm_object_content_set/get/unset APIs.

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

26 files changed:
doc/widgets/widget_preview_progressbar.c [new file with mode: 0644]
doc/widgets/widget_preview_scroller.c [new file with mode: 0644]
src/bin/config.c
src/bin/test_anchorblock.c
src/bin/test_button.c
src/bin/test_ctxpopup.c
src/bin/test_focus.c
src/bin/test_launcher.c
src/bin/test_photo.c
src/bin/test_progressbar.c
src/bin/test_radio.c
src/bin/test_scroller.c
src/bin/test_slider.c
src/bin/test_thumb.c
src/bin/test_win_inline.c
src/edje_externals/elm_progressbar.c
src/edje_externals/elm_radio.c
src/edje_externals/elm_scroller.c
src/edje_externals/elm_slider.c
src/lib/Elementary.h.in
src/lib/elc_anchorview.c
src/lib/elc_ctxpopup.c
src/lib/elm_progressbar.c
src/lib/elm_radio.c
src/lib/elm_scroller.c
src/lib/elm_slider.c

diff --git a/doc/widgets/widget_preview_progressbar.c b/doc/widgets/widget_preview_progressbar.c
new file mode 100644 (file)
index 0000000..90c225e
--- /dev/null
@@ -0,0 +1,26 @@
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *ic, *pb, *bx;
+
+bx = elm_box_add(win);
+evas_object_show(bx);
+elm_win_resize_object_add(win, bx);
+
+ic = elm_icon_add(win);
+elm_icon_standard_set(ic, "file");
+evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+evas_object_show(ic);
+
+/* pb with label, icon, custom unit label and span size set */
+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_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);
+evas_object_show(pb);
+elm_progressbar_value_set(pb, 0.5);
+elm_box_pack_end(bx, pb);
+
+#include "widget_preview_tmpl_foot.c"
diff --git a/doc/widgets/widget_preview_scroller.c b/doc/widgets/widget_preview_scroller.c
new file mode 100644 (file)
index 0000000..7501eea
--- /dev/null
@@ -0,0 +1,14 @@
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *o = elm_scroller_add(win);
+elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
+evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+elm_win_resize_object_add(win, o);
+evas_object_show(o);
+
+Evas_Object *o2 = elm_label_add(win);
+elm_object_text_set(o2, "This is the content of the scroller");
+evas_object_show(o2);
+elm_object_content_set(o, o2);
+
+#include "widget_preview_tmpl_foot.c"
index f35a790..825f97b 100644 (file)
@@ -1420,7 +1420,7 @@ _status_config_themes(Evas_Object *win,
    evas_object_show(sc);
 
    sample = _sample_theme_new(win);
-   elm_scroller_content_set(sc, sample);
+   elm_object_content_set(sc, sample);
    evas_object_show(sample);
    evas_object_data_set(win, "theme_preview", sample);
 
@@ -2391,7 +2391,7 @@ _status_config_scrolling(Evas_Object *win,
    evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
    elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
    evas_object_show(sc);
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
 
    ck = elm_check_add(win);
    elm_object_tooltip_text_set(ck, "Set whether scrollers should bounce<br>"
index 8bf9392..ea9abbf 100644 (file)
@@ -230,7 +230,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    elm_box_pack_end(bx, bb);
    evas_object_show(bb);
 
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
 
    evas_object_show(sc);
index 350a99d..94fd46d 100644 (file)
@@ -55,7 +55,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    bx = elm_box_add(win);
    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_scroller_content_set(scr, bx);
+   elm_object_content_set(scr, bx);
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
index 59aef37..3596119 100644 (file)
@@ -134,7 +134,7 @@ _list_item_cb5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    elm_object_text_set(btn, "Enlightenment");
    evas_object_size_hint_min_set(btn, 140, 140);
 
-   elm_scroller_content_set(sc, btn);
+   elm_object_content_set(sc, btn);
 
    elm_box_pack_end(bx, sc);
 
index a78887d..ab39e54 100644 (file)
@@ -159,7 +159,7 @@ test_focus(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
                                                        EVAS_HINT_FILL);
                        evas_object_size_hint_weight_set(bt, 0.0, 0.0);
                        elm_object_event_callback_add(bt, _event, NULL);
-                       elm_scroller_content_set(sc, bt);
+                       elm_object_content_set(sc, bt);
                        my_show(bt);
                        elm_object_event_callback_del(bt, _event, NULL);
                     }
@@ -225,7 +225,7 @@ test_focus(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
                   evas_object_size_hint_align_set(bx3, EVAS_HINT_FILL,
                                                   EVAS_HINT_FILL);
                   evas_object_size_hint_weight_set(bx3, 0.0, 0.0);
-                  elm_scroller_content_set(sc, bx3);
+                  elm_object_content_set(sc, bx3);
                   my_show(bx3);
 
                   for (i = 5; i; i--)
index 0036ec9..3eb6254 100644 (file)
@@ -313,7 +313,7 @@ test_launcher(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_win_resize_object_add(win, bx2);
    evas_object_show(bx2);
 
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
 
    elm_scroller_page_relative_set(sc, 1.0, 1.0);
@@ -440,7 +440,7 @@ test_launcher2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, sc);
 
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
 
    elm_scroller_page_relative_set(sc, 1.0, 1.0);
@@ -848,7 +848,7 @@ test_launcher3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    elm_win_resize_object_add(win, bx2);
    evas_object_show(bx2);
 
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
 
    elm_scroller_page_relative_set(sc, 1.0, 1.0);
index 2f54366..f50a520 100644 (file)
@@ -76,7 +76,7 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, sc);
 
-   elm_scroller_content_set(sc, tb);
+   elm_object_content_set(sc, tb);
    evas_object_show(tb);
    evas_object_show(sc);
 
index 688d2d7..716b0d3 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_progressbar_icon_set(pb, ic1);
+   elm_object_content_set(pb, 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_progressbar_icon_set(pb, ic2);
+   elm_object_content_set(pb, ic2);
    elm_progressbar_inverted_set(pb, 1);
    elm_progressbar_unit_format_set(pb, "%1.2f%%");
    elm_progressbar_span_size_set(pb, 200);
index 944bf5b..eedea32 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_radio_icon_set(rd, ic);
+   elm_object_content_set(rd, 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_radio_icon_set(rd, ic);
+   elm_object_content_set(rd, 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_radio_icon_set(rd, ic);
+   elm_object_content_set(rd, 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_radio_icon_set(rd, ic);
+   elm_object_content_set(rd, ic);
    elm_object_disabled_set(rd, 1);
    elm_box_pack_end(bx, rd);
    evas_object_show(rd);
index ea0fe4c..7a9ac06 100644 (file)
@@ -81,11 +81,10 @@ test_scroller(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, sc);
 
-   elm_scroller_content_set(sc, tb);
+   elm_object_content_set(sc, tb);
    evas_object_show(tb);
 
    elm_scroller_page_relative_set(sc, 1.0, 1.0);
-//   elm_scroller_page_size_set(sc, 200, 200);
    evas_object_show(sc);
 
    tb2 = elm_table_add(win);
@@ -189,7 +188,7 @@ test_scroller2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
         evas_object_show(bt);
      }
 
-   elm_scroller_content_set(sc, bx2);
+   elm_object_content_set(sc, bx2);
    evas_object_show(bx2);
    /* } */
 
@@ -237,7 +236,7 @@ test_scroller2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
           }
      }
 
-   elm_scroller_content_set(sc, tb2);
+   elm_object_content_set(sc, tb2);
    evas_object_show(tb2);
    /* } */
 
@@ -256,7 +255,7 @@ test_scroller2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_scroller_bounce_set(sc, 0, 1);
    elm_win_resize_object_add(win, sc);
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
    evas_object_show(sc);
 
index d34729c..47e5780 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_slider_icon_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_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_slider_icon_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_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_slider_end_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_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_slider_end_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_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_slider_icon_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_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_slider_icon_set(sl, ic);
+   elm_object_content_part_set(sl, ELM_SLIDER_CONTENT_ICON, ic);
    elm_object_text_set(sl, "Disabled vertical");
    elm_slider_inverted_set(sl, EINA_TRUE);
    elm_slider_unit_format_set(sl, "units");
index 490914b..811c464 100644 (file)
@@ -62,7 +62,7 @@ test_thumb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, sc);
 
-   elm_scroller_content_set(sc, tb);
+   elm_object_content_set(sc, tb);
    evas_object_show(tb);
    evas_object_show(sc);
 
index 297910d..ac60633 100644 (file)
@@ -128,7 +128,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    elm_box_pack_end(bx, bb);
    evas_object_show(bb);
 
-   elm_scroller_content_set(sc, bx);
+   elm_object_content_set(sc, bx);
    evas_object_show(bx);
 
    evas_object_show(sc);
index aa4338e..d32a7cb 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_progressbar_icon_set(obj, p->icon);
+     elm_object_content_set(obj, 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_progressbar_icon_set(obj, icon);
+            elm_object_content_set(obj, icon);
             return EINA_TRUE;
          }
      }
index 7f4c600..839326b 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_radio_icon_set(obj, p->icon);
+     elm_object_content_set(obj, 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_radio_icon_set(obj, icon);
+            elm_object_content_set(obj, icon);
             return EINA_TRUE;
          }
      }
index ccec362..2173e3c 100644 (file)
@@ -22,7 +22,7 @@ static void external_scroller_state_set(void *data __UNUSED__,
        else return;
 
        if (p->content) {
-               elm_scroller_content_set(obj, p->content);
+               elm_object_content_set(obj, p->content);
        }
 }
 
@@ -35,7 +35,7 @@ static Eina_Bool external_scroller_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_scroller_content_set(obj, content);
+               elm_object_content_set(obj, content);
                return EINA_TRUE;
        }
 
@@ -83,7 +83,7 @@ static Evas_Object *external_scroller_content_get(void *data __UNUSED__,
                const Evas_Object *obj, const char *content)
 {
        if (!strcmp(content, "content"))
-               return elm_scroller_content_get(obj);
+               return elm_object_content_get(obj);
 
        ERR("unknown content '%s'", content);
        return NULL;
index 546b61f..67651ed 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_slider_icon_set(obj, p->icon);
+     elm_object_content_part_set(obj, ELM_SLIDER_CONTENT_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_slider_icon_set(obj, icon);
+            elm_object_content_part_set(obj, ELM_SLIDER_CONTENT_ICON, icon);
             return EINA_TRUE;
          }
      }
index f600a12..679f068 100644 (file)
@@ -7006,7 +7006,7 @@ extern "C" {
     * elm_scroller_content_unset() function.
     * @deprecated See elm_object_content_set()
     */
-   EAPI void         elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void         elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1);
    /**
     * @brief Get the content of the scroller widget
     *
@@ -7018,7 +7018,7 @@ extern "C" {
     * @see elm_scroller_content_set()
     * @deprecated use elm_object_content_get() instead.
     */
-   EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * @brief Unset the content of the scroller widget
     *
@@ -7030,7 +7030,7 @@ extern "C" {
     * @see elm_scroller_content_set()
     * @deprecated use elm_object_content_unset() instead.
     */
-   EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * @brief Set custom theme elements for the scroller
     *
@@ -17067,7 +17067,7 @@ extern "C" {
     * @ingroup Slider
     * @deprecated use elm_object_content_set() instead.
     */
-   EAPI void               elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void               elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
 
    /**
     * Unset an icon set on a given slider widget.
@@ -17088,7 +17088,7 @@ extern "C" {
     *
     * @ingroup Slider
     */
-   EAPI Evas_Object       *elm_slider_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object       *elm_slider_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Retrieve the icon object set for a given slider widget.
@@ -17105,7 +17105,7 @@ extern "C" {
     *
     * @ingroup Slider
     */
-   EAPI Evas_Object       *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object       *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Set the end object of the slider object.
@@ -17125,7 +17125,7 @@ extern "C" {
     *
     * @ingroup Slider
     */
-   EAPI void               elm_slider_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void               elm_slider_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1);
 
    /**
     * Unset an end object set on a given slider widget.
@@ -17145,7 +17145,7 @@ extern "C" {
     *
     * @ingroup Slider
     */
-   EAPI Evas_Object       *elm_slider_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object       *elm_slider_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Retrieve the end object set for a given slider widget.
@@ -17162,7 +17162,7 @@ extern "C" {
     *
     * @ingroup Slider
     */
-   EAPI Evas_Object       *elm_slider_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object       *elm_slider_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Set the (exact) length of the bar region of a given slider widget.
@@ -19603,7 +19603,7 @@ extern "C" {
     &
     * @deprecated use elm_object_content_set() instead.
     */
-   EAPI void         elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void         elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
    /**
     * @brief Get the icon object of the radio object
     *
@@ -19612,7 +19612,7 @@ extern "C" {
     *
     * @see elm_radio_icon_set()
     */
-   EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * @brief Unset the icon used for the radio object
     *
@@ -19624,7 +19624,7 @@ extern "C" {
     * @see elm_radio_icon_set()
     * @deprecated use elm_object_content_unset() instead.
     */
-   EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * @brief Add this radio to a group of other radio objects
     *
@@ -20851,7 +20851,7 @@ extern "C" {
     *
     * @ingroup Progressbar
     */
-   EAPI void         elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void         elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
 
    /**
     * Retrieve the icon object set for a given progress bar widget
@@ -20865,7 +20865,7 @@ extern "C" {
     *
     * @ingroup Progressbar
     */
-   EAPI Evas_Object *elm_progressbar_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Unset an icon set on a given progress bar widget
@@ -20882,7 +20882,7 @@ extern "C" {
     *
     * @ingroup Progressbar
     */
-   EAPI Evas_Object *elm_progressbar_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
 
    /**
     * Set the (exact) length of the bar region of a given progress bar
index 3288808..16994c7 100644 (file)
@@ -227,7 +227,7 @@ elm_anchorview_add(Evas_Object *parent)
    elm_entry_editable_set(wd->entry, 0);
    evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   elm_scroller_content_set(wd->scroller, wd->entry);
+   elm_object_content_set(wd->scroller, wd->entry);
    evas_object_show(wd->entry);
 
    evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
index 5cadf25..612cfee 100644 (file)
@@ -1050,7 +1050,7 @@ _list_new(Evas_Object *obj)
    evas_object_size_hint_weight_set(wd->box, EVAS_HINT_EXPAND,
                                     EVAS_HINT_EXPAND);
 
-   elm_scroller_content_set(wd->scr, wd->box);
+   elm_object_content_set(wd->scr, wd->box);
    elm_ctxpopup_horizontal_set(obj, wd->horizontal);
 }
 
index 3ee3b0c..a44c5f3 100644 (file)
@@ -197,6 +197,54 @@ _elm_progressbar_label_get(const Evas_Object *obj, const char *item)
    return wd->label;
 }
 
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->icon == content) return;
+   if (wd->icon) evas_object_del(wd->icon);
+   wd->icon = content;
+   if (content)
+     {
+        elm_widget_sub_object_add(obj, content);
+        evas_object_event_callback_add(content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->progressbar, "elm.swallow.content", content);
+        edje_object_signal_emit(wd->progressbar, "elm,state,icon,visible", "elm");
+        edje_object_message_signal_process(wd->progressbar);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *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__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->icon) return NULL;
+   Evas_Object *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);
+   edje_object_part_unswallow(wd->progressbar, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
+
+
 EAPI Evas_Object *
 elm_progressbar_add(Evas_Object *parent)
 {
@@ -215,6 +263,9 @@ elm_progressbar_add(Evas_Object *parent)
    elm_widget_can_focus_set(obj, EINA_FALSE);
    elm_widget_text_set_hook_set(obj, _elm_progressbar_label_set);
    elm_widget_text_get_hook_set(obj, _elm_progressbar_label_get);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
 
    wd->horizontal = EINA_TRUE;
    wd->inverted = EINA_FALSE;
@@ -315,45 +366,19 @@ elm_progressbar_label_get(const Evas_Object *obj)
 EAPI void
 elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->icon == icon) return;
-   if (wd->icon) evas_object_del(wd->icon);
-   wd->icon = icon;
-   if (icon)
-     {
-        elm_widget_sub_object_add(obj, icon);
-        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-        edje_object_part_swallow(wd->progressbar, "elm.swallow.content", icon);
-        edje_object_signal_emit(wd->progressbar, "elm,state,icon,visible", "elm");
-        edje_object_message_signal_process(wd->progressbar);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, NULL, icon);
 }
 
 EAPI Evas_Object *
 elm_progressbar_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 wd->icon;
+   return _content_get_hook(obj, NULL);
 }
 
 EAPI Evas_Object *
 elm_progressbar_icon_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   if (!wd->icon) return NULL;
-   Evas_Object *icon = wd->icon;
-   elm_widget_sub_object_del(obj, wd->icon);
-   edje_object_part_unswallow(wd->progressbar, wd->icon);
-   wd->icon = NULL;
-   return icon;
+   return _content_unset_hook(obj, NULL);
 }
 
 EAPI void
index b22837e..4be9681 100644 (file)
@@ -271,6 +271,74 @@ _elm_radio_label_get(const Evas_Object *obj, const char *item)
    return wd->label;
 }
 
+static char *
+_access_info_cb(void *data __UNUSED__, Evas_Object *obj, Elm_Widget_Item *item __UNUSED__)
+{
+   const char *txt = elm_widget_access_info_get(obj);
+   if (!txt) txt = _elm_radio_label_get(obj, NULL);
+   if (txt) return strdup(txt);
+   return NULL;
+}
+
+static char *
+_access_state_cb(void *data __UNUSED__, Evas_Object *obj, Elm_Widget_Item *item __UNUSED__)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (elm_widget_disabled_get(obj))
+     return strdup(E_("State: Disabled"));
+   if (wd->state)
+     return strdup(E_("State: On"));
+   return strdup(E_("State: Off"));
+}
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->icon == content) return;
+   if (wd->icon) evas_object_del(wd->icon);
+   wd->icon = content;
+   if (content)
+     {
+        elm_widget_sub_object_add(obj, content);
+        evas_object_event_callback_add(content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->radio, "elm.swallow.content", content);
+        edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
+        edje_object_message_signal_process(wd->radio);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *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__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->icon) return NULL;
+   Evas_Object *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);
+   edje_object_part_unswallow(wd->radio, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
+
 EAPI Evas_Object *
 elm_radio_add(Evas_Object *parent)
 {
@@ -293,6 +361,9 @@ elm_radio_add(Evas_Object *parent)
    elm_widget_event_hook_set(obj, _event_hook);
    elm_widget_text_set_hook_set(obj, _elm_radio_label_set);
    elm_widget_text_get_hook_set(obj, _elm_radio_label_get);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
 
    wd->radio = edje_object_add(e);
    _elm_theme_object_set(obj, wd->radio, "radio", "base", "default");
@@ -330,45 +401,18 @@ elm_radio_label_get(const Evas_Object *obj)
 EAPI void
 elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->icon == icon) return;
-   if (wd->icon) evas_object_del(wd->icon);
-   wd->icon = icon;
-   if (icon)
-     {
-        elm_widget_sub_object_add(obj, icon);
-        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-        edje_object_part_swallow(wd->radio, "elm.swallow.content", icon);
-        edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
-        edje_object_message_signal_process(wd->radio);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, NULL, icon);
 }
 
 EAPI Evas_Object *
 elm_radio_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 wd->icon;
+   return _content_get_hook(obj, NULL);
 }
 
 EAPI Evas_Object *
 elm_radio_icon_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   if (!wd->icon) return NULL;
-   Evas_Object *icon = wd->icon;
-   elm_widget_sub_object_del(obj, wd->icon);
-   edje_object_part_unswallow(wd->radio, wd->icon);
-   wd->icon = NULL;
-   return icon;
 }
 
 EAPI void
index 830b965..21c0e1b 100644 (file)
@@ -413,6 +413,65 @@ _scroll_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
    evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_STOP, NULL);
 }
 
+Evas_Object *
+_elm_scroller_edje_object_get(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return elm_smart_scroller_edje_object_get(wd->scr);
+}
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
+   wd->content = content;
+   if (content)
+     {
+        elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
+        elm_widget_sub_object_add(obj, content);
+        if (wd->scr)
+          elm_smart_scroller_child_set(wd->scr, content);
+        evas_object_event_callback_add(content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *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__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   evas_object_event_callback_del_full(wd->content,
+                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+   edje_object_part_unswallow(elm_smart_scroller_edje_object_get(wd->scr),
+                              wd->content);
+   wd->content = NULL;
+   return content;
+}
+
 EAPI Evas_Object *
 elm_scroller_add(Evas_Object *parent)
 {
@@ -437,6 +496,9 @@ elm_scroller_add(Evas_Object *parent)
    elm_widget_can_focus_set(obj, EINA_TRUE);
    elm_widget_event_hook_set(obj, _event_hook);
    elm_widget_focus_region_hook_set(obj, _focus_region_hook);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
 
    wd->widget_name = eina_stringshare_add("scroller");
    wd->widget_base = eina_stringshare_add("base");
@@ -477,58 +539,22 @@ elm_scroller_add(Evas_Object *parent)
    return obj;
 }
 
-Evas_Object *
-_elm_scroller_edje_object_get(Evas_Object *obj)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   return elm_smart_scroller_edje_object_get(wd->scr);
-}
-
 EAPI void
 elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->content == content) return;
-   if (wd->content) evas_object_del(wd->content);
-   wd->content = content;
-   if (content)
-     {
-        elm_widget_on_show_region_hook_set(content, _show_region_hook, obj);
-        elm_widget_sub_object_add(obj, content);
-        if (wd->scr)
-          elm_smart_scroller_child_set(wd->scr, content);
-        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, NULL, content);
 }
 
 EAPI Evas_Object *
 elm_scroller_content_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   return wd->content;
+   return _content_get_hook(obj, NULL);
 }
 
 EAPI Evas_Object *
 elm_scroller_content_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Object *content;
-   if (!wd) return NULL;
-   if (!wd->content) return NULL;
-   content = wd->content;
-   elm_widget_sub_object_del(obj, wd->content);
-   edje_object_part_unswallow(wd->scr, wd->content);
-   wd->content = NULL;
-   return content;
+   return _content_unset_hook(obj, NULL);
 }
 
 EAPI void
index 439d14a..f67d36d 100644 (file)
@@ -516,6 +516,122 @@ _elm_slider_label_get(const Evas_Object *obj, const char *item)
    return wd->label;
 }
 
+static void
+_icon_set(Evas_Object *obj, Evas_Object *icon)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
+   wd->icon = icon;
+   if (icon)
+     {
+        elm_widget_sub_object_add(obj, icon);
+        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->slider, "elm.swallow.icon", icon);
+        edje_object_signal_emit(wd->slider, "elm,state,icon,visible", "elm");
+        edje_object_message_signal_process(wd->slider);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_icon_unset(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *ret = NULL;
+   if (!wd) return NULL;
+   if (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);
+        ret = wd->icon;
+        edje_object_part_unswallow(wd->slider, wd->icon);
+        edje_object_signal_emit(wd->slider, "elm,state,icon,hidden", "elm");
+        wd->icon = NULL;
+        _sizing_eval(obj);
+     }
+   return ret;
+}
+
+static void
+_end_set(Evas_Object *obj, Evas_Object *end)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->end == end) return;
+   if (wd->end) evas_object_del(wd->end);
+   wd->end = end;
+   if (end)
+     {
+        elm_widget_sub_object_add(obj, end);
+        evas_object_event_callback_add(end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->slider, "elm.swallow.end", end);
+        edje_object_signal_emit(wd->slider, "elm,state,end,visible", "elm");
+        edje_object_message_signal_process(wd->slider);
+     }
+   _sizing_eval(obj);
+}
+
+static Evas_Object *
+_end_unset(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *ret = NULL;
+   if (!wd) return NULL;
+   if (wd->end)
+     {
+        elm_widget_sub_object_del(obj, wd->end);
+        evas_object_event_callback_del_full(wd->end,
+                                            EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                            _changed_size_hints, obj);
+        ret = wd->end;
+        edje_object_part_unswallow(wd->slider, wd->end);
+        edje_object_signal_emit(wd->slider, "elm,state,end,hidden", "elm");
+        wd->end = NULL;
+        _sizing_eval(obj);
+     }
+   return ret;
+}
+
+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")))
+     _icon_set(obj, content);
+   else if (!strcmp(part, "elm.swallow.end"))
+     _end_set(obj, content);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if ((!part) || (!strcmp(part, "elm.swallow.icon")))
+     return wd->icon;
+   else if (!strcmp(part, "elm.swallow.end"))
+     return wd->end;
+   return NULL;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   if ((!part) || (!strcmp(part, "elm.swallow.icon")))
+     return _icon_unset(obj);
+   else if (!strcmp(part, "elm.swallow.end"))
+     return _end_unset(obj);
+   return NULL;
+}
+
 EAPI Evas_Object *
 elm_slider_add(Evas_Object *parent)
 {
@@ -537,6 +653,9 @@ elm_slider_add(Evas_Object *parent)
    elm_widget_event_hook_set(obj, _event_hook);
    elm_widget_text_set_hook_set(obj, _elm_slider_label_set);
    elm_widget_text_get_hook_set(obj, _elm_slider_label_get);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
 
    wd->horizontal = EINA_TRUE;
    wd->indicator_show = EINA_TRUE;
@@ -588,50 +707,19 @@ elm_slider_label_get(const Evas_Object *obj)
 EAPI void
 elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->icon == icon) return;
-   if (wd->icon) evas_object_del(wd->icon);
-   wd->icon = icon;
-   if (icon)
-     {
-        elm_widget_sub_object_add(obj, icon);
-        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-        edje_object_part_swallow(wd->slider, "elm.swallow.icon", icon);
-        edje_object_signal_emit(wd->slider, "elm,state,icon,visible", "elm");
-        edje_object_message_signal_process(wd->slider);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, NULL, icon);
 }
 
 EAPI Evas_Object *
 elm_slider_icon_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Object *ret = NULL;
-   if (!wd) return NULL;
-   if (wd->icon)
-     {
-        elm_widget_sub_object_del(obj, wd->icon);
-        ret = wd->icon;
-        edje_object_part_unswallow(wd->slider, wd->icon);
-        edje_object_signal_emit(wd->slider, "elm,state,icon,hidden", "elm");
-        wd->icon = NULL;
-        _sizing_eval(obj);
-     }
-   return ret;
+   return _content_unset_hook(obj, NULL);
 }
 
 EAPI Evas_Object *
 elm_slider_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 wd->icon;
+   return _content_get_hook(obj, NULL);
 }
 
 EAPI void
@@ -839,50 +927,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)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->end == end) return;
-   if (wd->end) evas_object_del(wd->end);
-   wd->end = end;
-   if (end)
-     {
-        elm_widget_sub_object_add(obj, end);
-        evas_object_event_callback_add(end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-        edje_object_part_swallow(wd->slider, "elm.swallow.end", end);
-        edje_object_signal_emit(wd->slider, "elm,state,end,visible", "elm");
-        edje_object_message_signal_process(wd->slider);
-     }
-   _sizing_eval(obj);
+   _content_set_hook(obj, "elm.swallow.end", end);
 }
 
 EAPI Evas_Object *
 elm_slider_end_unset(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Object *ret = NULL;
-   if (!wd) return NULL;
-   if (wd->end)
-     {
-        elm_widget_sub_object_del(obj, wd->end);
-        ret = wd->end;
-        edje_object_part_unswallow(wd->slider, wd->end);
-        edje_object_signal_emit(wd->slider, "elm,state,end,hidden", "elm");
-        wd->end = NULL;
-        _sizing_eval(obj);
-     }
-   return ret;
+   return _content_unset_hook(obj, "elm.swallow.end");
 }
 
 EAPI Evas_Object *
 elm_slider_end_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return NULL;
-   return wd->end;
+   return _content_get_hook(obj, "elm.swallow.end");
 }
 
 EAPI void