Work around elementary's lack of proper inheritance.

Someday someone should take care to make elementary real smart objects
and benefit from everything it brings... yes, types more, but it is
worth -- and we added macros to help the type-a-lot.



SVN revision: 48831
This commit is contained in:
Gustavo Sverzut Barbieri 2010-05-13 22:02:26 +00:00
parent 0e397de63c
commit ad18100ff3
2 changed files with 20 additions and 0 deletions

View File

@ -252,6 +252,7 @@ extern "C" {
EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj);
EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj);
EAPI const char *elm_object_widget_type_get(const Evas_Object *obj);
EAPI double elm_scale_get(void);
EAPI void elm_scale_set(double scale);

View File

@ -1342,3 +1342,22 @@ elm_object_parent_widget_get(const Evas_Object *obj)
{
return elm_widget_parent_widget_get(obj);
}
/**
* Get the string that represents this Elementary widget.
*
* @note Elementary is weird and exposes itself as a single
* Evas_Object_Smart_Class of type "elm_widget", so
* evas_object_type_get() always return that, making debug and
* language bindings hard. This function tries to mitigate this
* problem, but the solution is to change Elementary to use
* proper inheritance.
*
* @param obj the object to query.
* @return Elementary widget name, or @c NULL if not a valid widget.
*/
EAPI const char *
elm_object_widget_type_get(const Evas_Object *obj)
{
return elm_widget_type_get(obj);
}