aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_photo.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-11-14 10:49:51 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-11-14 10:49:51 +0000
commite23406a6c062c4c639bbd0685a95ee4c1073bb4f (patch)
tree1cc563a23201350dd64714f04d9dd166d979aabb /legacy/elementary/src/bin/test_photo.c
parentelm test_index.c: 1. do not need to call elm_list_selected_item_get(). event_... (diff)
downloadefl-e23406a6c062c4c639bbd0685a95ee4c1073bb4f.tar.gz
elm test_photo.c: Added clicked smart callback example for photo widget.
SVN revision: 79283
Diffstat (limited to 'legacy/elementary/src/bin/test_photo.c')
-rw-r--r--legacy/elementary/src/bin/test_photo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_photo.c b/legacy/elementary/src/bin/test_photo.c
index 5346b2e319..70fb4bd85b 100644
--- a/legacy/elementary/src/bin/test_photo.c
+++ b/legacy/elementary/src/bin/test_photo.c
@@ -8,6 +8,13 @@ static void drop_cb(void *mydata, Evas_Object *obj, void *evdata);
static void drag_stop_cb(void *mydata, Evas_Object *obj, void *evdata);
static void drag_start_cb(void *mydata, Evas_Object *obj, void *evdata);
+static void
+_clicked_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
+{
+ printf("photo clicked\n");
+}
+
void
test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
@@ -41,6 +48,7 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
for (i = 0; i < 12; i++)
{
ph = elm_photo_add(win);
+ evas_object_smart_callback_add(ph, "clicked", _clicked_cb, NULL);
snprintf(buf, sizeof(buf), "%s/images/%s",
elm_app_data_dir_get(), img[n]);
n++;