Initialize Tizen 2.3
[framework/uifw/elementary.git] / mobile / doc / widgets / widget_preview_slideshow.c
1 #include <Elementary.h>
2
3 /* get our images to make slideshow items */
4 static Evas_Object *
5 _get(void        *data,
6      Evas_Object *obj)
7 {
8    Evas_Object *photo = elm_photo_add(obj);
9    elm_photo_file_set(photo, data);
10    elm_photo_fill_inside_set(photo, EINA_TRUE);
11    elm_object_style_set(photo, "shadow");
12
13    return photo;
14 }
15
16 #include "widget_preview_tmpl_head.c"
17
18 static const char *img9 = PACKAGE_DATA_DIR "/images/logo.png";
19 static Elm_Slideshow_Item_Class itc;
20
21 Evas_Object *o = elm_slideshow_add(win);
22 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
23 elm_win_resize_object_add(win, o);
24 evas_object_show(o);
25
26 itc.func.get = _get;
27 itc.func.del = NULL;
28
29 elm_slideshow_timeout_set(o, 0.01);
30 elm_slideshow_item_add(o, &itc, img9);
31
32 #include "widget_preview_tmpl_foot.c"