* Enlightenment SVN <[email protected]> [2012-07-03 05:09:34 -0700]:
> Log: > From: Kim Shinwoo <[email protected]> > 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. > > > > +2012-07-3 Shinwoo Kim (kimcinoo) > + > + * Add access hook to widget infra. > + Who uses it? What is it meant to do? > > Modified: trunk/elementary/src/lib/elm_widget.c > =================================================================== > --- trunk/elementary/src/lib/elm_widget.c 2012-07-03 12:07:25 UTC (rev > 73228) > +++ trunk/elementary/src/lib/elm_widget.c 2012-07-03 12:09:34 UTC (rev > 73229) > @@ -82,6 +82,7 @@ > void (*activate)(Evas_Object *obj); > void (*disable)(Evas_Object *obj); > void (*theme)(Evas_Object *obj); > + void (*access)(Evas_Object *obj, Eina_Bool is_access); Please, ALWAYS update the ELM_WIDGET_SMART_CLASS_INIT macro whenever you change this struct! > void (*translate)(Evas_Object *obj); > Eina_Bool (*event)(Evas_Object *obj, > Evas_Object *source, > @@ -1075,6 +1076,16 @@ > } > > 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; > +} Remember, we are approaching ZERO compat widgets inside elm. No more hooks like that, please. > + > +EAPI void > elm_widget_translate_hook_set(Evas_Object *obj, > void (*func)(Evas_Object *obj)) > { > @@ -1187,6 +1198,27 @@ > } > > 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; > +} No callers? No implementors? > + > +EAPI Eina_Bool > elm_widget_theme(Evas_Object *obj) > { > const Eina_List *l; > > Modified: trunk/elementary/src/lib/elm_widget.h > =================================================================== > --- trunk/elementary/src/lib/elm_widget.h 2012-07-03 12:07:25 UTC (rev > 73228) > +++ trunk/elementary/src/lib/elm_widget.h 2012-07-03 12:09:34 UTC (rev > 73229) > @@ -425,6 +425,7 @@ > > Eina_Bool (*sub_object_del)(Evas_Object *obj, > 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; > > /** > @@ -610,12 +611,14 @@ > 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_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_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_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_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 void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme > *th, Eina_Bool force); > EAPI void elm_widget_translate(Evas_Object *obj); > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn -- Gustavo Lima Chaves Computer Engineer @ ProFUSION Embedded Systems ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
