summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-08-09 06:43:33 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-08-09 06:43:33 +0000
commit845bab2130f40ea1f45af7e000763966e8a0cd59 (patch)
treedea547cf28e5d38737edd5a538f22a879b9887ec
parente3b0932cc1fc92a2eabafe3df5891ca77e5c1611 (diff)
more tests ahoy!
SVN revision: 50922
-rw-r--r--src/bin/Makefile.am8
-rw-r--r--src/bin/tests.h8
-rw-r--r--src/bin/ui.c18
-rw-r--r--src/bin/widgets_list_1.c150
-rw-r--r--src/bin/widgets_list_1_grouped.c158
-rw-r--r--src/bin/widgets_list_2.c150
-rw-r--r--src/bin/widgets_list_2_grouped.c158
-rw-r--r--src/bin/widgets_list_3.c180
-rw-r--r--src/bin/widgets_list_3_grouped.c196
-rw-r--r--src/bin/widgets_list_4.c180
-rw-r--r--src/bin/widgets_list_4_grouped.c196
11 files changed, 1397 insertions, 5 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 55f6267..0d3f875 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -29,6 +29,14 @@ widgets_file_icons_2_same.c \
29widgets_file_icons_2_same_grouped.c \ 29widgets_file_icons_2_same_grouped.c \
30widgets_file_icons_3.c \ 30widgets_file_icons_3.c \
31widgets_file_icons_4.c \ 31widgets_file_icons_4.c \
32widgets_list_1.c \
33widgets_list_1_grouped.c \
34widgets_list_2.c \
35widgets_list_2_grouped.c \
36widgets_list_3.c \
37widgets_list_3_grouped.c \
38widgets_list_4.c \
39widgets_list_4_grouped.c \
32image_blend_unscaled.c \ 40image_blend_unscaled.c \
33image_blend_solid_middle_unscaled.c \ 41image_blend_solid_middle_unscaled.c \
34image_blend_fade_unscaled.c \ 42image_blend_fade_unscaled.c \
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 3b09e26..ec8402c 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -5,6 +5,14 @@
5#include "widgets_file_icons_2_same_grouped.c" 5#include "widgets_file_icons_2_same_grouped.c"
6#include "widgets_file_icons_3.c" 6#include "widgets_file_icons_3.c"
7#include "widgets_file_icons_4.c" 7#include "widgets_file_icons_4.c"
8#include "widgets_list_1.c"
9#include "widgets_list_1_grouped.c"
10#include "widgets_list_2.c"
11#include "widgets_list_2_grouped.c"
12#include "widgets_list_3.c"
13#include "widgets_list_3_grouped.c"
14#include "widgets_list_4.c"
15#include "widgets_list_4_grouped.c"
8#include "image_blend_unscaled.c" 16#include "image_blend_unscaled.c"
9#include "image_blend_solid_middle_unscaled.c" 17#include "image_blend_solid_middle_unscaled.c"
10#include "image_blend_fade_unscaled.c" 18#include "image_blend_fade_unscaled.c"
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 6b2ca92..98c44e1 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -53,11 +53,19 @@ static double weights[] =
53 0.0, // no test 0 53 0.0, // no test 0
54 54
55 50.4851, // test 1 55 50.4851, // test 1
56 37.3703, // test 2 56 97.3703, // test 2
57 37.3703, // test 3 57 10.0000, // test 3
58 27.3703, // test 4 58 87.3703, // ...
59 27.3703, // test 5 59 10.0000,
60 10.6493, // ... 60 150.0000,
61 10.0000,
62 150.0000,
63 10.0000,
64 150.0000,
65 10.0000,
66 150.0000,
67 10.0000,
68 10.6493,
61 38.4818, 69 38.4818,
62 40.7314, 70 40.7314,
63 32.0866, 71 32.0866,
diff --git a/src/bin/widgets_list_1.c b/src/bin/widgets_list_1.c
new file mode 100644
index 0000000..64cd2a1
--- /dev/null
+++ b/src/bin/widgets_list_1.c
@@ -0,0 +1,150 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_1_start
7#define NAME "Widgets List"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 64
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_texts[NUM];
21
22static const char *labels[] =
23{
24 "Andrew",
25 "Alex",
26 "Amanda",
27 "Arthur",
28 "Astrid",
29 "Avery",
30
31 "Beethoven",
32 "Billy",
33 "Bob",
34 "Bundy",
35
36 "Candy",
37 "Carsten",
38
39 "Danny",
40 "Dennis",
41 "Dirk",
42 "Doug",
43
44 "Edmond",
45 "Erik",
46
47 "Fernando",
48 "Frank",
49 "Frederick",
50
51 "Gabby",
52 "George",
53 "Gilroy",
54 "Goodrich",
55 "Gumby",
56};
57
58/* setup */
59static void _setup(void)
60{
61 int i;
62 Evas_Object *o;
63 for (i = 0; i < NUM; i++)
64 {
65 o = evas_object_image_filled_add(evas);
66 o_images[i] = o;
67 evas_object_image_border_set(o, 2, 2, 2, 2);
68 evas_object_image_file_set(o, build_path("pan.png"), NULL);
69 evas_object_resize(o, win_w, ICON_SIZE);
70 evas_object_show(o);
71
72 o = evas_object_text_add(evas);
73 o_texts[i] = o;
74 evas_object_text_font_set(o, "Vera-Bold", 10);
75 evas_object_text_text_set(o, labels[i % 26]);
76 evas_object_color_set(o, 0, 0, 0, 255);
77 evas_object_show(o);
78 }
79 done = 0;
80}
81
82/* cleanup */
83static void _cleanup(void)
84{
85 int i;
86 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
87 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
88}
89
90/* loop - do things */
91static void _loop(double t, int f)
92{
93 int i;
94 Evas_Coord x, y, w, h, tw, th, cent;
95 x = 0;
96 y = 0 - f;
97 w = win_w;
98 h = ICON_SIZE;
99 for (i = 0; i < NUM; i++)
100 {
101 evas_object_move(o_images[i], x, y);
102 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
103 cent = (ICON_SIZE - th) / 2;
104 evas_object_move(o_texts[i], x + 8, y + cent);
105 y += ICON_SIZE;
106 }
107 FPS_STD(NAME);
108}
109
110/* prepend special key handlers if interactive (before STD) */
111static void _key(char *key)
112{
113 KEY_STD;
114}
115
116
117
118
119
120
121
122
123
124
125
126
127/* template stuff - ignore */
128# endif
129#endif
130
131#ifdef UI
132_ui_menu_item_add(ICON, NAME, FNAME);
133#endif
134
135#ifdef PROTO
136void FNAME(void);
137#endif
138
139#ifndef PROTO
140# ifndef UI
141void FNAME(void)
142{
143 ui_func_set(_key, _loop);
144 _setup();
145}
146# endif
147#endif
148#undef FNAME
149#undef NAME
150#undef ICON
diff --git a/src/bin/widgets_list_1_grouped.c b/src/bin/widgets_list_1_grouped.c
new file mode 100644
index 0000000..b327efb
--- /dev/null
+++ b/src/bin/widgets_list_1_grouped.c
@@ -0,0 +1,158 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_1_grouped_start
7#define NAME "Widgets List Grouped"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 64
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_texts[NUM];
21
22static const char *labels[] =
23{
24 "Andrew",
25 "Alex",
26 "Amanda",
27 "Arthur",
28 "Astrid",
29 "Avery",
30
31 "Beethoven",
32 "Billy",
33 "Bob",
34 "Bundy",
35
36 "Candy",
37 "Carsten",
38
39 "Danny",
40 "Dennis",
41 "Dirk",
42 "Doug",
43
44 "Edmond",
45 "Erik",
46
47 "Fernando",
48 "Frank",
49 "Frederick",
50
51 "Gabby",
52 "George",
53 "Gilroy",
54 "Goodrich",
55 "Gumby",
56};
57
58/* setup */
59static void _setup(void)
60{
61 int i;
62 Evas_Object *o;
63 for (i = 0; i < NUM; i++)
64 {
65 o = evas_object_image_filled_add(evas);
66 o_images[i] = o;
67 evas_object_image_border_set(o, 2, 2, 2, 2);
68 evas_object_image_file_set(o, build_path("pan.png"), NULL);
69 evas_object_resize(o, win_w, ICON_SIZE);
70 evas_object_show(o);
71
72 o = evas_object_text_add(evas);
73 o_texts[i] = o;
74 evas_object_text_font_set(o, "Vera-Bold", 10);
75 evas_object_text_text_set(o, labels[i % 26]);
76 evas_object_color_set(o, 0, 0, 0, 255);
77 evas_object_show(o);
78 }
79 for (i = 0; i < NUM; i++)
80 {
81 evas_object_raise(o_images[i]);
82 }
83 for (i = 0; i < NUM; i++)
84 {
85 evas_object_raise(o_texts[i]);
86 }
87 done = 0;
88}
89
90/* cleanup */
91static void _cleanup(void)
92{
93 int i;
94 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
95 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
96}
97
98/* loop - do things */
99static void _loop(double t, int f)
100{
101 int i;
102 Evas_Coord x, y, w, h, tw, th, cent;
103 x = 0;
104 y = 0 - f;
105 w = win_w;
106 h = ICON_SIZE;
107 for (i = 0; i < NUM; i++)
108 {
109 evas_object_move(o_images[i], x, y);
110 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
111 cent = (ICON_SIZE - th) / 2;
112 evas_object_move(o_texts[i], x + 8, y + cent);
113 y += ICON_SIZE;
114 }
115 FPS_STD(NAME);
116}
117
118/* prepend special key handlers if interactive (before STD) */
119static void _key(char *key)
120{
121 KEY_STD;
122}
123
124
125
126
127
128
129
130
131
132
133
134
135/* template stuff - ignore */
136# endif
137#endif
138
139#ifdef UI
140_ui_menu_item_add(ICON, NAME, FNAME);
141#endif
142
143#ifdef PROTO
144void FNAME(void);
145#endif
146
147#ifndef PROTO
148# ifndef UI
149void FNAME(void)
150{
151 ui_func_set(_key, _loop);
152 _setup();
153}
154# endif
155#endif
156#undef FNAME
157#undef NAME
158#undef ICON
diff --git a/src/bin/widgets_list_2.c b/src/bin/widgets_list_2.c
new file mode 100644
index 0000000..56dff92
--- /dev/null
+++ b/src/bin/widgets_list_2.c
@@ -0,0 +1,150 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_2_start
7#define NAME "Widgets List 2"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 32
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_texts[NUM];
21
22static const char *labels[] =
23{
24 "Andrew",
25 "Alex",
26 "Amanda",
27 "Arthur",
28 "Astrid",
29 "Avery",
30
31 "Beethoven",
32 "Billy",
33 "Bob",
34 "Bundy",
35
36 "Candy",
37 "Carsten",
38
39 "Danny",
40 "Dennis",
41 "Dirk",
42 "Doug",
43
44 "Edmond",
45 "Erik",
46
47 "Fernando",
48 "Frank",
49 "Frederick",
50
51 "Gabby",
52 "George",
53 "Gilroy",
54 "Goodrich",
55 "Gumby",
56};
57
58/* setup */
59static void _setup(void)
60{
61 int i;
62 Evas_Object *o;
63 for (i = 0; i < NUM; i++)
64 {
65 o = evas_object_image_filled_add(evas);
66 o_images[i] = o;
67 evas_object_image_border_set(o, 2, 2, 2, 2);
68 evas_object_image_file_set(o, build_path("pan.png"), NULL);
69 evas_object_resize(o, win_w, ICON_SIZE);
70 evas_object_show(o);
71
72 o = evas_object_text_add(evas);
73 o_texts[i] = o;
74 evas_object_text_font_set(o, "Vera-Bold", 10);
75 evas_object_text_text_set(o, labels[i % 26]);
76 evas_object_color_set(o, 0, 0, 0, 255);
77 evas_object_show(o);
78 }
79 done = 0;
80}
81
82/* cleanup */
83static void _cleanup(void)
84{
85 int i;
86 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
87 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
88}
89
90/* loop - do things */
91static void _loop(double t, int f)
92{
93 int i;
94 Evas_Coord x, y, w, h, tw, th, cent;
95 x = 0;
96 y = 0 - f;
97 w = win_w;
98 h = ICON_SIZE;
99 for (i = 0; i < NUM; i++)
100 {
101 evas_object_move(o_images[i], x, y);
102 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
103 cent = (ICON_SIZE - th) / 2;
104 evas_object_move(o_texts[i], x + 8, y + cent);
105 y += ICON_SIZE;
106 }
107 FPS_STD(NAME);
108}
109
110/* prepend special key handlers if interactive (before STD) */
111static void _key(char *key)
112{
113 KEY_STD;
114}
115
116
117
118
119
120
121
122
123
124
125
126
127/* template stuff - ignore */
128# endif
129#endif
130
131#ifdef UI
132_ui_menu_item_add(ICON, NAME, FNAME);
133#endif
134
135#ifdef PROTO
136void FNAME(void);
137#endif
138
139#ifndef PROTO
140# ifndef UI
141void FNAME(void)
142{
143 ui_func_set(_key, _loop);
144 _setup();
145}
146# endif
147#endif
148#undef FNAME
149#undef NAME
150#undef ICON
diff --git a/src/bin/widgets_list_2_grouped.c b/src/bin/widgets_list_2_grouped.c
new file mode 100644
index 0000000..fae8011
--- /dev/null
+++ b/src/bin/widgets_list_2_grouped.c
@@ -0,0 +1,158 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_2_grouped_start
7#define NAME "Widgets List 2 Grouped"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 64
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_texts[NUM];
21
22static const char *labels[] =
23{
24 "Andrew",
25 "Alex",
26 "Amanda",
27 "Arthur",
28 "Astrid",
29 "Avery",
30
31 "Beethoven",
32 "Billy",
33 "Bob",
34 "Bundy",
35
36 "Candy",
37 "Carsten",
38
39 "Danny",
40 "Dennis",
41 "Dirk",
42 "Doug",
43
44 "Edmond",
45 "Erik",
46
47 "Fernando",
48 "Frank",
49 "Frederick",
50
51 "Gabby",
52 "George",
53 "Gilroy",
54 "Goodrich",
55 "Gumby",
56};
57
58/* setup */
59static void _setup(void)
60{
61 int i;
62 Evas_Object *o;
63 for (i = 0; i < NUM; i++)
64 {
65 o = evas_object_image_filled_add(evas);
66 o_images[i] = o;
67 evas_object_image_border_set(o, 2, 2, 2, 2);
68 evas_object_image_file_set(o, build_path("pan.png"), NULL);
69 evas_object_resize(o, win_w, ICON_SIZE);
70 evas_object_show(o);
71
72 o = evas_object_text_add(evas);
73 o_texts[i] = o;
74 evas_object_text_font_set(o, "Vera-Bold", 10);
75 evas_object_text_text_set(o, labels[i % 26]);
76 evas_object_color_set(o, 0, 0, 0, 255);
77 evas_object_show(o);
78 }
79 for (i = 0; i < NUM; i++)
80 {
81 evas_object_raise(o_images[i]);
82 }
83 for (i = 0; i < NUM; i++)
84 {
85 evas_object_raise(o_texts[i]);
86 }
87 done = 0;
88}
89
90/* cleanup */
91static void _cleanup(void)
92{
93 int i;
94 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
95 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
96}
97
98/* loop - do things */
99static void _loop(double t, int f)
100{
101 int i;
102 Evas_Coord x, y, w, h, tw, th, cent;
103 x = 0;
104 y = 0 - f;
105 w = win_w;
106 h = ICON_SIZE;
107 for (i = 0; i < NUM; i++)
108 {
109 evas_object_move(o_images[i], x, y);
110 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
111 cent = (ICON_SIZE - th) / 2;
112 evas_object_move(o_texts[i], x + 8, y + cent);
113 y += ICON_SIZE;
114 }
115 FPS_STD(NAME);
116}
117
118/* prepend special key handlers if interactive (before STD) */
119static void _key(char *key)
120{
121 KEY_STD;
122}
123
124
125
126
127
128
129
130
131
132
133
134
135/* template stuff - ignore */
136# endif
137#endif
138
139#ifdef UI
140_ui_menu_item_add(ICON, NAME, FNAME);
141#endif
142
143#ifdef PROTO
144void FNAME(void);
145#endif
146
147#ifndef PROTO
148# ifndef UI
149void FNAME(void)
150{
151 ui_func_set(_key, _loop);
152 _setup();
153}
154# endif
155#endif
156#undef FNAME
157#undef NAME
158#undef ICON
diff --git a/src/bin/widgets_list_3.c b/src/bin/widgets_list_3.c
new file mode 100644
index 0000000..ae022cd
--- /dev/null
+++ b/src/bin/widgets_list_3.c
@@ -0,0 +1,180 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_3_start
7#define NAME "Widgets List 3"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 64
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_icons[NUM];
21static Evas_Object *o_texts[NUM];
22
23static const char *icons[] =
24{
25 "bug.png",
26 "bulb.png",
27 "camera.png",
28 "colorbox.png",
29
30 "e.png",
31 "error.png",
32 "flower.png",
33 "house.png",
34
35 "mushroom.png",
36 "pulse.png",
37 "typewriter.png",
38 "warning.png",
39
40 "watch.png"
41};
42
43static const char *labels[] =
44{
45 "Andrew",
46 "Alex",
47 "Amanda",
48 "Arthur",
49 "Astrid",
50 "Avery",
51
52 "Beethoven",
53 "Billy",
54 "Bob",
55 "Bundy",
56
57 "Candy",
58 "Carsten",
59
60 "Danny",
61 "Dennis",
62 "Dirk",
63 "Doug",
64
65 "Edmond",
66 "Erik",
67
68 "Fernando",
69 "Frank",
70 "Frederick",
71
72 "Gabby",
73 "George",
74 "Gilroy",
75 "Goodrich",
76 "Gumby",
77};
78
79/* setup */
80static void _setup(void)
81{
82 int i;
83 Evas_Object *o;
84 for (i = 0; i < NUM; i++)
85 {
86 o = evas_object_image_filled_add(evas);
87 o_images[i] = o;
88 evas_object_image_border_set(o, 2, 2, 2, 2);
89 evas_object_image_file_set(o, build_path("pan.png"), NULL);
90 evas_object_resize(o, win_w, ICON_SIZE);
91 evas_object_show(o);
92
93 o = evas_object_image_filled_add(evas);
94 o_icons[i] = o;
95 evas_object_image_border_set(o, 2, 2, 2, 2);
96 evas_object_image_file_set(o, build_path(icons[i % 13]), NULL);
97 evas_object_resize(o, ICON_SIZE - 8, ICON_SIZE - 8);
98 evas_object_show(o);
99
100 o = evas_object_text_add(evas);
101 o_texts[i] = o;
102 evas_object_text_font_set(o, "Vera-Bold", 10);
103 evas_object_text_text_set(o, labels[i % 26]);
104 evas_object_color_set(o, 0, 0, 0, 255);
105 evas_object_show(o);
106 }
107 done = 0;
108}
109
110/* cleanup */
111static void _cleanup(void)
112{
113 int i;
114 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
115 for (i = 0; i < NUM; i++) evas_object_del(o_icons[i]);
116 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
117}
118
119/* loop - do things */
120static void _loop(double t, int f)
121{
122 int i;
123 Evas_Coord x, y, w, h, tw, th, cent;
124 x = 0;
125 y = 0 - f;
126 w = win_w;
127 h = ICON_SIZE;
128 for (i = 0; i < NUM; i++)
129 {
130 evas_object_move(o_images[i], x, y);
131 evas_object_move(o_icons[i], x + 4, y + 4);
132 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
133 cent = (ICON_SIZE - th) / 2;
134 evas_object_move(o_texts[i], x + 8 + ICON_SIZE + 8, y + cent);
135 y += ICON_SIZE;
136 }
137 FPS_STD(NAME);
138}
139
140/* prepend special key handlers if interactive (before STD) */
141static void _key(char *key)
142{
143 KEY_STD;
144}
145
146
147
148
149
150
151
152
153
154
155
156
157/* template stuff - ignore */
158# endif
159#endif
160
161#ifdef UI
162_ui_menu_item_add(ICON, NAME, FNAME);
163#endif
164
165#ifdef PROTO
166void FNAME(void);
167#endif
168
169#ifndef PROTO
170# ifndef UI
171void FNAME(void)
172{
173 ui_func_set(_key, _loop);
174 _setup();
175}
176# endif
177#endif
178#undef FNAME
179#undef NAME
180#undef ICON
diff --git a/src/bin/widgets_list_3_grouped.c b/src/bin/widgets_list_3_grouped.c
new file mode 100644
index 0000000..d545f0f
--- /dev/null
+++ b/src/bin/widgets_list_3_grouped.c
@@ -0,0 +1,196 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_3_grouped_start
7#define NAME "Widgets List 3 Grouped"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 64
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_icons[NUM];
21static Evas_Object *o_texts[NUM];
22
23static const char *icons[] =
24{
25 "bug.png",
26 "bulb.png",
27 "camera.png",
28 "colorbox.png",
29
30 "e.png",
31 "error.png",
32 "flower.png",
33 "house.png",
34
35 "mushroom.png",
36 "pulse.png",
37 "typewriter.png",
38 "warning.png",
39
40 "watch.png"
41};
42
43static const char *labels[] =
44{
45 "Andrew",
46 "Alex",
47 "Amanda",
48 "Arthur",
49 "Astrid",
50 "Avery",
51
52 "Beethoven",
53 "Billy",
54 "Bob",
55 "Bundy",
56
57 "Candy",
58 "Carsten",
59
60 "Danny",
61 "Dennis",
62 "Dirk",
63 "Doug",
64
65 "Edmond",
66 "Erik",
67
68 "Fernando",
69 "Frank",
70 "Frederick",
71
72 "Gabby",
73 "George",
74 "Gilroy",
75 "Goodrich",
76 "Gumby",
77};
78
79/* setup */
80static void _setup(void)
81{
82 int i;
83 Evas_Object *o;
84 for (i = 0; i < NUM; i++)
85 {
86 o = evas_object_image_filled_add(evas);
87 o_images[i] = o;
88 evas_object_image_border_set(o, 2, 2, 2, 2);
89 evas_object_image_file_set(o, build_path("pan.png"), NULL);
90 evas_object_resize(o, win_w, ICON_SIZE);
91 evas_object_show(o);
92
93 o = evas_object_image_filled_add(evas);
94 o_icons[i] = o;
95 evas_object_image_border_set(o, 2, 2, 2, 2);
96 evas_object_image_file_set(o, build_path(icons[i % 13]), NULL);
97 evas_object_resize(o, ICON_SIZE - 8, ICON_SIZE - 8);
98 evas_object_show(o);
99
100 o = evas_object_text_add(evas);
101 o_texts[i] = o;
102 evas_object_text_font_set(o, "Vera-Bold", 10);
103 evas_object_text_text_set(o, labels[i % 26]);
104 evas_object_color_set(o, 0, 0, 0, 255);
105 evas_object_show(o);
106 }
107 for (i = 0; i < NUM; i++)
108 {
109 evas_object_raise(o_images[i]);
110 }
111 for (i = 0; i < NUM; i++)
112 {
113 evas_object_raise(o_icons[i]);
114 }
115 for (i = 0; i < NUM; i++)
116 {
117 if (i > 13) evas_object_stack_above(o_icons[i], o_icons[i - 13]);
118 }
119 for (i = 0; i < NUM; i++)
120 {
121 evas_object_raise(o_texts[i]);
122 }
123 done = 0;
124}
125
126/* cleanup */
127static void _cleanup(void)
128{
129 int i;
130 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
131 for (i = 0; i < NUM; i++) evas_object_del(o_icons[i]);
132 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
133}
134
135/* loop - do things */
136static void _loop(double t, int f)
137{
138 int i;
139 Evas_Coord x, y, w, h, tw, th, cent;
140 x = 0;
141 y = 0 - f;
142 w = win_w;
143 h = ICON_SIZE;
144 for (i = 0; i < NUM; i++)
145 {
146 evas_object_move(o_images[i], x, y);
147 evas_object_move(o_icons[i], x + 4, y + 4);
148 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
149 cent = (ICON_SIZE - th) / 2;
150 evas_object_move(o_texts[i], x + 8 + ICON_SIZE + 8, y + cent);
151 y += ICON_SIZE;
152 }
153 FPS_STD(NAME);
154}
155
156/* prepend special key handlers if interactive (before STD) */
157static void _key(char *key)
158{
159 KEY_STD;
160}
161
162
163
164
165
166
167
168
169
170
171
172
173/* template stuff - ignore */
174# endif
175#endif
176
177#ifdef UI
178_ui_menu_item_add(ICON, NAME, FNAME);
179#endif
180
181#ifdef PROTO
182void FNAME(void);
183#endif
184
185#ifndef PROTO
186# ifndef UI
187void FNAME(void)
188{
189 ui_func_set(_key, _loop);
190 _setup();
191}
192# endif
193#endif
194#undef FNAME
195#undef NAME
196#undef ICON
diff --git a/src/bin/widgets_list_4.c b/src/bin/widgets_list_4.c
new file mode 100644
index 0000000..4291b29
--- /dev/null
+++ b/src/bin/widgets_list_4.c
@@ -0,0 +1,180 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_4_start
7#define NAME "Widgets List 4"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 32
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_icons[NUM];
21static Evas_Object *o_texts[NUM];
22
23static const char *icons[] =
24{
25 "bug.png",
26 "bulb.png",
27 "camera.png",
28 "colorbox.png",
29
30 "e.png",
31 "error.png",
32 "flower.png",
33 "house.png",
34
35 "mushroom.png",
36 "pulse.png",
37 "typewriter.png",
38 "warning.png",
39
40 "watch.png"
41};
42
43static const char *labels[] =
44{
45 "Andrew",
46 "Alex",
47 "Amanda",
48 "Arthur",
49 "Astrid",
50 "Avery",
51
52 "Beethoven",
53 "Billy",
54 "Bob",
55 "Bundy",
56
57 "Candy",
58 "Carsten",
59
60 "Danny",
61 "Dennis",
62 "Dirk",
63 "Doug",
64
65 "Edmond",
66 "Erik",
67
68 "Fernando",
69 "Frank",
70 "Frederick",
71
72 "Gabby",
73 "George",
74 "Gilroy",
75 "Goodrich",
76 "Gumby",
77};
78
79/* setup */
80static void _setup(void)
81{
82 int i;
83 Evas_Object *o;
84 for (i = 0; i < NUM; i++)
85 {
86 o = evas_object_image_filled_add(evas);
87 o_images[i] = o;
88 evas_object_image_border_set(o, 2, 2, 2, 2);
89 evas_object_image_file_set(o, build_path("pan.png"), NULL);
90 evas_object_resize(o, win_w, ICON_SIZE);
91 evas_object_show(o);
92
93 o = evas_object_image_filled_add(evas);
94 o_icons[i] = o;
95 evas_object_image_border_set(o, 2, 2, 2, 2);
96 evas_object_image_file_set(o, build_path(icons[i % 13]), NULL);
97 evas_object_resize(o, ICON_SIZE - 8, ICON_SIZE - 8);
98 evas_object_show(o);
99
100 o = evas_object_text_add(evas);
101 o_texts[i] = o;
102 evas_object_text_font_set(o, "Vera-Bold", 10);
103 evas_object_text_text_set(o, labels[i % 26]);
104 evas_object_color_set(o, 0, 0, 0, 255);
105 evas_object_show(o);
106 }
107 done = 0;
108}
109
110/* cleanup */
111static void _cleanup(void)
112{
113 int i;
114 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
115 for (i = 0; i < NUM; i++) evas_object_del(o_icons[i]);
116 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
117}
118
119/* loop - do things */
120static void _loop(double t, int f)
121{
122 int i;
123 Evas_Coord x, y, w, h, tw, th, cent;
124 x = 0;
125 y = 0 - f;
126 w = win_w;
127 h = ICON_SIZE;
128 for (i = 0; i < NUM; i++)
129 {
130 evas_object_move(o_images[i], x, y);
131 evas_object_move(o_icons[i], x + 4, y + 4);
132 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
133 cent = (ICON_SIZE - th) / 2;
134 evas_object_move(o_texts[i], x + 8 + ICON_SIZE + 8, y + cent);
135 y += ICON_SIZE;
136 }
137 FPS_STD(NAME);
138}
139
140/* prepend special key handlers if interactive (before STD) */
141static void _key(char *key)
142{
143 KEY_STD;
144}
145
146
147
148
149
150
151
152
153
154
155
156
157/* template stuff - ignore */
158# endif
159#endif
160
161#ifdef UI
162_ui_menu_item_add(ICON, NAME, FNAME);
163#endif
164
165#ifdef PROTO
166void FNAME(void);
167#endif
168
169#ifndef PROTO
170# ifndef UI
171void FNAME(void)
172{
173 ui_func_set(_key, _loop);
174 _setup();
175}
176# endif
177#endif
178#undef FNAME
179#undef NAME
180#undef ICON
diff --git a/src/bin/widgets_list_4_grouped.c b/src/bin/widgets_list_4_grouped.c
new file mode 100644
index 0000000..2cb9aae
--- /dev/null
+++ b/src/bin/widgets_list_4_grouped.c
@@ -0,0 +1,196 @@
1#undef FNAME
2#undef NAME
3#undef ICON
4
5/* metadata */
6#define FNAME widgets_list_4_grouped_start
7#define NAME "Widgets List 4 Grouped"
8#define ICON "widgets.png"
9
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
13
14/* standard var */
15static int done = 0;
16/* private data */
17#define NUM 512
18#define ICON_SIZE 32
19static Evas_Object *o_images[NUM];
20static Evas_Object *o_icons[NUM];
21static Evas_Object *o_texts[NUM];
22
23static const char *icons[] =
24{
25 "bug.png",
26 "bulb.png",
27 "camera.png",
28 "colorbox.png",
29
30 "e.png",
31 "error.png",
32 "flower.png",
33 "house.png",
34
35 "mushroom.png",
36 "pulse.png",
37 "typewriter.png",
38 "warning.png",
39
40 "watch.png"
41};
42
43static const char *labels[] =
44{
45 "Andrew",
46 "Alex",
47 "Amanda",
48 "Arthur",
49 "Astrid",
50 "Avery",
51
52 "Beethoven",
53 "Billy",
54 "Bob",
55 "Bundy",
56
57 "Candy",
58 "Carsten",
59
60 "Danny",
61 "Dennis",
62 "Dirk",
63 "Doug",
64
65 "Edmond",
66 "Erik",
67
68 "Fernando",
69 "Frank",
70 "Frederick",
71
72 "Gabby",
73 "George",
74 "Gilroy",
75 "Goodrich",
76 "Gumby",
77};
78
79/* setup */
80static void _setup(void)
81{
82 int i;
83 Evas_Object *o;
84 for (i = 0; i < NUM; i++)
85 {
86 o = evas_object_image_filled_add(evas);
87 o_images[i] = o;
88 evas_object_image_border_set(o, 2, 2, 2, 2);
89 evas_object_image_file_set(o, build_path("pan.png"), NULL);
90 evas_object_resize(o, win_w, ICON_SIZE);
91 evas_object_show(o);
92
93 o = evas_object_image_filled_add(evas);
94 o_icons[i] = o;
95 evas_object_image_border_set(o, 2, 2, 2, 2);
96 evas_object_image_file_set(o, build_path(icons[i % 13]), NULL);
97 evas_object_resize(o, ICON_SIZE - 8, ICON_SIZE - 8);
98 evas_object_show(o);
99
100 o = evas_object_text_add(evas);
101 o_texts[i] = o;
102 evas_object_text_font_set(o, "Vera-Bold", 10);
103 evas_object_text_text_set(o, labels[i % 26]);
104 evas_object_color_set(o, 0, 0, 0, 255);
105 evas_object_show(o);
106 }
107 for (i = 0; i < NUM; i++)
108 {
109 evas_object_raise(o_images[i]);
110 }
111 for (i = 0; i < NUM; i++)
112 {
113 evas_object_raise(o_icons[i]);
114 }
115 for (i = 0; i < NUM; i++)
116 {
117 if (i > 13) evas_object_stack_above(o_icons[i], o_icons[i - 13]);
118 }
119 for (i = 0; i < NUM; i++)
120 {
121 evas_object_raise(o_texts[i]);
122 }
123 done = 0;
124}
125
126/* cleanup */
127static void _cleanup(void)
128{
129 int i;
130 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
131 for (i = 0; i < NUM; i++) evas_object_del(o_icons[i]);
132 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
133}
134
135/* loop - do things */
136static void _loop(double t, int f)
137{
138 int i;
139 Evas_Coord x, y, w, h, tw, th, cent;
140 x = 0;
141 y = 0 - f;
142 w = win_w;
143 h = ICON_SIZE;
144 for (i = 0; i < NUM; i++)
145 {
146 evas_object_move(o_images[i], x, y);
147 evas_object_move(o_icons[i], x + 4, y + 4);
148 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
149 cent = (ICON_SIZE - th) / 2;
150 evas_object_move(o_texts[i], x + 8 + ICON_SIZE + 8, y + cent);
151 y += ICON_SIZE;
152 }
153 FPS_STD(NAME);
154}
155
156/* prepend special key handlers if interactive (before STD) */
157static void _key(char *key)
158{
159 KEY_STD;
160}
161
162
163
164
165
166
167
168
169
170
171
172
173/* template stuff - ignore */
174# endif
175#endif
176
177#ifdef UI
178_ui_menu_item_add(ICON, NAME, FNAME);
179#endif
180
181#ifdef PROTO
182void FNAME(void);
183#endif
184
185#ifndef PROTO
186# ifndef UI
187void FNAME(void)
188{
189 ui_func_set(_key, _loop);
190 _setup();
191}
192# endif
193#endif
194#undef FNAME
195#undef NAME
196#undef ICON