1 #include "widget_preview_tmpl_head.c" 2 3 static const char *dict[] = \ 4 { 5 "awkward", 6 "businessman", 7 "issuing", 8 "just", 9 "knows", 10 "putting", 11 "systematically", 12 "tyranny", 13 "xenophobia", 14 "yacht", 15 "zebra" 16 }; 17 18 Evas_Object *o = elm_list_add(win); 19 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 20 elm_win_resize_object_add(win, o); 21 evas_object_show(o); 22 23 Evas_Object *id = elm_index_add(win); 24 evas_object_size_hint_weight_set(id, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 25 elm_win_resize_object_add(win, id); 26 evas_object_show(id); 27 28 unsigned int i; 29 for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++) 30 { 31 char buf[32]; 32 Elm_Object_Item *list_it; 33 34 list_it = elm_list_item_append(o, dict[i], NULL, NULL, NULL, NULL); 35 snprintf(buf, sizeof(buf), "%c", dict[i][0]); 36 elm_index_item_append(id, buf, NULL, list_it); 37 } 38 39 elm_index_autohide_disabled_set(id, EINA_FALSE); 40 41 #include "widget_preview_tmpl_foot.c" 42