summaryrefslogtreecommitdiff
path: root/src/examples/gengrid_example.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2011-09-11 12:24:40 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2011-09-11 12:24:40 +0000
commit9a0764c14a96fcb7947f850f79f1dccffa366c80 (patch)
treea14809d7a469e861bcf1ab94df9636f1b0f127ca /src/examples/gengrid_example.c
parent77ea7c89a8bfd0648bd18bd8bd26083651a73da5 (diff)
elm gengrid: Gengrid longpress documentation. Patch by Benjamin Drucker <benjamin.t.drucker@alum.mit.edu>
On Fri, Sep 9, 2011 at 4:18 PM, Benjamin Drucker <benjamin.t.drucker@alum.mit.edu> wrote: > gengrid already emits "longpressed" signals, but it is not currently > documented nor demonstrated in the examples. See the attached patch, > please. SVN revision: 63323
Diffstat (limited to 'src/examples/gengrid_example.c')
-rw-r--r--src/examples/gengrid_example.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/examples/gengrid_example.c b/src/examples/gengrid_example.c
index bba0f7066..b3c145eab 100644
--- a/src/examples/gengrid_example.c
+++ b/src/examples/gengrid_example.c
@@ -288,6 +288,16 @@ _double_click(void *data __UNUSED__,
288 fprintf(stdout, "Double click on item with handle %p\n", event_info); 288 fprintf(stdout, "Double click on item with handle %p\n", event_info);
289} 289}
290 290
291/* item long press callback */
292static void
293_long_pressed(void *data __UNUSED__,
294 Evas_Object *obj __UNUSED__,
295 void *event_info)
296{
297 fprintf(stdout, "Long press on item with handle %p\n", event_info);
298}
299
300
291/* label fetching callback */ 301/* label fetching callback */
292static char * 302static char *
293_grid_label_get(void *data, 303_grid_label_get(void *data,
@@ -428,6 +438,7 @@ elm_main(int argc __UNUSED__,
428 evas_object_size_hint_min_set(grid, 600, 500); 438 evas_object_size_hint_min_set(grid, 600, 500);
429 elm_box_pack_end(bx, grid); 439 elm_box_pack_end(bx, grid);
430 evas_object_smart_callback_add(grid, "clicked,double", _double_click, NULL); 440 evas_object_smart_callback_add(grid, "clicked,double", _double_click, NULL);
441 evas_object_smart_callback_add(grid, "longpressed", _long_pressed, NULL);
431 evas_object_show(grid); 442 evas_object_show(grid);
432 443
433 hbx_1 = elm_box_add(win); 444 hbx_1 = elm_box_add(win);