forked from enlightenment/efl
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [Patch][elm_widget] access hook Real time setting would be necessary in case of running applications which have elm_layout or elm_widget_item. If the access mode does not care of this, running applications should restart. The attached for this. Please review the patch and give any feedbacks. Thanks. SVN revision: 73229
This commit is contained in:
parent
06be3e5ab6
commit
a060189012
|
@ -265,3 +265,7 @@
|
||||||
* Add elm_multibuttonentry_editable_set() and
|
* Add elm_multibuttonentry_editable_set() and
|
||||||
elm_multibuttonentry_editable_get()
|
elm_multibuttonentry_editable_get()
|
||||||
|
|
||||||
|
2012-07-3 Shinwoo Kim (kimcinoo)
|
||||||
|
|
||||||
|
* Add access hook to widget infra.
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ typedef struct _Elm_Widget_Compat_Smart_Data
|
||||||
void (*activate)(Evas_Object *obj);
|
void (*activate)(Evas_Object *obj);
|
||||||
void (*disable)(Evas_Object *obj);
|
void (*disable)(Evas_Object *obj);
|
||||||
void (*theme)(Evas_Object *obj);
|
void (*theme)(Evas_Object *obj);
|
||||||
|
void (*access)(Evas_Object *obj, Eina_Bool is_access);
|
||||||
void (*translate)(Evas_Object *obj);
|
void (*translate)(Evas_Object *obj);
|
||||||
Eina_Bool (*event)(Evas_Object *obj,
|
Eina_Bool (*event)(Evas_Object *obj,
|
||||||
Evas_Object *source,
|
Evas_Object *source,
|
||||||
|
@ -1074,6 +1075,16 @@ elm_widget_theme_hook_set(Evas_Object *obj,
|
||||||
COMPAT_SMART_DATA(sd)->theme = func;
|
COMPAT_SMART_DATA(sd)->theme = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_widget_access_hook_set(Evas_Object *obj,
|
||||||
|
void (*func)(Evas_Object *obj,
|
||||||
|
Eina_Bool is_access))
|
||||||
|
{
|
||||||
|
API_ENTRY return;
|
||||||
|
|
||||||
|
COMPAT_SMART_DATA(sd)->access = func;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_widget_translate_hook_set(Evas_Object *obj,
|
elm_widget_translate_hook_set(Evas_Object *obj,
|
||||||
void (*func)(Evas_Object *obj))
|
void (*func)(Evas_Object *obj))
|
||||||
|
@ -1186,6 +1197,27 @@ elm_widget_signal_callback_del_hook_set(Evas_Object *obj,
|
||||||
COMPAT_SMART_DATA(sd)->callback_del = func;
|
COMPAT_SMART_DATA(sd)->callback_del = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
elm_widget_access(Evas_Object *obj, Eina_Bool is_access)
|
||||||
|
{
|
||||||
|
const Eina_List *l;
|
||||||
|
Evas_Object *child;
|
||||||
|
Eina_Bool ret = EINA_TRUE;
|
||||||
|
|
||||||
|
API_ENTRY return EINA_FALSE;
|
||||||
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
|
ret &= elm_widget_access(child, is_access);
|
||||||
|
|
||||||
|
if (_elm_legacy_is(obj) && COMPAT_SMART_DATA(sd)->access)
|
||||||
|
COMPAT_SMART_DATA(sd)->access(obj, is_access);
|
||||||
|
else if (sd->api && sd->api->access)
|
||||||
|
sd->api->access(obj, is_access);
|
||||||
|
else
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_widget_theme(Evas_Object *obj)
|
elm_widget_theme(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -425,6 +425,7 @@ typedef struct _Elm_Widget_Smart_Class
|
||||||
|
|
||||||
Eina_Bool (*sub_object_del)(Evas_Object *obj,
|
Eina_Bool (*sub_object_del)(Evas_Object *obj,
|
||||||
Evas_Object *sobj); /**< 'Virtual' function handling sub objects being removed */
|
Evas_Object *sobj); /**< 'Virtual' function handling sub objects being removed */
|
||||||
|
void (*access)(Evas_Object *obj, Eina_Bool is_access); /**< 'Virtual' function on the widget being set access */
|
||||||
} Elm_Widget_Smart_Class;
|
} Elm_Widget_Smart_Class;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -610,12 +611,14 @@ EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func)(E
|
||||||
EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
||||||
EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
||||||
EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
||||||
|
EAPI void elm_widget_access_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, Eina_Bool is_access));
|
||||||
EAPI void elm_widget_translate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
EAPI void elm_widget_translate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
||||||
EAPI void elm_widget_event_hook_set(Evas_Object *obj, Eina_Bool (*func)(Evas_Object *obj, Evas_Object *source, Evas_Callback_Type type, void *event_info));
|
EAPI void elm_widget_event_hook_set(Evas_Object *obj, Eina_Bool (*func)(Evas_Object *obj, Evas_Object *source, Evas_Callback_Type type, void *event_info));
|
||||||
EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj));
|
||||||
EAPI void elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source));
|
EAPI void elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source));
|
||||||
EAPI void elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data));
|
EAPI void elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data));
|
||||||
EAPI void elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data));
|
EAPI void elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data));
|
||||||
|
EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access);
|
||||||
EAPI Eina_Bool elm_widget_theme(Evas_Object *obj);
|
EAPI Eina_Bool 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_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
|
||||||
EAPI void elm_widget_translate(Evas_Object *obj);
|
EAPI void elm_widget_translate(Evas_Object *obj);
|
||||||
|
|
Loading…
Reference in New Issue