EAPI_MAIN int elm_main(int argc, char **argv) { Evas_Object *win, *bg, *obj, *photocam; char buf[PATH_MAX]; elm_app_info_set(elm_main, "elementary", "images/insanely_huge_test_image.jpg"); win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC); elm_win_title_set(win, "Photocam"); elm_win_autodel_set(win, EINA_TRUE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bg); evas_object_show(bg); photocam = elm_photocam_add(win); snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); elm_photocam_file_set(photocam, buf); elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); evas_object_resize(photocam, 500, 400); evas_object_show(photocam); obj = elm_button_add(win); elm_object_text_set(obj, "Fit"); evas_object_show(obj); evas_object_resize(obj, 50, 30); evas_object_move(obj, 10, 410); evas_object_smart_callback_add(obj, "clicked", _fit, photocam); obj = elm_button_add(win); elm_object_text_set(obj, "Unfit"); evas_object_show(obj); evas_object_resize(obj, 70, 30); evas_object_move(obj, 70, 410); evas_object_smart_callback_add(obj, "clicked", _unfit, photocam); obj = elm_slider_add(win); elm_object_text_set(obj, "Zoom"); evas_object_show(obj); evas_object_resize(obj, 300, 30); evas_object_move(obj, 150, 410); evas_object_smart_callback_add(obj, "changed", _zoom, photocam); evas_object_resize(win, 500, 440); evas_object_show(win); elm_run(); elm_shutdown(); return 0; }
EAPI_MAIN int elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *obj, *photocam; win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC); elm_win_title_set(win, "Photocam"); elm_win_autodel_set(win, EINA_TRUE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); evas_object_show(bg); photocam = elm_photocam_add(win); elm_photocam_file_set(photocam, PACKAGE_DATA_DIR"/images/insanely_huge_test_image.jpg"); elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); evas_object_resize(photocam, 500, 400); evas_object_show(photocam); obj = elm_button_add(win); elm_object_text_set(obj, "Fit"); evas_object_show(obj); evas_object_resize(obj, 50, 30); evas_object_move(obj, 10, 410); evas_object_smart_callback_add(obj, "clicked", _fit, photocam); obj = elm_button_add(win); elm_object_text_set(obj, "Unfit"); evas_object_show(obj); evas_object_resize(obj, 70, 30); evas_object_move(obj, 70, 410); evas_object_smart_callback_add(obj, "clicked", _unfit, photocam); obj = elm_slider_add(win); elm_object_text_set(obj, "Zoom"); evas_object_show(obj); evas_object_resize(obj, 300, 30); evas_object_move(obj, 150, 410); evas_object_smart_callback_add(obj, "changed", _zoom, photocam); evas_object_resize(win, 500, 440); evas_object_show(win); elm_run(); return 0; }