efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error

Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
This commit is contained in:
Mike Blumenkrantz 2019-03-04 13:36:41 -05:00
parent 2f007f7a08
commit 644b771fe4
94 changed files with 429 additions and 403 deletions

View File

@ -1,14 +1,14 @@
/* Efl.Ui enum and struct types */
enum Efl.Ui.Theme_Apply_Result
enum Efl.Ui.Theme_Apply_Error
{
[[Return error code when setting the style on a widget.]]
fail = 0, [[Failed to apply theme. The widget may become unusable.]]
none = 0, [[Successfully applied the requested style from the current
theme.]]
default = 1, [[Successfully applied the default style. The widget may
look different from the rest of the UI if a custom theme
is in use, but it should be usable.]]
success = 3 [[Successfully applied the requested style from the current
theme.]]
generic = 2, [[Failed to apply theme. The widget may become unusable.]]
}
enum Efl.Ui.Focus.Direction

View File

@ -32,10 +32,10 @@ _efl_ui_bg_efl_object_constructor(Eo *obj, Efl_Ui_Bg_Data *pd)
elm_widget_sub_object_parent_add(obj);
elm_widget_can_focus_set(obj, EINA_FALSE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
if (elm_widget_is_legacy(obj))

View File

@ -255,10 +255,10 @@ _efl_ui_button_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Button_Data *_pd EINA_
elm_widget_can_focus_set(obj, EINA_TRUE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
}
@ -442,13 +442,13 @@ _icon_signal_emit(Evas_Object *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 */
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_button_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
return int_ret;

View File

@ -510,13 +510,13 @@ _spinner_buttons_add(Evas_Object *obj, Efl_Ui_Calendar_Data *sd)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_calendar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Calendar_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_spinner_buttons_add(obj, sd);
@ -938,10 +938,10 @@ _efl_ui_calendar_constructor_internal(Eo *obj, Efl_Ui_Calendar_Data *priv)
if (!elm_widget_theme_klass_get(obj))
elm_widget_theme_klass_set(obj, "calendar");
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
evas_object_smart_changed(obj);

View File

@ -135,16 +135,15 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
return EINA_TRUE;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_check_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Check_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (elm_widget_is_legacy(obj))
{
@ -492,13 +491,13 @@ _icon_signal_emit(Evas_Object *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 */
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_check_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);

View File

@ -514,10 +514,10 @@ _efl_ui_clock_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Clock_Data *sd)
evas_object_size_hint_max_set(obj, -1, -1);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_clock_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Clock_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Clock_Field *field;
char buf[BUFFER_SIZE];
@ -527,7 +527,7 @@ _efl_ui_clock_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Clock_Data *sd)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
dt_mod = _dt_mod_init();
if ((!dt_mod) || (!dt_mod->field_value_display)) return EINA_TRUE;
@ -857,10 +857,10 @@ _efl_ui_clock_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Clock_Data *priv)
efl_canvas_group_add(efl_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
// module - initialise module for clock

View File

@ -244,10 +244,10 @@ _efl_ui_datepicker_efl_object_constructor(Eo *obj, Efl_Ui_Datepicker_Data *pd)
elm_widget_theme_klass_set(obj, "datepicker");
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
pd->dt_manager = efl_add(EFL_DATETIME_MANAGER_CLASS, obj);

View File

@ -97,12 +97,12 @@ _sizing_eval(Evas_Object *obj)
evas_object_size_hint_max_set(obj, maxw, maxh);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_flip_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Flip_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_sizing_eval(obj);

View File

@ -136,10 +136,10 @@ _efl_ui_frame_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UN
elm_widget_can_focus_set(obj, EINA_FALSE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_layout_sizing_eval(obj);

View File

@ -844,12 +844,12 @@ _efl_ui_grid_efl_ui_direction_direction_get(const Eo *obj EINA_UNUSED, Efl_Ui_Gr
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_grid_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Grid_Data *pd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
efl_ui_mirrored_set(pd->smanager, efl_ui_mirrored_get(obj));

View File

@ -23,9 +23,9 @@ _efl_ui_grid_default_item_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
Eo *eo;
eo = efl_finalize(efl_super(obj, MY_CLASS));
ELM_WIDGET_DATA_GET_OR_RETURN(eo, wd, eo);
Efl_Ui_Theme_Apply_Result theme_apply = efl_ui_layout_theme_set(obj, "grid_item", NULL, NULL);
Efl_Ui_Theme_Apply_Error theme_apply = efl_ui_layout_theme_set(obj, "grid_item", NULL, NULL);
if (theme_apply == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (theme_apply == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Default Item(%p) failed to set theme [efl/grid_item]!", eo);
return eo;
}

View File

@ -717,16 +717,16 @@ _efl_ui_image_efl_canvas_object_clipper_set(Eo *obj, Efl_Ui_Image_Data *sd, Evas
if (sd->prev_img) evas_object_clip_set(sd->prev_img, clip);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_image_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (sd->stdicon)
_elm_theme_object_icon_set(obj, sd->stdicon, elm_widget_style_get(obj));
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_efl_ui_image_sizing_eval(obj);

View File

@ -920,17 +920,17 @@ _efl_ui_image_zoomable_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Image
return EINA_TRUE;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_image_zoomable_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_Bool fdo = EINA_FALSE;
if (sd->stdicon)
_internal_efl_ui_image_zoomable_icon_set(obj, sd->stdicon, &fdo, EINA_TRUE);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
efl_ui_mirrored_set(sd->smanager, efl_ui_mirrored_get(obj));

View File

@ -445,12 +445,12 @@ _efl_ui_layout_base_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Layout_Data *_pd
_flush_mirrored_state(obj);
}
static Efl_Ui_Theme_Apply_Result
static Efl_Ui_Theme_Apply_Error
_efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd)
{
Efl_Ui_Theme_Apply_Result ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
/* function already prints error messages, if any */
if (!sd->file_set)
@ -462,22 +462,22 @@ _efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd)
elm_widget_theme_style_get(obj));
}
if (ret)
if (ret != EFL_UI_THEME_APPLY_ERROR_GENERIC)
efl_event_callback_legacy_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL);
if (!_visuals_refresh(obj, sd))
ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
return ret;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd)
{
Efl_Ui_Theme_Apply_Result theme_apply_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error theme_apply_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
theme_apply_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!theme_apply_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
theme_apply_ret &= _efl_ui_layout_theme_internal(obj, sd);
return theme_apply_ret;
@ -920,7 +920,7 @@ _efl_ui_layout_base_theme_get(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED,
if (style) *style = elm_widget_theme_style_get(obj);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_layout_base_theme_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *klass, const char *group, const char *style)
{
Eina_Bool changed = EINA_FALSE;
@ -928,7 +928,7 @@ _efl_ui_layout_base_theme_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *klass
if (!elm_widget_is_legacy(obj) && efl_finalized_get(obj))
{
ERR("Efl.Ui.Layout_theme can only be set before finalize!");
return EFL_UI_THEME_APPLY_RESULT_FAIL;
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
}
if (sd->file_set) sd->file_set = EINA_FALSE;
@ -939,7 +939,7 @@ _efl_ui_layout_base_theme_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *klass
if (changed)
return efl_ui_widget_theme_apply(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
EOLIAN static void
@ -2944,10 +2944,10 @@ elm_layout_data_get(const Evas_Object *obj, const char *key)
EAPI Eina_Bool
elm_layout_theme_set(Evas_Object *obj, const char *klass, const char *group, const char *style)
{
Efl_Ui_Theme_Apply_Result theme_apply_ret;
Efl_Ui_Theme_Apply_Error theme_apply_ret;
theme_apply_ret = efl_ui_layout_theme_set(obj, klass, group, style);
return (theme_apply_ret != EFL_UI_THEME_APPLY_RESULT_FAIL);
return (theme_apply_ret != EFL_UI_THEME_APPLY_ERROR_GENERIC);
}
#include "efl_ui_layout_legacy.eo.c"

View File

@ -30,9 +30,9 @@ abstract @beta Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container
If this returns $false the widget is very likely to become
non-functioning.
]]
return: Efl.Ui.Theme_Apply_Result(0);
return: Efl.Ui.Theme_Apply_Error(2);
[[Whether the style was successfully applied or not, see
the values of @Efl.Ui.Theme_Apply_Result for more information.]]
the values of @Efl.Ui.Theme_Apply_Error for more information.]]
}
get {
[[Get information about the current theme in use.]]

View File

@ -426,8 +426,8 @@ _efl_ui_list_efl_object_finalize(Eo *obj,
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
Efl_Ui_Theme_Apply_Result theme_apply_ret = efl_ui_layout_theme_set(obj, "list", "base", efl_ui_widget_style_get(obj));
if (theme_apply_ret == EFL_UI_THEME_APPLY_RESULT_FAIL)
Efl_Ui_Theme_Apply_Error theme_apply_ret = efl_ui_layout_theme_set(obj, "list", "base", efl_ui_widget_style_get(obj));
if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("list(%p) failed to set theme [efl/list:%s]!", obj, efl_ui_widget_style_get(obj) ?: "NULL");
pd->smanager = efl_add(EFL_UI_SCROLL_MANAGER_CLASS, obj);
@ -599,12 +599,12 @@ _efl_ui_list_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_List_Data
}
*/
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_list_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_List_Data *pd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
efl_ui_mirrored_set(pd->smanager, efl_ui_mirrored_get(obj));

View File

@ -23,9 +23,9 @@ _efl_ui_list_default_item_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
Eo *eo;
eo = efl_finalize(efl_super(obj, MY_CLASS));
ELM_WIDGET_DATA_GET_OR_RETURN(eo, wd, eo);
Efl_Ui_Theme_Apply_Result theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, NULL);
Efl_Ui_Theme_Apply_Error theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, NULL);
if (theme_apply_ret == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Default Item(%p) failed to set theme [efl/list_item]!", eo);
return eo;
}

