return obj;
}
-/* FIXME: replicated from elm_layout just because button's icon spot
- * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
- * can changed the theme API */
-static void
-_icon_signal_emit(Evas_Object *obj)
-{
- char buf[64];
-
- if (!elm_widget_resize_object_get(obj)) return;
- if (!edje_object_part_exists(obj, "elm.swallow.content")) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
-
- elm_layout_signal_emit(obj, buf, "elm");
- edje_object_message_signal_process(elm_layout_edje_get(obj));
- efl_canvas_group_change(obj);
-}
-
/* FIXME: replicated from elm_layout just because button's icon spot
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
- if (efl_finalized_get(obj)) _icon_signal_emit(obj);
+ if (efl_finalized_get(obj)) _elm_layout_legacy_icon_signal_emit(obj);
#ifdef TIZEN_VECTOR_UX
tizen_vg_button_set(obj);
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
return obj;
}
-/* FIXME: replicated from elm_layout just because check's icon spot
- * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
- * can changed the theme API */
-static void
-_icon_signal_emit(Evas_Object *obj)
-{
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
- char buf[64];
-
- if (!elm_widget_resize_object_get(obj)) return;
- if (!edje_object_part_exists(obj, "elm.swallow.content")) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
-
- elm_layout_signal_emit(obj, buf, "elm");
- edje_object_message_signal_process(wd->resize_obj);
-
- efl_canvas_group_change(obj);
-}
-
/* FIXME: replicated from elm_layout just because check's icon spot
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
- if (efl_finalized_get(obj)) _icon_signal_emit(obj);
+ if (efl_finalized_get(obj)) _elm_layout_legacy_icon_signal_emit(obj);
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
_edje_signal_callback, esd);
}
+/* replicated from elm_layout just because legacy widget's icon spot
+ * is elm.swallow.content, not elm.swallow.icon.
+ */
+void
+_elm_layout_legacy_icon_signal_emit(Evas_Object *obj)
+{
+ char buf[63];
+ Eo *edje;
+
+ edje = elm_layout_edje_get(obj);
+ if (!edje) return;
+ if (!edje_object_part_exists(obj, "elm.swallow.content")) return;
+ snprintf(buf, sizeof(buf), "elm,state,icon,%s",
+ elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
+
+ elm_layout_signal_emit(obj, buf, "elm");
+ edje_object_message_signal_process(edje);
+ efl_canvas_group_change(obj);
+}
+
EAPI void
elm_layout_signal_callback_add(Eo *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
{
return obj;
}
-/* FIXME: replicated from elm_layout just because progressbar's icon spot
- * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
- * can changed the theme API */
-static void
-_icon_signal_emit(Evas_Object *obj)
-{
- char buf[64];
-
- if (!elm_widget_resize_object_get(obj)) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
-
- elm_layout_signal_emit(obj, buf, "elm");
- edje_object_message_signal_process(elm_layout_edje_get(obj));
- efl_canvas_group_change(obj);
-}
-
/* FIXME: replicated from elm_layout just because progressbar's icon spot
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
- if (efl_finalized_get(obj)) _icon_signal_emit(obj);
+ if (efl_finalized_get(obj)) _elm_layout_legacy_icon_signal_emit(obj);
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
return obj;
}
-/* FIXME: replicated from elm_layout just because radio's icon spot
- * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
- * can changed the theme API */
-static void
-_icon_signal_emit(Evas_Object *obj)
-{
- char buf[63];
- Eo *edje;
-
- edje = elm_widget_resize_object_get(obj);
- if (!edje) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
-
- elm_layout_signal_emit(obj, buf, "elm");
- edje_object_message_signal_process(edje);
- efl_canvas_group_change(obj);
-}
-
EOLIAN static Eina_Error
_efl_ui_radio_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
{
/* FIXME: replicated from elm_layout just because radio's icon
* spot is elm.swallow.content, not elm.swallow.icon. Fix that
* whenever we can changed the theme API */
- if (efl_finalized_get(obj)) _icon_signal_emit(obj);
+ if (efl_finalized_get(obj)) _elm_layout_legacy_icon_signal_emit(obj);
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_RADIO_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_RADIO_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _elm_layout_legacy_icon_signal_emit(obj);
return EINA_TRUE;
}
void tizen_vg_slider_set(Elm_Slider *obj, Evas_Object *popup);
#endif
+void _elm_layout_legacy_icon_signal_emit(Evas_Object *obj);
// elm_layout and elm_entry LEGACY signal API (returned the user data pointer)
void _elm_layout_signal_callback_add_legacy(Eo *obj, Eo *edje, Eina_List **p_edje_signals, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
void *_elm_layout_signal_callback_del_legacy(Eo *obj, Eo *edje, Eina_List **p_edje_signals, const char *emission, const char *source, Edje_Signal_Cb func);