Review of content setters, getters and unsetters
authorTiago Rezende Campos Falcao <developer@tiagofalcao.com>
Thu, 14 Oct 2010 18:54:42 +0000 (18:54 +0000)
committerTiago Rezende Campos Falcao <developer@tiagofalcao.com>
Thu, 14 Oct 2010 18:54:42 +0000 (18:54 +0000)
Revised the parent, icon, end and content setter and getters of
elementary objects.
Review to smart objects and widgets items will be the next steps.

SVN revision: 53425

24 files changed:
src/lib/Elementary.h.in
src/lib/elc_anchorblock.c
src/lib/elc_anchorview.c
src/lib/elc_fileselector_button.c
src/lib/elc_hoversel.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_flip.c
src/lib/elm_frame.c
src/lib/elm_hover.c
src/lib/elm_mapbuf.c
src/lib/elm_menu.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
src/lib/elm_win.c

index b59930d..2e588c3 100644 (file)
@@ -438,6 +438,7 @@ extern "C" {
    EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj);
    EAPI void         elm_win_inwin_activate(Evas_Object *obj);
    EAPI void         elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj);
    EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);
    /* available styles:
     * default
@@ -535,6 +536,7 @@ extern "C" {
    EAPI const char  *elm_button_label_get(const Evas_Object *obj);
    EAPI void         elm_button_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj);
    EAPI void         elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on);
    EAPI void         elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t);
    EAPI void         elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);
@@ -544,6 +546,7 @@ extern "C" {
    EAPI const char  *elm_fileselector_button_label_get(const Evas_Object *obj);
    EAPI void         elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_fileselector_button_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_fileselector_button_icon_unset(Evas_Object *obj);
    EAPI void         elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title);
    EAPI const char  *elm_fileselector_button_window_title_get(const Evas_Object *obj);
    EAPI void         elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height);
@@ -607,6 +610,7 @@ extern "C" {
 
    EAPI Evas_Object *elm_scroller_add(Evas_Object *parent);
    EAPI void         elm_scroller_content_set(Evas_Object *obj, Evas_Object *child);
+   EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj);
    EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj);
    EAPI void         elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base);
    EAPI void         elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h);
@@ -655,6 +659,7 @@ extern "C" {
    EAPI const char  *elm_toggle_label_get(const Evas_Object *obj);
    EAPI void         elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj);
    EAPI void         elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel);
    EAPI void         elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel);
    EAPI void         elm_toggle_state_set(Evas_Object *obj, Eina_Bool state);
@@ -845,6 +850,7 @@ extern "C" {
    EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj);
    EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj);
    EAPI void         elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent);
+   EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj);
    EAPI void         elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient);
    EAPI Elm_Notify_Orient          elm_notify_orient_get(const Evas_Object *obj);
    EAPI void         elm_notify_timeout_set(Evas_Object *obj, double timeout);
@@ -865,10 +871,11 @@ extern "C" {
      } Elm_Hover_Axis;
    EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
    EAPI void         elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
-   EAPI Evas_Object *elm_hover_target_get(Evas_Object *obj);
+   EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj);
    EAPI void         elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
-   EAPI Evas_Object *elm_hover_parent_get(Evas_Object *obj);
+   EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj);
    EAPI void         elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content);
+   EAPI Evas_Object *elm_hover_content_get(const Evas_Object *obj, const char *swallow);
    EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow);
    EAPI const char  *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
    /* available styles:
@@ -1008,6 +1015,7 @@ extern "C" {
    EAPI const char  *elm_anchorview_text_get(const Evas_Object *obj);
 
    EAPI void         elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
+   EAPI Evas_Object *elm_anchorview_hover_parent_get(const Evas_Object *obj);
    EAPI void         elm_anchorview_hover_style_set(Evas_Object *obj, const char *style);
    EAPI void         elm_anchorview_hover_end(Evas_Object *obj);
    EAPI void         elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
@@ -1037,6 +1045,7 @@ extern "C" {
    EAPI void         elm_anchorblock_text_set(Evas_Object *obj, const char *text);
    EAPI const char  *elm_anchorblock_text_get(const Evas_Object *obj);
    EAPI void         elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
+   EAPI Evas_Object *elm_anchorblock_hover_parent_get(Evas_Object *obj);
    EAPI void         elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style);
    EAPI void         elm_anchorblock_hover_end(Evas_Object *obj);
    EAPI void         elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data);
@@ -1053,9 +1062,11 @@ extern "C" {
    EAPI const char  *elm_bubble_info_get(const Evas_Object *obj);
 
    EAPI void         elm_bubble_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj);
    EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj);
    EAPI void         elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj);
    EAPI void         elm_bubble_corner_set(Evas_Object *obj, const char *corner);
    /* smart callbacks called:
     */
