summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-09-01 19:34:43 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-09-01 19:34:43 +0200
commit624e0b1209cf8767573aadccb6e61c685ca1bdb4 (patch)
treea141f771ee97309586e6a6fc064745cabc01cedd
parenta5c3589ac324c945f62d64f6c7064b0b253a93d0 (diff)
Genlist test: cosmetics
* add separator comments between different tests * keep function definitions on 2 lines
-rw-r--r--src/bin/test_genlist.c146
1 files changed, 91 insertions, 55 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index d202b37b7..a4ff09607 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -238,6 +238,8 @@ _move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
238 INF("<%s> over none, where %i\n", __func__,where); 238 INF("<%s> over none, where %i\n", __func__,where);
239} 239}
240 240
241
242/*** Genlist ***************************************************************/
241static void 243static void
242_bt50_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 244_bt50_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
243{ 245{
@@ -391,8 +393,8 @@ test_genlist(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
391 evas_object_show(win); 393 evas_object_show(win);
392} 394}
393 395
394/*************/
395 396
397/*** Genlist 2 *************************************************************/
396static void 398static void
397my_gl_clear(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 399my_gl_clear(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
398{ 400{
@@ -773,8 +775,10 @@ test_genlist2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
773 evas_object_show(win); 775 evas_object_show(win);
774} 776}
775 777
776/*************/ 778
777char *gl2_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 779/*** Genlist 3 *************************************************************/
780char *
781gl2_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
778{ 782{
779 const Testitem *tit = data; 783 const Testitem *tit = data;
780 char buf[256]; 784 char buf[256];
@@ -782,7 +786,8 @@ char *gl2_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EI
782 return strdup(buf); 786 return strdup(buf);
783} 787}
784 788
785Evas_Object *gl2_content_get(void *data, Evas_Object *obj, const char *part) 789Evas_Object *
790gl2_content_get(void *data, Evas_Object *obj, const char *part)
786{ 791{
787 const Testitem *tit = data; 792 const Testitem *tit = data;
788 char buf[PATH_MAX]; 793 char buf[PATH_MAX];
@@ -815,7 +820,8 @@ Evas_Object *gl2_content_get(void *data, Evas_Object *obj, const char *part)
815 return ic; 820 return ic;
816} 821}
817 822
818Eina_Bool gl2_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 823Eina_Bool
824gl2_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
819{ 825{
820 return EINA_FALSE; 826 return EINA_FALSE;
821} 827}
@@ -926,8 +932,8 @@ test_genlist3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
926 evas_object_show(win); 932 evas_object_show(win);
927} 933}
928 934
929/*************/
930 935
936/*** Genlist 4 *************************************************************/
931static void 937static void
932my_gl_item_check_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 938my_gl_item_check_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
933{ 939{
@@ -936,7 +942,8 @@ my_gl_item_check_changed(void *data, Evas_Object *obj, void *event_info EINA_UNU
936 printf("item %p onoff = %i\n", tit, tit->onoff); 942 printf("item %p onoff = %i\n", tit, tit->onoff);
937} 943}
938 944
939char *gl3_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 945char *
946gl3_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
940{ 947{
941 const Testitem *tit = data; 948 const Testitem *tit = data;
942 char buf[256]; 949 char buf[256];
@@ -944,7 +951,8 @@ char *gl3_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EI
944 return strdup(buf); 951 return strdup(buf);
945} 952}
946 953
947Evas_Object *gl3_content_get(void *data, Evas_Object *obj, const char *part) 954Evas_Object *
955gl3_content_get(void *data, Evas_Object *obj, const char *part)
948{ 956{
949 const Testitem *tit = data; 957 const Testitem *tit = data;
950 if (!strcmp(part, "elm.swallow.icon")) 958 if (!strcmp(part, "elm.swallow.icon"))
@@ -969,12 +977,14 @@ Evas_Object *gl3_content_get(void *data, Evas_Object *obj, const char *part)
969 return NULL; 977 return NULL;
970} 978}
971 979
972Eina_Bool gl3_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 980Eina_Bool
981gl3_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
973{ 982{
974 return EINA_FALSE; 983 return EINA_FALSE;
975} 984}
976 985
977static void _realized(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ei) 986static void
987_realized(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ei)
978{ 988{
979 Evas_Object *check; 989 Evas_Object *check;
980 Eina_List *items; 990 Eina_List *items;
@@ -1026,15 +1036,18 @@ test_genlist4(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1026 1036
1027 tit[0].mode = 0; 1037 tit[0].mode = 0;
1028 tit[0].item = elm_genlist_item_append(gl, api->itc1, 1038 tit[0].item = elm_genlist_item_append(gl, api->itc1,
1029 &(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1039 &(tit[0])/* item data */, NULL/* parent */,
1040 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1030 NULL/* func data */); 1041 NULL/* func data */);
1031 tit[1].mode = 1; 1042 tit[1].mode = 1;
1032 tit[1].item = elm_genlist_item_append(gl, api->itc1, 1043 tit[1].item = elm_genlist_item_append(gl, api->itc1,
1033 &(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1044 &(tit[1])/* item data */, NULL/* parent */,
1045 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1034 NULL/* func data */); 1046 NULL/* func data */);
1035 tit[2].mode = 2; 1047 tit[2].mode = 2;
1036 tit[2].item = elm_genlist_item_append(gl, api->itc1, 1048 tit[2].item = elm_genlist_item_append(gl, api->itc1,
1037 &(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1049 &(tit[2])/* item data */, NULL/* parent */,
1050 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1038 NULL/* func data */); 1051 NULL/* func data */);
1039 1052
1040 elm_genlist_item_class_free(api->itc1); 1053 elm_genlist_item_class_free(api->itc1);
@@ -1078,8 +1091,8 @@ test_genlist4(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1078 evas_object_show(win); 1091 evas_object_show(win);
1079} 1092}
1080 1093
1081/*************/
1082 1094
1095/*** Genlist 5 *************************************************************/
1083static void 1096static void
1084my_gl_item_check_changed2(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 1097my_gl_item_check_changed2(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
1085{ 1098{
@@ -1088,7 +1101,8 @@ my_gl_item_check_changed2(void *data, Evas_Object *obj, void *event_info EINA_UN
1088 printf("item %p onoff = %i\n", tit, tit->onoff); 1101 printf("item %p onoff = %i\n", tit, tit->onoff);
1089} 1102}
1090 1103
1091char *gl5_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part) 1104char *
1105gl5_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
1092{ 1106{
1093 const Testitem *tit = data; 1107 const Testitem *tit = data;
1094 char buf[256] = { 0 }; 1108 char buf[256] = { 0 };
@@ -1103,7 +1117,8 @@ char *gl5_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
1103 return strdup(buf); 1117 return strdup(buf);
1104} 1118}
1105 1119
1106Evas_Object *gl5_content_get(void *data, Evas_Object *obj, const char *part) 1120Evas_Object *
1121gl5_content_get(void *data, Evas_Object *obj, const char *part)
1107{ 1122{
1108 const Testitem *tit = data; 1123 const Testitem *tit = data;
1109 char buf[PATH_MAX]; 1124 char buf[PATH_MAX];
@@ -1140,7 +1155,8 @@ Evas_Object *gl5_content_get(void *data, Evas_Object *obj, const char *part)
1140 return NULL; 1155 return NULL;
1141} 1156}
1142 1157
1143Eina_Bool gl5_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 1158Eina_Bool
1159gl5_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
1144{ 1160{
1145 return EINA_FALSE; 1161 return EINA_FALSE;
1146} 1162}
@@ -1244,15 +1260,18 @@ test_genlist5(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1244 1260
1245 tit[0].mode = 0; 1261 tit[0].mode = 0;
1246 tit[0].item = elm_genlist_item_append(gl, api->itc1, 1262 tit[0].item = elm_genlist_item_append(gl, api->itc1,
1247 &(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1263 &(tit[0])/* item data */, NULL/* parent */,
1264 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1248 NULL/* func data */); 1265 NULL/* func data */);
1249 tit[1].mode = 1; 1266 tit[1].mode = 1;
1250 tit[1].item = elm_genlist_item_append(gl, api->itc1, 1267 tit[1].item = elm_genlist_item_append(gl, api->itc1,
1251 &(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1268 &(tit[1])/* item data */, NULL/* parent */,
1269 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1252 NULL/* func data */); 1270 NULL/* func data */);
1253 tit[2].mode = 2; 1271 tit[2].mode = 2;
1254 tit[2].item = elm_genlist_item_append(gl, api->itc1, 1272 tit[2].item = elm_genlist_item_append(gl, api->itc1,
1255 &(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */, 1273 &(tit[2])/* item data */, NULL/* parent */,
1274 ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
1256 NULL/* func data */); 1275 NULL/* func data */);
1257 1276
1258 elm_box_pack_end(bx, gl); 1277 elm_box_pack_end(bx, gl);
@@ -1304,8 +1323,8 @@ test_genlist5(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1304 evas_object_show(win); 1323 evas_object_show(win);
1305} 1324}
1306 1325
1307/*************/
1308 1326
1327/*** Genlist Tree **********************************************************/
1309static void 1328static void
1310gl4_sel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 1329gl4_sel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1311{ 1330{
@@ -1366,14 +1385,16 @@ gl4_con_req(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
1366 elm_genlist_item_expanded_set(glit, EINA_FALSE); 1385 elm_genlist_item_expanded_set(glit, EINA_FALSE);
1367} 1386}
1368 1387
1369char *gl4_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 1388char *
1389gl4_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
1370{ 1390{
1371 char buf[256]; 1391 char buf[256];
1372 snprintf(buf, sizeof(buf), "Item mode %i", (int)(uintptr_t)data); 1392 snprintf(buf, sizeof(buf), "Item mode %i", (int)(uintptr_t)data);
1373 return strdup(buf); 1393 return strdup(buf);
1374} 1394}
1375 1395
1376Evas_Object *gl4_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part) 1396Evas_Object *
1397gl4_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
1377{ 1398{
1378 char buf[PATH_MAX]; 1399 char buf[PATH_MAX];
1379 if (!strcmp(part, "elm.swallow.icon")) 1400 if (!strcmp(part, "elm.swallow.icon"))
@@ -1396,12 +1417,14 @@ Evas_Object *gl4_content_get(void *data EINA_UNUSED, Evas_Object *obj, const cha
1396 return NULL; 1417 return NULL;
1397} 1418}
1398 1419
1399Eina_Bool gl4_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 1420Eina_Bool
1421gl4_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
1400{ 1422{
1401 return EINA_FALSE; 1423 return EINA_FALSE;
1402} 1424}
1403 1425
1404void gl4_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED) 1426void
1427gl4_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED)
1405{ 1428{
1406 printf("item deleted.\n"); 1429 printf("item deleted.\n");
1407} 1430}
@@ -1511,8 +1534,8 @@ test_genlist6(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1511 evas_object_show(win); 1534 evas_object_show(win);
1512} 1535}
1513 1536
1514/*************/
1515 1537
1538/*** Genlist 7 *************************************************************/
1516struct genlist7_data 1539struct genlist7_data
1517{ 1540{
1518 Evas_Object *win, *naviframe; 1541 Evas_Object *win, *naviframe;
@@ -1635,8 +1658,8 @@ test_genlist7(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1635 evas_object_show(win); 1658 evas_object_show(win);
1636} 1659}
1637 1660
1638/*************/
1639 1661
1662/*** Genlist Group *********************************************************/
1640char *gl8_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 1663char *gl8_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
1641{ 1664{
1642 char buf[256]; 1665 char buf[256];
@@ -1831,8 +1854,8 @@ test_genlist8(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1831 evas_object_show(win); 1854 evas_object_show(win);
1832} 1855}
1833 1856
1834/*************/
1835 1857
1858/*** Genlist Group Tree ****************************************************/
1836static void 1859static void
1837gl9_exp(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) 1860gl9_exp(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1838{ 1861{
@@ -1959,10 +1982,12 @@ test_genlist9(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1959 evas_object_show(win); 1982 evas_object_show(win);
1960} 1983}
1961 1984
1962/*************/ 1985
1986/*** Genlist Decorate Item Mode ********************************************/
1963static char *mode_type[] = { "slide", "rotate" }; 1987static char *mode_type[] = { "slide", "rotate" };
1964 1988
1965char *gl10_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part) 1989char *
1990gl10_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
1966{ 1991{
1967 char buf[256]; 1992 char buf[256];
1968 if (!strcmp(part, "elm.text.mode")) 1993 if (!strcmp(part, "elm.text.mode"))
@@ -1972,7 +1997,8 @@ char *gl10_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
1972 return strdup(buf); 1997 return strdup(buf);
1973} 1998}
1974 1999
1975Evas_Object *gl10_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part) 2000Evas_Object *
2001gl10_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
1976{ 2002{
1977 char buf[PATH_MAX]; 2003 char buf[PATH_MAX];
1978 Evas_Object *ic = elm_icon_add(obj); 2004 Evas_Object *ic = elm_icon_add(obj);
@@ -2097,8 +2123,8 @@ test_genlist10(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2097 evas_object_show(win); 2123 evas_object_show(win);
2098} 2124}
2099 2125
2100/*************/
2101 2126
2127/*** Genlist Reorder Mode **************************************************/
2102static void 2128static void
2103_reorder_tg_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 2129_reorder_tg_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
2104{ 2130{
@@ -2263,8 +2289,8 @@ test_genlist_reorder(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2263 evas_object_show(win); 2289 evas_object_show(win);
2264} 2290}
2265 2291
2266/*************/
2267 2292
2293/*** Genlist Textblock *****************************************************/
2268char *gl12_text_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 2294char *gl12_text_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
2269{ 2295{
2270 return strdup("Enlightenment is not just a window manager for Linux/X11 and others, but also a whole suite of libraries to help you create beautiful user interfaces with much less work than doing it the old fashioned way and fighting with traditional toolkits, not to mention a traditional window manager. It covers uses from small mobile devices like phones all the way to powerful multi-core desktops (which are the primary development environment)."); 2296 return strdup("Enlightenment is not just a window manager for Linux/X11 and others, but also a whole suite of libraries to help you create beautiful user interfaces with much less work than doing it the old fashioned way and fighting with traditional toolkits, not to mention a traditional window manager. It covers uses from small mobile devices like phones all the way to powerful multi-core desktops (which are the primary development environment).");
@@ -2315,8 +2341,8 @@ test_genlist12(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2315 evas_object_show(win); 2341 evas_object_show(win);
2316} 2342}
2317 2343
2318/*************/
2319 2344
2345/*** Genlist Tree, Insert Sorted *******************************************/
2320static int 2346static int
2321gl13_cmp(const void *pa, const void *pb) 2347gl13_cmp(const void *pa, const void *pb)
2322{ 2348{
@@ -2404,8 +2430,8 @@ test_genlist13(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2404 evas_object_show(win); 2430 evas_object_show(win);
2405} 2431}
2406 2432
2407/*************/
2408 2433
2434/*** Genlist Tree, Insert Relative *****************************************/
2409static void 2435static void
2410my_gl_insert_before_rel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 2436my_gl_insert_before_rel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
2411{ 2437{
@@ -2635,15 +2661,17 @@ test_genlist14(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2635 evas_object_show(win); 2661 evas_object_show(win);
2636} 2662}
2637 2663
2638/*************/
2639 2664
2640static void _edit_icon_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 2665/*** Genlist Decorate All Mode *********************************************/
2666static void
2667_edit_icon_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
2641{ 2668{
2642 Elm_Object_Item *item = (Elm_Object_Item *)data; 2669 Elm_Object_Item *item = (Elm_Object_Item *)data;
2643 elm_object_item_del(item); 2670 elm_object_item_del(item);
2644} 2671}
2645 2672
2646char *gl15_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 2673char *
2674gl15_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
2647{ 2675{
2648 const Testitem *tit = data; 2676 const Testitem *tit = data;
2649 char buf[256]; 2677 char buf[256];
@@ -2651,7 +2679,8 @@ char *gl15_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part E
2651 return strdup(buf); 2679 return strdup(buf);
2652} 2680}
2653 2681
2654Evas_Object *gl15_content_get(void *data, Evas_Object *obj, const char *part) 2682Evas_Object *
2683gl15_content_get(void *data, Evas_Object *obj, const char *part)
2655{ 2684{
2656 Testitem *tit = data; 2685 Testitem *tit = data;
2657 char buf[PATH_MAX]; 2686 char buf[PATH_MAX];
@@ -2718,7 +2747,8 @@ gl15_normal_mode(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA
2718 elm_genlist_select_mode_set(data, ELM_OBJECT_SELECT_MODE_DEFAULT); 2747 elm_genlist_select_mode_set(data, ELM_OBJECT_SELECT_MODE_DEFAULT);
2719} 2748}
2720 2749
2721void gl15_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED) 2750void
2751gl15_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED)
2722{ 2752{
2723 Testitem *ti = data; 2753 Testitem *ti = data;
2724 printf("item deleted. (# %d)\n", ti->mode); 2754 printf("item deleted. (# %d)\n", ti->mode);
@@ -2798,9 +2828,10 @@ test_genlist15(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2798 evas_object_show(win); 2828 evas_object_show(win);
2799} 2829}
2800 2830
2801/*************/
2802 2831
2803static void _flip_icon_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 2832/*** Genlist Flip Mode *****************************************************/
2833static void
2834_flip_icon_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
2804{ 2835{
2805 const Testitem *tit = data; 2836 const Testitem *tit = data;
2806 2837
@@ -2810,7 +2841,8 @@ static void _flip_icon_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void
2810 elm_genlist_item_flip_set(tit->item, EINA_TRUE); 2841 elm_genlist_item_flip_set(tit->item, EINA_TRUE);
2811} 2842}
2812 2843
2813char *gl16_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 2844char *
2845gl16_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
2814{ 2846{
2815 const Testitem *tit = data; 2847 const Testitem *tit = data;
2816 char buf[256]; 2848 char buf[256];
@@ -2818,7 +2850,8 @@ char *gl16_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part E
2818 return strdup(buf); 2850 return strdup(buf);
2819} 2851}
2820 2852
2821Evas_Object *gl16_content_get(void *data, Evas_Object *obj, const char *part) 2853Evas_Object *
2854gl16_content_get(void *data, Evas_Object *obj, const char *part)
2822{ 2855{
2823 Testitem *tit = data; 2856 Testitem *tit = data;
2824 char buf[PATH_MAX]; 2857 char buf[PATH_MAX];
@@ -2908,8 +2941,8 @@ test_genlist16(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
2908 evas_object_show(win); 2941 evas_object_show(win);
2909} 2942}
2910 2943
2911/*************/
2912 2944
2945/*** Genlist Decorate Modes ************************************************/
2913char * 2946char *
2914gl17_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part) 2947gl17_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
2915{ 2948{
@@ -3077,7 +3110,8 @@ test_genlist17(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
3077 evas_object_show(win); 3110 evas_object_show(win);
3078} 3111}
3079 3112
3080/*************/ 3113
3114/*** Genlist Tree and Decorate All Mode ************************************/
3081Evas_Object * 3115Evas_Object *
3082_tree_effect_frame_new(Evas_Object *win, Evas_Object **rdg, Evas_Object *gl) 3116_tree_effect_frame_new(Evas_Object *win, Evas_Object **rdg, Evas_Object *gl)
3083{ 3117{
@@ -3290,6 +3324,8 @@ test_genlist18(void *data EINA_UNUSED,
3290 evas_object_show(win); 3324 evas_object_show(win);
3291} 3325}
3292 3326
3327
3328/*** Genlist Full Widget ***************************************************/
3293void 3329void
3294test_genlist19(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 3330test_genlist19(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
3295{ 3331{
@@ -3380,10 +3416,8 @@ test_genlist19(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
3380 evas_object_show(win); 3416 evas_object_show(win);
3381} 3417}
3382 3418
3383/*************/
3384
3385/* test genlist item styles */
3386 3419
3420/*** Genlist Item Styles ***************************************************/
3387const char *_genlist_styles[] = { 3421const char *_genlist_styles[] = {
3388 "default", "full", "one_icon", "end_icon", "no_icon", 3422 "default", "full", "one_icon", "end_icon", "no_icon",
3389 "default_style", "double_label", "icon_top_text_bottom", 3423 "default_style", "double_label", "icon_top_text_bottom",
@@ -3494,8 +3528,8 @@ test_genlist_item_styles(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
3494 evas_object_show(win); 3528 evas_object_show(win);
3495} 3529}
3496 3530
3497/***********/
3498 3531
3532/*** Genlist Multi Select **************************************************/
3499typedef struct _Genlist_Multi_Data Genlist_Multi_Data; 3533typedef struct _Genlist_Multi_Data Genlist_Multi_Data;
3500struct _Genlist_Multi_Data 3534struct _Genlist_Multi_Data
3501{ 3535{
@@ -3624,8 +3658,8 @@ test_genlist_multi_select(void *data EINA_UNUSED,
3624 evas_object_show(win); 3658 evas_object_show(win);
3625} 3659}
3626 3660
3627/* test genlist item search by text */
3628 3661
3662/*** Genlist Item Search By Text *******************************************/
3629typedef struct _gl20_Event_Data gl20_Event_Data; 3663typedef struct _gl20_Event_Data gl20_Event_Data;
3630struct _gl20_Event_Data 3664struct _gl20_Event_Data
3631{ 3665{
@@ -3885,8 +3919,8 @@ test_genlist20(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
3885 evas_object_show(win); 3919 evas_object_show(win);
3886} 3920}
3887 3921
3888/* test genlist deletion */
3889 3922
3923/*** Genlist Del ***********************************************************/
3890static void _gl_del_sel(void *data, Evas_Object *obj, void *event_info); 3924static void _gl_del_sel(void *data, Evas_Object *obj, void *event_info);
3891 3925
3892static void 3926static void
@@ -3948,8 +3982,9 @@ _gl_del_item_append(Evas_Object *gl, Elm_Genlist_Item_Class *itc)
3948 } 3982 }
3949} 3983}
3950 3984
3951char *_gl_del_text_get(void *data, Evas_Object *obj EINA_UNUSED, 3985char *
3952 const char *part EINA_UNUSED) 3986_gl_del_text_get(void *data, Evas_Object *obj EINA_UNUSED,
3987 const char *part EINA_UNUSED)
3953{ 3988{
3954 char buf[256] = { 0 }; 3989 char buf[256] = { 0 };
3955 int num = (int)(uintptr_t)data; 3990 int num = (int)(uintptr_t)data;
@@ -4049,7 +4084,8 @@ test_genlist_del(void *data EINA_UNUSED,
4049 evas_object_show(win); 4084 evas_object_show(win);
4050} 4085}
4051 4086
4052/*************/ 4087
4088/*** Genlist Focus *********************************************************/
4053static unsigned _gl_focus_objects = 3; 4089static unsigned _gl_focus_objects = 3;
4054static const char *_gl_focus_object_names[] = {"None", "Square", "Button", "Check", "Box"}; 4090static const char *_gl_focus_object_names[] = {"None", "Square", "Button", "Check", "Box"};
4055 4091