{
const char *str;
const char *style = elm_widget_style_get(obj);
+ Elm_Theme_Apply theme_apply;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
+ // Note: We are skipping elm_layout here! This is by design.
+ // This assumes the following inheritance: my_class -> layout -> widget ...
+ theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
evas_event_freeze(evas_object_evas_get(obj));
evas_object_unref(obj);
- return int_ret;
+ return theme_apply;
}
static void
evas_object_raise(sd->hit_rect);
}
-EOLIAN static Eina_Bool
-_efl_ui_text_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd EINA_UNUSED)
-{
- return EINA_FALSE;
-}
-
static void
_cb_added(void *data EINA_UNUSED, const Efl_Event *ev)
{
Elm.Widget.disable;
Elm.Widget.sub_object_del;
Elm.Widget.focus_next_manager_is;
- Elm.Layout.theme_enable;
Elm.Layout.sizing_eval;
Elm.Layout.signal_callback_add;
Elm.Layout.signal_callback_del;
const char *t;
const char *stl_user;
const char *style = elm_widget_style_get(obj);
+ Elm_Theme_Apply theme_apply;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
+ // Note: We are skipping elm_layout here! This is by design.
+ // This assumes the following inheritance: my_class -> layout -> widget ...
+ theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
evas_event_freeze(evas_object_evas_get(obj));
evas_object_unref(obj);
- return int_ret;
+ return theme_apply;
}
static void
evas_object_raise(sd->hit_rect);
}
-EOLIAN static Eina_Bool
-_elm_entry_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd EINA_UNUSED)
-{
- return EINA_FALSE;
-}
-
EAPI Evas_Object *
elm_entry_add(Evas_Object *parent)
{
Elm.Widget.disable;
Elm.Widget.sub_object_del;
Elm.Widget.focus_next_manager_is;
- Elm.Layout.theme_enable;
Elm.Layout.sizing_eval;
Elm.Layout.signal_callback_add;
Elm.Layout.signal_callback_del;
EOLIAN static Elm_Theme_Apply
_elm_layout_elm_widget_theme_apply(Eo *obj, Elm_Layout_Smart_Data *sd)
{
- Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
+ Elm_Theme_Apply theme_apply = ELM_THEME_APPLY_FAILED;
- int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
- if (!int_ret) return ELM_THEME_APPLY_FAILED;
- /* The following lines are here to support entry design; the _theme function
- * of entry needs to call directly the widget _theme function */
- Eina_Bool enable = EINA_TRUE;
- enable = elm_obj_layout_theme_enable(obj);
- if (!enable) return int_ret;
-
- int_ret = _elm_layout_theme_internal(obj, sd) & int_ret;
+ theme_apply = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
+ if (!theme_apply) return ELM_THEME_APPLY_FAILED;
- return int_ret;
+ theme_apply &= _elm_layout_theme_internal(obj, sd);
+ return theme_apply;
}
static void *
return EINA_TRUE;
}
-EOLIAN static Eina_Bool
-_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
-{
- return EINA_TRUE;
-}
-
EAPI Eina_Bool
_elm_layout_part_aliasing_eval(const Evas_Object *obj,
const char **part,
settings loaded \@ref elm_layout_file_set.]]
}
}
- theme_enable {
- [[Enable theme]]
- legacy: null;
- return: bool; [[$true on success, $false otherwise]]
- }
sizing_eval {
[[Eval sizing.