@@ -1099,10 +1110,12 @@ extern "C" {
    EAPI void         elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
    EAPI Eina_Bool    elm_hoversel_horizontal_get(const Evas_Object *obj);
    EAPI void         elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
+   EAPI Evas_Object *elm_hoversel_hover_parent_get(const Evas_Object *obj);
    EAPI void         elm_hoversel_label_set(Evas_Object *obj, const char *label);
    EAPI const char  *elm_hoversel_label_get(const Evas_Object *obj);
    EAPI void         elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_hoversel_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_hoversel_icon_unset(Evas_Object *obj);
    EAPI void         elm_hoversel_hover_begin(Evas_Object *obj);
    EAPI void         elm_hoversel_hover_end(Evas_Object *obj);
    EAPI Eina_Bool    elm_hoversel_expanded_get(Evas_Object *obj);
@@ -1205,6 +1218,7 @@ extern "C" {
    typedef struct _Elm_Menu_Item Elm_Menu_Item; /**< Item of Elm_Menu. Sub-type of Elm_Widget_Item */
    EAPI Evas_Object     *elm_menu_add(Evas_Object *parent);
    EAPI void            elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent);
+   EAPI Evas_Object     *elm_menu_parent_get(const Evas_Object *obj);
    EAPI void            elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
    EAPI Evas_Object     *elm_menu_object_get(const Elm_Menu_Item *it);
    EAPI Elm_Menu_Item   *elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, const char *label, Evas_Smart_Cb func, const void *data);
@@ -1446,6 +1460,7 @@ extern "C" {
    EAPI const char  *elm_check_label_get(const Evas_Object *obj);
    EAPI void         elm_check_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj);
    EAPI void         elm_check_state_set(Evas_Object *obj, Eina_Bool state);
    EAPI Eina_Bool    elm_check_state_get(const Evas_Object *obj);
    EAPI void         elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep);
@@ -1455,6 +1470,7 @@ extern "C" {
    EAPI const char  *elm_radio_label_get(const Evas_Object *obj);
    EAPI void         elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj);
    EAPI void         elm_radio_group_add(Evas_Object *obj, Evas_Object *group);
    EAPI void         elm_radio_state_value_set(Evas_Object *obj, int value);
    EAPI void         elm_radio_value_set(Evas_Object *obj, int value);
@@ -1541,6 +1557,7 @@ extern "C" {
    EAPI const char  *elm_progressbar_label_get(const Evas_Object *obj);
    EAPI void         elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_progressbar_icon_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_progressbar_icon_unset(Evas_Object *obj);
    EAPI void         elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size);
    EAPI Evas_Coord   elm_progressbar_span_size_get(const Evas_Object *obj);
    EAPI void         elm_progressbar_unit_format_set(Evas_Object *obj, const char *format);
@@ -1759,6 +1776,7 @@ extern "C" {
    EAPI void                  elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
    EAPI Elm_Panel_Orient      elm_panel_orient_get(Evas_Object *obj);
    EAPI void                  elm_panel_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object          *elm_panel_content_get(const Evas_Object *obj);
    EAPI Evas_Object          *elm_panel_content_unset(Evas_Object *obj);
    EAPI void                  elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
    EAPI Eina_Bool             elm_panel_hidden_get(Evas_Object *obj);
@@ -1776,6 +1794,8 @@ extern "C" {
    EAPI void                  elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content);
    EAPI Evas_Object          *elm_panes_content_left_get(const Evas_Object *obj);
    EAPI Evas_Object          *elm_panes_content_right_get(const Evas_Object *obj);
+   EAPI Evas_Object          *elm_panes_content_left_unset(Evas_Object *obj);
+   EAPI Evas_Object          *elm_panes_content_right_unset(Evas_Object *obj);
    EAPI double                elm_panes_content_left_size_get(const Evas_Object *obj);
    EAPI void                  elm_panes_content_left_size_set(Evas_Object *obj, double size);
    EAPI void                  elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
@@ -1798,6 +1818,8 @@ extern "C" {
    EAPI void         elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content);
    EAPI Evas_Object *elm_flip_content_front_get(const Evas_Object *obj);
    EAPI Evas_Object *elm_flip_content_back_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_flip_content_front_unset(Evas_Object *obj);
+   EAPI Evas_Object *elm_flip_content_back_unset(Evas_Object *obj);
    EAPI Eina_Bool    elm_flip_front_get(const Evas_Object *obj);
    EAPI void         elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y);
    EAPI void         elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode);
