Add elm_widget_sub_object_list_get().
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 30 Jan 2014 21:43:49 +0000 (19:43 -0200)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Tue, 22 Apr 2014 11:21:27 +0000 (13:21 +0200)
Change-Id: I7349de29016d2c1762391aeb0efdea4a41850f03

src/lib/elm_widget.c
src/lib/elm_widget.h

index 5f52f17e4559fdb3af3026bd96c1869fd9d7b387..82f4025f60c8320a6131a7b855a6e99d9a2244e1 100644 (file)
@@ -3659,6 +3659,24 @@ _elm_widget_parents_bounce_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
    while (parent_obj);
 }
 
+EAPI const Eina_List *
+elm_widget_sub_object_list_get(const Evas_Object *obj)
+{
+   ELM_WIDGET_CHECK(obj) NULL;
+   const Eina_List *ret = NULL;
+   eo_do(obj, elm_wdg_sub_object_list_get(&ret));
+   return ret;
+}
+
+static void
+_elm_widget_sub_object_list_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+{
+   Eina_List **ret = va_arg(*list, Eina_List **);
+   Elm_Widget_Smart_Data *sd = _pd;
+
+   if (ret) *ret = sd->subobjs;
+}
+
 EAPI Eina_List *
 elm_widget_scrollable_children_get(Evas_Object *obj)
 {
@@ -6581,6 +6599,7 @@ _class_constructor(Eo_Class *klass)
 
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENTS_BOUNCE_GET), _elm_widget_parents_bounce_get),
 
+        EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_LIST_GET), _elm_widget_sub_object_list_get),
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SCROLLABLE_CHILDREN_GET), _elm_widget_scrollable_children_get),
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SCALE_SET), _elm_widget_scale_set),
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SCALE_GET), _elm_widget_scale_get),
index 35e96e632cfe9ce128b88101ecddbb45e0f3603b..8b8f96051e9d94d992840f867d9f357602326742 100644 (file)
@@ -804,6 +804,9 @@ EAPI void             _elm_widget_item_track_cancel(Elm_Widget_Item *item);
  */
 EAPI Eina_List       *elm_widget_scrollable_children_get(Evas_Object *obj);
 
+ /* Added for backwards compatibility */
+EAPI const Eina_List       *elm_widget_sub_object_list_get(const Evas_Object *obj);
+
 /* debug function. don't use it unless you are tracking parenting issues */
 EAPI void             elm_widget_tree_dump(const Evas_Object *top);
 EAPI void             elm_widget_tree_dot_dump(const Evas_Object *top, FILE *output);
@@ -1196,6 +1199,7 @@ enum
 
    ELM_WIDGET_SUB_ID_PARENTS_BOUNCE_GET,
 
+   ELM_WIDGET_SUB_ID_SUB_OBJECT_LIST_GET,
    ELM_WIDGET_SUB_ID_SCROLLABLE_CHILDREN_GET,
    ELM_WIDGET_SUB_ID_SCALE_SET,
    ELM_WIDGET_SUB_ID_SCALE_GET,
@@ -1912,6 +1916,16 @@ typedef void * (*list_data_get_func_type)(const Eina_List * l);
  */
 #define elm_wdg_parents_bounce_get(horiz, vert) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_PARENTS_BOUNCE_GET), EO_TYPECHECK(Eina_Bool *, horiz), EO_TYPECHECK(Eina_Bool *, vert)
 
+/**
+ * @def elm_wdg_sub_object_list_get_
+ *
+ * Added for backwards compatibility.
+ *
+ * @param[out] ret
+ *
+ */
+#define elm_wdg_sub_object_list_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_SUB_OBJECT_LIST_GET), EO_TYPECHECK(Eina_List **, ret)
+
 /**
  * @def elm_wdg_scrollable_children_get
  * @since 1.8