Example #1
0
static void
win_delete_request_cb(void *data, Evas_Object *obj, void *event_info)
{
	appdata_s *ad = data;

	cairo_surface_destroy(ad->surface);
	cairo_destroy(ad->cairo);
	cairo_device_destroy(ad->cairo_device);

	evas_gl_surface_destroy(ad->evas_gl, ad->evas_gl_surface);
	evas_gl_context_destroy(ad->evas_gl, ad->evas_gl_context);
	evas_gl_config_free(ad->evas_gl_config);
	evas_gl_free(ad->evas_gl);

	ui_app_exit();
}
Example #2
0
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);

	}
}
static Eina_Bool naviframe_pop_cb(void *data, Elm_Object_Item *it)
{
    ui_app_exit();
    return EINA_FALSE;
}
static void win_delete_request_cb(void *data, Evas_Object *obj, void *event_info)
{
    ui_app_exit();
}
Example #5
0
static void
intf_pop_view(interface *intf)
{
    if (naviframe_count(intf->nf_content) == 1)
    {
        playback_service *p_ps = application_get_playback_service(intf->p_app);

        if (playback_service_is_playing(p_ps))
        {
            /* Lower the window (but keep the mainloop running) */
            elm_win_lower(intf->win);
            playback_service_set_auto_exit(p_ps, true);
        }
        else
        {
            ui_app_exit();
        }
        return;
    }

    /* Get the top of the NaviFrame Stack */
    Elm_Object_Item *it = elm_naviframe_top_item_get(intf->nf_content);
    interface_view *view = (interface_view *)elm_object_item_data_get(it);
    if (view) {
        if(view->pf_stop != NULL) {
            view->pf_stop(view->p_view_sys);
        }
    }

    // NOTE: When pop() is called a naviframe will free the content of the item
    //       unless elm_naviframe_content_preserve_on_pop_set is set but this
    //       function seems broken or underspecified (at least in Tizen 2.3 SDK).
    //       To workaround this issue there's two options:
    //
    //       * Don't recycle view and instantiate a new one instead
    //       * Remove the view from the item before calling pop()
    //
    //       The second option has one drawback though, once unset the part
    //       will be flying and needs to be hidden until it's reattached.

    evas_object_hide(elm_object_part_content_unset(intf->nf_content, "elm.swallow.content"));

    /* Pop the top view */
    elm_naviframe_item_pop(intf->nf_content);
    elm_win_indicator_opacity_set(intf->win, ELM_WIN_INDICATOR_OPAQUE);

    Evas_Object *sidebar_toggle_btn = create_button(intf->nf_content, "naviframe/drawers");
    evas_object_smart_callback_add(sidebar_toggle_btn, "clicked", left_panel_button_clicked_cb, intf);
    elm_object_part_content_set(intf->nf_content, "title_left_btn", sidebar_toggle_btn);

    view = (interface_view *)elm_object_item_data_get(elm_naviframe_top_item_get(intf->nf_content));
    if (view)
    {
        intf->current_view = view->i_type;
        sidebar_set_selected_view(intf->sidebar, intf->current_view);

        if (view->pf_has_menu && view->pf_has_menu(view->p_view_sys) == true)
        {
            Evas_Object *popup_toggle_btn = create_button(intf->nf_content, "naviframe/custom_more");
            evas_object_smart_callback_add(popup_toggle_btn, "clicked", right_panel_button_clicked_cb, intf);
            elm_object_part_content_set(intf->nf_content, "title_right_btn", popup_toggle_btn);
            evas_object_show(popup_toggle_btn);
        }

        evas_object_show(view->view);
    }
    else
    {
        LOGE("Cannot get view metadata");
    }
}
Example #6
0
 void Application::stop()
 {
   ui_app_exit();
 }