index eef3beb..cdc1a91 100644 (file)
@@ -289,6 +289,26 @@ elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
 }
 
 /**
+ * Get the parent of the hover popup
+ *
+ * This sgets the parent of the hover that anchorblock will create. See hover
+ * objects for more information on this.
+ *
+ * @param obj The anchorblock object
+ * @return The parent used by the hover
+ *
+ * @ingroup Anchorblock
+ */
+EAPI Evas_Object *
+elm_anchorblock_hover_parent_get(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return wd->hover_parent;
+}
+
+/**
  * Set the style that the hover should use
  *
  * This sets the style for the hover that anchorblock will create. See hover
index 2e35dc3..da3972c 100644 (file)
@@ -283,6 +283,26 @@ elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
 }
 
 /**
+  * Get the parent of the hover popup
+  *
+  * This gets the parent of the hover that anchorview will created. See hover
+  * objects for more information on this.
+  *
+  * @param obj The anchorview object
+  * @return The parent used by hover
+  *
+  * @ingroup Anchorview
+  */
+EAPI Evas_Object *
+elm_anchorview_hover_parent_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->hover_parent;
+}
+
+/**
   * Set the style that the hover should use
   *
   * This sets the style for the hover that anchorview will create. See hover
index 22cc4d4..b389106 100644 (file)
@@ -748,9 +748,11 @@ elm_fileselector_button_inwin_mode_get(const Evas_Object *obj)
  * Set the icon used for the button
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_fileselector_button_icon_unset() function.
  *
  * @param obj The button object
- * @param icon  The image for the button
+ * @param icon  The icon object for the button
  *
  * @ingroup File_Selector_Button
  */
@@ -780,7 +782,7 @@ elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon)
  * Get the icon used for the button
  *
  * @param obj The button object
- * @return The image for the button
+ * @return The icon object that is being used
  *
  * @ingroup File_Selector_Button
  */
@@ -793,3 +795,27 @@ elm_fileselector_button_icon_get(const Evas_Object *obj)
    if (!wd) return NULL;
    return wd->icon;
 }
+
+/**
+ * Unset the icon used for the button
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The button object
+ * @return The icon object that was being used
+ *
+ * @ingroup File_Selector_Button
+ */
+EAPI Evas_Object *
+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;
+   if (!wd->icon) return NULL;
+   Evas_Object *icon = wd->icon;
+   elm_widget_sub_object_del(obj, wd->icon);
+   edje_object_part_unswallow(wd->btn, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
index 1c4141a..e5c458e 100644 (file)
@@ -317,6 +317,26 @@ elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
 }
 
 /**
+ * Get the Hover parent
+ *
+ * Gets the hover parent object. Should probably be the window that the hoversel
+ * is in.  See Hover objects for more information.
+ *
+ * @param obj The hoversel object
+ * @return The used parent
+ *
+ * @ingroup Hoversel
+ */
+EAPI Evas_Object *
+elm_hoversel_hover_parent_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->hover_parent;
+}
+
+/**
  * Set the hoversel button label
  *
  * This sets the label of the button that is always visible (before it is
@@ -394,6 +414,9 @@ elm_hoversel_horizontal_get(const Evas_Object *obj)
  *
  * Sets the icon of the button that is always visible (before it is clicked
  * and expanded). Also see elm_button_icon_set().
+ * Once the icon object is set, a previously set one will be deleted
+ * If you want to keep that old content object, use the
+ * elm_hoversel_icon_unset() function.
  *
  * @param obj The hoversel object
  * @param icon The icon object
@@ -430,6 +453,26 @@ elm_hoversel_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Get the icon of the hoversel button
+ *
+ * Unparent and return the icon of the button that is always visible
+ * (before it is clicked and expanded). Also see elm_button_icon_unset().
+ *
+ * @param obj The hoversel object
+ * @return The icon object that was being used
+ *
+ * @ingroup Hoversel
+ */
+EAPI Evas_Object *
+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_button_icon_unset(wd->btn);
+}
+
+/**
  * This triggers the hoversel popup from code, the same as though the
  * user clicked the button.
  *
index cee1533..d6c7924 100644 (file)
@@ -255,29 +255,74 @@ elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
  * @param overlay The overlay object
  *
  * This provides a way for elm_bg to have an 'overlay' (such as animated fog)
- * 
+ * Once the over object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_bg_overlay_unset() function.
+ *
  * @ingroup Bg
  */
-EAPI void 
+EAPI void
 elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd;
-
-   wd = elm_widget_data_get(obj);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    if (wd->overlay)
      {
        evas_object_del(wd->overlay);
        wd->overlay = NULL;
      }
-   if (!overlay) 
+   if (overlay)
      {
-        _custom_resize(wd, NULL, NULL, NULL);
-        return;
+        wd->overlay = overlay;
+        edje_object_part_swallow(wd->base, "elm.swallow.content", wd->overlay);
+        elm_widget_sub_object_add(obj, wd->overlay);
      }
-   wd->overlay = overlay;
-   edje_object_part_swallow(wd->base, "elm.swallow.content", wd->overlay);
-   elm_widget_sub_object_add(obj, wd->overlay);
 
    _custom_resize(wd, NULL, NULL, NULL);
 }
+
+/**
+ * Set the overlay object used for the background object.
+ *
+ * @param obj The bg object
+ * @return The content that is being used
+ *
+ * Return the content object which is set for this widget
+ *
+ * @ingroup Bg
+ */
+EAPI Evas_Object *
+elm_bg_overlay_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->overlay;
+}
+
+/**
+ * Get the overlay object used for the background object.
+ *
+ * @param obj The bg object
+ * @return The content that was being used
+ *
+ * Unparent and return the overlay object which was set for this widget
+ *
+ * @ingroup Bg
+ */
+EAPI Evas_Object *
+elm_bg_overlay_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *overlay;
+   if (!wd) return NULL;
+   if (!wd->overlay) return NULL;
+   overlay = wd->overlay;
+   elm_widget_sub_object_del(obj, wd->overlay);
+   edje_object_part_unswallow(wd->base, wd->overlay);
+   wd->overlay = NULL;
+   _custom_resize(wd, NULL, NULL, NULL);
+   return overlay;
+}
index c93e694..9095e81 100644 (file)
@@ -269,6 +269,25 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content shown in the bubble
+ *
+ * Return the content object which is set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The content that is being used
+ *
+ * @ingroup Bubble
+ */
+EAPI Evas_Object *
+elm_bubble_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;
+}
+
+/**
  * Unset the content shown in the bubble
  *
  * Unparent and return the content object which was set for this widget.
@@ -297,6 +316,8 @@ elm_bubble_content_unset(Evas_Object *obj)
  * Set the icon of the bubble
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_icon_content_unset() function.
  *
  * @param obj The bubble object
  * @param icon The given icon for the bubble
@@ -344,6 +365,31 @@ elm_bubble_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon of the bubble
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The icon that was being used
+ *
+ * @ingroup Bubble
+ */
+EAPI Evas_Object *
+elm_bubble_icon_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *icon;
+   if (!wd) return NULL;
+   if (!wd->icon) return NULL;
+   icon = wd->icon;
+   elm_widget_sub_object_del(obj, icon);
+   edje_object_part_unswallow(wd->bbl, icon);
+   wd->icon = NULL;
+   return icon;
+}
+
+/**
  * Set the corner of the bubble
  *
  * @param obj The bubble object.
index 5abbcad..7a7e858 100644 (file)
@@ -372,9 +372,11 @@ elm_button_label_get(const Evas_Object *obj)
  * Set the icon used for the button
  *
  * Once the icon object is set, a previously set one will be deleted
+ * If you want to keep that old content object, use the
+ * elm_button_icon_unset() function.
  *
  * @param obj The button object
- * @param icon The image for the button
+ * @param icon The icon object for the button
  *
  * @ingroup Button
  */
@@ -402,8 +404,10 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
 /**
  * Get the icon used for the button
  *
+ * Return the icon object which is set for this widget.
+ *
  * @param obj The button object
- * @return The image for the button
+ * @return The icon object that is being used
  *
  * @ingroup Button
  */
@@ -417,6 +421,30 @@ elm_button_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon used for the button
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The button object
+ * @return The icon object that was being used
+ *
+ * @ingroup Button
+ */
+EAPI Evas_Object *
+elm_button_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->btn, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
+
+/**
  * Turn on/off the autorepeat event generated when the user keeps pressing on the button
  *
  * @param obj The button object
index bd5473f..0a3a81a 100644 (file)
@@ -313,6 +313,8 @@ elm_check_label_get(const Evas_Object *obj)
  * Set the icon object of the check object
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_check_icon_unset() function.
  *
  * @param obj The check object
  * @param icon The icon object
@@ -358,6 +360,30 @@ elm_check_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon used for the check object
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The check object
+ * @return The icon object that was being used
+ *
+ * @ingroup Check
+ */
+EAPI Evas_Object *
+elm_check_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->chk, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
+
+/**
  * Set the on/off state of the check object
  *
  * This sets the state of the check and will also set the value if pointed to
index 8d65685..a6049e8 100644 (file)
@@ -299,6 +299,25 @@ elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content of the conformant widget
+ *
+ * Return the content object which is set for this widget;
+ *
+ * @param obj The conformant object
+ * @return The content that is being used
+ *
+ * @ingroup Conformant
+ */
+EAPI Evas_Object *
+elm_conformant_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;
+}
+
+/**
  * Unset the content of the conformant widget
  *
  * Unparent and return the content object which was set for this widget;
index 384f388..1c79609 100644 (file)
@@ -457,10 +457,14 @@ elm_flip_add(Evas_Object *parent)
 }
 
 /**
- * Set the flip front content
+ * Set the front content of the flip widget.
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_flip_content_front_unset() function.
  *
  * @param obj The flip object
- * @param content The content to be used in this flip object
+ * @param content The new front content object
  *
  * @ingroup Flip
  */
@@ -471,12 +475,7 @@ elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->front.content == content) return;
-   if ((wd->front.content != content) && (wd->front.content))
-     {
-        evas_object_clip_set(wd->front.content, NULL);
-        elm_widget_sub_object_del(obj, wd->front.content);
-        evas_object_smart_member_del(wd->front.content);
-     }
+   if (wd->front.content) evas_object_del(wd->back.content);
    wd->front.content = content;
    if (content)
      {
@@ -495,10 +494,14 @@ elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
- * Set the flip back content
+ * Set the back content of the flip widget.
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_flip_content_back_unset() function.
  *
  * @param obj The flip object
- * @param content The content to be used in this flip object
+ * @param content The new back content object
  *
  * @ingroup Flip
  */
@@ -509,12 +512,7 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->back.content == content) return;
-   if ((wd->back.content != content) && (wd->back.content))
-     {
-        evas_object_clip_set(wd->back.content, NULL);
-        elm_widget_sub_object_del(obj, wd->back.content);
-        evas_object_smart_member_del(wd->back.content);
-     }
+   if (wd->back.content) evas_object_del(wd->back.content);
    wd->back.content = content;
    if (content)
      {
@@ -533,10 +531,12 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
- * Get the flip front content
+ * Get the front content used for the flip
+ *
+ * Return the front content object which is set for this widget.
  *
  * @param obj The flip object
- * @return The content to be used in this flip object front
+ * @return The front content object that is being used
  *
  * @ingroup Flip
  */
@@ -548,11 +548,14 @@ elm_flip_content_front_get(const Evas_Object *obj)
    return wd->front.content;
 }
 
+
 /**
- * Get the flip back content
+ * Get the back content used for the flip
+ *
+ * Return the back content object which is set for this widget.
  *
  * @param obj The flip object
- * @return The content to be used in this flip object back
+ * @return The back content object that is being used
  *
  * @ingroup Flip
  */
