From: ChunEon Park Date: Thu, 4 Aug 2011 17:10:17 +0000 (+0000) Subject: elementary/elm_widget - patched by hyoyoung.chang@samsung.com X-Git-Tag: v1.0.0~2291 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b1a95108f5c084983646721e69f4a59154ca423;p=platform%2Fupstream%2Felementary.git elementary/elm_widget - patched by hyoyoung.chang@samsung.com [E-devel] [patch] elm_widget - elm_widget_type_unregister Dear developers. This patch is adding a api to elm_widget. In elm_widget, there is an api to register widget type to elementary's own list. However it doesn't provide unregister api. So I made this patch. Most of case, it's not needed. But in some case, it's useful. (such as elm objects in DSO, if a DSO unloaded, registered widtype is invalidated) Thank you SVN revision: 62099 --- diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index b5edcad..ecdf0f2 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -411,6 +411,18 @@ elm_widget_type_register(const char **ptr) widtypes = eina_list_append(widtypes, (void *)ptr); } +/** + * @defgroup Widget Widget + * + * @internal + * Disposed api for making widgets + */ +EAPI void +elm_widget_type_unregister(const char **ptr) +{ + widtypes = eina_list_remove(widtypes, (void *)ptr); +} + EAPI Eina_Bool elm_widget_api_check(int ver) { diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h index 79707ed..2165e1d 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -335,6 +335,7 @@ EAPI int elm_widget_drag_child_locked_x_get(const Evas_Object *obj) EAPI int elm_widget_drag_child_locked_y_get(const Evas_Object *obj); EAPI Eina_Bool elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle); EAPI void elm_widget_type_register(const char **ptr); +EAPI void elm_widget_type_unregister(const char **ptr); EAPI Eina_Bool elm_widget_type_check(const Evas_Object *obj, const char *type); EAPI Eina_List *elm_widget_stringlist_get(const char *str); EAPI void elm_widget_stringlist_free(Eina_List *list);