Hi,

Attached is a small patch which (correctly?) implements the
hoversel_expanded_get() function along with proper documentation. It
returns EINA_TRUE if the hoversel is expanded by checking to see if
wd->hover is non-null.

zmike (discomfi...@freenode)
--- Elementary.h.in	2010-04-01 03:11:24.000000000 -0400
+++ Elementary.h.in.old	2010-04-01 03:11:54.000000000 -0400
@@ -746,7 +746,6 @@
    EAPI Evas_Object *elm_hoversel_icon_get(const Evas_Object *obj);
    EAPI void         elm_hoversel_hover_begin(Evas_Object *obj);
    EAPI void         elm_hoversel_hover_end(Evas_Object *obj);
-   EAPI Eina_Bool    elm_hoversel_state_get(Evas_Object *obj);
    EAPI void         elm_hoversel_clear(Evas_Object *obj);
    EAPI const Eina_List * elm_hoversel_items_get(const Evas_Object *obj);
    EAPI Elm_Hoversel_Item *elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);
--- elc_hoversel.c.old	2010-04-01 03:12:44.000000000 -0400
+++ elc_hoversel.c	2010-04-01 03:09:54.000000000 -0400
@@ -425,6 +425,25 @@
 }
 
 /**
+ * Returns whether the hoversel is expanded.
+ *
+ * This will return EINA_TRUE if the hoversel is expanded or
+ * EINA_FALSE if it is not expanded.
+ * @param obj The hoversel object
+ *
+ * @ingroup Hoversel
+ */
+
+EAPI Eina_Bool
+elm_hoversel_state_get(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   return (wd->hover) ? 1 : 0;
+}
+
+/**
  * Remove all the items from the given hoversel object.
  *
  * This will remove all the children items from the hoversel. (should not be
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to