@@ -565,6 +568,56 @@ elm_flip_content_back_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the front content used for the flip
+ *
+ * Unparent and return the front content object which was set for this widget.
+ *
+ * @param obj The flip object
+ * @return The front content object that was being used
+ *
+ * @ingroup Flip
+ */
+EAPI Evas_Object *
+elm_flip_content_front_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->front.content) return NULL;
+   Evas_Object *content = wd->front.content;
+   evas_object_clip_set(content, NULL);
+   elm_widget_sub_object_del(obj, content);
+   evas_object_smart_member_del(content);
+   wd->front.content = NULL;
+   return content;
+}
+
+/**
+ * Unset the back content used for the flip
+ *
+ * Unparent and return the back content object which was set for this widget.
+ *
+ * @param obj The flip object
+ * @return The back content object that was being used
+ *
+ * @ingroup Flip
+ */
+EAPI Evas_Object *
+elm_flip_content_back_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->back.content) return NULL;
+   Evas_Object *content = wd->back.content;
+   evas_object_clip_set(content, NULL);
+   elm_widget_sub_object_del(obj, content);
+   evas_object_smart_member_del(content);
+   wd->back.content = NULL;
+   return content;
+}
+
+/**
  * Get flip front visibility state
  *
  * @param obj The flip object
index 601a55b..b75a241 100644 (file)
@@ -204,6 +204,25 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content of the frame widget
+ *
+ * Return the content object which is set for this widget
+ *
+ * @param obj The frame object
+ * @return The content that is being used
+ *
+ * @ingroup Frame
+ */
+EAPI Evas_Object *
+elm_frame_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;
+}
+
+/**
  * Unset the content of the frame widget
  *
  * Unparent and return the content object which was set for this widget
index d3e7840..73fedbd 100644 (file)
@@ -413,11 +413,11 @@ elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
  *
  * @param obj The hover object
  * @return The target object of the hover.
- * 
+ *
  * @ingroup Hover
  */
 EAPI Evas_Object *
-elm_hover_target_get(Evas_Object *obj)
+elm_hover_target_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -435,7 +435,7 @@ elm_hover_target_get(Evas_Object *obj)
  * @ingroup Hover
  */
 EAPI Evas_Object *
-elm_hover_parent_get(Evas_Object *obj)
+elm_hover_parent_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -495,6 +495,39 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
 }
 
 /**
+ * Get the content of the hover object
+ *
+ * Return the content object which is set for this widget
+ *
+ * @param obj The hover object
+ * @param swallow The direction that the object will display in. Multiple
+ * objects can have the same swallow location. Objects placed in the same
+ * swallow will be placed starting at the middle of the hover and ending
+ * farther from the middle.
+ * Accepted values are "left" "right" "top" "bottom" "middle"
+ * @return The content that is being used
+ *
+ * @ingroup Hover
+ */
+EAPI Evas_Object *
+elm_hover_content_get(const Evas_Object *obj, const char *swallow)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Subinfo *si;
+   const Eina_List *l;
+   char buf[1024];
+   if (!wd) return NULL;
+   snprintf(buf, sizeof(buf), "elm.swallow.slot.%s", swallow);
+   EINA_LIST_FOREACH(wd->subs, l, si)
+     {
+        if (!strcmp(buf, si->swallow))
+          return si->obj;
+     }
+   return NULL;
+}
+
+/**
  * Unset the content of the hover object
  *
  * Unparent and return the content object which was set for this widget
index 5a84baf..8117e5e 100644 (file)
@@ -226,6 +226,25 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the mapbuf front content
+ *
+ * Return the content object which is set for this widget.
+ *
+ * @param obj The mapbuf object
+ * @return The content that is being used
+ *
+ * @ingroup Mapbuf
+ */
+EAPI Evas_Object *
+elm_mapbuf_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;
+}
+
+/**
  * Unset the mapbuf front content
  *
  * Unparent and return the content object which was set for this widget.
index 7e9ef3d..83af887 100644 (file)
@@ -480,6 +480,23 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
 }
 
 /**
+ * Get the parent
+ *
+ * @param obj The menu object.
+ * @return The parent.
+ *
+ * @ingroup Menu
+ */
+EAPI Evas_Object *
+elm_menu_parent_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->parent;
+}
+
+/**
  * Move the menu to a new position
  *
  * @param obj The menu object.
index 188a041..70d778d 100644 (file)
@@ -430,13 +430,16 @@ elm_notify_content_get(const Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
 
-   if ((!wd) || (!wd->content)) return NULL;
+   if (!wd) return NULL;
    return wd->content;
 }
 
 /**
  * Set the notify parent
  *
+ * Once the parent object is set, a previously set one will be desconected
+ * and replaced.
+ *
  * @param obj The notify object
  * @param content The new parent
  *
@@ -485,6 +488,23 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
 }
 
 /**
+ * Get the notify parent
+ *
+ * @param obj The notify object
+ * @return The parent
+ *
+ * @ingroup Notify
+ */
+EAPI Evas_Object *
+elm_notify_parent_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->parent;
+}
+
+/**
  * Set the orientation
  *
  * @param obj The notify object
index 924ef84..8c8b95b 100644 (file)
@@ -370,6 +370,25 @@ elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content of the panel.
+ *
+ * Return the content object which is set for this widget.
+ *
+ * @param obj The panel object
+ * @return The content that is being used
+ *
+ * @ingroup Panel
+ */
+EAPI Evas_Object *
+elm_panel_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;
+}
+
+/**
  * Unset the content of the panel.
  *
  * Unparent and return the content object which was set for this widget.
index f07d899..1787256 100644 (file)
@@ -244,12 +244,24 @@ elm_panes_add(Evas_Object *parent)
    return obj;
 }
 
+
+/**
+ * Set the left content of the panes widget.
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_panes_content_left_unset() function.
+ *
+ * @param obj The panes object
+ * @param content The new left content object
+ *
+ * @ingroup Panes
+ */
 EAPI void
 elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   // FIXME: should we delete or orphan?
    if (wd->contents.left)
      {
        evas_object_del(wd->contents.left);
@@ -263,12 +275,23 @@ elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
      }
 }
 
