void sp_view_mgr_pop_view_to(Sp_View_Manager *view_mgr, Sp_View_Type type) { MP_CHECK(view_mgr); MP_CHECK(view_mgr->view_history); GList *last = g_list_last(view_mgr->view_history); MP_CHECK(last); Sp_View_Data *view_data = last->data; MP_CHECK(view_data); while(view_data) { if (view_data->type == type) break; SAFE_FREE(view_data); view_mgr->view_history = g_list_delete_link(view_mgr->view_history, last); last = g_list_last(view_mgr->view_history); if (last) view_data = last->data; } MP_CHECK(view_data); if (view_data->navi_item) elm_naviframe_item_pop_to(view_data->navi_item); }
void sp_view_mgr_pop_view_content(Sp_View_Manager *view_mgr, bool pop_to_first) { startfunc; MP_CHECK(view_mgr); MP_CHECK(view_mgr->navi); GList *last = g_list_last(view_mgr->view_history); MP_CHECK(last); Sp_View_Data *view_data = last->data; MP_CHECK(view_data); if (pop_to_first) { Elm_Object_Item *bottom_item = elm_naviframe_bottom_item_get(view_mgr->navi); if (bottom_item) elm_naviframe_item_pop_to(bottom_item); while(view_data && view_data->index > 0) { SAFE_FREE(view_data); view_mgr->view_history = g_list_delete_link(view_mgr->view_history, last); last = g_list_last(view_mgr->view_history); if (last) view_data = last->data; } } else { elm_naviframe_item_pop(view_mgr->navi); IF_FREE(view_data); view_mgr->view_history = g_list_delete_link(view_mgr->view_history, last); } if (g_list_length(view_mgr->view_history) == 0) { g_list_free(view_mgr->view_history); view_mgr->view_history = NULL; } }
static void win_back_cb(void *data, Evas_Object *obj, void *event_info) { appdata_s *ad = (appdata_s *)data; dlog_print(DLOG_INFO, LOG_TAG, "Top Item %p - %p\n", ad->nf_it, elm_naviframe_top_item_get(ad->nf)); if(ad->nf_it == elm_naviframe_top_item_get(ad->nf)){ dlog_print(DLOG_INFO, LOG_TAG, "Exiting The App"); ui_app_exit(); } else{ elm_naviframe_item_pop_to(ad->nf_it); evas_object_del(ad->slider); evas_object_del(ad->slider_layout); evas_object_show(ad->rotary_selector); eext_rotary_object_event_activated_set(ad->rotary_selector, EINA_TRUE); } }
PREFIX value ml_elm_naviframe_item_pop_to(value v_it) { elm_naviframe_item_pop_to((Elm_Object_Item*) v_it); return Val_unit; }