aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_widget.c
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-17 17:24:39 +0900
committerSungtaek Hong <sth253.hong@samsung.com>2017-12-08 16:02:22 +0900
commit751cf2c0d0d2dff2dcf55f3e49a16924a57e6da7 (patch)
tree65e206687da02a9d27c8f97cf75677585494dce9 /src/lib/elementary/elm_widget.c
parentefl_ui_widget: find theme just once in layout inherited widget (diff)
downloadefl-751cf2c0d0d2dff2dcf55f3e49a16924a57e6da7.tar.gz
efl_ui_widget: make Elm.Widget.theme, Elm.Widget.theme_object internal
Diffstat (limited to 'src/lib/elementary/elm_widget.c')
-rw-r--r--src/lib/elementary/elm_widget.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 45163c806e..317e631625 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -2661,9 +2661,10 @@ _elm_widget_efl_gfx_scale_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
return sd->scale;
}
-EOLIAN static void
-_elm_widget_theme_set(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Theme *th)
+EAPI void
+elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th)
{
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd);
Eina_Bool apply = EINA_FALSE;
if (sd->theme != th)
{
@@ -2675,13 +2676,6 @@ _elm_widget_theme_set(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Theme *th)
}
}
-/* beta in eo */
-EAPI void
-elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th)
-{
- efl_ui_widget_theme_set(obj, th);
-}
-
EAPI void
elm_widget_part_text_set(Eo *obj, const char *part, const char *label)
{
@@ -2883,9 +2877,11 @@ _elm_widget_access_info_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
return sd->access_info;
}
-EOLIAN static Elm_Theme*
-_elm_widget_theme_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
+EAPI Elm_Theme *
+elm_widget_theme_get(const Evas_Object *obj)
{
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd, NULL);
+
if (!sd->theme)
{
if (sd->parent_obj && elm_widget_is(sd->parent_obj))
@@ -2895,13 +2891,6 @@ _elm_widget_theme_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
return sd->theme;
}
-/* beta in eo */
-EAPI Elm_Theme *
-elm_widget_theme_get(const Evas_Object *obj)
-{
- return efl_ui_widget_theme_get(obj);
-}
-
EOLIAN static Efl_Ui_Theme_Apply
_elm_widget_style_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *style)
{
@@ -3013,9 +3002,11 @@ elm_widget_scroll_child_locked_y_get(const Eo *obj)
return sd->child_drag_y_locked;
}
-EOLIAN static Efl_Ui_Theme_Apply
-_elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle)
+EAPI Efl_Ui_Theme_Apply
+elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle)
{
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd, EFL_UI_THEME_APPLY_FAILED);
+
if (eina_streq(welement, "base"))
welement = NULL;
if (eina_streq(wstyle, "default"))
@@ -3036,13 +3027,6 @@ _elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *ed
return ret;
}
-/* beta in eo */
-EAPI Efl_Ui_Theme_Apply
-elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle)
-{
- return efl_ui_widget_theme_object_set(obj, edj, wname, welement, wstyle);
-}
-
static void
_convert(Efl_Dbg_Info *info, Eina_Iterator *ptr_list)
{
@@ -3702,7 +3686,7 @@ elm_widget_element_update(Evas_Object *obj, Evas_Object *component, const char *
}
else
{
- ret = efl_ui_widget_theme_object_set(obj, component,
+ ret = elm_widget_theme_object_set(obj, component,
elm_widget_theme_klass_get(obj),
(const char *)group,
elm_widget_theme_style_get(obj));