Merge remote-tracking branch 'remotes/origin/upstream'
[framework/uifw/elementary.git] / src / bin / test_list.c
1 #include <Elementary.h>
2 <<<<<<< HEAD
3 =======
4 #include "test.h"
5 #include <Elementary_Cursor.h>
6 >>>>>>> remotes/origin/upstream
7 #ifdef HAVE_CONFIG_H
8 # include "elementary_config.h"
9 #endif
10 #ifndef ELM_LIB_QUICKLAUNCH
11 <<<<<<< HEAD
12 =======
13 struct _api_data
14 {
15    unsigned int state;  /* What state we are testing       */
16    void *list;
17 };
18 typedef struct _api_data api_data;
19
20 enum _api_state
21 {
22    ITEM_PREPEND,        /* 0 */
23    ITEM_INSERT_BEFORE,  /* 1 */
24    ITEM_INSERT_AFTER,   /* 2 */
25    ITEM_SEPARATOR_SET,  /* 3 */
26    LIST_ITEM_DEL,       /* 4 */
27    SCROLLER_POLICY_SET_ON,
28    SCROLLER_POLICY_SET_OFF, /* Back to AUTO next */
29    TOOLTIP_TEXT_SET,    /* 7 */
30    TOOLTIP_UNSET,       /* 8 */
31    ITEM_CURSOR_SET,     /* 9 */
32    ITEM_CURSOR_STYLE_SET,
33    DISABLED_SET,        /* 11 */
34    MODE_SET_COMPRESS,   /* 12 */
35    MODE_SET_LIMIT,      /* 13 */
36    MODE_SET_EXPAND,     /* 14 */
37    HORIZONTAL_SET,      /* 15 */
38    BOUNCE_SET,          /* 16 */
39    LIST_CLEAR,          /* 17 */
40    API_STATE_LAST
41 };
42 typedef enum _api_state api_state;
43
44 static void
45 set_api_state(api_data *api)
46 {
47 /** HOW TO TEST ************************
48 0 ITEM PREPEND
49 Scroll to end
50 1 INSERT BEFORE
51 Scroll to end
52 2 INSERT AFTER
53 3 INSERT SEPERATOR
54 Scroll to end
55 4 ITEM DEL
56 5 POLICY ON, BOUNCE_SET(TRUE, TRUE)
57 6 POLICY OFF
58 Scroll to end
59 7 TOOLTIP last-item
60 8 Cancel tootip
61 9 Curosr set on last item
62 10 Cursor style set last item
63 11 DISABLE last item
64 12 MODE COMPRESS
65 13 MODE LIMIT
66 14 MODE EXPAND
67 15 HORIZ SET
68 16 VERT MODE, BOUNCE(TRUE, FALSE) try to bounce on Y-axis
69 17 List clear
70 *** HOW TO TEST ***********************/
71    Evas_Object *li = api->list;
72
73    switch(api->state)
74      { /* Put all api-changes under switch */
75       case ITEM_PREPEND: /* 0 */
76            {
77               const Eina_List *items = elm_list_items_get(li);
78               elm_list_item_prepend(li, "PREPEND", NULL, NULL, NULL, NULL);
79               elm_list_go(li);
80               elm_list_item_bring_in(eina_list_nth(items, 0));
81            }
82          break;
83
84       case ITEM_INSERT_BEFORE: /* 1 */
85            {
86               const Eina_List *items = elm_list_items_get(li);
87               if(eina_list_count(items))
88                 {
89                   elm_list_item_insert_before(li,
90                         eina_list_nth(items, eina_list_count(items)-1),
91                         "1-before-last", NULL, NULL, NULL, NULL);
92                   elm_list_go(li);
93                   elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
94                 }
95            }
96          break;
97
98       case ITEM_INSERT_AFTER: /* 2 */
99            {
100               const Eina_List *items = elm_list_items_get(li);
101               if(eina_list_count(items))
102                 {
103                   elm_list_item_insert_after(li,
104                         eina_list_nth(items, eina_list_count(items)-2),
105                         "insert-after", NULL, NULL, NULL, NULL);
106                   elm_list_go(li);
107                   elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
108                 }
109            }
110          break;
111
112       case ITEM_SEPARATOR_SET: /* 3 */
113            {
114               const Eina_List *items = elm_list_items_get(li);
115               if(eina_list_count(items))
116                 {
117                   elm_list_item_separator_set(eina_list_nth(items, eina_list_count(items)-3), EINA_TRUE);
118                   elm_list_item_bring_in(eina_list_nth(items, eina_list_count(items)-3));
119                   elm_list_go(li);
120                 }
121            }
122          break;
123
124       case LIST_ITEM_DEL: /* 4 */
125            {
126               const Eina_List *items = elm_list_items_get(li);
127               if(eina_list_count(items))
128                 {
129                   elm_object_item_del(eina_list_data_get(eina_list_last(items)));
130                 }
131            }
132          break;
133
134       case SCROLLER_POLICY_SET_ON: /* 5 */
135          elm_list_bounce_set(li, EINA_TRUE, EINA_TRUE);
136          elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
137          break;
138
139       case SCROLLER_POLICY_SET_OFF: /* Back to AUTO next (6) */
140          elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
141          break;
142
143       case TOOLTIP_TEXT_SET: /* 7 */
144            {
145               const Eina_List *items = elm_list_items_get(li);
146               if(eina_list_count(items))
147                 {
148                   elm_object_item_tooltip_text_set(eina_list_data_get(eina_list_last(items)), "Tooltip set from API");
149                 }
150               elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
151            }
152          break;
153
154       case TOOLTIP_UNSET: /* 8 */
155            {
156               const Eina_List *items = elm_list_items_get(li);
157               if(eina_list_count(items))
158                 {
159                   elm_object_item_tooltip_unset(eina_list_data_get(eina_list_last(items)));
160                 }
161            }
162          break;
163
164       case ITEM_CURSOR_SET: /* 9 */
165            {
166               const Eina_List *items = elm_list_items_get(li);
167               if(eina_list_count(items))
168                 {
169                   elm_object_item_cursor_set(eina_list_data_get(eina_list_last(items)), ELM_CURSOR_HAND2);
170                 }
171            }
172          break;
173
174       case ITEM_CURSOR_STYLE_SET: /* 10 */
175            {
176               const Eina_List *items = elm_list_items_get(li);
177               if(eina_list_count(items))
178                 {
179                   elm_object_item_cursor_style_set(eina_list_data_get(eina_list_last(items)), "transparent");
180                 }
181            }
182          break;
183
184       case DISABLED_SET: /* 11 */
185            {
186               const Eina_List *items = elm_list_items_get(li);
187               if(eina_list_count(items))
188                 {
189                   elm_object_item_disabled_set(eina_list_data_get(eina_list_last(items)), EINA_TRUE);
190                 }
191            }
192          break;
193
194       case MODE_SET_COMPRESS: /* 12 */
195          elm_list_mode_set(li, ELM_LIST_COMPRESS);
196          break;
197
198       case MODE_SET_LIMIT: /* 13 */
199          elm_list_mode_set(li, ELM_LIST_LIMIT);
200          break;
201
202       case MODE_SET_EXPAND: /* 14 */
203          elm_list_mode_set(li, ELM_LIST_EXPAND);
204          break;
205
206       case HORIZONTAL_SET: /* 15 */
207          elm_list_mode_set(li, ELM_LIST_SCROLL); /* return to default mode */
208          elm_list_horizontal_set(li, EINA_TRUE);
209          break;
210
211       case BOUNCE_SET: /* 16 */
212          elm_list_horizontal_set(li, EINA_FALSE);
213          elm_list_bounce_set(li, EINA_TRUE, EINA_FALSE);
214          break;
215
216       case LIST_CLEAR: /* 17 */
217          elm_list_clear(li);
218          break;
219
220       case API_STATE_LAST:
221          break;
222
223       default:
224          return;
225      }
226 }
227
228 static void
229 _api_bt_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__)
230 {  /* Will add here a SWITCH command containing code to modify test-object */
231    /* in accordance a->state value. */
232    api_data *a = data;
233    char str[128];
234
235    printf("clicked event on API Button: api_state=<%d>\n", a->state);
236    set_api_state(a);
237    a->state++;
238    sprintf(str, "Next API function (%u)", a->state);
239    elm_object_text_set(obj, str);
240    elm_object_disabled_set(obj, a->state == API_STATE_LAST);
241 }
242
243 >>>>>>> remotes/origin/upstream
244 static void
245 my_show_it(void        *data,
246            Evas_Object *obj __UNUSED__,
247            void        *event_info __UNUSED__)
248 {
249    elm_list_item_show(data);
250 }
251
252 static void
253 scroll_top(void        *data __UNUSED__,
254            Evas_Object *obj __UNUSED__,
255            void        *event_info __UNUSED__)
256 {
257    printf("Top edge!\n");
258 }
259
260 static void
261 scroll_bottom(void        *data __UNUSED__,
262               Evas_Object *obj __UNUSED__,
263               void        *event_info __UNUSED__)
264 {
265    printf("Bottom edge!\n");
266 }
267
268 static void
269 scroll_left(void        *data __UNUSED__,
270             Evas_Object *obj __UNUSED__,
271             void        *event_info __UNUSED__)
272 {
273    printf("Left edge!\n");
274 }
275
276 static void
277 scroll_right(void        *data __UNUSED__,
278              Evas_Object *obj __UNUSED__,
279              void        *event_info __UNUSED__)
280 {
281    printf("Right edge!\n");
282 }
283
284 <<<<<<< HEAD
285 =======
286 static void
287 _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
288 {
289    free(data);
290 }
291
292 >>>>>>> remotes/origin/upstream
293 void
294 test_list(void        *data __UNUSED__,
295           Evas_Object *obj __UNUSED__,
296           void        *event_info __UNUSED__)
297 {
298 <<<<<<< HEAD
299    Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
300    char buf[PATH_MAX];
301    Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4, *list_it5;
302 =======
303    Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt, *bxx;
304    char buf[PATH_MAX];
305    Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4, *list_it5;
306    api_data *api = calloc(1, sizeof(api_data));
307 >>>>>>> remotes/origin/upstream
308
309    win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
310    elm_win_title_set(win, "List");
311    elm_win_autodel_set(win, EINA_TRUE);
312 <<<<<<< HEAD
313 =======
314    evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
315 >>>>>>> remotes/origin/upstream
316
317    bg = elm_bg_add(win);
318    elm_win_resize_object_add(win, bg);
319    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
320    evas_object_show(bg);
321
322 <<<<<<< HEAD
323    li = elm_list_add(win);
324    elm_win_resize_object_add(win, li);
325    elm_list_mode_set(li, ELM_LIST_LIMIT);
326    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
327 =======
328    bxx = elm_box_add(win);
329    elm_win_resize_object_add(win, bxx);
330    evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
331    evas_object_show(bxx);
332
333    li = elm_list_add(win);
334    elm_list_mode_set(li, ELM_LIST_LIMIT);
335    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
336    evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
337    api->list = li;
338
339    bt = elm_button_add(win);
340    elm_object_text_set(bt, "Next API function");
341    evas_object_smart_callback_add(bt, "clicked", _api_bt_clicked, (void *) api);
342    elm_box_pack_end(bxx, bt);
343    elm_object_disabled_set(bt, api->state == API_STATE_LAST);
344    evas_object_show(bt);
345
346    elm_box_pack_end(bxx, li);
347 >>>>>>> remotes/origin/upstream
348
349    ic = elm_icon_add(win);
350    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
351    elm_icon_file_set(ic, buf, NULL);
352 <<<<<<< HEAD
353    elm_icon_scale_set(ic, 1, 1);
354    list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
355    ic = elm_icon_add(win);
356    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
357    elm_icon_scale_set(ic, 0, 0);
358 =======
359    elm_icon_resizable_set(ic, 1, 1);
360    list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
361    ic = elm_icon_add(win);
362    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
363    elm_icon_resizable_set(ic, 0, 0);
364 >>>>>>> remotes/origin/upstream
365    elm_icon_file_set(ic, buf, NULL);
366    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
367    ic = elm_icon_add(win);
368    elm_icon_standard_set(ic, "edit");
369 <<<<<<< HEAD
370    elm_icon_scale_set(ic, 0, 0);
371 =======
372    elm_icon_resizable_set(ic, 0, 0);
373 >>>>>>> remotes/origin/upstream
374    elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
375
376    ic = elm_icon_add(win);
377    elm_icon_standard_set(ic, "delete");
378 <<<<<<< HEAD
379    elm_icon_scale_set(ic, 0, 0);
380    ic2 = elm_icon_add(win);
381    elm_icon_standard_set(ic2, "clock");
382    elm_icon_scale_set(ic2, 0, 0);
383 =======
384    elm_icon_resizable_set(ic, 0, 0);
385    ic2 = elm_icon_add(win);
386    elm_icon_standard_set(ic2, "clock");
387    elm_icon_resizable_set(ic2, 0, 0);
388 >>>>>>> remotes/origin/upstream
389    list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
390
391    bx = elm_box_add(win);
392    elm_box_horizontal_set(bx, EINA_TRUE);
393
394    ic = elm_icon_add(win);
395    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
396    elm_icon_file_set(ic, buf, NULL);
397 <<<<<<< HEAD
398    elm_icon_scale_set(ic, 0, 0);
399 =======
400    elm_icon_resizable_set(ic, 0, 0);
401 >>>>>>> remotes/origin/upstream
402    evas_object_size_hint_align_set(ic, 0.5, 0.5);
403    elm_box_pack_end(bx, ic);
404    evas_object_show(ic);
405
406    ic = elm_icon_add(win);
407    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
408    elm_icon_file_set(ic, buf, NULL);
409 <<<<<<< HEAD
410    elm_icon_scale_set(ic, 0, 0);
411 =======
412    elm_icon_resizable_set(ic, 0, 0);
413 >>>>>>> remotes/origin/upstream
414    evas_object_size_hint_align_set(ic, 0.5, 0.0);
415    elm_box_pack_end(bx, ic);
416    evas_object_show(ic);
417
418    ic = elm_icon_add(win);
419    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
420    elm_icon_file_set(ic, buf, NULL);
421 <<<<<<< HEAD
422    elm_icon_scale_set(ic, 0, 0);
423 =======
424    elm_icon_resizable_set(ic, 0, 0);
425 >>>>>>> remotes/origin/upstream
426    evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
427    elm_box_pack_end(bx, ic);
428    evas_object_show(ic);
429    elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
430
431    elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
432    list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
433    elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
434    elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
435    elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
436    elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
437    list_it4 = elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
438    elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
439    elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
440    elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
441    elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
442    elm_list_item_append(li, "Is this label long enough?", NULL, NULL, NULL, NULL);
443    list_it5 = elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
444
445    elm_list_go(li);
446
447    evas_object_show(li);
448
449    tb2 = elm_table_add(win);
450    evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
451    elm_win_resize_object_add(win, tb2);
452
453    bt = elm_button_add(win);
454    elm_object_text_set(bt, "Hello");
455    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
456    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
457    evas_object_size_hint_align_set(bt, 0.9, 0.5);
458    elm_table_pack(tb2, bt, 0, 0, 1, 1);
459    evas_object_show(bt);
460
461    bt = elm_button_add(win);
462    elm_object_text_set(bt, "How");
463    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
464    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
465    evas_object_size_hint_align_set(bt, 0.9, 0.5);
466    elm_table_pack(tb2, bt, 0, 1, 1, 1);
467    evas_object_show(bt);
468
469    bt = elm_button_add(win);
470    elm_object_text_set(bt, "doing");
471    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
472    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
473    evas_object_size_hint_align_set(bt, 0.9, 0.5);
474    elm_table_pack(tb2, bt, 0, 2, 1, 1);
475    evas_object_show(bt);
476
477    bt = elm_button_add(win);
478    elm_object_text_set(bt, "Here");
479    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
480    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
481    evas_object_size_hint_align_set(bt, 0.9, 0.5);
482    elm_table_pack(tb2, bt, 0, 3, 1, 1);
483    evas_object_show(bt);
484
485    bt = elm_button_add(win);
486    elm_object_text_set(bt, "Maybe this...");
487    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it5);
488    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
489    evas_object_size_hint_align_set(bt, 0.9, 0.5);
490    elm_table_pack(tb2, bt, 0, 4, 1, 1);
491    evas_object_show(bt);
492
493    evas_object_show(tb2);
494
495    evas_object_resize(win, 320, 300);
496    evas_object_show(win);
497
498    evas_object_smart_callback_add(li, "scroll,edge,top", scroll_top, NULL);
499    evas_object_smart_callback_add(li, "scroll,edge,bottom", scroll_bottom, NULL);
500    evas_object_smart_callback_add(li, "scroll,edge,left", scroll_left, NULL);
501    evas_object_smart_callback_add(li, "scroll,edge,right", scroll_right, NULL);
502 }
503
504 void
505 test_list_horizontal(void        *data __UNUSED__,
506                      Evas_Object *obj __UNUSED__,
507                      void        *event_info __UNUSED__)
508 {
509    Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *tb2, *bt;
510    char buf[PATH_MAX];
511    Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4;
512
513    win = elm_win_add(NULL, "list-horizontal", ELM_WIN_BASIC);
514    elm_win_title_set(win, "List Horizontal");
515    elm_win_autodel_set(win, EINA_TRUE);
516
517    bg = elm_bg_add(win);
518    elm_win_resize_object_add(win, bg);
519    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
520    evas_object_show(bg);
521
522    li = elm_list_add(win);
523    elm_list_horizontal_set(li, EINA_TRUE);
524    elm_list_mode_set(li, ELM_LIST_LIMIT);
525    elm_win_resize_object_add(win, li);
526    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
527
528    ic = elm_icon_add(win);
529    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
530    elm_icon_file_set(ic, buf, NULL);
531 <<<<<<< HEAD
532    elm_icon_scale_set(ic, 1, 1);
533    list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
534    ic = elm_icon_add(win);
535    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
536    elm_icon_scale_set(ic, 0, 0);
537 =======
538    elm_icon_resizable_set(ic, 1, 1);
539    list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
540    ic = elm_icon_add(win);
541    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
542    elm_icon_resizable_set(ic, 0, 0);
543 >>>>>>> remotes/origin/upstream
544    elm_icon_file_set(ic, buf, NULL);
545    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
546    ic = elm_icon_add(win);
547    elm_icon_standard_set(ic, "edit");
548 <<<<<<< HEAD
549    elm_icon_scale_set(ic, 0, 0);
550 =======
551    elm_icon_resizable_set(ic, 0, 0);
552 >>>>>>> remotes/origin/upstream
553    elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
554
555    ic = elm_icon_add(win);
556    elm_icon_standard_set(ic, "delete");
557 <<<<<<< HEAD
558    elm_icon_scale_set(ic, 0, 0);
559    ic2 = elm_icon_add(win);
560    elm_icon_standard_set(ic2, "clock");
561    elm_icon_scale_set(ic2, 0, 0);
562 =======
563    elm_icon_resizable_set(ic, 0, 0);
564    ic2 = elm_icon_add(win);
565    elm_icon_standard_set(ic2, "clock");
566    elm_icon_resizable_set(ic2, 0, 0);
567 >>>>>>> remotes/origin/upstream
568    list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
569
570    bx = elm_box_add(win);
571
572    ic = elm_icon_add(win);
573    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
574    elm_icon_file_set(ic, buf, NULL);
575 <<<<<<< HEAD
576    elm_icon_scale_set(ic, 0, 0);
577 =======
578    elm_icon_resizable_set(ic, 0, 0);
579 >>>>>>> remotes/origin/upstream
580    evas_object_size_hint_align_set(ic, 0.5, 0.5);
581    elm_box_pack_end(bx, ic);
582    evas_object_show(ic);
583
584    ic = elm_icon_add(win);
585    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
586    elm_icon_file_set(ic, buf, NULL);
587 <<<<<<< HEAD
588    elm_icon_scale_set(ic, 0, 0);
589 =======
590    elm_icon_resizable_set(ic, 0, 0);
591 >>>>>>> remotes/origin/upstream
592    evas_object_size_hint_align_set(ic, 0.5, 0.0);
593    elm_box_pack_end(bx, ic);
594    evas_object_show(ic);
595
596    elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
597
598    elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
599    list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
600    elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
601    elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
602    elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
603    elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
604
605    list_it4 = elm_list_item_append(li, "And", NULL, NULL, NULL, NULL);
606    elm_list_item_append(li, "here", NULL, NULL, NULL, NULL);
607    elm_list_item_append(li, "we", NULL, NULL, NULL, NULL);
608    elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
609    elm_list_item_append(li, "done", NULL, NULL, NULL, NULL);
610    elm_list_item_append(li, "with", NULL, NULL, NULL, NULL);
611    elm_list_item_append(li, "items.", NULL, NULL, NULL, NULL);
612
613    elm_list_go(li);
614
615    evas_object_show(li);
616
617    tb2 = elm_table_add(win);
618    evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
619    elm_win_resize_object_add(win, tb2);
620
621    bt = elm_button_add(win);
622    elm_object_text_set(bt, "Hello");
623    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
624    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
625    evas_object_size_hint_align_set(bt, 0.5, 0.9);
626    elm_table_pack(tb2, bt, 0, 0, 1, 1);
627    evas_object_show(bt);
628
629    bt = elm_button_add(win);
630    elm_object_text_set(bt, "How");
631    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
632    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
633    evas_object_size_hint_align_set(bt, 0.5, 0.9);
634    elm_table_pack(tb2, bt, 1, 0, 1, 1);
635    evas_object_show(bt);
636
637    bt = elm_button_add(win);
638    elm_object_text_set(bt, "doing");
639    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
640    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
641    evas_object_size_hint_align_set(bt, 0.5, 0.9);
642    elm_table_pack(tb2, bt, 2, 0, 1, 1);
643    evas_object_show(bt);
644
645    bt = elm_button_add(win);
646    elm_object_text_set(bt, "And");
647    evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
648    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
649    evas_object_size_hint_align_set(bt, 0.5, 0.9);
650    elm_table_pack(tb2, bt, 3, 0, 1, 1);
651    evas_object_show(bt);
652
653    evas_object_show(tb2);
654
655    evas_object_resize(win, 320, 300);
656    evas_object_show(win);
657 }
658
659 /***********/
660
661 static void
662 my_li2_clear(void        *data,
663              Evas_Object *obj __UNUSED__,
664              void        *event_info __UNUSED__)
665 {
666    elm_list_clear(data);
667 }
668
669 static void
670 my_li2_sel(void        *data __UNUSED__,
671            Evas_Object *obj,
672            void        *event_info __UNUSED__)
673 {
674    Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
675    elm_list_item_selected_set(list_it, 0);
676 }
677
678 void
679 test_list2(void        *data __UNUSED__,
680            Evas_Object *obj __UNUSED__,
681            void        *event_info __UNUSED__)
682 {
683    Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
684    char buf[PATH_MAX];
685    Elm_Object_Item *list_it;
686
687    win = elm_win_add(NULL, "list2", ELM_WIN_BASIC);
688    elm_win_title_set(win, "List 2");
689    elm_win_autodel_set(win, EINA_TRUE);
690
691    bg = elm_bg_add(win);
692    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
693    elm_bg_file_set(bg, buf, NULL);
694    elm_win_resize_object_add(win, bg);
695    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
696    evas_object_show(bg);
697
698    bx = elm_box_add(win);
699    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
700    elm_win_resize_object_add(win, bx);
701    evas_object_show(bx);
702
703    li = elm_list_add(win);
704    evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
705    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
706    elm_list_mode_set(li, ELM_LIST_LIMIT);
707 //   elm_list_multi_select_set(li, 1);
708
709    ic = elm_icon_add(win);
710    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
711    elm_icon_file_set(ic, buf, NULL);
712    list_it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
713    elm_list_item_selected_set(list_it, EINA_TRUE);
714    ic = elm_icon_add(win);
715    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
716 <<<<<<< HEAD
717    elm_icon_scale_set(ic, 0, 0);
718 =======
719    elm_icon_resizable_set(ic, 0, 0);
720 >>>>>>> remotes/origin/upstream
721    elm_icon_file_set(ic, buf, NULL);
722    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
723    ic = elm_icon_add(win);
724    elm_icon_standard_set(ic, "edit");
725 <<<<<<< HEAD
726    elm_icon_scale_set(ic, 0, 0);
727 =======
728    elm_icon_resizable_set(ic, 0, 0);
729 >>>>>>> remotes/origin/upstream
730    elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
731
732    ic = elm_icon_add(win);
733    elm_icon_standard_set(ic, "delete");
734 <<<<<<< HEAD
735    elm_icon_scale_set(ic, 0, 0);
736    ic2 = elm_icon_add(win);
737    elm_icon_standard_set(ic2, "clock");
738    elm_icon_scale_set(ic2, 0, 0);
739 =======
740    elm_icon_resizable_set(ic, 0, 0);
741    ic2 = elm_icon_add(win);
742    elm_icon_standard_set(ic2, "clock");
743    elm_icon_resizable_set(ic2, 0, 0);
744 >>>>>>> remotes/origin/upstream
745    elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
746
747    bx2 = elm_box_add(win);
748    elm_box_horizontal_set(bx2, EINA_TRUE);
749
750    ic = elm_icon_add(win);
751    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
752    elm_icon_file_set(ic, buf, NULL);
753 <<<<<<< HEAD
754    elm_icon_scale_set(ic, 0, 0);
755 =======
756    elm_icon_resizable_set(ic, 0, 0);
757 >>>>>>> remotes/origin/upstream
758    evas_object_size_hint_align_set(ic, 0.5, 0.5);
759    elm_box_pack_end(bx2, ic);
760    evas_object_show(ic);
761
762    ic = elm_icon_add(win);
763    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
764    elm_icon_file_set(ic, buf, NULL);
765 <<<<<<< HEAD
766    elm_icon_scale_set(ic, 0, 0);
767 =======
768    elm_icon_resizable_set(ic, 0, 0);
769 >>>>>>> remotes/origin/upstream
770    evas_object_size_hint_align_set(ic, 0.5, 0.0);
771    elm_box_pack_end(bx2, ic);
772    evas_object_show(ic);
773    elm_list_item_append(li, "are", bx2, NULL, NULL, NULL);
774
775    elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
776    elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
777    elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
778    elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
779    elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
780    elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
781    elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
782    elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
783    elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
784    elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
785    elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
786    elm_list_item_append(li, "Longer label.", NULL, NULL, NULL, NULL);
787
788    elm_list_go(li);
789
790    elm_box_pack_end(bx, li);
791    evas_object_show(li);
792
793    bx2 = elm_box_add(win);
794    elm_box_horizontal_set(bx2, EINA_TRUE);
795    elm_box_homogeneous_set(bx2, EINA_TRUE);
796    evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
797    evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
798
799    bt = elm_button_add(win);
800    elm_object_text_set(bt, "Clear");
801    evas_object_smart_callback_add(bt, "clicked", my_li2_clear, li);
802    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
803    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
804    elm_box_pack_end(bx2, bt);
805    evas_object_show(bt);
806
807    elm_box_pack_end(bx, bx2);
808    evas_object_show(bx2);
809
810    evas_object_resize(win, 320, 300);
811    evas_object_show(win);
812 }
813
814 /***********/
815
816 static void
817 _bt_clicked(void        *data __UNUSED__,
818             Evas_Object *obj __UNUSED__,
819             void        *event_info __UNUSED__)
820 {
821    printf("button was clicked\n");
822 }
823
824 static void
825 _it_clicked(void        *data __UNUSED__,
826             Evas_Object *obj __UNUSED__,
827             void        *event_info __UNUSED__)
828 {
829    printf("item was clicked\n");
830 }
831
832 void
833 test_list3(void        *data __UNUSED__,
834            Evas_Object *obj __UNUSED__,
835            void        *event_info __UNUSED__)
836 {
837    Evas_Object *win, *bg, *li, *ic, *ic2, *bx;
838    char buf[PATH_MAX];
839
840    win = elm_win_add(NULL, "list3", ELM_WIN_BASIC);
841    elm_win_title_set(win, "List 3");
842    elm_win_autodel_set(win, EINA_TRUE);
843
844    bg = elm_bg_add(win);
845    elm_win_resize_object_add(win, bg);
846    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
847    evas_object_show(bg);
848
849    li = elm_list_add(win);
850    elm_win_resize_object_add(win, li);
851    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
852    elm_list_mode_set(li, ELM_LIST_COMPRESS);
853
854    ic = elm_icon_add(win);
855    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
856 <<<<<<< HEAD
857    elm_icon_scale_set(ic, 0, 0);
858 =======
859    elm_icon_resizable_set(ic, 0, 0);
860 >>>>>>> remotes/origin/upstream
861    elm_icon_file_set(ic, buf, NULL);
862    ic2 = elm_button_add(win);
863    elm_object_text_set(ic2, "Click me");
864    evas_object_smart_callback_add(ic2, "clicked", _bt_clicked, NULL);
865    evas_object_propagate_events_set(ic2, 0);
866    elm_list_item_append(li, "Hello", ic, ic2, _it_clicked, NULL);
867
868    ic = elm_icon_add(win);
869    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
870 <<<<<<< HEAD
871    elm_icon_scale_set(ic, 0, 0);
872 =======
873    elm_icon_resizable_set(ic, 0, 0);
874 >>>>>>> remotes/origin/upstream
875    elm_icon_file_set(ic, buf, NULL);
876    ic2 = elm_button_add(win);
877    elm_object_text_set(ic2, "Click me");
878    evas_object_smart_callback_add(ic2, "clicked", _bt_clicked, NULL);
879    elm_list_item_append(li, "world", ic, ic2, _it_clicked, NULL);
880
881    ic = elm_icon_add(win);
882    elm_icon_standard_set(ic, "edit");
883 <<<<<<< HEAD
884    elm_icon_scale_set(ic, 0, 0);
885 =======
886    elm_icon_resizable_set(ic, 0, 0);
887 >>>>>>> remotes/origin/upstream
888    elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
889
890    ic = elm_icon_add(win);
891    elm_icon_standard_set(ic, "delete");
892 <<<<<<< HEAD
893    elm_icon_scale_set(ic, 0, 0);
894    ic2 = elm_icon_add(win);
895    elm_icon_standard_set(ic2, "clock");
896    elm_icon_scale_set(ic2, 0, 0);
897 =======
898    elm_icon_resizable_set(ic, 0, 0);
899    ic2 = elm_icon_add(win);
900    elm_icon_standard_set(ic2, "clock");
901    elm_icon_resizable_set(ic2, 0, 0);
902 >>>>>>> remotes/origin/upstream
903    elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
904
905    bx = elm_box_add(win);
906    elm_box_horizontal_set(bx, EINA_TRUE);
907
908    ic = elm_icon_add(win);
909    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
910    elm_icon_file_set(ic, buf, NULL);
911 <<<<<<< HEAD
912    elm_icon_scale_set(ic, 0, 0);
913 =======
914    elm_icon_resizable_set(ic, 0, 0);
915 >>>>>>> remotes/origin/upstream
916    evas_object_size_hint_align_set(ic, 0.5, 0.5);
917    elm_box_pack_end(bx, ic);
918    evas_object_show(ic);
919
920    ic = elm_icon_add(win);
921    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
922    elm_icon_file_set(ic, buf, NULL);
923 <<<<<<< HEAD
924    elm_icon_scale_set(ic, 0, 0);
925 =======
926    elm_icon_resizable_set(ic, 0, 0);
927 >>>>>>> remotes/origin/upstream
928    evas_object_size_hint_align_set(ic, 0.5, 0.0);
929    elm_box_pack_end(bx, ic);
930    evas_object_show(ic);
931
932    ic = elm_icon_add(win);
933    snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
934    elm_icon_file_set(ic, buf, NULL);
935 <<<<<<< HEAD
936    elm_icon_scale_set(ic, 0, 0);
937 =======
938    elm_icon_resizable_set(ic, 0, 0);
939 >>>>>>> remotes/origin/upstream
940    evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
941    elm_box_pack_end(bx, ic);
942    evas_object_show(ic);
943
944    elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
945    elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
946    elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
947    elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
948    elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
949    elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
950    elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
951    elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
952    elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
953    elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
954    elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
955    elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
956    elm_list_item_append(li, "Is this label long enough?", NULL, NULL, NULL, NULL);
957    elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
958
959    elm_list_go(li);
960
961    evas_object_show(li);
962
963    evas_object_resize(win, 320, 300);
964    evas_object_show(win);
965 }
966
967 ///////////////////////////////////////////////////////////////////////////////////////
968
969 struct Pginfo
970 {
971 <<<<<<< HEAD
972    Evas_Object *pager, *win;
973 =======
974    Evas_Object *naviframe, *win;
975 >>>>>>> remotes/origin/upstream
976 };
977
978 static void
979 test_list4_back_cb(void        *data,
980                    Evas_Object *obj __UNUSED__,
981                    void        *event_info __UNUSED__)
982 {
983    struct Pginfo *info = data;
984    if (!info) return;
985
986 <<<<<<< HEAD
987    elm_pager_content_pop(info->pager);
988 =======
989    elm_naviframe_item_pop(info->naviframe);
990 >>>>>>> remotes/origin/upstream
991 }
992
993 static void
994 test_list4_swipe(void        *data,
995                  Evas_Object *obj __UNUSED__,
996                  void        *event_info)
997 {
998    Evas_Object *box, *entry, *button;
999    struct Pginfo *info = data;
1000    char *item_data;
1001    if ((!event_info) || (!data)) return;
1002
1003    item_data = elm_object_item_data_get(event_info);
1004
1005    box = elm_box_add(info->win);
1006    elm_box_horizontal_set(box, EINA_FALSE);
1007    elm_box_homogeneous_set(box, EINA_FALSE);
1008    evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1009    evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
1010    evas_object_show(box);
1011
1012    entry = elm_entry_add(info->win);
1013    elm_entry_scrollable_set(entry, EINA_TRUE);
1014    elm_entry_editable_set(entry, EINA_FALSE);
1015    elm_object_text_set(entry, item_data);
1016    evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1017    evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
1018    evas_object_show(entry);
1019
1020    button = elm_button_add(info->win);
1021    elm_object_text_set(button, "back");
1022    evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
1023    evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0);
1024    evas_object_smart_callback_add(button, "clicked", test_list4_back_cb, info);
1025    evas_object_show(button);
1026
1027    elm_box_pack_start(box, entry);
1028    elm_box_pack_end(box, button);
1029
1030 <<<<<<< HEAD
1031    elm_pager_content_push(info->pager, box);
1032 =======
1033    elm_naviframe_item_simple_push(info->naviframe, box);
1034 >>>>>>> remotes/origin/upstream
1035 }
1036
1037 void
1038 test_list4(void        *data __UNUSED__,
1039            Evas_Object *obj __UNUSED__,
1040            void        *event_info __UNUSED__)
1041 {
1042 <<<<<<< HEAD
1043    Evas_Object *win, *bg, *li, *ic, *ic2, *pager;
1044 =======
1045    Evas_Object *win, *bg, *li, *ic, *ic2, *naviframe;
1046 >>>>>>> remotes/origin/upstream
1047    static struct Pginfo info = {NULL, NULL};
1048    char buf[PATH_MAX];
1049
1050    win = elm_win_add(NULL, "list4", ELM_WIN_BASIC);
1051    elm_win_title_set(win, "List 4");
1052    elm_win_autodel_set(win, EINA_TRUE);
1053    info.win = win;
1054
1055    bg = elm_bg_add(win);
1056    elm_win_resize_object_add(win, bg);
1057    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1058    evas_object_show(bg);
1059
1060 <<<<<<< HEAD
1061    pager = elm_pager_add(win);
1062    elm_win_resize_object_add(win, pager);
1063    evas_object_size_hint_weight_set(pager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1064    evas_object_size_hint_align_set(pager, EVAS_HINT_FILL, EVAS_HINT_FILL);
1065    evas_object_show(pager);
1066    info.pager = pager;
1067 =======
1068    naviframe = elm_naviframe_add(win);
1069    elm_win_resize_object_add(win, naviframe);
1070    evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1071    evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
1072    evas_object_show(naviframe);
1073    info.naviframe = naviframe;
1074 >>>>>>> remotes/origin/upstream
1075
1076    li = elm_list_add(win);
1077    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1078    elm_list_mode_set(li, ELM_LIST_COMPRESS);
1079    evas_object_smart_callback_add(li, "swipe", test_list4_swipe, &info);
1080 <<<<<<< HEAD
1081    elm_pager_content_push(pager, li);
1082 =======
1083    elm_naviframe_item_simple_push(naviframe, li);
1084 >>>>>>> remotes/origin/upstream
1085
1086    static char pf_data[] = "Pink Floyd were formed in 1965, and originally consisted of university"                       \
1087                            "students Roger Waters, Nick Mason, Richard Wright, and Syd Barrett. The group were a popular" \
1088                            "fixture on London's underground music scene, and under Barrett's leadership released two "    \
1089                            "charting singles, \"Arnold Layne\" and \"See Emily Play\", and a successful debut album, "    \
1090                            "ThePiper at the Gates of Dawn. In 1968, guitarist and singer David Gilmour joined the "       \
1091                            "line-up. Barrett was soon removed, due to his increasingly erratic behaviour. Following "     \
1092                            "Barrett's departure, bass player and singer Roger Waters became the band's lyricist and "     \
1093                            "conceptual leader, with Gilmour assuming lead guitar and much of the vocals. With this "      \
1094                            "line-up, Floyd went on to achieve worldwide critical and commercial success with the "        \
1095                            "conceptalbums The Dark Side of the Moon, Wish You Were Here, Animals, and The Wall.";
1096    ic = elm_icon_add(win);
1097    snprintf(buf, sizeof(buf), "%s/images/mystrale.jpg", elm_app_data_dir_get());
1098 <<<<<<< HEAD
1099    elm_icon_scale_set(ic, 0, 0);
1100 =======
1101    elm_icon_resizable_set(ic, 0, 0);
1102 >>>>>>> remotes/origin/upstream
1103    elm_icon_file_set(ic, buf, NULL);
1104    elm_list_item_append(li, "Pink Floyd", ic, NULL, NULL, &pf_data);
1105
1106    static char ds_data[] = "Dire Straits were a British rock band, formed by Mark Knopfler "                          \
1107                            "(lead vocals and lead guitar), his younger brother David Knopfler (rhythm guitar and "    \
1108                            "backing vocals), John Illsley (bass guitar and backing vocals), and Pick Withers (drums " \
1109                            "and percussion), and managed by Ed Bicknell, active between 1977 and 1995. Although the " \
1110                            "band was formed in an era when punk rock was at the forefront, Dire Straits played a more "
1111                            "bluesy style, albeit with a stripped-down sound that appealed to audiences weary of the "   \
1112                            "overproduced stadium rock of the 1970s.[citation needed] In their early days, Mark and "    \
1113                            "David requested that pub owners turn down their sound so that patrons could converse "      \
1114                            "while the band played, an indication of their unassuming demeanor. Despite this oddly "     \
1115                            "self-effacing approach to rock and roll, Dire Straits soon became hugely successful, with " \
1116                            "their first album going multi-platinum globally.";
1117    ic = elm_icon_add(win);
1118    snprintf(buf, sizeof(buf), "%s/images/mystrale_2.jpg", elm_app_data_dir_get());
1119 <<<<<<< HEAD
1120    elm_icon_scale_set(ic, 0, 0);
1121 =======
1122    elm_icon_resizable_set(ic, 0, 0);
1123 >>>>>>> remotes/origin/upstream
1124    elm_icon_file_set(ic, buf, NULL);
1125    elm_list_item_append(li, "Dire Straits", ic, NULL, NULL, &ds_data);
1126
1127    static char uh_data[] = "Uriah Heep are an English hard rock band. The band released several "                       \
1128                            "commercially successful albums in the 1970s such as Uriah Heep Live (1973), but their "     \
1129                            "audience declined by the 1980s, to the point where they became essentially a cult band in " \
1130                            "the United States and United Kingdom. Uriah Heep maintain a significant following in "      \
1131                            "Germany, the Netherlands, Scandinavia, the Balkans, Japan and Russia, where they still "    \
1132                            "perform at stadium-sized venues.";
1133    ic = elm_icon_add(win);
1134    snprintf(buf, sizeof(buf), "%s/images/icon_17.png", elm_app_data_dir_get());
1135 <<<<<<< HEAD
1136    elm_icon_scale_set(ic, 1, 1);
1137 =======
1138    elm_icon_resizable_set(ic, 1, 1);
1139 >>>>>>> remotes/origin/upstream
1140    elm_icon_file_set(ic, buf, NULL);
1141    elm_list_item_append(li, "Uriah Heep", ic, NULL, NULL, &uh_data);
1142
1143    static char r_data[] = "Rush is a Canadian rock band formed in August 1968, in the Willowdale "                       \
1144                           "neighbourhood of Toronto, Ontario. The band is composed of bassist, keyboardist, and lead "   \
1145                           "vocalist Geddy Lee, guitarist Alex Lifeson, and drummer and lyricist Neil Peart. The band "   \
1146                           "and its membership went through a number of re-configurations between 1968 and 1974, "        \
1147                           "achieving their current form when Peart replaced original drummer John Rutsey in July 1974, " \
1148                           "two weeks before the group's first United States tour.";
1149    ic = elm_icon_add(win);
1150    snprintf(buf, sizeof(buf), "%s/images/icon_21.png", elm_app_data_dir_get());
1151 <<<<<<< HEAD
1152    elm_icon_scale_set(ic, 0, 0);
1153    elm_icon_file_set(ic, buf, NULL);
1154    ic2 = elm_icon_add(win);
1155    elm_icon_standard_set(ic2, "clock");
1156    elm_icon_scale_set(ic2, 0, 0);
1157 =======
1158    elm_icon_resizable_set(ic, 0, 0);
1159    elm_icon_file_set(ic, buf, NULL);
1160    ic2 = elm_icon_add(win);
1161    elm_icon_standard_set(ic2, "clock");
1162    elm_icon_resizable_set(ic2, 0, 0);
1163 >>>>>>> remotes/origin/upstream
1164    elm_list_item_append(li, "Rush", ic, ic2, NULL, &r_data);
1165
1166    elm_list_go(li);
1167
1168    evas_object_show(li);
1169    evas_object_resize(win, 320, 300);
1170    evas_object_show(win);
1171 }
1172
1173 /////////////////////////////////////////////////////////////////////////////////////////
1174 struct list5_data_cb
1175 {
1176    Evas_Object *win, *list;
1177 };
1178
1179 static void
1180 test_list5_item_del(void        *data,
1181                     Evas_Object *obj __UNUSED__,
1182                     void        *event_info __UNUSED__)
1183 {
1184    elm_object_item_del(data);
1185 }
1186
1187 static void
1188 test_list5_swipe(void        *data __UNUSED__,
1189                  Evas_Object *obj __UNUSED__,
1190                  void        *event_info)
1191 {
1192    Evas_Object *button;
1193    struct list5_data_cb *info = elm_object_item_data_get(event_info);
1194
1195    if (elm_object_item_part_content_get(event_info, "end")) return;
1196
1197    button = elm_button_add(info->win);
1198    elm_object_text_set(button, "delete");
1199    evas_object_propagate_events_set(button, 0);
1200    evas_object_smart_callback_add(button, "clicked", test_list5_item_del,
1201                                   event_info);
1202    elm_object_item_part_content_set(event_info, "end", button);
1203 }
1204
1205 void
1206 test_list5(void        *data __UNUSED__,
1207            Evas_Object *obj __UNUSED__,
1208            void        *event_info __UNUSED__)
1209 {
1210    Evas_Object *win, *bg, *li;
1211    static struct list5_data_cb info;
1212
1213    win = elm_win_add(NULL, "list5", ELM_WIN_BASIC);
1214    elm_win_title_set(win, "List 5");
1215    elm_win_autodel_set(win, EINA_TRUE);
1216    info.win = win;
1217
1218    bg = elm_bg_add(win);
1219    elm_win_resize_object_add(win, bg);
1220    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1221    evas_object_show(bg);
1222
1223    li = elm_list_add(win);
1224    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1225    elm_list_mode_set(li, ELM_LIST_COMPRESS);
1226    evas_object_smart_callback_add(li, "swipe", test_list5_swipe, NULL);
1227    elm_win_resize_object_add(win, li);
1228    evas_object_show(li);
1229    info.list = li;
1230
1231    elm_list_item_append(li, "Network", NULL, NULL, NULL, &info);
1232    elm_list_item_append(li, "Audio", NULL, NULL, NULL, &info);
1233
1234    elm_list_go(li);
1235    evas_object_resize(win, 320, 300);
1236    evas_object_show(win);
1237 }
1238
1239 #endif