forked from enlightenment/efl
Get a table element with its coordinates.
By: Hugo Camboulive <hugo.camboulive@gmail.com> SVN revision: 48087
This commit is contained in:
parent
1dde324c33
commit
9b5981a52e
|
@ -2053,6 +2053,7 @@ struct _Evas_Smart_Cb_Description
|
|||
EAPI Eina_Iterator *evas_object_table_iterator_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
|
||||
EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
|
||||
EAPI Eina_List *evas_object_table_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
|
||||
EAPI Evas_Object *evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1358,3 +1358,22 @@ evas_object_table_children_get(const Evas_Object *o)
|
|||
|
||||
return new_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a child from the table using its coordinates
|
||||
*
|
||||
* @note This does not take into account col/row spanning
|
||||
*/
|
||||
Evas_Object *
|
||||
evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object_Table_Option *opt;
|
||||
|
||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
||||
|
||||
EINA_LIST_FOREACH(priv->children, l, opt)
|
||||
if (opt->col == col && opt->row == row)
|
||||
return opt->obj;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue