Exemple #1
0
/**
 * @brief Get reference to elm_gengrid child as AtkObject
 *
 * @param obj EailGengrid instance
 * @param i child index
 *
 * @returns reference to AtkObject
 */
static AtkObject *
eail_gengrid_ref_child(AtkObject *obj, gint i)
{
   g_return_val_if_fail(EAIL_IS_GENGRID(obj), NULL);

   AtkObject *child = NULL;

   Eina_List *list = eail_gengrid_items_get(EAIL_GENGRID(obj));
   if (eina_list_count(list) > i)
     {
        child = eail_factory_get_item_atk_obj
                             (eina_list_nth(list, i), ATK_ROLE_LIST_ITEM, obj);

        g_object_ref(child);
     }

   return child;
}
/**
 * @brief Get reference to elm_gengrid child as AtkObject
 *
 * @param obj EailGengrid instance
 * @param i child index
 *
 * @returns reference to AtkObject
 */
static AtkObject *
eail_gengrid_ref_child(AtkObject *obj, gint i)
{
   g_return_val_if_fail(EAIL_IS_GENGRID(obj), NULL);

   AtkObject *child = NULL;

   Eina_List *list = eail_gengrid_items_get(EAIL_GENGRID(obj));
   if (eina_list_count(list) > i)
     {
        child = eail_item_new(obj, ATK_ROLE_TABLE_CELL);
        atk_object_initialize(child, eina_list_nth(list, i));

        g_object_ref(child);
     }

   return child;
}