layout: Remove method theme_enable

This was an internal thing, ugly, replaced by another ugly
solution, but maybe less ugly.

Ref T5315
This commit is contained in:
Jean-Philippe Andre 2017-08-02 21:15:50 +09:00
parent ed94e8b535
commit a4940ae6c9
6 changed files with 17 additions and 44 deletions

View File

@ -912,12 +912,14 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
{
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));
@ -1031,7 +1033,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
evas_object_unref(obj);
return int_ret;
return theme_apply;
}
static void
@ -3328,12 +3330,6 @@ _efl_ui_text_efl_canvas_group_group_member_add(Eo *obj, Efl_Ui_Text_Data *sd, Ev
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)
{

View File

@ -412,7 +412,6 @@ class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
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;

View File

@ -862,12 +862,14 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
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));
@ -1001,7 +1003,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
evas_object_unref(obj);
return int_ret;
return theme_apply;
}
static void
@ -4010,12 +4012,6 @@ _elm_entry_efl_canvas_group_group_member_add(Eo *obj, Elm_Entry_Data *sd, Evas_O
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)
{

View File

@ -962,7 +962,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
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;

View File

@ -376,19 +376,13 @@ _elm_layout_theme_internal(Eo *obj, Elm_Layout_Smart_Data *sd)
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;
theme_apply = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!theme_apply) return ELM_THEME_APPLY_FAILED;
int_ret = _elm_layout_theme_internal(obj, sd) & int_ret;
return int_ret;
theme_apply &= _elm_layout_theme_internal(obj, sd);
return theme_apply;
}
static void *
@ -602,12 +596,6 @@ _elm_layout_sub_object_add_enable(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *_p
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,

View File

@ -62,11 +62,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
settings loaded \@ref elm_layout_file_set.]]
}
}
theme_enable {
[[Enable theme]]
legacy: null;
return: bool; [[$true on success, $false otherwise]]
}
sizing_eval {
[[Eval sizing.