PREFIX value ml_elm_naviframe_items_get(value v_obj)
{
        Eina_List* list = elm_naviframe_items_get((Evas_Object*) v_obj);
        value v_list = copy_Eina_List_Elm_Object_Item(list);
        eina_list_free(list);
        return v_list;
}
Beispiel #2
0
/**
 * @brief Get index of object in parent object
 *
 * @param obj object instance
 *
 * @returns object index
 */
static gint
eail_naviframe_page_index_in_parent_get(AtkObject *obj)
{
   EailNaviframePage *page = NULL;
   Eina_List *list = NULL;
   gint pos = -1, i = 0;

   if (!EAIL_IS_NAVIFRAME_PAGE(obj))
     {
        ERR("Not a naviframe page");
        return pos;
     }

   page = EAIL_NAVIFRAME_PAGE(obj);
   if (!page->naviframe) return pos;

   list = elm_naviframe_items_get(page->naviframe);
   for (i = 0; i < eina_list_count(list); ++i)
     {
        if (page->page == eina_list_nth(list, i))
          {
             pos = i;
             break;
          }
     }

   eina_list_free(list);
   return pos;
}
/**
 * @brief Implementation AtkObject->ref_child callback
 *
 * ATK doc says:\n
 * Gets a reference to the specified accessible child of the object. The
 * accessible children are 0-based so the first accessible child is at index 0,
 * the second at index 1 and so on.
 *
 * @returns an AtkObject representing the specified accessible child of the
 * accessible.
 */
static AtkObject *
eail_naviframe_ref_child(AtkObject *obj, gint i)
{
   Eina_List *list;
   EailNaviframe *naviframe;
   EailWidget *widget;
   Evas_Object *e_object;

   g_return_val_if_fail(EAIL_IS_NAVIFRAME(obj), NULL);

   naviframe = EAIL_NAVIFRAME(obj);
   widget = EAIL_WIDGET(naviframe);

   e_object = eail_widget_get_widget(widget);

   list = elm_naviframe_items_get(e_object);
   int list_count = eina_list_count(list);
   if (i >= list_count)
     {
        eina_list_free(list);
        return NULL;
     }

   AtkObject *child = eail_naviframe_page_new(obj, i);
   atk_object_initialize(child, eina_list_nth(list, i));
   g_object_ref(child);
   naviframe->cached_pages = eina_list_append(naviframe->cached_pages, child);

   eina_list_free(list);

   return child;
}
/**
 * @brief Implementation AtkObject->get_n_children callback
 *
 * ATK doc says:\n
 * Gets the number of accessible children of the accessible.
 *
 * @param obj an AtkObject
 *
 * @returns an integer representing the number of accessible children of
 * the accessible
 */
static gint
eail_naviframe_n_children_get(AtkObject *obj)
{
   EailNaviframe *naviframe;
   Evas_Object *widget;
   Eina_List *list;
   int list_count;

   g_return_val_if_fail(EAIL_IS_NAVIFRAME(obj), -1);

   naviframe = EAIL_NAVIFRAME(obj);
   widget = eail_widget_get_widget(EAIL_WIDGET(naviframe));
   list = elm_naviframe_items_get(widget);
   list_count = eina_list_count(list);
   eina_list_free(list);

   return list_count;
}
Beispiel #5
0
}/*edams_app_get*/


/*
 *Callback
 */
static void
_list_locations_selected_cb(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *event_info __UNUSED__)
{
	Eina_List *its = NULL, *l;
	Elm_Object_Item *it;

	app->location = elm_object_item_data_get(event_info);

	Evas_Object *naviframe = elm_object_name_find(app->win, "naviframe", -1);
	its = elm_naviframe_items_get(naviframe);

	EINA_LIST_FOREACH(its, l, it)
	{
		if (app->location == elm_object_item_data_get(it))
		{
			elm_naviframe_item_promote(it);
			break;
		}
	}
}/*_list_locations_selected_cb*/

/*
 *
 */
static void