View File

@ -21,9 +21,9 @@ _efl_ui_list_empty_item_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
Eo *eo;
eo = efl_finalize(efl_super(obj, MY_CLASS));
ELM_WIDGET_DATA_GET_OR_RETURN(eo, wd, eo);
Efl_Ui_Theme_Apply_Result theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, "empty");
Efl_Ui_Theme_Apply_Error theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, "empty");
if (theme_apply_ret == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Empty Item(%p) failed to set theme [efl/list_item:empty]!", eo);
return eo;
}

View File

@ -42,10 +42,10 @@ _efl_ui_navigation_bar_efl_object_constructor(Eo *obj, Efl_Ui_Navigation_Bar_Dat
elm_widget_sub_object_parent_add(obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
Eo *back_button = efl_add(EFL_UI_BUTTON_CLASS, obj,

View File

@ -40,10 +40,10 @@ _efl_ui_navigation_layout_efl_object_constructor(Eo *obj, Efl_Ui_Navigation_Layo
elm_widget_sub_object_parent_add(obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
return obj;

View File

@ -116,13 +116,13 @@ _efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state)
_state_active(obj, pd);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_nstate_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_state_signal_emit(obj, pd);

View File

@ -328,10 +328,10 @@ _efl_ui_pager_efl_object_constructor(Eo *obj,
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_widget_sub_object_parent_add(obj);

View File

@ -198,18 +198,18 @@ _scrollable_layout_theme_set(Eo *obj, Efl_Ui_Panel_Data *sd)
_access_obj_process(obj, EINA_TRUE);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_panel_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Panel_Data *sd)
{
const char *str;
Evas_Coord minw = 0, minh = 0;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -110,14 +110,14 @@ _efl_ui_panes_theme_group_get(Evas_Object *obj, Efl_Ui_Panes_Data *sd)
return eina_strbuf_release(new_group);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_panes_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Panes_Data *sd)
{
double size;
Evas_Coord minw = 0, minh = 0;
char *group;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
group = _efl_ui_panes_theme_group_get(obj, sd);
if (group)
@ -131,7 +131,7 @@ _efl_ui_panes_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Panes_Data *sd)
evas_object_size_hint_min_set(sd->event, minw, minh);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
size = elm_panes_content_left_size_get(obj);
@ -411,10 +411,10 @@ _efl_ui_panes_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Panes_Data *_pd EINA_UN
elm_widget_sub_object_parent_add(obj);
group = _efl_ui_panes_theme_group_get(obj, sd);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
free(group);

View File

@ -218,10 +218,10 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
elm_widget_sub_object_parent_add(obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
pd->backwall = edje_object_add(evas_object_evas_get(obj));

View File

@ -232,11 +232,11 @@ _efl_ui_progressbar_theme_group_get(Evas_Object *obj, Efl_Ui_Progressbar_Data *s
return eina_strbuf_release(new_group);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
char *group;
group = _efl_ui_progressbar_theme_group_get(obj, sd);
@ -247,7 +247,7 @@ _efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data *
}
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (elm_widget_is_legacy(obj))
{
@ -366,11 +366,10 @@ _efl_ui_progressbar_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Progressbar_Data
priv->val_max = 1.0;
group = _efl_ui_progressbar_theme_group_get(obj, priv);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)))
CRI("Failed to set layout!");
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
free(group);
@ -820,13 +819,13 @@ _icon_signal_emit(Evas_Object *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 */
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_progressbar_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
return int_ret;

View File

@ -147,13 +147,13 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
return EINA_TRUE;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_radio_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Radio_Data *sd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (elm_widget_is_legacy(obj))
{
@ -414,12 +414,12 @@ _icon_signal_emit(Evas_Object *obj)
elm_layout_sizing_eval(obj);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_radio_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_RADIO_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
/* FIXME: replicated from elm_layout just because radio's icon
* spot is elm.swallow.content, not elm.swallow.icon. Fix that

View File

@ -678,12 +678,12 @@ _efl_ui_scroller_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Scroller_Data *sd)
efl_gfx_hint_size_min_set(obj, size);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_scroller_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Scroller_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
efl_ui_mirrored_set(sd->smanager, efl_ui_mirrored_get(obj));

View File

@ -423,11 +423,11 @@ _efl_ui_slider_theme_group_get(Evas_Object *obj, Efl_Ui_Slider_Data *sd)
return eina_strbuf_release(new_group);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_slider_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Slider_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
char *group;
group = _efl_ui_slider_theme_group_get(obj, sd);
@ -438,7 +438,7 @@ _efl_ui_slider_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Slider_Data *sd)
}
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (elm_widget_is_legacy(obj))
{
@ -640,10 +640,10 @@ _efl_ui_slider_efl_object_constructor(Eo *obj, Efl_Ui_Slider_Data *priv)
elm_widget_sub_object_parent_add(obj);
group = _efl_ui_slider_theme_group_get(obj, priv);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
free(group);

View File

@ -245,10 +245,10 @@ _efl_ui_spin_efl_object_constructor(Eo *obj, Efl_Ui_Spin_Data *sd)
sd->step = 1.0;
sd->special_values = eina_array_new(sizeof(Efl_Ui_Spin_Special_Value));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
_label_write(obj);

View File

@ -788,10 +788,10 @@ _efl_ui_spin_button_theme_group_get(Evas_Object *obj, Efl_Ui_Spin_Button_Data *s
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_spin_button_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Spin_Button_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
char *group;
group = _efl_ui_spin_button_theme_group_get(obj, sd);
@ -802,7 +802,7 @@ _efl_ui_spin_button_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Spin_Button_Data *
}
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (sd->ent)
elm_widget_element_update(obj, sd->ent, PART_NAME_ENTRY);
@ -821,7 +821,7 @@ _efl_ui_spin_button_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Spin_Button_Data *
_label_write(obj);
elm_layout_sizing_eval(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
EOLIAN static Eo *
@ -836,12 +836,13 @@ _efl_ui_spin_button_efl_object_constructor(Eo *obj, Efl_Ui_Spin_Button_Data *sd)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
group = _efl_ui_spin_button_theme_group_get(obj, sd);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
group,
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
free(group);
sd->first_interval = 0.85;

View File

@ -213,7 +213,7 @@ _tab_add(Eo *obj, const char *label, const char *icon)
{
Eo *tab, *icon_obj;
Tab_Info *ti;
Efl_Ui_Theme_Apply_Result theme_apply;
Efl_Ui_Theme_Apply_Error theme_apply;
ti = calloc(1, sizeof(*ti));
@ -243,7 +243,7 @@ _tab_add(Eo *obj, const char *label, const char *icon)
theme_apply = elm_widget_element_update(obj, tab, PART_NAME_TAB);
if (theme_apply == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (theme_apply == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
efl_layout_signal_callback_add
@ -370,12 +370,13 @@ _efl_ui_tab_bar_efl_object_constructor(Eo *obj, Efl_Ui_Tab_Bar_Data *sd)
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_widget_sub_object_parent_add(obj);
sd->dir = EFL_UI_DIR_HORIZONTAL;

View File

@ -49,12 +49,13 @@ _efl_ui_tab_page_efl_object_constructor(Eo *obj, Efl_Ui_Tab_Page_Data *sd)
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_widget_sub_object_parent_add(obj);
efl_ui_widget_focus_allow_set(obj, EINA_TRUE);

View File

@ -28,12 +28,12 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
evas_object_table_mirrored_set(wd->resize_obj, rtl);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_table_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -403,7 +403,7 @@ _item_new(Efl_Ui_Tags_Data *sd,
layout = efl_add(EFL_UI_LAYOUT_CLASS, obj);
if (!elm_widget_element_update(obj, layout, PART_NAME_BUTTON))
if (elm_widget_element_update(obj, layout, PART_NAME_BUTTON) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
efl_text_set(efl_part(layout, "efl.btn.text"), str);
@ -1011,10 +1011,10 @@ _efl_ui_tags_efl_object_constructor(Eo *obj, Efl_Ui_Tags_Data *sd)
obj = efl_constructor(efl_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_widget_can_focus_set(obj, EINA_FALSE);

View File

@ -733,17 +733,17 @@ _efl_ui_text_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool
/* we can't issue the layout's theming code here, cause it assumes an
* unique edje object, always */
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_text_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
{
Efl_Ui_Theme_Apply_Result theme_apply;
Efl_Ui_Theme_Apply_Error theme_apply;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
// Note: We are skipping elm_layout here! This is by design.
// This assumes the following inheritance: my_class -> layout -> widget ...
theme_apply = efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS));
if (!theme_apply) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (theme_apply == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
efl_event_freeze(obj);
@ -2165,11 +2165,11 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
CRI("Failed tp set layout!");
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_ENTRY);
efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _cb_added, NULL);

View File

@ -24,7 +24,7 @@ EOLIAN static Efl_Canvas_Object
Eo *o;
o = efl_add(EFL_CANVAS_LAYOUT_CLASS, object);
if (!elm_widget_element_update(object, o, key))
if (elm_widget_element_update(object, o, key) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
elm_widget_element_update(object, o, "wtf");
}

View File

@ -653,13 +653,13 @@ _efl_ui_textpath_efl_text_text_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Da
return edje_object_part_text_get(pd->text_obj, "efl.text");
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_textpath_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textpath_Data *pd)
{
Efl_Ui_Theme_Apply_Result ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
elm_widget_theme_object_set(obj, pd->text_obj, "textpath", "base",
elm_widget_style_get(obj));

View File

@ -218,10 +218,10 @@ _efl_ui_timepicker_efl_object_constructor(Eo *obj, Efl_Ui_Timepicker_Data *pd EI
elm_widget_theme_klass_set(obj, "timepicker");
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
_fields_init(obj);

View File

@ -249,10 +249,10 @@ _efl_ui_video_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Video_Data *priv)
if (!emotion_object_init(priv->emotion, NULL))
CRI("Failed to init emotion object");
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
if (elm_widget_is_legacy(obj))

View File

@ -1192,31 +1192,63 @@ _efl_ui_widget_on_access_update(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd
{
}
EAPI Efl_Ui_Theme_Apply_Result
EAPI Efl_Ui_Theme_Apply_Error
elm_widget_theme(Evas_Object *obj)
{
const Eina_List *l;
Evas_Object *child;
Elm_Tooltip *tt;
Elm_Cursor *cur;
Efl_Ui_Theme_Apply_Result ret = EFL_UI_THEME_APPLY_RESULT_SUCCESS;
Eina_Bool err_default = EINA_FALSE;
Eina_Bool err_generic = EINA_FALSE;
API_ENTRY return EFL_UI_THEME_APPLY_RESULT_FAIL;
API_ENTRY return EFL_UI_THEME_APPLY_ERROR_GENERIC;
EINA_LIST_FOREACH(sd->subobjs, l, child)
if (_elm_widget_is(child))
ret &= elm_widget_theme(child);
{
switch (elm_widget_theme(child))
{
case EFL_UI_THEME_APPLY_ERROR_DEFAULT:
err_default = EINA_TRUE;
break;
case EFL_UI_THEME_APPLY_ERROR_GENERIC:
err_generic = EINA_TRUE;
break;
default: break;
}
}
if (sd->hover_obj) ret &= elm_widget_theme(sd->hover_obj);
if (sd->hover_obj)
switch (elm_widget_theme(sd->hover_obj))
{
case EFL_UI_THEME_APPLY_ERROR_DEFAULT:
err_default = EINA_TRUE;
break;
case EFL_UI_THEME_APPLY_ERROR_GENERIC:
err_generic = EINA_TRUE;
break;
default: break;
}
EINA_LIST_FOREACH(sd->tooltips, l, tt)
elm_tooltip_theme(tt);
EINA_LIST_FOREACH(sd->cursors, l, cur)
elm_cursor_theme(cur);
ret &= efl_ui_widget_theme_apply(obj);
return ret;
switch (efl_ui_widget_theme_apply(obj))
{
case EFL_UI_THEME_APPLY_ERROR_DEFAULT:
err_default = EINA_TRUE;
break;
case EFL_UI_THEME_APPLY_ERROR_GENERIC:
err_generic = EINA_TRUE;
break;
default: break;
}
if (err_generic) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (err_default) return EFL_UI_THEME_APPLY_ERROR_DEFAULT;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
EAPI void
@ -1264,12 +1296,12 @@ elm_widget_theme_specific(Evas_Object *obj,
efl_ui_widget_theme_apply(obj);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_widget_theme_apply(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
{
_elm_widget_mirrored_reload(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
/**
@ -2795,19 +2827,19 @@ elm_widget_theme_get(const Evas_Object *obj)
return sd->theme;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_widget_style_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *style)
{
if (!elm_widget_is_legacy(obj) && efl_finalized_get(obj))
{
ERR("Efl.Ui.Widget.style can only be set before finalize!");
return EFL_UI_THEME_APPLY_RESULT_FAIL;
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
}
if (eina_stringshare_replace(&sd->style, style))
return elm_widget_theme(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
EOLIAN static const char*
@ -2906,23 +2938,17 @@ elm_widget_scroll_child_locked_y_get(const Eo *obj)
return sd->child_drag_y_locked;
}
EAPI Efl_Ui_Theme_Apply_Result
EAPI Efl_Ui_Theme_Apply_Error
elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle)
{
Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
if (!sd) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (!sd) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (eina_streq(welement, "base"))
welement = NULL;
if (eina_streq(wstyle, "default"))
wstyle = NULL;
Efl_Ui_Theme_Apply_Result ret = _elm_theme_object_set(obj, edj, wname, welement, wstyle);
if (!ret)
{
return EFL_UI_THEME_APPLY_RESULT_FAIL;
}
return ret;
return _elm_theme_object_set(obj, edj, wname, welement, wstyle);
}
static void
@ -3528,10 +3554,10 @@ elm_widget_theme_style_get(const Evas_Object *obj)
* @param name An element name of sub object.
* @return Whether the style was successfully applied or not.
*/
EAPI Efl_Ui_Theme_Apply_Result
EAPI Efl_Ui_Theme_Apply_Error
elm_widget_element_update(Evas_Object *obj, Evas_Object *component, const char *name)
{
Efl_Ui_Theme_Apply_Result ret = EFL_UI_THEME_APPLY_RESULT_SUCCESS;
Efl_Ui_Theme_Apply_Error ret = EFL_UI_THEME_APPLY_ERROR_NONE;
Eina_Bool changed = EINA_FALSE;
const char *obj_group;
Eina_Stringshare *group;

View File

@ -144,9 +144,9 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
]]
set @protected {
[[Can only be called during construction, before finalize.]]
return: Efl.Ui.Theme_Apply_Result(0);
return: Efl.Ui.Theme_Apply_Error(2);
[[Whether the style was successfully applied or not, see
the values of @Efl.Ui.Theme_Apply_Result for more information.]]
the values of @Efl.Ui.Theme_Apply_Error for more information.]]
}
get {
[[Returns the current style of a widget.]]
@ -325,7 +325,7 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
Note: even widgets not based on layouts may override this method
to handle widget updates (scale, mirrored mode, etc...).
]]
return: Efl.Ui.Theme_Apply_Result; [[Indicates success, and if the current
return: Efl.Ui.Theme_Apply_Error; [[Indicates success, and if the current
theme or default theme was used.]]
}

View File

@ -378,7 +378,7 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
void *event_info);
static void
_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
static Efl_Ui_Theme_Apply_Result _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd);
static Efl_Ui_Theme_Apply_Error _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd);
static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style);
static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool calc);
static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine);
@ -3285,7 +3285,7 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
if (cursor)
{
if (!elm_widget_theme_object_set(sd->obj, sd->pointer.obj,
if (elm_widget_theme_object_set(sd->obj, sd->pointer.obj,
"cursor", cursor, "default"))
{
elm_widget_theme_object_set(sd->obj, sd->pointer.obj,
@ -4501,8 +4501,8 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
v = version ? atoi(version) : 0;
if (EINA_LIKELY(v >= FRAME_OBJ_THEME_MIN_VERSION))
{
if (!elm_widget_theme_object_set
(sd->obj, sd->frame_obj, "border", element, style))
if (elm_widget_theme_object_set
(sd->obj, sd->frame_obj, "border", element, style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("Failed to set main border theme for the window.");
ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
@ -6959,16 +6959,16 @@ _efl_ui_win_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Da
return sd->focus_highlight.enabled;
}
static Efl_Ui_Theme_Apply_Result
static Efl_Ui_Theme_Apply_Error
_elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_Bool prev_alpha;
const char *s;
int_ret = elm_widget_theme_object_set(obj, sd->legacy.edje, "win", "base",
elm_widget_style_get(obj));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
edje_object_mirrored_set(sd->legacy.edje, efl_ui_mirrored_get(obj));
edje_object_scale_set(sd->legacy.edje,
@ -6985,17 +6985,17 @@ _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
return int_ret;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
sd->focus_highlight.theme_changed = EINA_TRUE;
int_ret = _elm_win_theme_internal(obj, sd) & int_ret;
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_elm_win_focus_highlight_reconfigure_job_start(sd);
return int_ret;

View File

@ -79,15 +79,15 @@ _elm_combobox_efl_ui_l10n_translation_update(Eo *obj EINA_UNUSED, Elm_Combobox_D
efl_ui_l10n_translation_update(sd->hover);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_combobox_efl_ui_widget_theme_apply(Eo *obj, Elm_Combobox_Data *sd)
{
const char *style;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_Bool mirrored;
char buf[128];
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
style = eina_stringshare_add(elm_widget_style_get(obj));
@ -97,7 +97,7 @@ _elm_combobox_efl_ui_widget_theme_apply(Eo *obj, Elm_Combobox_Data *sd)
eina_stringshare_replace(&(wd->style), buf);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
eina_stringshare_replace(&(wd->style), style);

View File

@ -666,13 +666,13 @@ _on_content_resized(void *data,
}
//FIXME: lost the content size when theme hook is called.
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_ctxpopup_efl_ui_widget_theme_apply(Eo *obj, Elm_Ctxpopup_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
elm_widget_theme_object_set
(obj, sd->bg, "ctxpopup", "bg", elm_widget_style_get(obj));
@ -1044,7 +1044,7 @@ _elm_ctxpopup_efl_canvas_group_group_add(Eo *obj, Elm_Ctxpopup_Data *priv)
//Background
priv->bg = edje_object_add(evas_object_evas_get(obj));
if (!elm_widget_theme_object_set(obj, priv->bg, "ctxpopup", "bg", "default"))
if (elm_widget_theme_object_set(obj, priv->bg, "ctxpopup", "bg", "default"))
CRI("ctxpopup(%p) failed to set theme [efl/ctxpopup/bg/default]!", obj);
edje_object_signal_callback_add

View File

@ -226,16 +226,16 @@ _model_str_property_set(Efl_Model *model, const char *property_name, const char
return efl_model_property_set(model, property_name, eina_value_string_new(property_value));
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_fileselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Data *sd)
{
const char *style;
const char *data;
char buf[1024];
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
style = elm_widget_style_get(obj);
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -38,15 +38,15 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
};
#undef ELM_PRIV_FILESELECTOR_BUTTON_SIGNALS
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_fileselector_button_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Button_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
char buf[4096];
const char *style;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
style = eina_stringshare_add(elm_widget_style_get(obj));
@ -56,7 +56,7 @@ _elm_fileselector_button_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_But
eina_stringshare_replace(&(wd->style), buf);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
eina_stringshare_replace(&(wd->style), style);

View File

@ -127,17 +127,17 @@ _elm_fileselector_entry_elm_layout_sizing_eval(Eo *obj, Elm_Fileselector_Entry_D
evas_object_size_hint_max_set(obj, -1, -1);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_fileselector_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Entry_Data *sd)
{
const char *style;
char buf[1024];
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
style = elm_widget_style_get(obj);

View File

@ -63,14 +63,14 @@ _elm_hoversel_efl_ui_l10n_translation_update(Eo *obj EINA_UNUSED, Elm_Hoversel_D
efl_ui_l10n_translation_update(efl_super(obj, MY_CLASS));
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_hoversel_efl_ui_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_List *l;
Elm_Object_Item *eo_item;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
char buf[4096];
const char *style;
@ -86,7 +86,7 @@ _elm_hoversel_efl_ui_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *sd)
elm_widget_theme_style_set(obj, buf);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
elm_widget_theme_style_set(obj, style);

View File

@ -91,7 +91,7 @@ _format_count(int count, void *data EINA_UNUSED)
return strdup(buf);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_multibuttonentry_efl_ui_widget_theme_apply(Eo *obj, Elm_Multibuttonentry_Data *sd)
{
const char *str;
@ -100,9 +100,9 @@ _elm_multibuttonentry_efl_ui_widget_theme_apply(Eo *obj, Elm_Multibuttonentry_Da
Elm_Object_Item *eo_item;
double pad_scale;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
str = elm_layout_data_get(obj, "horizontal_pad");
if (str) hpad = atoi(str);
@ -1564,10 +1564,10 @@ _elm_multibuttonentry_efl_canvas_group_group_add(Eo *obj, Elm_Multibuttonentry_D
efl_canvas_group_add(efl_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
elm_widget_can_focus_set(obj, EINA_FALSE);

View File

@ -366,7 +366,7 @@ _item_title_enabled_update(Elm_Naviframe_Item_Data *nit, Eina_Bool transition)
edje_object_message_signal_process(elm_layout_edje_get(VIEW(nit)));
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_naviframe_efl_ui_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd)
{
Elm_Naviframe_Item_Data *it;
@ -384,7 +384,7 @@ _elm_naviframe_efl_ui_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd)
}
elm_layout_sizing_eval(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
static char *

View File

@ -185,12 +185,12 @@ _update_theme_slider(Evas_Object *obj, Evas_Object *sl, const char *name, const
elm_object_disabled_set(sl, elm_widget_disabled_get(obj));
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_player_efl_ui_widget_theme_apply(Eo *obj, Elm_Player_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_update_theme_button(obj, sd->forward, "forward");
_update_theme_button(obj, sd->info, "info");

View File

@ -365,7 +365,7 @@ _populate_theme_scroll(Elm_Popup_Data *sd)
sd->theme_scroll = EINA_FALSE;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_popup_efl_ui_widget_theme_apply(Eo *obj, Elm_Popup_Data *sd)
{
Elm_Popup_Item_Data *it;
@ -439,7 +439,7 @@ _elm_popup_efl_ui_widget_theme_apply(Eo *obj, Elm_Popup_Data *sd)
/* access */
if (_elm_config->access_mode) _access_obj_process(obj, EINA_TRUE);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
static void

View File

@ -113,18 +113,18 @@ _mirroredness_change_eval(Evas_Object *obj)
(wd->resize_obj, "elm.drag_button_base", 1.0 - pos, 0.5);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_actionslider_efl_ui_widget_theme_apply(Eo *obj, Elm_Actionslider_Data *sd EINA_UNUSED)
{
Eina_Bool mirrored;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
mirrored = elm_object_mirrored_get(obj);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (elm_object_mirrored_get(obj) != mirrored)
_mirroredness_change_eval(obj);

View File

@ -57,15 +57,15 @@ _child_removed_cb_proxy(void *data, const Efl_Event *event)
efl_event_callback_legacy_call(box, ELM_BOX_EVENT_CHILD_REMOVED, child);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_box_efl_ui_widget_theme_apply(Eo *obj, Elm_Box_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
evas_object_smart_calculate(wd->resize_obj);
return int_ret;

View File

@ -842,13 +842,13 @@ _spinner_buttons_add(Evas_Object *obj, Elm_Calendar_Data *sd)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_calendar_efl_ui_widget_theme_apply(Eo *obj, Elm_Calendar_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_spinner_buttons_add(obj, sd);

View File

@ -627,13 +627,13 @@ _time_update(Evas_Object *obj, Eina_Bool theme_update)
sd->cur.ampm = -1;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_clock_efl_ui_widget_theme_apply(Eo *obj, Elm_Clock_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_time_update(obj, EINA_TRUE);

View File

@ -2341,15 +2341,15 @@ _elm_code_widget_theme_refresh(Eo *obj, Elm_Code_Widget_Data *pd)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_code_widget_efl_ui_widget_theme_apply(Eo *obj, Elm_Code_Widget_Data *pd)
{
if (!efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS)))
return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
_elm_code_widget_theme_refresh(obj, pd);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
EOLIAN static int
@ -2382,10 +2382,10 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
elm_widget_can_focus_set(obj, EINA_TRUE);
pd->alpha = 255;
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
scroller = elm_scroller_add(obj);

View File

@ -1317,7 +1317,7 @@ _color_bars_add(Evas_Object *obj)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_colorselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd)
{
int i;
@ -1328,11 +1328,11 @@ _elm_colorselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd
unsigned int h_pad = DEFAULT_HOR_PAD;
unsigned int v_pad = DEFAULT_VER_PAD;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if ((sd->mode == ELM_COLORSELECTOR_PALETTE) ||
(sd->mode == ELM_COLORSELECTOR_ALL) ||

View File

@ -573,13 +573,13 @@ _on_rotation_changed(void *data, const Efl_Event *event EINA_UNUSED)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_conformant_efl_ui_widget_theme_apply(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_conformant_parts_swallow(obj);

View File

@ -123,17 +123,17 @@ _item_location_get(Elm_Dayselector_Data *sd,
ELM_DAYSELECTOR_MAX;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_dayselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Dayselector_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_List *l;
char buf[1024];
Elm_Dayselector_Item_Data *it;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
EINA_LIST_FOREACH(sd->items, l, it)
{

View File

@ -811,18 +811,18 @@ _theme_data_get(Evas_Object *obj)
else sd->minh = -1;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_diskselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Diskselector_Data *sd)
{
Eina_List *l;
Elm_Diskselector_Item_Data *it;
Evas_Object *blank;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Evas *evas;
const char *style = elm_widget_style_get(obj);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
evas = evas_object_evas_get(obj);
evas_event_freeze(evas);

View File

@ -872,22 +872,22 @@ _elm_entry_background_switch(Evas_Object *from_edje, Evas_Object *to_edje)
/* we can't issue the layout's theming code here, cause it assumes an
* unique edje object, always */
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
{
const char *str;
const char *t;
const char *stl_user;
const char *style = elm_widget_style_get(obj);
Efl_Ui_Theme_Apply_Result theme_apply;
Efl_Ui_Theme_Apply_Error theme_apply;
int cursor_pos;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
// Note: We are skipping elm_layout here! This is by design.
// This assumes the following inheritance: my_class -> layout -> widget ...
theme_apply = efl_ui_widget_theme_apply(efl_cast(obj, EFL_UI_WIDGET_CLASS));
if (!theme_apply) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (theme_apply == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
evas_event_freeze(evas_object_evas_get(obj));
@ -974,14 +974,14 @@ _elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
if (sd->scroll)
{
Efl_Ui_Theme_Apply_Result ok = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error err = EFL_UI_THEME_APPLY_ERROR_GENERIC;
efl_ui_mirrored_set(obj, efl_ui_mirrored_get(obj));
if (sd->single_line)
ok = elm_widget_theme_object_set
err = elm_widget_theme_object_set
(obj, sd->scr_edje, "scroller", "entry_single", style);
if (!ok)
if (err)
elm_widget_theme_object_set
(obj, sd->scr_edje, "scroller", "entry", style);
@ -2854,8 +2854,8 @@ _item_get(void *data,
}
o = edje_object_add(evas_object_evas_get(data));
if (!_elm_theme_object_set
(data, o, "entry", item, style))
if (_elm_theme_object_set
(data, o, "entry", item, style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
_elm_theme_object_set
(data, o, "entry/emoticon", "wtf", style);
return o;
@ -3799,10 +3799,10 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
if (!elm_widget_theme_object_set(obj, wd->resize_obj,
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)))
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
priv->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));

View File

@ -350,16 +350,16 @@ _item_new(Evas_Object *obj,
return eo_item;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_flipselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Flipselector_Data *sd)
{
const char *max_len;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
max_len = edje_object_data_get(wd->resize_obj, "max_len");
if (!max_len) sd->max_len = MAX_LEN_DEFAULT;

View File

@ -1170,10 +1170,10 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style)
ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
snprintf(buf, sizeof(buf), "item/%s", style ? style : "default");
Efl_Ui_Theme_Apply_Result th_ret =
Efl_Ui_Theme_Apply_Error th_ret =
elm_widget_theme_object_set(WIDGET(it), view, "gengrid", buf,
elm_widget_style_get(WIDGET(it)));
if (th_ret == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (th_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("%s is not a valid gengrid item style. "
"Automatically falls back into default style.",
@ -3589,12 +3589,12 @@ _mirrored_set(Evas_Object *obj,
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_gengrid_efl_ui_widget_theme_apply(Eo *obj, Elm_Gengrid_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -566,10 +566,10 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style)
"",style ? : "default");
}
Efl_Ui_Theme_Apply_Result th_ret =
Efl_Ui_Theme_Apply_Error th_ret =
elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf,
elm_widget_style_get(WIDGET(it)));
if (th_ret == EFL_UI_THEME_APPLY_RESULT_FAIL)
if (th_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("%s is not a valid genlist item style. "
"Automatically falls back into default style.",
@ -3533,17 +3533,17 @@ _mirrored_set(Evas_Object *obj,
efl_ui_mirrored_set(obj, rtl);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_genlist_efl_ui_widget_theme_apply(Eo *obj, Elm_Genlist_Data *sd)
{
Item_Block *itb;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_List *l;
Elm_Gen_Item *it;
Evas *e;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
e = evas_object_evas_get(obj);
evas_event_freeze(e);

View File

@ -40,13 +40,13 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
evas_object_grid_mirrored_set(wd->resize_obj, rtl);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_grid_efl_ui_widget_theme_apply(Eo *obj, void *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -298,12 +298,12 @@ _hov_show_do(Evas_Object *obj)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_hover_efl_ui_widget_theme_apply(Eo *obj, Elm_Hover_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (sd->smt_sub) _elm_hover_smt_sub_re_eval(obj);

View File

@ -366,16 +366,16 @@ _elm_icon_efl_file_load(Eo *obj, Elm_Icon_Data *sd)
return 0;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_icon_efl_ui_widget_theme_apply(Eo *obj, Elm_Icon_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (sd->stdicon)
_elm_theme_object_icon_set(obj, sd->stdicon, elm_widget_style_get(obj));
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
return int_ret;
}

View File

@ -432,13 +432,13 @@ _index_priority_change(void *data, Elm_Index_Item_Data *it)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_index_efl_ui_widget_theme_apply(Eo *obj, Elm_Index_Data *sd)
{
Evas_Coord minw = 0, minh = 0;
Elm_Object_Item *eo_item;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@ -451,7 +451,7 @@ _elm_index_efl_ui_widget_theme_apply(Eo *obj, Elm_Index_Data *sd)
elm_widget_theme_element_set(obj, "base/vertical");
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
evas_object_size_hint_min_set(sd->event_rect[0], minw, minh);

View File

@ -182,17 +182,17 @@ _elm_label_horizontal_size_policy_update(Eo *obj, Elm_Label_Data *sd)
edje_object_message_signal_process(wd->resize_obj);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_label_efl_ui_widget_theme_apply(Eo *obj, Elm_Label_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
evas_event_freeze(evas_object_evas_get(obj));
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_elm_label_horizontal_size_policy_update(obj, sd);

View File

@ -1115,15 +1115,15 @@ _mirrored_set(Evas_Object *obj,
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_list_efl_ui_widget_theme_apply(Eo *obj, Elm_List_Data *sd)
{
Elm_Object_Item *eo_it;
Eina_List *n;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -1559,9 +1559,7 @@ elm_object_style_set(Evas_Object *obj,
const char *style)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
if (elm_widget_style_set(obj, style))
return EINA_TRUE;
return EINA_FALSE;
return elm_widget_style_set(obj, style) == EFL_UI_THEME_APPLY_ERROR_NONE;
}
EAPI Eina_Bool

View File

@ -3997,13 +3997,13 @@ _elm_map_pan_class_constructor(Efl_Class *klass)
#include "elm_map_pan.eo.c"
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_map_efl_ui_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
elm_widget_theme_object_set

View File

@ -36,12 +36,12 @@ _sizing_eval(Evas_Object *obj)
evas_object_size_hint_max_set(obj, maxw, maxh);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_mapbuf_efl_ui_widget_theme_apply(Eo *obj, Elm_Mapbuf_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_sizing_eval(obj);

View File

@ -231,10 +231,10 @@ _sizing_eval(Evas_Object *obj)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_menu_efl_ui_widget_theme_apply(Eo *obj, Elm_Menu_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
Eina_List *l, *_l, *_ll, *ll = NULL;
Elm_Object_Item *eo_item;
@ -242,7 +242,7 @@ _elm_menu_efl_ui_widget_theme_apply(Eo *obj, Elm_Menu_Data *sd)
char style[1024];
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (sd->menu_bar)
snprintf(style, sizeof(style), "main_menu/%s", elm_widget_style_get(obj));

View File

@ -20,7 +20,7 @@
#define MY_CLASS_NAME "Elm_Notify"
#define MY_CLASS_NAME_LEGACY "elm_notify"
static Efl_Ui_Theme_Apply_Result
static Efl_Ui_Theme_Apply_Error
_notify_theme_apply(Evas_Object *obj)
{
const char *style = elm_widget_style_get(obj);
@ -139,12 +139,12 @@ _sizing_eval(Evas_Object *obj)
evas_object_geometry_set(obj, x, y, w, h);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_notify_efl_ui_widget_theme_apply(Eo *obj, Elm_Notify_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -216,18 +216,18 @@ _scrollable_layout_theme_set(Eo *obj, Elm_Panel_Data *sd)
_access_obj_process(obj, EINA_TRUE);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_panel_efl_ui_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd)
{
const char *str;
Evas_Coord minw = 0, minh = 0;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -49,14 +49,14 @@ _sizing_eval(Evas_Object *obj)
evas_object_size_hint_max_set(obj, maxw, maxh);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_photo_efl_ui_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
edje_object_mirrored_set
(wd->resize_obj, efl_ui_mirrored_get(obj));

View File

@ -80,12 +80,12 @@ _elm_plug_efl_ui_focus_object_on_focus_update(Eo *obj, void *sd EINA_UNUSED)
return EINA_TRUE;
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_plug_efl_ui_widget_theme_apply(Eo *obj, void *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_sizing_eval(obj);

View File

@ -589,7 +589,7 @@ void _elm_win_standard_init(Eo *win);
Ecore_X_Window _elm_ee_xwin_get(const Ecore_Evas *ee);
Efl_Ui_Theme_Apply_Result _elm_theme_object_set(Evas_Object *parent,
Efl_Ui_Theme_Apply_Error _elm_theme_object_set(Evas_Object *parent,
Evas_Object *o,
const char *clas,
const char *group,
@ -597,7 +597,7 @@ Efl_Ui_Theme_Apply_Result _elm_theme_object_set(Evas_Object *parent,
Eina_Bool _elm_theme_object_icon_set(Evas_Object *o,
const char *group,
const char *style);
Efl_Ui_Theme_Apply_Result _elm_theme_set(Elm_Theme *th,
Efl_Ui_Theme_Apply_Error _elm_theme_set(Elm_Theme *th,
Evas_Object *o,
const char *clas,
const char *group,

View File

@ -86,12 +86,12 @@ _move_resize_cb(void *data EINA_UNUSED,
_sizing_eval(obj);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_route_efl_ui_widget_theme_apply(Eo *obj, Elm_Route_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
//TODO

View File

@ -398,12 +398,12 @@ _mirrored_set(Evas_Object *obj,
efl_ui_mirrored_set(obj, mirrored);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_scroller_efl_ui_widget_theme_apply(Eo *obj, Elm_Scroller_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -215,16 +215,16 @@ _update_list(Elm_Segment_Control_Data *sd)
}
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_segment_control_efl_ui_widget_theme_apply(Eo *obj, Elm_Segment_Control_Data *sd)
{
Eina_List *l;
Eina_Bool rtl;
Elm_Object_Item *eo_item;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
rtl = efl_ui_mirrored_get(obj);

View File

@ -16,10 +16,10 @@
#define MY_CLASS_NAME "Elm_Separator"
#define MY_CLASS_NAME_LEGACY "elm_separator"
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_separator_efl_ui_widget_theme_apply(Eo *obj, Elm_Separator_Data *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (sd->horizontal)
elm_widget_theme_element_set(obj, "horizontal");
@ -27,7 +27,7 @@ _elm_separator_efl_ui_widget_theme_apply(Eo *obj, Elm_Separator_Data *sd EINA_UN
elm_widget_theme_element_set(obj, "vertical");
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
return int_ret;
}

View File

@ -804,12 +804,12 @@ _elm_slider_theme_group_get(Evas_Object *obj, Elm_Slider_Data *sd)
return eina_strbuf_release(new_group);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_slider_efl_ui_widget_theme_apply(Eo *obj, Elm_Slider_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
EFL_UI_SLIDER_DATA_GET_OR_RETURN(obj, sd2, EFL_UI_THEME_APPLY_RESULT_FAIL);
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
EFL_UI_SLIDER_DATA_GET_OR_RETURN(obj, sd2, EFL_UI_THEME_APPLY_ERROR_GENERIC);
char *group;
group = _elm_slider_theme_group_get(obj, sd);
@ -820,7 +820,7 @@ _elm_slider_efl_ui_widget_theme_apply(Eo *obj, Elm_Slider_Data *sd)
}
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
if (_is_horizontal(sd2->dir))
evas_object_size_hint_min_set

View File

@ -1299,15 +1299,15 @@ _elm_spinner_efl_canvas_group_group_del(Eo *obj, Elm_Spinner_Data *sd)
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_spinner_efl_ui_widget_theme_apply(Eo *obj, Elm_Spinner_Data *sd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
if (!efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)))
if (efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
CRI("Failed to set layout!");
return EFL_UI_THEME_APPLY_RESULT_FAIL;
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
}
if (edje_object_part_exists(wd->resize_obj, "elm.swallow.dec_button"))
@ -1351,7 +1351,7 @@ _elm_spinner_efl_ui_widget_theme_apply(Eo *obj, Elm_Spinner_Data *sd)
_access_spinner_register(obj, EINA_TRUE);
elm_layout_sizing_eval(obj);
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
static Eina_Bool _elm_spinner_smart_focus_next_enable = EINA_FALSE;

View File

@ -41,12 +41,12 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
evas_object_table_mirrored_set(wd->resize_obj, rtl);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_table_efl_ui_widget_theme_apply(Eo *obj, void *sd EINA_UNUSED)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_mirrored_set(obj, efl_ui_mirrored_get(obj));

View File

@ -302,7 +302,7 @@ _elm_theme_data_find(Elm_Theme *th, const char *key)
return NULL;
}
Efl_Ui_Theme_Apply_Result
Efl_Ui_Theme_Apply_Error
_elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style)
{
Elm_Theme *th = NULL;
@ -323,7 +323,7 @@ _elm_theme_object_icon_set(Evas_Object *o,
return _elm_theme_icon_set(th, o, group, style);
}
Efl_Ui_Theme_Apply_Result
Efl_Ui_Theme_Apply_Error
_elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style, Eina_Bool is_legacy)
{
Eina_File *file;
@ -331,9 +331,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
const char *group_sep = "/";
const char *style_sep = ":";
if ((!clas) || !o) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if ((!clas) || !o) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (!th) th = theme_default;
if (!th) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (!th) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (eina_streq(style, "default")) style = NULL;
@ -348,7 +348,7 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
file = _elm_theme_group_file_find(th, buf2);
if (file)
{
if (edje_object_mmap_set(o, file, buf2)) return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
if (edje_object_mmap_set(o, file, buf2)) return EFL_UI_THEME_APPLY_ERROR_NONE;
else
{
ERR("could not set theme group '%s' from file '%s': %s",
@ -362,11 +362,12 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
}
if (!style)
return EFL_UI_THEME_APPLY_RESULT_FAIL;
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
// Use the elementary default style.
return (EFL_UI_THEME_APPLY_RESULT_DEFAULT &
_elm_theme_set(th, o, clas, group, NULL, is_legacy));
if (_elm_theme_set(th, o, clas, group, NULL, is_legacy) == EFL_UI_THEME_APPLY_ERROR_NONE)
return EFL_UI_THEME_APPLY_ERROR_DEFAULT;
return EFL_UI_THEME_APPLY_ERROR_GENERIC;
}
Eina_Bool

View File

@ -1480,18 +1480,18 @@ _elm_toolbar_highlight_in_theme(Evas_Object *obj)
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
}
EOLIAN static Efl_Ui_Theme_Apply_Result
EOLIAN static Efl_Ui_Theme_Apply_Error
_elm_toolbar_efl_ui_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *sd)
{
Elm_Toolbar_Item_Data *it;
double scale = 0;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
if (sd->delete_me) return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
if (sd->delete_me) return EFL_UI_THEME_APPLY_ERROR_NONE;
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
Efl_Ui_Theme_Apply_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL;
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
elm_widget_theme_object_set
(obj, wd->resize_obj, "toolbar", "base",

View File

@ -579,7 +579,7 @@ struct _Elm_Widget_Item_Data
EAPI Eina_Bool elm_widget_api_check(int ver);
EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access);
EAPI Efl_Ui_Theme_Apply_Result elm_widget_theme(Evas_Object *obj);
EAPI Efl_Ui_Theme_Apply_Error elm_widget_theme(Evas_Object *obj);
EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free);
EAPI Eina_Bool elm_widget_sub_object_parent_add(Evas_Object *sobj);
@ -646,7 +646,7 @@ EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
EAPI Efl_Ui_Theme_Apply_Result elm_widget_style_set(Evas_Object *obj, const char *style);
EAPI Efl_Ui_Theme_Apply_Error elm_widget_style_set(Evas_Object *obj, const char *style);
EAPI const char *elm_widget_style_get(const Evas_Object *obj);
EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);
EAPI const char *elm_widget_type_get(const Evas_Object *obj);
@ -658,7 +658,7 @@ EAPI void elm_widget_scroll_lock_set(Evas_Object *obj, Efl_Ui_Scroll
EAPI Efl_Ui_Scroll_Block elm_widget_scroll_lock_get(const Evas_Object *obj);
EAPI int elm_widget_scroll_child_locked_x_get(const Evas_Object *obj);
EAPI int elm_widget_scroll_child_locked_y_get(const Evas_Object *obj);
EAPI Efl_Ui_Theme_Apply_Result elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle);
EAPI Efl_Ui_Theme_Apply_Error elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle);
EAPI Eina_Bool elm_widget_type_check(const Evas_Object *obj, const char *type, const char *func);
EAPI Evas_Object *elm_widget_name_find(const Evas_Object *obj, const char *name, int recurse);
EAPI Eina_List *elm_widget_stringlist_get(const char *str);
@ -687,7 +687,7 @@ EAPI Eina_Bool elm_widget_theme_element_set(Evas_Object *obj, const char
EAPI const char *elm_widget_theme_element_get(const Evas_Object *obj);
EAPI Eina_Bool elm_widget_theme_style_set(Evas_Object *obj, const char *name);
EAPI const char *elm_widget_theme_style_get(const Evas_Object *obj);
EAPI Efl_Ui_Theme_Apply_Result elm_widget_element_update(Evas_Object *obj, Evas_Object *component, const char *name);
EAPI Efl_Ui_Theme_Apply_Error elm_widget_element_update(Evas_Object *obj, Evas_Object *component, const char *name);
/* debug function. don't use it unless you are tracking parenting issues */
EAPI void elm_widget_tree_dump(const Evas_Object *top);

View File

@ -289,8 +289,8 @@ _elm_cursor_obj_add(Evas_Object *obj, Elm_Cursor *cur)
edje_object_freeze(cur->obj);
edje_object_update_hints_set(cur->obj, 1);
if (!elm_widget_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name,
cur->style ? cur->style : "default"))
if (elm_widget_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name,
cur->style ? cur->style : "default") == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ELM_SAFE_FREE(cur->obj, evas_object_del);
return EINA_FALSE;
@ -779,8 +779,8 @@ elm_object_sub_cursor_style_set(Evas_Object *obj, const char *style)
}
else
{
if (!elm_widget_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name,
style))
if (elm_widget_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name,
style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("Could not apply the theme to the cursor style=%s", style);
return EINA_FALSE;
@ -820,8 +820,8 @@ void
elm_cursor_theme(Elm_Cursor *cur)
{
if ((!cur) || (!cur->obj)) return;
if (!elm_widget_theme_object_set(cur->owner, cur->obj, "cursor",
cur->cursor_name, cur->style))
if (elm_widget_theme_object_set(cur->owner, cur->obj, "cursor",
cur->cursor_name, cur->style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
ERR("Could not apply the theme to the cursor style=%s", cur->style);
else
_elm_cursor_set_hot_spots(cur);

View File

@ -445,8 +445,8 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
{
const char *style = tt->style ? tt->style : "default";
const char *str;
if (!_elm_theme_object_set(tt->tt_win ? : tt->owner, tt->tooltip,
"tooltip", NULL, style))
if (_elm_theme_object_set(tt->tt_win ? : tt->owner, tt->tooltip,
"tooltip", NULL, style) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("Could not apply the theme to the tooltip! style=%s", style);
if (tt->tt_win) evas_object_del(tt->tt_win);

View File

@ -476,7 +476,7 @@ _elm_ews_wm_init(void)
o = edje_object_add(e);
if (!o) return EINA_FALSE;
if (!_elm_theme_set(NULL, o, "ews", "background", "default", EINA_TRUE))
if (_elm_theme_set(NULL, o, "ews", "background", "default", EINA_TRUE) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
{
ERR("Could not set background theme, fallback to rectangle");
evas_object_del(o);