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:
parent
0e397de63c
commit
ad18100ff3
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue