Add elm_object_top_widget_get(): Useful for hoversels.
authorBrett Nash <nash@nash.id.au>
Wed, 23 Jun 2010 08:51:58 +0000 (08:51 +0000)
committerBrett Nash <nash@nash.id.au>
Wed, 23 Jun 2010 08:51:58 +0000 (08:51 +0000)
Also useful for arguments about widget_top or top_widget.
After all it's not a widget of type top, but rather the widget at the top.
Your views?  Opinions on a postcard plase.

SVN revision: 49814

src/lib/Elementary.h.in
src/lib/elm_main.c

index 63c7b11..46ba6f1 100644 (file)
@@ -265,6 +265,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 Evas_Object *elm_object_top_widget_get(const Evas_Object *obj);
    EAPI const char  *elm_object_widget_type_get(const Evas_Object *obj);
 
    EAPI double       elm_scale_get(void);
index 4729ce0..389dbba 100644 (file)
@@ -1362,6 +1362,19 @@ elm_object_parent_widget_get(const Evas_Object *obj)
 }
 
 /**
+ * Get the top level parent of an Elementary widget.
+ *
+ * @param obj The object to query.
+ * @return The top level Elementary widget, or @c NULL if parent cannot be
+ * found.
+ */
+EAPI Evas_Object *
+elm_object_top_widget_get(const Evas_Object *obj)
+{
+   return elm_widget_top_get(obj);
+}
+
+/**
  * Get the string that represents this Elementary widget.
  *
  * @note Elementary is weird and exposes itself as a single