* elm_scroller_content_unset() function.
* @deprecated use elm_object_content_set() instead
*/
- EINA_DEPRECATED 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
*
* until the toggle is released by the cursor (assuming it
* has been triggered by the cursor in the first place).
*
+ * Default contents parts of the toggle widget that you can use for are:
+ * @li "icon" - A icon of the toggle
+ *
+ * Default text parts of the toggle widget that you can use for are:
+ * @li "elm.text" - Label of the toggle
+ *
* @ref tutorial_toggle show how to use a toggle.
* @{
*/
* If you want to keep that old content object, use the
* elm_toggle_icon_unset() function.
*
- * @deprecated use elm_object_content_set() instead.
+ * @deprecated use elm_object_content_part_set() instead.
*/
EINA_DEPRECATED EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
*
* @see elm_toggle_icon_set()
*
- * @deprecated use elm_object_content_get() instead.
+ * @deprecated use elm_object_content_part_get() instead.
*/
EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
*
* @see elm_toggle_icon_set()
*
- * @deprecated use elm_object_content_unset() instead.
+ * @deprecated use elm_object_content_part_unset() instead.
*/
EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* you want to keep that old content object, use the
* elm_ctxpopup_content_unset() function.
*
- * @deprecated use elm_object_content_set()
- *
* @warning Ctxpopup can't hold both a item list and a content at the same
* time. When a content is set, any previous items will be removed.
*
- *
* @deprecated use elm_object_content_set() instead
*
*/
static void
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
- if (!part || strcmp(part, "video")) return;
+ if (part && strcmp(part, "video")) return;
#ifdef HAVE_EMOTION
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- if (!part || strcmp(part, "overlay")) return;
+ if (part && strcmp(part, "overlay")) return;
wd = elm_widget_data_get(obj);
if (!wd) return;
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part || strcmp(part, "overlay")) return NULL;
+ if (part && strcmp(part, "overlay")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->overlay;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
Evas_Object *overlay;
- if (!part || strcmp(part, "overlay")) return NULL;
+ if (part && strcmp(part, "overlay")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd || !wd->overlay) return NULL;
overlay = wd->overlay;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (!part || strcmp(part, "icon")) return;
+ if (part && strcmp(part, "icon")) return;
if (wd->icon == content) return;
if (wd->icon) evas_object_del(wd->icon);
wd->icon = content;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- if (strcmp(part, "icon")) return;
+ if (part && strcmp(part, "icon")) return;
wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd;
-
- if (!part) return;
- wd = elm_widget_data_get(obj);
+ Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (!strcmp(part, "right"))
+ if (!part || !strcmp(part, "right"))
_content_right_set(obj, content);
else if(!strcmp(part, "left"))
_content_left_set(obj, content);
_content_get_hook(const Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd;
-
- if (!part) return NULL;
- wd = elm_widget_data_get(obj);
+ Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if (!strcmp(part, "right"))
+ if (!part || !strcmp(part, "right"))
return wd->contents.left;
else if (!strcmp(part, "left"))
return wd->contents.right;
_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd;
-
- if (!part) return NULL;
- wd = elm_widget_data_get(obj);
+ Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if (!strcmp(part, "right"))
+ if (!part || !strcmp(part, "right"))
_content_right_unset(obj);
else if (!strcmp(part, "left"))
_content_left_unset(obj);
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return;
+ if (part && strcmp(part, "icon")) return;
wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
Evas_Object *icon;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return;
+ if (part && strcmp(part, "icon")) return;
wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->icon == content) return;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->icon;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
Evas_Object *icon;
- if (!part || strcmp(part, "icon")) return NULL;
+ if (part && strcmp(part, "icon")) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
if (!wd->icon) return NULL;
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
- if (!part) return;
- if (!strcmp(part, "icon"))
+ if (!part || !strcmp(part, "icon"))
_icon_set(obj, content);
else if (!strcmp(part, "end"))
_end_set(obj, content);
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd;
- if (!part) return NULL;
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if (!strcmp(part, "icon"))
+ if (!part || !strcmp(part, "icon"))
return wd->icon;
else if (!strcmp(part, "end"))
return wd->end;
_content_unset_hook(Evas_Object *obj, const char *part)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- if (!part) return NULL;
- if (!strcmp(part, "icon"))
+ if (!part || !strcmp(part, "icon"))
return _icon_unset(obj);
else if (!strcmp(part, "end"))
return _end_unset(obj);