Get a table element with its coordinates.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 17 Apr 2010 20:28:22 +0000 (20:28 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 17 Apr 2010 20:28:22 +0000 (20:28 +0000)
By: Hugo Camboulive <hugo.camboulive@gmail.com>

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@48088 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Edje.h
src/lib/edje_util.c

index 90ebff2..efc2399 100644 (file)
@@ -544,6 +544,7 @@ extern "C" {
    EAPI Evas_Object *edje_object_part_box_remove     (Evas_Object *obj, const char *part, Evas_Object *child);
    EAPI Evas_Object *edje_object_part_box_remove_at  (Evas_Object *obj, const char *part, unsigned int pos);
    EAPI Eina_Bool    edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear);
+   EAPI Evas_Object *edje_object_part_table_child_get(Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
    EAPI Eina_Bool    edje_object_part_table_pack     (Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
    EAPI Eina_Bool    edje_object_part_table_unpack   (Evas_Object *obj, const char *part, Evas_Object *child_obj);
    EAPI Eina_Bool    edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);
index 1e5ea92..1a2b04a 100644 (file)
@@ -3673,6 +3673,31 @@ _edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child)
 }
 
 /**
+ * @brief Retrieve a child from a table
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ * @param col The column of the child to get
+ * @param row The row of the child to get
+ * @return The child Evas_Object
+ */
+EAPI Evas_Object *
+edje_object_part_table_child_get(Evas_Object *obj, const char *part, unsigned int col, unsigned int row)
+{
+   Edje *ed;
+   Edje_Real_Part *rp;
+
+   ed = _edje_fetch(obj);
+   if ((!ed) || (!part)) return NULL;
+
+   rp = _edje_real_part_recursive_get(ed, part);
+   if (!rp) return NULL;
+   if (rp->part->type != EDJE_PART_TYPE_TABLE) return NULL;
+
+   return evas_object_table_child_get(rp->object, col, row);
+}
+
+/**
  * @brief Packs an object into the table.
  *
  * @param obj A valid Evas_Object handle