aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_photocam.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/elementary/src/bin/test_photocam.c')
-rw-r--r--legacy/elementary/src/bin/test_photocam.c137
1 files changed, 137 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_photocam.c b/legacy/elementary/src/bin/test_photocam.c
index 75431eee15..9aa470c603 100644
--- a/legacy/elementary/src/bin/test_photocam.c
+++ b/legacy/elementary/src/bin/test_photocam.c
@@ -370,4 +370,141 @@ test_photocam(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_resize(win, 800, 800);
evas_object_show(win);
}
+
+void
+test_photocam_remote(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Evas_Object *win, *ph, *tb2, *bt, *box;
+ // these were just testing - use the "select photo" browser to select one
+ static const char *url = "http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x10800.jpg";
+
+ win = elm_win_util_standard_add("photocam", "PhotoCam");
+ elm_win_autodel_set(win, EINA_TRUE);
+
+ ph = elm_photocam_add(win);
+ evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, ph);
+ evas_object_data_set(ph, "window", win);
+
+ rect = evas_object_rectangle_add(evas_object_evas_get(win));
+ evas_object_color_set(rect, 0, 0, 0, 0);
+ evas_object_repeat_events_set(rect,1);
+ evas_object_show(rect);
+ evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_WHEEL, _photocam_mouse_wheel_cb, ph);
+ evas_object_raise(rect);
+
+ evas_object_event_callback_add(ph, EVAS_CALLBACK_RESIZE, _photocam_move_resize_cb, ph);
+ evas_object_event_callback_add(ph, EVAS_CALLBACK_MOVE, _photocam_move_resize_cb, ph);
+
+ evas_object_smart_callback_add(ph, "clicked", my_ph_clicked, win);
+ evas_object_smart_callback_add(ph, "press", my_ph_press, win);
+ evas_object_smart_callback_add(ph, "longpressed", my_ph_longpressed, win);
+ evas_object_smart_callback_add(ph, "clicked,double", my_ph_clicked_double, win);
+ evas_object_smart_callback_add(ph, "load", my_ph_load, win);
+ evas_object_smart_callback_add(ph, "loaded", my_ph_loaded, win);
+ evas_object_smart_callback_add(ph, "load,details", my_ph_load_details, win);
+ evas_object_smart_callback_add(ph, "loaded,details", my_ph_loaded_details, win);
+ evas_object_smart_callback_add(ph, "zoom,start", my_ph_zoom_start, win);
+ evas_object_smart_callback_add(ph, "zoom,stop", my_ph_zoom_stop, win);
+ evas_object_smart_callback_add(ph, "zoom,change", my_ph_zoom_change, win);
+ evas_object_smart_callback_add(ph, "scroll,anim,start", my_ph_anim_start, win);
+ evas_object_smart_callback_add(ph, "scroll,anim,stop", my_ph_anim_stop, win);
+ evas_object_smart_callback_add(ph, "scroll,drag,start", my_ph_drag_start, win);
+ evas_object_smart_callback_add(ph, "scroll,drag,stop", my_ph_drag_stop, win);
+ evas_object_smart_callback_add(ph, "scroll", my_ph_scroll, win);
+
+ elm_photocam_file_set(ph, url);
+
+ evas_object_show(ph);
+
+ tb2 = elm_table_add(win);
+ evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, tb2);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Z -");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_zoom_out, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bt, 0.1, 0.1);
+ elm_table_pack(tb2, bt, 0, 0, 1, 1);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Z +");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_zoom_in, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bt, 0.9, 0.1);
+ elm_table_pack(tb2, bt, 2, 0, 1, 1);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Show 30,50 500x300");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_show_reg, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bt, 0.1, 0.5);
+ elm_table_pack(tb2, bt, 0, 1, 1, 1);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Bring 800,300 500x300");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_bring_reg, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bt, 0.9, 0.5);
+ elm_table_pack(tb2, bt, 2, 1, 1, 1);
+ evas_object_show(bt);
+
+ box = elm_box_add(win);
+ elm_box_horizontal_set(box, EINA_TRUE);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, 0.0, 0.9);
+ elm_table_pack(tb2, box, 0, 2, 1, 1);
+ evas_object_show(box);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Pause On/Off");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_pause, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(box, bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Gesture On/Off");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_gesture, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(box, bt);
+ evas_object_show(bt);
+
+ box = elm_box_add(win);
+ elm_box_horizontal_set(box, EINA_TRUE);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, 0.9, 0.9);
+ elm_table_pack(tb2, box, 2, 2, 1, 1);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Fit");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_zoom_fit, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(box, bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Fit_In");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_zoom_fit_in, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(box, bt);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Fill");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_zoom_fill, ph);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(box, bt);
+ evas_object_show(bt);
+
+ evas_object_show(box);
+ evas_object_show(tb2);
+
+ evas_object_resize(win, 800, 800);
+ evas_object_show(win);
+}
#endif