+/**
+ * Set the right content of the panes widget.
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_panes_content_right_unset() function.
+ *
+ * @param obj The panes object
+ * @param content The new right content object
+ *
+ * @ingroup Panes
+ */
 EAPI void
 elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   // FIXME: should we delete or orphan?
    if (wd->contents.right)
      {
        evas_object_del(wd->contents.right);
@@ -282,6 +305,16 @@ elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
      }
 }
 
+/**
+ * Get the left content used for the panes
+ *
+ * Return the left content object which is set for this widget.
+ *
+ * @param obj The panes object
+ * @return The left content object that is being used
+ *
+ * @ingroup Panes
+ */
 EAPI Evas_Object *
 elm_panes_content_left_get(const Evas_Object *obj)
 {
@@ -290,6 +323,16 @@ elm_panes_content_left_get(const Evas_Object *obj)
    return wd->contents.left;
 }
 
+/**
+ * Get the right content used for the panes
+ *
+ * Return the right content object which is set for this widget.
+ *
+ * @param obj The panes object
+ * @return The right content object that is being used
+ *
+ * @ingroup Panes
+ */
 EAPI Evas_Object *
 elm_panes_content_right_get(const Evas_Object *obj)
 {
@@ -298,6 +341,54 @@ elm_panes_content_right_get(const Evas_Object *obj)
    return wd->contents.right;
 }
 
