aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_photocam.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2009-10-14 08:41:36 +0000
committerCarsten Haitzler <raster@rasterman.com>2009-10-14 08:41:36 +0000
commitc3ccf673e80d5f12454a9311a1d4a29025b316f1 (patch)
tree9f6bd6c67c4258451601bda2ed94d9174de99d97 /legacy/elementary/src/bin/test_photocam.c
parentphotocam -> allow zoom as a double and allow all values > 0.0 for zoom for (diff)
downloadefl-c3ccf673e80d5f12454a9311a1d4a29025b316f1.tar.gz
1. add signal emits for scrolling in photocam
2. standardise all callback names to be x,y,z etc. if they have multiple words. 3. add cal to get the region viewed 4. test photocams signals and new call SVN revision: 43069
Diffstat (limited to 'legacy/elementary/src/bin/test_photocam.c')
-rw-r--r--legacy/elementary/src/bin/test_photocam.c132
1 files changed, 132 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_photocam.c b/legacy/elementary/src/bin/test_photocam.c
index b0c2ef0f3c..9ac0d9845f 100644
--- a/legacy/elementary/src/bin/test_photocam.c
+++ b/legacy/elementary/src/bin/test_photocam.c
@@ -1,5 +1,120 @@
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
+
+static void
+my_ph_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("clicked\n");
+}
+
+static void
+my_ph_press(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("press\n");
+}
+
+static void
+my_ph_longpressed(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("longpressed\n");
+}
+
+static void
+my_ph_clicked_double(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("clicked,double\n");
+}
+
+static void
+my_ph_load(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("load\n");
+}
+
+static void
+my_ph_loaded(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("loaded\n");
+}
+
+static void
+my_ph_load_details(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("load,details\n");
+}
+
+static void
+my_ph_loaded_details(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("loaded,details\n");
+}
+
+static void
+my_ph_zoom_start(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("zoom,start\n");
+}
+
+static void
+my_ph_zoom_stop(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("zoom,stop\n");
+}
+
+static void
+my_ph_zoom_change(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("zoom,change\n");
+}
+
+static void
+my_ph_anim_start(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("anim,start\n");
+}
+
+static void
+my_ph_anim_stop(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("anim,stop\n");
+}
+
+static void
+my_ph_drag_start(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("drag,start\n");
+}
+
+static void
+my_ph_drag_stop(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ printf("drag_stop\n");
+}
+
+static void
+my_ph_scroll(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win = data;
+ int x, y, w, h;
+ elm_photocam_region_get(obj, &x, &y, &w, &h);
+ printf("scroll %i %i %ix%i\n", x, y, w, h);
+}
+
static void
sel_done(void *data, Evas_Object *obj, void *event_info)
{
@@ -115,6 +230,23 @@ test_photocam(void *data, Evas_Object *obj, void *event_info)
elm_win_resize_object_add(win, ph);
evas_object_data_set(ph, "window", win);
+ 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, img[1]);
evas_object_show(ph);