Exemplo n.º 1
0
static bool
app_create(void *data)
{
	appdata_s *ad = data;
	cairo_evasgl_drawing(ad);

	ecore_animator_frametime_set(0.016);
	ecore_animator_add(_animate_cb, (void *)ad->img);

	eext_rotary_event_handler_add(_rotary_handler_cb, ad);
	return true;
}
Exemplo n.º 2
0
void create_third_page(void *data, Evas_Object *obj, void *event_info)
{
//	/* Window */
//	ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
//	elm_win_autodel_set(ad->win, EINA_TRUE);
//
//	if (elm_win_wm_rotation_supported_get(ad->win)) {
//		int rots[4] = { 0, 90, 180, 270 };
//		elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4);
//	}
//
//	evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
//	eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);
//
//	/* Conformant */
//	ad->conform = elm_conformant_add(ad->win);
//	elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
//	elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE);
//	evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//	elm_win_resize_object_add(ad->win, ad->conform);
//	evas_object_show(ad->conform);

//	ad->naviframe = elm_naviframe_add(ad->conform);
//	evas_object_size_hint_weight_set(ad->naviframe, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
//	elm_object_content_set(ad->conform, ad->naviframe);
//	evas_object_show(ad->naviframe);

	struct appdata *ad = data;
	Elm_Object_Item *nf_it = NULL;

	Evas_Object *layout = elm_box_add(ad->naviframe);

	initiate();
	remote_control_cb(1);

	Evas_Object *box = elm_box_add(layout);
	elm_box_horizontal_set(box, EINA_FALSE);
	evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
//	elm_naviframe_item_push(ad->naviframe, "Remote Control", NULL, NULL, box, NULL);
	elm_box_padding_set(box, 16, 16);
	evas_object_show(box);

	eext_rotary_event_handler_add(_rotary_handler_cb, NULL);

	Evas_Object *F5button = elm_button_add(box);
	evas_object_size_hint_weight_set(F5button, EVAS_HINT_FILL,EVAS_HINT_FILL);
	evas_object_size_hint_align_set(F5button, EVAS_HINT_FILL, EVAS_HINT_FILL);
	elm_object_text_set(F5button, "Start");
	evas_object_smart_callback_add(F5button, "clicked", start_cb, NULL);
	elm_box_pack_end(box, F5button);
	evas_object_show(F5button);

	Evas_Object *ESCbutton = elm_button_add(box);
	evas_object_size_hint_weight_set(ESCbutton, EVAS_HINT_FILL, EVAS_HINT_FILL);
	evas_object_size_hint_align_set(ESCbutton, EVAS_HINT_FILL, EVAS_HINT_FILL);
	elm_object_text_set(ESCbutton, "ESC");
	evas_object_smart_callback_add(ESCbutton, "clicked", esc_cb, NULL);
	elm_box_pack_end(box, ESCbutton);
	evas_object_show(ESCbutton);

	nf_it = elm_naviframe_item_push(ad->naviframe,"<color=#F5D6FFFF>Remote Control</color>", NULL, NULL, box, NULL);

	/* Show window after base gui is set up */
//	evas_object_show(ad->win);

}