+/**
+ * Unset the left content used for the panes
+ *
+ * Unparent and return the left content object which was set for this widget.
+ *
+ * @param obj The panes object
+ * @return The left content object that was being used
+ *
+ * @ingroup Panes
+ */
+EAPI Evas_Object *
+elm_panes_content_left_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->contents.left) return NULL;
+   Evas_Object *content = wd->contents.left;
+   elm_widget_sub_object_del(obj, content);
+   edje_object_part_unswallow(wd->panes, content);
+   wd->contents.left = NULL;
+   return content;
+}
+
+/**
+ * Unset the right content used for the panes
+ *
+ * Unparent and return the right content object which was set for this widget.
+ *
+ * @param obj The panes object
+ * @return The right content object that was being used
+ *
+ * @ingroup Panes
+ */
+EAPI Evas_Object *
+elm_panes_content_right_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->contents.right) return NULL;
+   Evas_Object *content = wd->contents.right;
+   elm_widget_sub_object_del(obj, content);
+   edje_object_part_unswallow(wd->panes, content);
+   wd->contents.right = NULL;
+   return content;
+}
+
 EAPI double 
 elm_panes_content_left_size_get(const Evas_Object *obj)
 {
index c0b93cb..ac0ef12 100644 (file)
@@ -377,6 +377,8 @@ elm_progressbar_label_get(const Evas_Object *obj)
  * Set the icon object of the progressbar object
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_progressbar_icon_unset() function.
  *
  * @param obj The progressbar object
  * @param icon The icon object
@@ -422,6 +424,30 @@ elm_progressbar_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon used for the progressbar object
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The progressbar object
+ * @return The icon object that was being used
+ *
+ * @ingroup Progressbar
+ */
+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;
+}
+
+/**
  * Set the length of the progression region of the progressbar
  *
  * This sets the minimum width or height (depending on orientation) of the
index 3061c5d..49b05a5 100644 (file)
@@ -354,6 +354,8 @@ elm_radio_label_get(const Evas_Object *obj)
  * Set the icon object of the radio object
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_radio_icon_unset() function.
  *
  * @param obj The radio object
  * @param icon The icon object
@@ -399,6 +401,30 @@ elm_radio_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon used for the radio object
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The radio object
+ * @return The icon object that was being used
+ *
+ * @ingroup Radio
+ */
+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;
+}
+
+/**
  * Add this radio to a group of other radio objects
  *
  * Radio objects work in groups. Each member should have a different integer
index 1b04490..ead52fe 100644 (file)
@@ -531,11 +531,30 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content of the scroller widget
+ *
+ * Return the content object which is set for this widget
+ *
+ * @param obj The slider object
+ * @return The content that is being used
+ *
+ * @ingroup Scroller
+ */
+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;
+}
+
+/**
  * Unset the content of the scroller widget
  *
  * Unparent and return the content object which was set for this widget
  *
- * @param obj The slider objecet
+ * @param obj The slider object
  * @return The content that was being used
  *
  * @ingroup Scroller
index 97256e7..7a969f9 100644 (file)
@@ -488,6 +488,8 @@ elm_slider_label_get(const Evas_Object *obj)
  * Set the icon object (leftmost widget) of the slider object.
  *
  * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_slider_icon_unset() function.
  *
  * @param obj The slider object
  * @param icon The icon object
@@ -922,6 +924,8 @@ elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(d
  * Set the end object (rightmost widget) of the slider object.
  *
  * Once the end object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_button_end_unset() function.
  *
  * @param obj The slider object
  * @param end The end object
index 06478e4..eb0bf3c 100644 (file)
@@ -268,7 +268,7 @@ elm_toggle_label_set(Evas_Object *obj, const char *label)
 /**
  * Gets the label of the toggle
  *
- * @param obj The toggle object
+ * @param obj  toggleeee object
  * @return The label of the toggle
  *
  * @ingroup Toggle
@@ -283,12 +283,14 @@ elm_toggle_label_get(const Evas_Object *obj)
 }
 
 /**
- * Sets the icon to be displayed with the toggle.
+ * Set the icon used for the toggle
  *
- * Once the icon object is set, a previously set one will be deleted.
+ * Once the icon object is set, a previously set one will be deleted
+ * If you want to keep that old content object, use the
+ * elm_toggle_icon_unset() function.
  *
  * @param obj The toggle object
- * @param icon The icon object to be displayed
+ * @param icon The icon object for the button
  *
  * @ingroup Toggle
  */
@@ -314,10 +316,12 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
 }
 
 /**
- * Gets the icon of the toggle
+ * Get the icon used for the toggle
+ *
+ * Return the icon object which is set for this widget.
  *
  * @param obj The toggle object
- * @return The icon object
+ * @return The icon object that is being used
  *
  * @ingroup Toggle
  */
@@ -331,6 +335,30 @@ elm_toggle_icon_get(const Evas_Object *obj)
 }
 
 /**
+ * Unset the icon used for the toggle
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The toggle object
+ * @return The icon object that was being used
+ *
+ * @ingroup Toggle
+ */
+EAPI Evas_Object *
+elm_toggle_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->tgl, wd->icon);
+   wd->icon = NULL;
+   return icon;
+}
+
+/**
  * Sets the labels to be associated with the on and off states of the toggle.
  *
  * @param obj The toggle object
index b13e85a..6e12b56 100644 (file)
@@ -2273,6 +2273,25 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Get the content of an inwin object.
+ *
+ * Return the content object which is set for this widget.
+ *
+ * @param obj The inwin object
+ * @return The content that is being used
+ *
+ * @ingroup Inwin
+ */
+EAPI Evas_Object *
+elm_win_inwin_content_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype2) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return wd->content;
+}
+
+/**
  * Unset the content of an inwin object.
  *
  * Unparent and return the content object which was set for this widget.