forked from enlightenment/efl
[Elm] Factoring out code for basic widget theme
smart function. SVN revision: 70629
This commit is contained in:
parent
a5b79bf277
commit
2d60b7baba
|
@ -188,7 +188,6 @@ static void _if_focused_revert(Evas_Object *obj,
|
|||
static Evas_Object *_newest_focus_order_get(Evas_Object *obj,
|
||||
unsigned int *newest_focus_order,
|
||||
Eina_Bool can_focus_only);
|
||||
|
||||
static void _sub_obj_del(void *data,
|
||||
Evas *e,
|
||||
Evas_Object *obj,
|
||||
|
@ -254,12 +253,21 @@ PROXY_MAKE(disable);
|
|||
PROXY_MAKE(theme);
|
||||
PROXY_MAKE(translate);
|
||||
UNIMPLEMENTED_MAKE(disable);
|
||||
UNIMPLEMENTED_MAKE(theme);
|
||||
UNIMPLEMENTED_MAKE(translate);
|
||||
|
||||
#undef PROXY_MAKE
|
||||
#undef UNIMPLEMENTED_MAKE
|
||||
|
||||
static Eina_Bool
|
||||
_elm_widget_theme_func(Evas_Object *obj)
|
||||
{
|
||||
_elm_widget_mirrored_reload(obj);
|
||||
|
||||
elm_widget_disabled_set(obj, elm_widget_disabled_get(obj));
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_widget_on_focus_func_compat(Evas_Object *obj)
|
||||
{
|
||||
|
@ -506,13 +514,18 @@ _elm_widget_smart_set(Elm_Widget_Smart_Class *api)
|
|||
#define API_DEFAULT_SET_UNIMPLEMENTED(_prefix) \
|
||||
api->_prefix = _elm_widget_##_prefix##_func_unimplemented;
|
||||
|
||||
/* NB: always remember to call these parent versions on children,
|
||||
* except for the unimplemented ones and calculate, which is moot */
|
||||
|
||||
#define API_DEFAULT_SET(_prefix) \
|
||||
api->_prefix = _elm_widget_##_prefix##_func;
|
||||
|
||||
/* base api */
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(on_focus);
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(disable);
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(theme);
|
||||
|
||||
api->theme = _elm_widget_theme_func;
|
||||
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(translate);
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(event);
|
||||
API_DEFAULT_SET_UNIMPLEMENTED(focus_next);
|
||||
|
|
Loading…
Reference in New Issue