Review of content setters, getters and unsetters

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
This commit is contained in:
Tiago Rezende Campos Falcao 2010-10-14 18:54:42 +00:00
parent 475318f728
commit 738bfaa747
24 changed files with 738 additions and 50 deletions

View 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);

View File

@ -288,6 +288,26 @@ elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
evas_object_event_callback_add(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj);
}
/**
* 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
*

View File

@ -282,6 +282,26 @@ elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
evas_object_event_callback_add(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj);
}
/**
* 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
*

View 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;
}

View File

@ -316,6 +316,26 @@ elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
_parent_del, obj);
}
/**
* 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
*
@ -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
@ -429,6 +452,26 @@ elm_hoversel_icon_get(const Evas_Object *obj)
return elm_button_icon_get(wd->btn);
}
/**
* 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.

View 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;
}

View File

@ -268,6 +268,25 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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
*
@ -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
@ -343,6 +364,31 @@ elm_bubble_icon_get(const Evas_Object *obj)
return wd->icon;
}
/**
* 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
*

View 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
*/
@ -416,6 +420,30 @@ elm_button_icon_get(const Evas_Object *obj)
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 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
*

View 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
@ -357,6 +359,30 @@ elm_check_icon_get(const Evas_Object *obj)
return wd->icon;
}
/**
* 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
*

View File

@ -298,6 +298,25 @@ elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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
*

View 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
*/
@ -564,6 +567,56 @@ elm_flip_content_back_get(const Evas_Object *obj)
return wd->back.content;
}
/**
* 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
*

View File

@ -203,6 +203,25 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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
*

View 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);
@ -494,6 +494,39 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
_sizing_eval(obj);
}
/**
* 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
*

View File

@ -225,6 +225,25 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
_configure(obj);
}
/**
* 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
*

View File

@ -479,6 +479,23 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
_sizing_eval(obj);
}
/**
* 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
*

View 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
*
@ -484,6 +487,23 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
_calc(obj);
}
/**
* 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
*

View File

@ -369,6 +369,25 @@ elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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.
*

View 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)
{

View 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
@ -421,6 +423,30 @@ elm_progressbar_icon_get(const Evas_Object *obj)
return wd->icon;
}
/**
* 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
*

View 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
@ -398,6 +400,30 @@ elm_radio_icon_get(const Evas_Object *obj)
return wd->icon;
}
/**
* 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
*

View File

@ -530,12 +530,31 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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

View 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

View 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
*/
@ -330,6 +334,30 @@ elm_toggle_icon_get(const Evas_Object *obj)
return wd->icon;
}
/**
* 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.
*

View File

@ -2272,6 +2272,25 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
_sizing_eval(obj);
}
/**
* 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.
*