widget: Make theme_apply a protected function (EO)

This is a strange function but absolutely necessary to implement a
widget. Even non-layout widgets may override this.

Ref T5363
This commit is contained in:
Jean-Philippe Andre 2017-08-24 14:33:36 +09:00
parent 6aa309ffb8
commit 1610ed12a8
2 changed files with 14 additions and 6 deletions

View File

@ -1209,9 +1209,7 @@ elm_widget_theme(Evas_Object *obj)
EINA_LIST_FOREACH(sd->cursors, l, cur)
elm_cursor_theme(cur);
Efl_Ui_Theme_Apply ret2 = EFL_UI_THEME_APPLY_FAILED;
ret2 = elm_obj_widget_theme_apply(obj);
ret &= ret2;
ret &= elm_obj_widget_theme_apply(obj);
return ret;
}

View File

@ -398,9 +398,19 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
}
return: bool; [[Indicates if the operation succeeded.]]
}
theme_apply {
[['Virtual' function on the widget being re-themed.]]
return: Efl.Ui.Theme.Apply; [[Theme apply]]
theme_apply @protected {
[[Virtual function called when the widget needs to re-apply its theme.
This may be called when the object is first created, or whenever
the widget is modified in any way that may require a reload of the
theme. This may include but is not limited to scale, theme, or
mirrored mode changes.
Note: even widgets not based on layouts may override this method
to handle widget updates (scale, mirrored mode, etc...).
]]
return: Efl.Ui.Theme.Apply; [[Indicates success, and if the current
theme or default theme was used.]]
}
activate {
[['Virtual' function to activate widget.]]