summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio S. Machado <savio.sena@acm.org>2014-10-13 12:27:58 -0300
committerSavio S. Machado <savio.sena@acm.org>2014-10-13 12:27:58 -0300
commit3434b132b843c7625d750234d62b4fa99ec6dfdf (patch)
treeae49f0d0bce46491e64e6770874e626a11e8e8e5
parent2360632b3752e0b9b68cbc430d0b0479664170fb (diff)
expedite-cxx: Added remaining tests.
-rw-r--r--src/bin/cxx/image_blend_nearest_solid_same_scaled.cc6
-rw-r--r--src/bin/cxx/image_data_ycbcr601pl.cc13
-rw-r--r--src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc13
-rw-r--r--src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc13
-rw-r--r--src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc13
-rw-r--r--src/bin/cxx/image_map_3d_1.cc56
-rw-r--r--src/bin/cxx/image_map_3d_2.cc51
-rw-r--r--src/bin/cxx/image_map_3d_3.cc48
-rw-r--r--src/bin/cxx/image_map_3d_4.cc32
-rw-r--r--src/bin/cxx/image_map_3d_5.cc58
-rw-r--r--src/bin/cxx/image_map_3d_6.cc56
-rw-r--r--src/bin/cxx/image_map_solid_rotate.cc6
-rw-r--r--src/bin/cxx/proxy_image_offscreen.cc2
-rw-r--r--src/bin/cxx/proxy_text_fixed.cc74
-rw-r--r--src/bin/cxx/proxy_text_random.cc71
-rw-r--r--src/bin/cxx/tests.h8
-rw-r--r--src/bin/cxx/text_change.cc8
-rw-r--r--src/bin/cxx/text_styles.cc4
-rw-r--r--src/bin/cxx/textblock_auto_align.cc26
-rw-r--r--src/bin/cxx/widgets_file_icons.cc15
-rw-r--r--src/bin/cxx/widgets_file_icons_2.cc17
-rw-r--r--src/bin/cxx/widgets_file_icons_2_grouped.cc31
-rw-r--r--src/bin/cxx/widgets_file_icons_2_same.cc15
-rw-r--r--src/bin/cxx/widgets_file_icons_2_same_grouped.cc27
-rw-r--r--src/bin/cxx/widgets_file_icons_3.cc16
-rw-r--r--src/bin/cxx/widgets_file_icons_4.cc18
-rw-r--r--src/bin/cxx/widgets_list_1.cc17
-rw-r--r--src/bin/cxx/widgets_list_1_grouped.cc17
-rw-r--r--src/bin/cxx/widgets_list_2.cc15
-rw-r--r--src/bin/cxx/widgets_list_2_grouped.cc15
-rw-r--r--src/bin/cxx/widgets_list_3.cc23
-rw-r--r--src/bin/cxx/widgets_list_3_grouped.cc56
-rw-r--r--src/bin/cxx/widgets_list_4.cc22
-rw-r--r--src/bin/cxx/widgets_list_4_grouped.cc54
34 files changed, 410 insertions, 506 deletions
diff --git a/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc
index 8b30c7e..9728f46 100644
--- a/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc
+++ b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc
@@ -30,7 +30,7 @@ static void _setup(void)
30 images.push_back(o); 30 images.push_back(o);
31 eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX 31 eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
32 o.smooth_scale_set(0); 32 o.smooth_scale_set(0);
33 o.visibility_set(EINA_TRUE); 33 o.visibility_set(true);
34 } 34 }
35 done = 0; 35 done = 0;
36} 36}
@@ -38,8 +38,8 @@ static void _setup(void)
38/* cleanup */ 38/* cleanup */
39static void _cleanup() 39static void _cleanup()
40{ 40{
41 for (evas::image& i : images) 41 for (evas::image& img : images)
42 i.parent_set(efl::eo::base(nullptr)); 42 img.parent_set(efl::eo::base(nullptr));
43 images.clear(); 43 images.clear();
44} 44}
45 45
diff --git a/src/bin/cxx/image_data_ycbcr601pl.cc b/src/bin/cxx/image_data_ycbcr601pl.cc
index 6491814..a88d610 100644
--- a/src/bin/cxx/image_data_ycbcr601pl.cc
+++ b/src/bin/cxx/image_data_ycbcr601pl.cc
@@ -37,9 +37,9 @@ static void _setup(void)
37 o.fill_set(0, 0, 640, 480); 37 o.fill_set(0, 0, 640, 480);
38 o.evas::object::size_set(640, 480); 38 o.evas::object::size_set(640, 480);
39 o.visibility_set(true); 39 o.visibility_set(true);
40 yp = static_cast<unsigned char*>(malloc(640 * 480)); 40 yp = new unsigned char[640 * 480];
41 up = static_cast<unsigned char*>(malloc(320 * 240)); 41 up = new unsigned char[320 * 240];
42 vp = static_cast<unsigned char*>(malloc(320 * 240)); 42 vp = new unsigned char[320 * 240];
43 FILE *f = fopen(build_path("tp.yuv"), "rb"); 43 FILE *f = fopen(build_path("tp.yuv"), "rb");
44 if (f) 44 if (f)
45 { 45 {
@@ -76,9 +76,10 @@ static void _cleanup(void)
76 for (evas::image& i : images) 76 for (evas::image& i : images)
77 i.parent_set(efl::eo::base(nullptr)); 77 i.parent_set(efl::eo::base(nullptr));
78 images.clear(); 78 images.clear();
79 free(yp); 79
80 free(up); 80 delete yp;
81 free(vp); 81 delete up;
82 delete vp;
82} 83}
83 84
84/* loop - do things */ 85/* loop - do things */
diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc
index 4a21060..2651bcf 100644
--- a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc
+++ b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc
@@ -38,9 +38,9 @@ static void _setup(void)
38 o.evas::object::size_set(640, 480); 38 o.evas::object::size_set(640, 480);
39 o.smooth_scale_set(0); 39 o.smooth_scale_set(0);
40 o.visibility_set(true); 40 o.visibility_set(true);
41 yp = static_cast<unsigned char*>(malloc(640 * 480)); 41 yp = new unsigned char[640 * 480];
42 up = static_cast<unsigned char*>(malloc(320 * 240)); 42 up = new unsigned char[320 * 240];
43 vp = static_cast<unsigned char*>(malloc(320 * 240)); 43 vp = new unsigned char[320 * 240];
44 FILE *f = fopen(build_path("tp.yuv"), "rb"); 44 FILE *f = fopen(build_path("tp.yuv"), "rb");
45 if (f) 45 if (f)
46 { 46 {
@@ -77,9 +77,10 @@ static void _cleanup(void)
77 for (evas::image& i : images) 77 for (evas::image& i : images)
78 i.parent_set(efl::eo::base(nullptr)); 78 i.parent_set(efl::eo::base(nullptr));
79 images.clear(); 79 images.clear();
80 free(yp); 80
81 free(up); 81 delete yp;
82 free(vp); 82 delete up;
83 delete vp;
83} 84}
84 85
85/* loop - do things */ 86/* loop - do things */
diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc
index a672dc1..0935156 100644
--- a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc
+++ b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc
@@ -37,9 +37,9 @@ static void _setup(void)
37 o.fill_set(0, 0, 640, 480); 37 o.fill_set(0, 0, 640, 480);
38 o.evas::object::size_set(640, 480); 38 o.evas::object::size_set(640, 480);
39 o.evas::object::visibility_set(true); 39 o.evas::object::visibility_set(true);
40 yp = static_cast<unsigned char*>(malloc(640 * 480)); 40 yp = new unsigned char[640 * 480];
41 up = static_cast<unsigned char*>(malloc(320 * 240)); 41 up = new unsigned char[320 * 240];
42 vp = static_cast<unsigned char*>(malloc(320 * 240)); 42 vp = new unsigned char[320 * 240];
43 FILE *f = fopen(build_path("tp.yuv"), "rb"); 43 FILE *f = fopen(build_path("tp.yuv"), "rb");
44 if (f) 44 if (f)
45 { 45 {
@@ -76,9 +76,10 @@ static void _cleanup(void)
76 for (evas::image& i : images) 76 for (evas::image& i : images)
77 i.parent_set(efl::eo::base(nullptr)); 77 i.parent_set(efl::eo::base(nullptr));
78 images.clear(); 78 images.clear();
79 free(yp); 79
80 free(up); 80 delete yp;
81 free(vp); 81 delete up;
82 delete vp;
82} 83}
83 84
84/* loop - do things */ 85/* loop - do things */
diff --git a/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc
index 1d01693..01e9d81 100644
--- a/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc
+++ b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc
@@ -37,9 +37,9 @@ static void _setup(void)
37 o.fill_set(0, 0, 640, 480); 37 o.fill_set(0, 0, 640, 480);
38 o.evas::object::size_set(640, 480); 38 o.evas::object::size_set(640, 480);
39 o.evas::object::visibility_set(true); 39 o.evas::object::visibility_set(true);
40 yp = static_cast<unsigned char*>(malloc(640 * 480)); 40 yp = new unsigned char[640 * 480];
41 up = static_cast<unsigned char*>(malloc(320 * 240)); 41 up = new unsigned char[320 * 240];
42 vp = static_cast<unsigned char*>(malloc(320 * 240)); 42 vp = new unsigned char[320 * 240];
43 FILE *f = fopen(build_path("tp.yuv"), "rb"); 43 FILE *f = fopen(build_path("tp.yuv"), "rb");
44 if (f) 44 if (f)
45 { 45 {
@@ -80,9 +80,10 @@ static void _cleanup(void)
80 for (evas::image& i : images) 80 for (evas::image& i : images)
81 i.parent_set(efl::eo::base(nullptr)); 81 i.parent_set(efl::eo::base(nullptr));
82 images.clear(); 82 images.clear();
83 free(yp); 83
84 free(up); 84 delete yp;
85 free(vp); 85 delete up;
86 delete vp;
86} 87}
87 88
88/* loop - do things */ 89/* loop - do things */
diff --git a/src/bin/cxx/image_map_3d_1.cc b/src/bin/cxx/image_map_3d_1.cc
index 4d3dd4f..399048c 100644
--- a/src/bin/cxx/image_map_3d_1.cc
+++ b/src/bin/cxx/image_map_3d_1.cc
@@ -22,7 +22,7 @@ typedef struct _Point
22 22
23typedef struct _Side 23typedef struct _Side
24{ 24{
25 evas::image o; 25 evas::image *o;
26 Point pt[4]; 26 Point pt[4];
27} Side; 27} Side;
28 28
@@ -48,22 +48,20 @@ static Cube *
48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) 48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
49{ 49{
50 evas::canvas canvas(::eo_ref(G_evas)); 50 evas::canvas canvas(::eo_ref(G_evas));
51 Cube *c;
52
53 w -= (w / 2); 51 w -= (w / 2);
54 h -= (h / 2); 52 h -= (h / 2);
55 d -= (d / 2); 53 d -= (d / 2);
56 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 54 Cube *c = new Cube {};
57 for (int i = 0; i < 6; i++) 55 for (int i = 0; i < 6; i++)
58 { 56 {
59 char buf[256]; 57 char buf[256];
60 c->side[i].o = evas::image(efl::eo::parent = canvas); 58 c->side[i].o = new evas::image(efl::eo::parent = canvas);
61 snprintf(buf, sizeof(buf), "cube%i.png", i + 1); 59 snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
62 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 60 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
63 c->side[i].o.fill_set(0, 0, 256, 256); 61 c->side[i].o->fill_set(0, 0, 256, 256);
64 c->side[i].o.evas::object::size_set(256, 256); 62 c->side[i].o->evas::object::size_set(256, 256);
65 c->side[i].o.smooth_scale_set(0); 63 c->side[i].o->smooth_scale_set(0);
66 c->side[i].o.visibility_set(true); 64 c->side[i].o->visibility_set(true);
67 } 65 }
68 POINT(0, 0, -w, -h, -d, 0, 0); 66 POINT(0, 0, -w, -h, -d, 0, 0);
69 POINT(0, 1, w, -h, -d, 256, 0); 67 POINT(0, 1, w, -h, -d, 256, 0);
@@ -107,8 +105,8 @@ _cube_pos(Cube *c,
107 int i, j, order[6], sorted; 105 int i, j, order[6], sorted;
108 Evas_Coord mz[6]; 106 Evas_Coord mz[6];
109 107
110 if (!m) m = evas_map_new(4); 108 if (!m) m = ::evas_map_new(4);
111 evas_map_smooth_set(m, 0); 109 ::evas_map_smooth_set(m, 0);
112 110
113 for (i = 0; i < 6; i++) 111 for (i = 0; i < 6; i++)
114 { 112 {
@@ -116,34 +114,34 @@ _cube_pos(Cube *c,
116 114
117 for (j = 0; j < 4; j++) 115 for (j = 0; j < 4; j++)
118 { 116 {
119 evas_map_point_coord_set(m, j, 117 ::evas_map_point_coord_set(m, j,
120 c->side[i].pt[j].x + x, 118 c->side[i].pt[j].x + x,
121 c->side[i].pt[j].y + y, 119 c->side[i].pt[j].y + y,
122 c->side[i].pt[j].z + z); 120 c->side[i].pt[j].z + z);
123 evas_map_point_image_uv_set(m, j, 121 ::evas_map_point_image_uv_set(m, j,
124 c->side[i].pt[j].u, 122 c->side[i].pt[j].u,
125 c->side[i].pt[j].v); 123 c->side[i].pt[j].v);
126 evas_map_point_color_set(m, j, 255, 255, 255, 255); 124 ::evas_map_point_color_set(m, j, 255, 255, 255, 255);
127 } 125 }
128 evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); 126 ::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
129 evas_map_util_3d_lighting(m, -1000, -1000, -1000, 127 ::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
130 255, 255, 255, 128 255, 255, 255,
131 20, 20, 20); 129 20, 20, 20);
132 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); 130 ::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
133 if (evas_map_util_clockwise_get(m)) 131 if (evas_map_util_clockwise_get(m))
134 { 132 {
135 c->side[i].o.map_enable_set(1); 133 c->side[i].o->map_enable_set(1);
136 c->side[i].o.map_set(m); 134 c->side[i].o->map_set(m);
137 c->side[i].o.visibility_set(true); 135 c->side[i].o->visibility_set(true);
138 } 136 }
139 else 137 else
140 { 138 {
141 c->side[i].o.visibility_set(false); 139 c->side[i].o->visibility_set(false);
142 } 140 }
143 141
144 order[i] = i; 142 order[i] = i;
145 for (j = 0; j < 4; j++) 143 for (j = 0; j < 4; j++)
146 evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); 144 ::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
147 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; 145 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
148 } 146 }
149 sorted = 0; 147 sorted = 0;
@@ -163,9 +161,9 @@ _cube_pos(Cube *c,
163 } 161 }
164 while (!sorted); 162 while (!sorted);
165 163
166 c->side[order[0]].o.evas::object::raise(); 164 c->side[order[0]].o->evas::object::raise();
167 for (i = 1; i < 6; i++) 165 for (i = 1; i < 6; i++)
168 c->side[order[i]].o.evas::object::stack_below(c->side[order[i - 1]].o); 166 c->side[order[i]].o->evas::object::stack_below(*c->side[order[i - 1]].o);
169} 167}
170 168
171static void 169static void
@@ -173,11 +171,11 @@ _cube_free(Cube *c)
173{ 171{
174 for (int i = 0; i < 6; i++) 172 for (int i = 0; i < 6; i++)
175 { 173 {
176 c->side[i].o.visibility_set(false); // XXX 174 c->side[i].o->visibility_set(false); // XXX
177 c->side[i].o.parent_set(efl::eo::base(nullptr)); 175 c->side[i].o->parent_set(efl::eo::base(nullptr));
178 ::eo_unref(c->side[i].o._release()); 176 delete c->side[i].o;
179 } 177 }
180 free(c); 178 delete c;
181} 179}
182 180
183/* setup */ 181/* setup */
diff --git a/src/bin/cxx/image_map_3d_2.cc b/src/bin/cxx/image_map_3d_2.cc
index f39531f..8c8c603 100644
--- a/src/bin/cxx/image_map_3d_2.cc
+++ b/src/bin/cxx/image_map_3d_2.cc
@@ -22,7 +22,7 @@ typedef struct _Point
22 22
23typedef struct _Side 23typedef struct _Side
24{ 24{
25 evas::image o; 25 evas::image *o;
26 Point pt[4]; 26 Point pt[4];
27} Side; 27} Side;
28 28
@@ -48,20 +48,19 @@ static Cube *
48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) 48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
49{ 49{
50 evas::canvas canvas(::eo_ref(G_evas)); 50 evas::canvas canvas(::eo_ref(G_evas));
51 Cube *c;
52 w -= (w / 2); 51 w -= (w / 2);
53 h -= (h / 2); 52 h -= (h / 2);
54 d -= (d / 2); 53 d -= (d / 2);
55 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 54 Cube *c = new Cube {};
56 for (int i = 0; i < 6; i++) 55 for (int i = 0; i < 6; i++)
57 { 56 {
58 char buf[256]; 57 char buf[256];
59 c->side[i].o = evas::image(efl::eo::parent = canvas); 58 c->side[i].o = new evas::image(efl::eo::parent = canvas);
60 snprintf(buf, sizeof(buf), "cube%i.png", i + 1); 59 snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
61 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 60 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
62 c->side[i].o.fill_set(0, 0, 256, 256); 61 c->side[i].o->fill_set(0, 0, 256, 256);
63 c->side[i].o.evas::object::size_set(256, 256); 62 c->side[i].o->evas::object::size_set(256, 256);
64 c->side[i].o.visibility_set(true); 63 c->side[i].o->evas::object::visibility_set(true);
65 } 64 }
66 POINT(0, 0, -w, -h, -d, 0, 0); 65 POINT(0, 0, -w, -h, -d, 0, 0);
67 POINT(0, 1, w, -h, -d, 256, 0); 66 POINT(0, 1, w, -h, -d, 256, 0);
@@ -113,34 +112,34 @@ _cube_pos(Cube *c,
113 112
114 for (j = 0; j < 4; j++) 113 for (j = 0; j < 4; j++)
115 { 114 {
116 evas_map_point_coord_set(m, j, 115 ::evas_map_point_coord_set(m, j,
117 c->side[i].pt[j].x + x, 116 c->side[i].pt[j].x + x,
118 c->side[i].pt[j].y + y, 117 c->side[i].pt[j].y + y,
119 c->side[i].pt[j].z + z); 118 c->side[i].pt[j].z + z);
120 evas_map_point_image_uv_set(m, j, 119 ::evas_map_point_image_uv_set(m, j,
121 c->side[i].pt[j].u, 120 c->side[i].pt[j].u,
122 c->side[i].pt[j].v); 121 c->side[i].pt[j].v);
123 evas_map_point_color_set(m, j, 255, 255, 255, 255); 122 ::evas_map_point_color_set(m, j, 255, 255, 255, 255);
124 } 123 }
125 evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); 124 ::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
126 evas_map_util_3d_lighting(m, -1000, -1000, -1000, 125 ::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
127 255, 255, 255, 126 255, 255, 255,
128 20, 20, 20); 127 20, 20, 20);
129 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); 128 ::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
130 if (evas_map_util_clockwise_get(m)) 129 if (::evas_map_util_clockwise_get(m))
131 { 130 {
132 c->side[i].o.map_enable_set(1); 131 c->side[i].o->map_enable_set(1);
133 c->side[i].o.map_set(m); 132 c->side[i].o->map_set(m);
134 c->side[i].o.visibility_set(true); 133 c->side[i].o->visibility_set(true);
135 } 134 }
136 else 135 else
137 { 136 {
138 c->side[i].o.visibility_set(false); 137 c->side[i].o->visibility_set(false);
139 } 138 }
140 139
141 order[i] = i; 140 order[i] = i;
142 for (j = 0; j < 4; j++) 141 for (j = 0; j < 4; j++)
143 evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); 142 ::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
144 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; 143 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
145 } 144 }
146 sorted = 0; 145 sorted = 0;
@@ -160,9 +159,9 @@ _cube_pos(Cube *c,
160 } 159 }
161 while (!sorted); 160 while (!sorted);
162 161
163 c->side[order[0]].o.raise(); 162 c->side[order[0]].o->raise();
164 for (i = 1; i < 6; i++) 163 for (i = 1; i < 6; i++)
165 c->side[order[i]].o.stack_below(c->side[order[i - 1]].o); 164 c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
166} 165}
167 166
168static void 167static void
@@ -170,11 +169,11 @@ _cube_free(Cube *c)
170{ 169{
171 for (int i = 0; i < 6; i++) 170 for (int i = 0; i < 6; i++)
172 { 171 {
173 c->side[i].o.visibility_set(false); // XXX 172 c->side[i].o->visibility_set(false); // XXX
174 c->side[i].o.parent_set(efl::eo::base(nullptr)); 173 c->side[i].o->parent_set(efl::eo::base(nullptr));
175 ::eo_unref(c->side[i].o._release()); 174 delete c->side[i].o;
176 } 175 }
177 free(c); 176 delete c;
178} 177}
179 178
180/* setup */ 179/* setup */
diff --git a/src/bin/cxx/image_map_3d_3.cc b/src/bin/cxx/image_map_3d_3.cc
index 9038e92..b177aec 100644
--- a/src/bin/cxx/image_map_3d_3.cc
+++ b/src/bin/cxx/image_map_3d_3.cc
@@ -22,7 +22,7 @@ typedef struct _Point
22 22
23typedef struct _Side 23typedef struct _Side
24{ 24{
25 evas::image o; 25 evas::image *o;
26 Point pt[4]; 26 Point pt[4];
27} Side; 27} Side;
28 28
@@ -53,17 +53,17 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
53 w -= (w / 2); 53 w -= (w / 2);
54 h -= (h / 2); 54 h -= (h / 2);
55 d -= (d / 2); 55 d -= (d / 2);
56 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 56 c = new Cube {};
57 for (int i = 0; i < 6; i++) 57 for (int i = 0; i < 6; i++)
58 { 58 {
59 char buf[256]; 59 char buf[256];
60 c->side[i].o = evas::image(efl::eo::parent = canvas); 60 c->side[i].o = new evas::image(efl::eo::parent = canvas);
61 snprintf(buf, sizeof(buf), "cube%i.png", i + 1); 61 snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
62 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 62 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
63 c->side[i].o.fill_set(0, 0, 256, 256); 63 c->side[i].o->fill_set(0, 0, 256, 256);
64 c->side[i].o.evas::object::size_set(256, 256); 64 c->side[i].o->evas::object::size_set(256, 256);
65 c->side[i].o.smooth_scale_set(0); 65 c->side[i].o->smooth_scale_set(0);
66 c->side[i].o.visibility_set(true); 66 c->side[i].o->visibility_set(true);
67 } 67 }
68 POINT(0, 0, -w, -h, -d, 0, 0); 68 POINT(0, 0, -w, -h, -d, 0, 0);
69 POINT(0, 1, w, -h, -d, 256, 0); 69 POINT(0, 1, w, -h, -d, 256, 0);
@@ -108,7 +108,7 @@ _cube_pos(Cube *c,
108 Evas_Coord mz[6]; 108 Evas_Coord mz[6];
109 109
110 if (!m) m = evas_map_new(4); 110 if (!m) m = evas_map_new(4);
111 evas_map_smooth_set(m, 0); 111 ::evas_map_smooth_set(m, 0);
112 112
113 for (i = 0; i < 6; i++) 113 for (i = 0; i < 6; i++)
114 { 114 {
@@ -116,26 +116,26 @@ _cube_pos(Cube *c,
116 116
117 for (j = 0; j < 4; j++) 117 for (j = 0; j < 4; j++)
118 { 118 {
119 evas_map_point_coord_set(m, j, 119 ::evas_map_point_coord_set(m, j,
120 c->side[i].pt[j].x + x, 120 c->side[i].pt[j].x + x,
121 c->side[i].pt[j].y + y, 121 c->side[i].pt[j].y + y,
122 c->side[i].pt[j].z + z); 122 c->side[i].pt[j].z + z);
123 evas_map_point_image_uv_set(m, j, 123 ::evas_map_point_image_uv_set(m, j,
124 c->side[i].pt[j].u, 124 c->side[i].pt[j].u,
125 c->side[i].pt[j].v); 125 c->side[i].pt[j].v);
126 evas_map_point_color_set(m, j, 255, 255, 255, 128); 126 ::evas_map_point_color_set(m, j, 255, 255, 255, 128);
127 } 127 }
128 evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); 128 ::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
129 evas_map_util_3d_lighting(m, -1000, -1000, -1000, 129 ::evas_map_util_3d_lighting(m, -1000, -1000, -1000,
130 255, 255, 255, 130 255, 255, 255,
131 20, 20, 20); 131 20, 20, 20);
132 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); 132 ::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
133 c->side[i].o.map_enable_set(1); 133 c->side[i].o->map_enable_set(1);
134 c->side[i].o.map_set(m); 134 c->side[i].o->map_set(m);
135 135
136 order[i] = i; 136 order[i] = i;
137 for (j = 0; j < 4; j++) 137 for (j = 0; j < 4; j++)
138 evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); 138 ::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
139 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; 139 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
140 } 140 }
141 sorted = 0; 141 sorted = 0;
@@ -155,9 +155,9 @@ _cube_pos(Cube *c,
155 } 155 }
156 while (!sorted); 156 while (!sorted);
157 157
158 c->side[order[0]].o.raise(); 158 c->side[order[0]].o->raise();
159 for (i = 1; i < 6; i++) 159 for (i = 1; i < 6; i++)
160 c->side[order[i]].o.stack_below(c->side[order[i - 1]].o); 160 c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
161} 161}
162 162
163static void 163static void
@@ -165,11 +165,11 @@ _cube_free(Cube *c)
165{ 165{
166 for (int i = 0; i < 6; i++) 166 for (int i = 0; i < 6; i++)
167 { 167 {
168 c->side[i].o.visibility_set(false); // XXX 168 c->side[i].o->visibility_set(false); // XXX
169 c->side[i].o.parent_set(efl::eo::base(nullptr)); 169 c->side[i].o->parent_set(efl::eo::base(nullptr));
170 ::eo_unref(c->side[i].o._release()); 170 delete c->side[i].o;
171 } 171 }
172 free(c); 172 delete c;
173} 173}
174 174
175/* setup */ 175/* setup */
diff --git a/src/bin/cxx/image_map_3d_4.cc b/src/bin/cxx/image_map_3d_4.cc
index cd360b7..dae4df6 100644
--- a/src/bin/cxx/image_map_3d_4.cc
+++ b/src/bin/cxx/image_map_3d_4.cc
@@ -21,7 +21,7 @@ typedef struct _Point
21 21
22typedef struct _Side 22typedef struct _Side
23{ 23{
24 evas::image o; 24 evas::image *o;
25 Point pt[4]; 25 Point pt[4];
26} Side; 26} Side;
27 27
@@ -47,21 +47,19 @@ static Cube *
47_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) 47_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
48{ 48{
49 evas::canvas canvas(::eo_ref(G_evas)); 49 evas::canvas canvas(::eo_ref(G_evas));
50 Cube *c;
51
52 w -= (w / 2); 50 w -= (w / 2);
53 h -= (h / 2); 51 h -= (h / 2);
54 d -= (d / 2); 52 d -= (d / 2);
55 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 53 Cube *c = new Cube {};
56 for (int i = 0; i < 6; i++) 54 for (int i = 0; i < 6; i++)
57 { 55 {
58 char buf[256]; 56 char buf[256];
59 c->side[i].o = evas::image(efl::eo::parent = canvas); 57 c->side[i].o = new evas::image(efl::eo::parent = canvas);
60 snprintf(buf, sizeof(buf), "cube%i.png", i + 1); 58 snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
61 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 59 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
62 c->side[i].o.fill_set(0, 0, 256, 256); 60 c->side[i].o->fill_set(0, 0, 256, 256);
63 c->side[i].o.evas::object::size_set(256, 256); 61 c->side[i].o->evas::object::size_set(256, 256);
64 c->side[i].o.visibility_set(true); 62 c->side[i].o->visibility_set(true);
65 } 63 }
66 POINT(0, 0, -w, -h, -d, 0, 0); 64 POINT(0, 0, -w, -h, -d, 0, 0);
67 POINT(0, 1, w, -h, -d, 256, 0); 65 POINT(0, 1, w, -h, -d, 256, 0);
@@ -127,8 +125,8 @@ _cube_pos(Cube *c,
127 255, 255, 255, 125 255, 255, 255,
128 20, 20, 20); 126 20, 20, 20);
129 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); 127 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
130 c->side[i].o.map_enable_set(1); 128 c->side[i].o->map_enable_set(1);
131 c->side[i].o.map_set(m); 129 c->side[i].o->map_set(m);
132 130
133 order[i] = i; 131 order[i] = i;
134 for (j = 0; j < 4; j++) 132 for (j = 0; j < 4; j++)
@@ -152,9 +150,9 @@ _cube_pos(Cube *c,
152 } 150 }
153 while (!sorted); 151 while (!sorted);
154 152
155 c->side[order[0]].o.raise(); 153 c->side[order[0]].o->raise();
156 for (i = 1; i < 6; i++) 154 for (i = 1; i < 6; i++)
157 c->side[order[i]].o.stack_below(c->side[order[i - 1]].o); 155 c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
158} 156}
159 157
160static void 158static void
@@ -162,11 +160,11 @@ _cube_free(Cube *c)
162{ 160{
163 for (int i = 0; i < 6; i++) 161 for (int i = 0; i < 6; i++)
164 { 162 {
165 c->side[i].o.visibility_set(false); // XXX 163 c->side[i].o->visibility_set(false); // XXX
166 c->side[i].o.parent_set(efl::eo::base(nullptr)); 164 c->side[i].o->parent_set(efl::eo::base(nullptr));
167 ::eo_unref(c->side[i].o._release()); 165 delete c->side[i].o;
168 } 166 }
169 free(c); 167 delete c;
170} 168}
171 169
172/* setup */ 170/* setup */
diff --git a/src/bin/cxx/image_map_3d_5.cc b/src/bin/cxx/image_map_3d_5.cc
index 896ae8b..438351d 100644
--- a/src/bin/cxx/image_map_3d_5.cc
+++ b/src/bin/cxx/image_map_3d_5.cc
@@ -22,7 +22,7 @@ typedef struct _Point
22 22
23typedef struct _Side 23typedef struct _Side
24{ 24{
25 evas::image o; 25 evas::image *o;
26 Point pt[4]; 26 Point pt[4];
27} Side; 27} Side;
28 28
@@ -48,22 +48,20 @@ static Cube *
48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) 48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
49{ 49{
50 evas::canvas canvas(::eo_ref(G_evas)); 50 evas::canvas canvas(::eo_ref(G_evas));
51 Cube *c;
52
53 w -= (w / 2); 51 w -= (w / 2);
54 h -= (h / 2); 52 h -= (h / 2);
55 d -= (d / 2); 53 d -= (d / 2);
56 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 54 Cube *c = new Cube {};
57 for (int i = 0; i < 6; i++) 55 for (int i = 0; i < 6; i++)
58 { 56 {
59 char buf[256]; 57 char buf[256];
60 c->side[i].o = evas::image(efl::eo::parent = canvas); 58 c->side[i].o = new evas::image(efl::eo::parent = canvas);
61 snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1); 59 snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
62 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 60 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
63 c->side[i].o.fill_set(0, 0, 720, 420); 61 c->side[i].o->fill_set(0, 0, 720, 420);
64 c->side[i].o.evas::object::size_set(720, 420); 62 c->side[i].o->evas::object::size_set(720, 420);
65 c->side[i].o.smooth_scale_set(0); 63 c->side[i].o->smooth_scale_set(0);
66 c->side[i].o.visibility_set(true); 64 c->side[i].o->visibility_set(true);
67 } 65 }
68 POINT(0, 0, -w, -h, -d, 0, 0); 66 POINT(0, 0, -w, -h, -d, 0, 0);
69 POINT(0, 1, w, -h, -d, 720, 0); 67 POINT(0, 1, w, -h, -d, 720, 0);
@@ -107,8 +105,8 @@ _cube_pos(Cube *c,
107 int i, j, order[6], sorted; 105 int i, j, order[6], sorted;
108 Evas_Coord mz[6]; 106 Evas_Coord mz[6];
109 107
110 if (!m) m = evas_map_new(4); 108 if (!m) m = ::evas_map_new(4);
111 evas_map_smooth_set(m, 0); 109 ::evas_map_smooth_set(m, 0);
112 110
113 for (i = 0; i < 6; i++) 111 for (i = 0; i < 6; i++)
114 { 112 {
@@ -116,34 +114,34 @@ _cube_pos(Cube *c,
116 114
117 for (j = 0; j < 4; j++) 115 for (j = 0; j < 4; j++)
118 { 116 {
119 evas_map_point_coord_set(m, j, 117 ::evas_map_point_coord_set(m, j,
120 c->side[i].pt[j].x + x, 118 c->side[i].pt[j].x + x,
121 c->side[i].pt[j].y + y, 119 c->side[i].pt[j].y + y,
122 c->side[i].pt[j].z + z); 120 c->side[i].pt[j].z + z);
123 evas_map_point_image_uv_set(m, j, 121 ::evas_map_point_image_uv_set(m, j,
124 c->side[i].pt[j].u, 122 c->side[i].pt[j].u,
125 c->side[i].pt[j].v); 123 c->side[i].pt[j].v);
126 evas_map_point_color_set(m, j, 255, 255, 255, 255); 124 ::evas_map_point_color_set(m, j, 255, 255, 255, 255);
127 } 125 }
128 evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); 126 ::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
129 evas_map_util_3d_lighting(m, -1000, win_h / 2, -1000, 127 ::evas_map_util_3d_lighting(m, -1000, win_h / 2, -1000,
130 255, 255, 255, 128 255, 255, 255,
131 20, 20, 20); 129 20, 20, 20);
132 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720); 130 ::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
133 if (evas_map_util_clockwise_get(m)) 131 if (::evas_map_util_clockwise_get(m))
134 { 132 {
135 c->side[i].o.map_enable_set(1); 133 c->side[i].o->map_enable_set(1);
136 c->side[i].o.map_set(m); 134 c->side[i].o->map_set(m);
137 c->side[i].o.visibility_set(true); 135 c->side[i].o->visibility_set(true);
138 } 136 }
139 else 137 else
140 { 138 {
141 c->side[i].o.visibility_set(false); 139 c->side[i].o->visibility_set(false);
142 } 140 }
143 141
144 order[i] = i; 142 order[i] = i;
145 for (j = 0; j < 4; j++) 143 for (j = 0; j < 4; j++)
146 evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); 144 ::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
147 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; 145 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
148 } 146 }
149 sorted = 0; 147 sorted = 0;
@@ -163,9 +161,9 @@ _cube_pos(Cube *c,
163 } 161 }
164 while (!sorted); 162 while (!sorted);
165 163
166 c->side[order[0]].o.raise(); 164 c->side[order[0]].o->raise();
167 for (i = 1; i < 6; i++) 165 for (i = 1; i < 6; i++)
168 c->side[order[i]].o.stack_below(c->side[order[i - 1]].o); 166 c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
169} 167}
170 168
171static void 169static void
@@ -173,11 +171,11 @@ _cube_free(Cube *c)
173{ 171{
174 for (int i = 0; i < 6; i++) 172 for (int i = 0; i < 6; i++)
175 { 173 {
176 c->side[i].o.visibility_set(false); // XXX 174 c->side[i].o->visibility_set(false); // XXX
177 c->side[i].o.parent_set(efl::eo::base(nullptr)); 175 c->side[i].o->parent_set(efl::eo::base(nullptr));
178 ::eo_unref(c->side[i].o._release()); 176 delete c->side[i].o;
179 } 177 }
180 free(c); 178 delete c;
181} 179}
182 180
183/* setup */ 181/* setup */
diff --git a/src/bin/cxx/image_map_3d_6.cc b/src/bin/cxx/image_map_3d_6.cc
index 72f8aaa..c31f089 100644
--- a/src/bin/cxx/image_map_3d_6.cc
+++ b/src/bin/cxx/image_map_3d_6.cc
@@ -22,7 +22,7 @@ typedef struct _Point
22 22
23typedef struct _Side 23typedef struct _Side
24{ 24{
25 evas::image o; 25 evas::image *o;
26 Point pt[4]; 26 Point pt[4];
27} Side; 27} Side;
28 28
@@ -48,22 +48,20 @@ static Cube *
48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) 48_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
49{ 49{
50 evas::canvas canvas(::eo_ref(G_evas)); 50 evas::canvas canvas(::eo_ref(G_evas));
51 Cube *c;
52
53 w -= (w / 2); 51 w -= (w / 2);
54 h -= (h / 2); 52 h -= (h / 2);
55 d -= (d / 2); 53 d -= (d / 2);
56 c = static_cast<Cube*>(calloc(1, sizeof(Cube))); 54 Cube *c = new Cube {};
57 for (int i = 0; i < 6; i++) 55 for (int i = 0; i < 6; i++)
58 { 56 {
59 char buf[256]; 57 char buf[256];
60 c->side[i].o = evas::image(efl::eo::parent = canvas); 58 c->side[i].o = new evas::image(efl::eo::parent = canvas);
61 snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1); 59 snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
62 eo_do(c->side[i].o._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX 60 eo_do(c->side[i].o->_eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
63 c->side[i].o.fill_set(0, 0, 720, 420); 61 c->side[i].o->fill_set(0, 0, 720, 420);
64 c->side[i].o.evas::object::size_set(720, 420); 62 c->side[i].o->evas::object::size_set(720, 420);
65 c->side[i].o.smooth_scale_set(0); 63 c->side[i].o->smooth_scale_set(0);
66 c->side[i].o.visibility_set(true); 64 c->side[i].o->visibility_set(true);
67 } 65 }
68 POINT(0, 0, -w, -h, -d, 0, 0); 66 POINT(0, 0, -w, -h, -d, 0, 0);
69 POINT(0, 1, w, -h, -d, 720, 0); 67 POINT(0, 1, w, -h, -d, 720, 0);
@@ -107,8 +105,8 @@ _cube_pos(Cube *c,
107 int i, j, order[6], sorted; 105 int i, j, order[6], sorted;
108 Evas_Coord mz[6]; 106 Evas_Coord mz[6];
109 107
110 if (!m) m = evas_map_new(4); 108 if (!m) m = ::evas_map_new(4);
111 evas_map_smooth_set(m, 0); 109 ::evas_map_smooth_set(m, 0);
112 110
113 for (i = 0; i < 6; i++) 111 for (i = 0; i < 6; i++)
114 { 112 {
@@ -116,31 +114,31 @@ _cube_pos(Cube *c,
116 114
117 for (j = 0; j < 4; j++) 115 for (j = 0; j < 4; j++)
118 { 116 {
119 evas_map_point_coord_set(m, j, 117 ::evas_map_point_coord_set(m, j,
120 c->side[i].pt[j].x + x, 118 c->side[i].pt[j].x + x,
121 c->side[i].pt[j].y + y, 119 c->side[i].pt[j].y + y,
122 c->side[i].pt[j].z + z); 120 c->side[i].pt[j].z + z);
123 evas_map_point_image_uv_set(m, j, 121 ::evas_map_point_image_uv_set(m, j,
124 c->side[i].pt[j].u, 122 c->side[i].pt[j].u,
125 c->side[i].pt[j].v); 123 c->side[i].pt[j].v);
126 evas_map_point_color_set(m, j, 255, 255, 255, 255); 124 ::evas_map_point_color_set(m, j, 255, 255, 255, 255);
127 } 125 }
128 evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); 126 ::evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z);
129 evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720); 127 ::evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
130 if (evas_map_util_clockwise_get(m)) 128 if (::evas_map_util_clockwise_get(m))
131 { 129 {
132 c->side[i].o.map_enable_set(1); 130 c->side[i].o->map_enable_set(1);
133 c->side[i].o.map_set(m); 131 c->side[i].o->map_set(m);
134 c->side[i].o.visibility_set(true); 132 c->side[i].o->visibility_set(true);
135 } 133 }
136 else 134 else
137 { 135 {
138 c->side[i].o.visibility_set(false); 136 c->side[i].o->visibility_set(false);
139 } 137 }
140 138
141 order[i] = i; 139 order[i] = i;
142 for (j = 0; j < 4; j++) 140 for (j = 0; j < 4; j++)
143 evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); 141 ::evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j]));
144 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; 142 mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4;
145 } 143 }
146 sorted = 0; 144 sorted = 0;
@@ -160,9 +158,9 @@ _cube_pos(Cube *c,
160 } 158 }
161 while (!sorted); 159 while (!sorted);
162 160
163 c->side[order[0]].o.raise(); 161 c->side[order[0]].o->raise();
164 for (i = 1; i < 6; i++) 162 for (i = 1; i < 6; i++)
165 c->side[order[i]].o.stack_below(c->side[order[i - 1]].o); 163 c->side[order[i]].o->stack_below(*c->side[order[i - 1]].o);
166} 164}
167 165
168static void 166static void
@@ -170,11 +168,11 @@ _cube_free(Cube *c)
170{ 168{
171 for (int i = 0; i < 6; i++) 169 for (int i = 0; i < 6; i++)
172 { 170 {
173 c->side[i].o.visibility_set(false); // XXX 171 c->side[i].o->visibility_set(false); // XXX
174 c->side[i].o.parent_set(efl::eo::base(nullptr)); 172 c->side[i].o->parent_set(efl::eo::base(nullptr));
175 ::eo_unref(c->side[i].o._release()); 173 delete c->side[i].o;
176 } 174 }
177 free(c); 175 delete c;
178} 176}
179 177
180/* setup */ 178/* setup */
diff --git a/src/bin/cxx/image_map_solid_rotate.cc b/src/bin/cxx/image_map_solid_rotate.cc
index e570285..a436bc6 100644
--- a/src/bin/cxx/image_map_solid_rotate.cc
+++ b/src/bin/cxx/image_map_solid_rotate.cc
@@ -32,7 +32,7 @@ static void _setup(void)
32 eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX 32 eo_do(o._eo_ptr(), efl_file_set(build_path("image.png"), NULL)); // XXX
33 o.fill_set(0, 0, 120, 160); 33 o.fill_set(0, 0, 120, 160);
34 o.evas::object::size_set(120, 160); 34 o.evas::object::size_set(120, 160);
35 o.evas::object::visibility_set(EINA_TRUE); 35 o.evas::object::visibility_set(true);
36 } 36 }
37 done = 0; 37 done = 0;
38} 38}
@@ -40,8 +40,8 @@ static void _setup(void)
40/* cleanup */ 40/* cleanup */
41static void _cleanup(void) 41static void _cleanup(void)
42{ 42{
43 for (evas::image& i : images) 43 for (evas::image& img : images)
44 i.parent_set(efl::eo::base(nullptr)); 44 img.parent_set(efl::eo::base(nullptr));
45 images.clear(); 45 images.clear();
46} 46}
47 47
diff --git a/src/bin/cxx/proxy_image_offscreen.cc b/src/bin/cxx/proxy_image_offscreen.cc
index 68b5d58..2b37b71 100644
--- a/src/bin/cxx/proxy_image_offscreen.cc
+++ b/src/bin/cxx/proxy_image_offscreen.cc
@@ -25,13 +25,11 @@ static void _setup(void)
25{ 25{
26 evas::canvas canvas(::eo_ref(G_evas)); 26 evas::canvas canvas(::eo_ref(G_evas));
27 evas::image o(efl::eo::parent = canvas); 27 evas::image o(efl::eo::parent = canvas);
28
29 eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX 28 eo_do(o._eo_ptr(), efl_file_set(build_path("logo.png"), NULL)); // XXX
30 o.fill_set(0, 0, 120, 160); 29 o.fill_set(0, 0, 120, 160);
31 o.evas::object::size_set(120, 160); 30 o.evas::object::size_set(120, 160);
32 o.evas::object::position_set(-400, -300); 31 o.evas::object::position_set(-400, -300);
33 evas::image src = o; 32 evas::image src = o;
34
35 for (int i = 0; i < OBNUM / 2; i++) 33 for (int i = 0; i < OBNUM / 2; i++)
36 { 34 {
37 evas::image o(efl::eo::parent = canvas); 35 evas::image o(efl::eo::parent = canvas);
diff --git a/src/bin/cxx/proxy_text_fixed.cc b/src/bin/cxx/proxy_text_fixed.cc
index 5eada1f..1ca9da3 100644
--- a/src/bin/cxx/proxy_text_fixed.cc
+++ b/src/bin/cxx/proxy_text_fixed.cc
@@ -19,52 +19,42 @@
19static int done = 0; 19static int done = 0;
20 20
21/* private data */ 21/* private data */
22static evas::object *texts[OBNUM]; 22static efl::eina::array<evas::object> texts;
23
24inline Evas_Text_Style_Type
25operator++(Evas_Text_Style_Type const& x)
26{
27 int val = static_cast<int>(x);
28 return static_cast<Evas_Text_Style_Type>(val++);
29}
30 23
31/* setup */ 24/* setup */
32static void _setup(void) 25static void _setup(void)
33{ 26{
34 evas::canvas canvas(::eo_ref(G_evas)); 27 evas::canvas canvas(::eo_ref(G_evas));
35 Evas_Text_Style_Type st, i; 28 int w, h, i = 0;
29 Evas_Text_Style_Type st = EVAS_TEXT_STYLE_SHADOW;
36 30
37 st = EVAS_TEXT_STYLE_SHADOW;
38 for (; st <= EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; ++i) 31 for (; st <= EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; ++i)
39 { 32 {
40 evas::text* o = new evas::text(efl::eo::parent = canvas); 33 evas::text o(efl::eo::parent = canvas);
41 o->font_set("Vera-Bold", 20); 34 texts.push_back(o);
42 o->text_set("This is a test string"); 35 o.font_set("Vera-Bold", 20);
43 o->style_set(st); 36 o.text_set("This is a test string");
44 o->evas::object::color_set(255, 255, 255, 255); 37 o.style_set(st);
45 o->shadow_color_set(0, 0, 0, 24); 38 o.evas::object::color_set(255, 255, 255, 255);
46 o->glow_color_set(100, 80, 40, 100); 39 o.shadow_color_set(0, 0, 0, 24);
47 o->glow2_color_set(50, 10, 5, 50); 40 o.glow_color_set(100, 80, 40, 100);
48 o->outline_color_set(0, 0, 0, 255); 41 o.glow2_color_set(50, 10, 5, 50);
49 o->visibility_set(true); 42 o.outline_color_set(0, 0, 0, 255);
50 texts[i] = o; 43 o.visibility_set(true);
51 ++st; 44 st = static_cast<Evas_Text_Style_Type>(static_cast<int>(st) + 1);
52 } 45 }
53 st = i; 46 st = static_cast<Evas_Text_Style_Type>(i);
54 47
55 for ( ; i < OBNUM ; ++i) 48 for ( ; i < OBNUM ; ++i)
56 { 49 {
57 evas::text s(::eo_ref(texts[i % st]->_eo_ptr())); 50 evas::image o(efl::eo::parent = canvas);
58 evas::image *o = new evas::image(efl::eo::parent = canvas); 51 evas::object s = texts[i % st];
59 o->source_set(s); 52 texts.push_back(o);
60 /* FIXME s == NULL*/ 53 o.source_set(s);
61 int w,h; 54 s.size_get(&w, &h);
62 s.evas::object::size_get(&w, &h); 55 o.evas::object::size_set(w, h);
63 o->evas::object::size_set(w, h); 56 o.fill_set(0, 0, w, h);
64 o->fill_set(0, 0, w, h); 57 o.evas::object::visibility_set(true);
65 o->visibility_set(true);
66 if (texts[i]) delete texts[i];
67 texts[i] = o;
68 } 58 }
69 59
70 done = 0; 60 done = 0;
@@ -73,26 +63,28 @@ static void _setup(void)
73/* cleanup */ 63/* cleanup */
74static void _cleanup(void) 64static void _cleanup(void)
75{ 65{
76 for (int i = 0; i < OBNUM; i++) // XXX 66 for (evas::object& obj : texts)
77 { 67 {
78 texts[i]->parent_set(efl::eo::base(nullptr)); 68 obj.visibility_set(false); // XXX
79 texts[i]->_reset(nullptr); 69 obj.parent_set(efl::eo::base(nullptr));
80 delete texts[i];
81 } 70 }
71 texts.clear();
82} 72}
83 73
84/* loop - do things */ 74/* loop - do things */
85static void _loop(double t, int f) 75static void _loop(double t, int f)
86{ 76{
87 Evas_Coord x, y, w, h; 77 Evas_Coord x, y, w, h;
88 for (int i = 0; i < OBNUM; i++) 78 int i = 0;
79 for (evas::object& text : texts)
89 { 80 {
90 texts[i]->evas::object::size_get(&w, &h); 81 text.size_get(&w, &h);
91 x = (win_w / 2) - (w / 2); 82 x = (win_w / 2) - (w / 2);
92 x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); 83 x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
93 y = (win_h / 2) - (h / 2); 84 y = (win_h / 2) - (h / 2);
94 y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); 85 y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
95 texts[i]->evas::object::position_set(x, y); 86 text.position_set(x, y);
87 ++i;
96 } 88 }
97 FPS_STD(NAME); 89 FPS_STD(NAME);
98} 90}
diff --git a/src/bin/cxx/proxy_text_random.cc b/src/bin/cxx/proxy_text_random.cc
index 7189cd3..f9ed115 100644
--- a/src/bin/cxx/proxy_text_random.cc
+++ b/src/bin/cxx/proxy_text_random.cc
@@ -19,13 +19,13 @@
19static int done = 0; 19static int done = 0;
20 20
21/* private data */ 21/* private data */
22static Evas_Object *o_texts[OBNUM]; 22static efl::eina::list<evas::object> texts;
23 23
24/* setup */ 24/* setup */
25static void _setup(void) 25static void _setup(void)
26{ 26{
27 int i = 0; 27 int i = 0;
28 Evas_Object *o; 28 evas::canvas canvas(::eo_ref(G_evas));
29 Evas_Coord x, y, w, h; 29 Evas_Coord x, y, w, h;
30 char buf[1024]; 30 char buf[1024];
31 const char *strs[] = { 31 const char *strs[] = {
@@ -34,41 +34,38 @@ static void _setup(void)
34 "Fiddly", "Family", "Lair", "Monkeys", "Magazine" 34 "Fiddly", "Family", "Lair", "Monkeys", "Magazine"
35 }; 35 };
36 srnd(); 36 srnd();
37 o = eo_add(EVAS_TEXT_CLASS, G_evas); 37 evas::text o(efl::eo::parent = canvas);
38 o_texts[0] = o; 38 texts.push_back(o);
39 snprintf(buf, sizeof(buf), "%s %s %s %s.", 39 snprintf(buf, sizeof(buf), "%s %s %s %s.",
40 strs[rnd() % (sizeof(strs) / sizeof(char *))], 40 strs[rnd() % (sizeof(strs) / sizeof(char *))],
41 strs[rnd() % (sizeof(strs) / sizeof(char *))], 41 strs[rnd() % (sizeof(strs) / sizeof(char *))],
42 strs[rnd() % (sizeof(strs) / sizeof(char *))], 42 strs[rnd() % (sizeof(strs) / sizeof(char *))],
43 strs[rnd() % (sizeof(strs) / sizeof(char *))]); 43 strs[rnd() % (sizeof(strs) / sizeof(char *))]);
44 44
45 eo_do(o, 45 o.font_set("Vera-Bold", 20);
46 efl_text_properties_font_set("Vera-Bold", 20), 46 o.text_set(buf);
47 efl_text_set(buf), 47 o.evas::object::color_set(0, 0, 0, 255);
48 evas_obj_color_set(0, 0, 0, 255), 48 o.evas::object::size_get(&w, &h);
49 evas_obj_size_get(&w, &h));
50 x = (win_w / 2) - (w / 2); 49 x = (win_w / 2) - (w / 2);
51 x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2); 50 x += ::sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2);
52 y = (win_h / 2) - (h / 2); 51 y = (win_h / 2) - (h / 2);
53 y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2); 52 y += ::cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2);
54 eo_do(o, 53 o.evas::object::position_set(x, y);
55 evas_obj_position_set(x, y), 54 o.evas::object::visibility_set(true);
56 evas_obj_visibility_set(EINA_TRUE)); 55 for (i = 1; i < OBNUM ; i ++)
57 for (i = 1 ; i < OBNUM ; i ++)
58 { 56 {
59 o = eo_add(EVAS_IMAGE_CLASS, G_evas); 57 evas::image o2(efl::eo::parent = canvas);
60 o_texts[i] = o; 58 texts.push_back(o2);
61 eo_do(o, 59 o2.source_set(texts.front());
62 evas_obj_image_source_set(o_texts[0])); 60 texts.front().evas::object::size_get(&w, &h);
63 eo_do(o_texts[0], evas_obj_size_get(&w, &h)); 61 o2.evas::object::size_set(w, h);
64 eo_do(o, evas_obj_size_set(w, h), 62 o2.fill_set(0, 0, w, h);
65 evas_obj_image_fill_set(0, 0, w, h));
66 x = (win_w / 2) - (w / 2); 63 x = (win_w / 2) - (w / 2);
67 x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2); 64 x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2);
68 y = (win_h / 2) - (h / 2); 65 y = (win_h / 2) - (h / 2);
69 y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2); 66 y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2);
70 eo_do(o, evas_obj_position_set(x, y), 67 o2.evas::object::position_set(x, y);
71 evas_obj_visibility_set(EINA_TRUE)); 68 o2.evas::object::visibility_set(true);
72 } 69 }
73 70
74 done = 0; 71 done = 0;
@@ -77,8 +74,12 @@ static void _setup(void)
77/* cleanup */ 74/* cleanup */
78static void _cleanup(void) 75static void _cleanup(void)
79{ 76{
80 int i; 77 for (evas::object& obj : texts)
81 for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); 78 {
79 obj.visibility_set(false); // XXX
80 obj.parent_set(efl::eo::base(nullptr));
81 }
82 texts.clear();
82} 83}
83 84
84/* loop - do things */ 85/* loop - do things */
@@ -96,14 +97,18 @@ static void _loop(double t, int f)
96 strs[rnd() % (sizeof(strs) / sizeof(char *))], 97 strs[rnd() % (sizeof(strs) / sizeof(char *))],
97 strs[rnd() % (sizeof(strs) / sizeof(char *))], 98 strs[rnd() % (sizeof(strs) / sizeof(char *))],
98 strs[rnd() % (sizeof(strs) / sizeof(char *))]); 99 strs[rnd() % (sizeof(strs) / sizeof(char *))]);
99 eo_do(o_texts[0], 100 efl::eina::list<evas::object>::iterator
100 efl_text_set(buf), 101 it = texts.begin(),
101 evas_obj_size_get(&w, &h)); 102 end = texts.end();
102 for (i = 1; i < OBNUM; i++) 103 if (it != end)
104 {
105 efl::eo::downcast<evas::text>(*it).text_set(buf);
106 (*it++).evas::object::size_get(&w, &h);
107 }
108 for (; it != end; ++it)
103 { 109 {
104 eo_do(o_texts[i], 110 (*it).evas::object::size_set(w, h);
105 evas_obj_size_set(w,h), 111 efl::eo::downcast<evas::image>(*it).fill_set(0, 0, w, h);
106 evas_obj_image_fill_set(0,0,w,h));
107 } 112 }
108 FPS_STD(NAME); 113 FPS_STD(NAME);
109} 114}
diff --git a/src/bin/cxx/tests.h b/src/bin/cxx/tests.h
index c7839e0..9395abc 100644
--- a/src/bin/cxx/tests.h
+++ b/src/bin/cxx/tests.h
@@ -63,10 +63,10 @@ extern "C" {
63#include "image_map_solid_rotate_capi.h" 63#include "image_map_solid_rotate_capi.h"
64#include "image_quality_scale_capi.h" 64#include "image_quality_scale_capi.h"
65#include "line_blend_capi.h" 65#include "line_blend_capi.h"
66/* #include "proxy_image_capi.h" */ 66#include "proxy_image_capi.h"
67/* #include "proxy_image_offscreen_capi.h" */ 67#include "proxy_image_offscreen_capi.h"
68/* #include "proxy_text_fixed_capi.h" */ 68#include "proxy_text_fixed_capi.h"
69/* #include "proxy_text_random_capi.h" */ 69#include "proxy_text_random_capi.h"
70#include "rect_blend_capi.h" 70#include "rect_blend_capi.h"
71#include "rect_blend_few_capi.h" 71#include "rect_blend_few_capi.h"
72#include "rect_blend_pow2_capi.h" 72#include "rect_blend_pow2_capi.h"
diff --git a/src/bin/cxx/text_change.cc b/src/bin/cxx/text_change.cc
index 723f242..da9bc12 100644
--- a/src/bin/cxx/text_change.cc
+++ b/src/bin/cxx/text_change.cc
@@ -59,8 +59,8 @@ static void _setup(void)
59/* cleanup */ 59/* cleanup */
60static void _cleanup(void) 60static void _cleanup(void)
61{ 61{
62 for (evas::text& t : texts) 62 for (evas::text& txt : texts)
63 t.parent_set(efl::eo::base(nullptr)); 63 txt.parent_set(efl::eo::base(nullptr));
64 texts.clear(); 64 texts.clear();
65} 65}
66 66
@@ -73,14 +73,14 @@ static void _loop(double t, int f)
73 "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", 73 "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy",
74 "Fiddly", "Family", "Lair", "Monkeys", "Magazine" 74 "Fiddly", "Family", "Lair", "Monkeys", "Magazine"
75 }; 75 };
76 for (evas::text& text : texts) 76 for (evas::text& txt : texts)
77 { 77 {
78 snprintf(buf, sizeof(buf), "%s %s %s %s.", 78 snprintf(buf, sizeof(buf), "%s %s %s %s.",
79 strs[rnd() % (sizeof(strs) / sizeof(char *))], 79 strs[rnd() % (sizeof(strs) / sizeof(char *))],
80 strs[rnd() % (sizeof(strs) / sizeof(char *))], 80 strs[rnd() % (sizeof(strs) / sizeof(char *))],
81 strs[rnd() % (sizeof(strs) / sizeof(char *))], 81 strs[rnd() % (sizeof(strs) / sizeof(char *))],
82 strs[rnd() % (sizeof(strs) / sizeof(char *))]); 82 strs[rnd() % (sizeof(strs) / sizeof(char *))]);
83 text.text_set(buf); 83 txt.text_set(buf);
84 } 84 }
85 FPS_STD(NAME); 85 FPS_STD(NAME);
86} 86}
diff --git a/src/bin/cxx/text_styles.cc b/src/bin/cxx/text_styles.cc
index d5d5e82..bf3d646 100644
--- a/src/bin/cxx/text_styles.cc
+++ b/src/bin/cxx/text_styles.cc
@@ -55,8 +55,8 @@ static void _setup(void)
55/* cleanup */ 55/* cleanup */
56static void _cleanup(void) 56static void _cleanup(void)
57{ 57{
58 for (evas::text& t : texts) 58 for (evas::text& txt : texts)
59 t.parent_set(efl::eo::base(nullptr)); 59 txt.parent_set(efl::eo::base(nullptr));
60 texts.clear(); 60 texts.clear();
61} 61}
62 62
diff --git a/src/bin/cxx/textblock_auto_align.cc b/src/bin/cxx/textblock_auto_align.cc
index 97005f8..b3fd75a 100644
--- a/src/bin/cxx/textblock_auto_align.cc
+++ b/src/bin/cxx/textblock_auto_align.cc
@@ -67,19 +67,19 @@ static void _cleanup(void)
67/* loop - do things */ 67/* loop - do things */
68static void _loop(double t, int f) 68static void _loop(double t, int f)
69{ 69{
70 Evas_Coord x, y, w, h, w0, h0; 70 if (text_block)
71 int i = 0; 71 {
72 if (!text_block) goto fps; // XXX 72 Evas_Coord x, y, w, h, w0, h0;
73 73 int i = 0;
74 text_block->size_native_get(&w0, &h0); 74 text_block->size_native_get(&w0, &h0);
75 w = w0; 75 w = w0;
76 h = h0; 76 h = h0;
77 w += fabs(sin((double)(f + (i * 13)) / (31.1 * SLOW))) * (w0); 77 w += fabs(sin((double)(f + (i * 13)) / (31.1 * SLOW))) * (w0);
78 x = (win_w / 2) - (w / 2); 78 x = (win_w / 2) - (w / 2);
79 y = (win_h / 2) - (h0 / 2); 79 y = (win_h / 2) - (h0 / 2);
80 text_block->evas::object::position_set(x, y); 80 text_block->evas::object::position_set(x, y);
81 text_block->evas::object::size_set(w, h); 81 text_block->evas::object::size_set(w, h);
82 fps: 82 }
83 FPS_STD(NAME); 83 FPS_STD(NAME);
84} 84}
85 85
diff --git a/src/bin/cxx/widgets_file_icons.cc b/src/bin/cxx/widgets_file_icons.cc
index a3815cb..ecaa977 100644
--- a/src/bin/cxx/widgets_file_icons.cc
+++ b/src/bin/cxx/widgets_file_icons.cc
@@ -88,18 +88,13 @@ static void _loop(double t, int f)
88 Evas_Coord x, y, tw, th, cent; 88 Evas_Coord x, y, tw, th, cent;
89 x = 0; 89 x = 0;
90 y = 0 - f; 90 y = 0 - f;
91 efl::eina::list<evas::image>::iterator 91 efl::eina::list<evas::image>::iterator img = images.begin();
92 it1 = images.begin(), 92 for (evas::text& txt : texts)
93 end1 = images.end();
94 efl::eina::list<evas::text>::iterator
95 it2 = texts.begin(),
96 end2 = texts.end();
97 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
98 { 93 {
99 (*it1).evas::object::position_set(x + 8, y); 94 (*img++).evas::object::position_set(x + 8, y);
100 (*it2).evas::object::size_get(&tw, &th); 95 txt.evas::object::size_get(&tw, &th);
101 cent = (ICON_SIZE + 16 - tw) / 2; 96 cent = (ICON_SIZE + 16 - tw) / 2;
102 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 97 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
103 x += ICON_SIZE + 16; 98 x += ICON_SIZE + 16;
104 if (x > win_w) 99 if (x > win_w)
105 { 100 {
diff --git a/src/bin/cxx/widgets_file_icons_2.cc b/src/bin/cxx/widgets_file_icons_2.cc
index 5aa1e0c..1303681 100644
--- a/src/bin/cxx/widgets_file_icons_2.cc
+++ b/src/bin/cxx/widgets_file_icons_2.cc
@@ -84,19 +84,14 @@ static void _loop(double t, int f)
84 Evas_Coord x, y, tw, th, cent; 84 Evas_Coord x, y, tw, th, cent;
85 x = 0; 85 x = 0;
86 y = 0 - f; 86 y = 0 - f;
87 efl::eina::list<evas::image>::iterator 87
88 it1 = images.begin(), 88 efl::eina::list<evas::image>::iterator img = images.begin();
89 end1 = images.end(); 89 for (evas::text& txt : texts)
90 efl::eina::list<evas::text>::iterator
91 it2 = texts.begin(),
92 end2 = texts.end();
93 if (images.empty() || texts.empty()) goto fps; // XXX
94 for (int i = 0; i < NUM; i++)
95 { 90 {
96 (*it1).evas::object::position_set(x + 8, y); 91 (*img++).evas::object::position_set(x + 8, y);
97 (*it2).evas::object::size_get(&tw, &th); 92 txt.evas::object::size_get(&tw, &th);
98 cent = (ICON_SIZE + 16 - tw) / 2; 93 cent = (ICON_SIZE + 16 - tw) / 2;
99 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 94 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
100 x += ICON_SIZE + 16; 95 x += ICON_SIZE + 16;
101 if (x > win_w) 96 if (x > win_w)
102 { 97 {
diff --git a/src/bin/cxx/widgets_file_icons_2_grouped.cc b/src/bin/cxx/widgets_file_icons_2_grouped.cc
index 226da91..02ef0e4 100644
--- a/src/bin/cxx/widgets_file_icons_2_grouped.cc
+++ b/src/bin/cxx/widgets_file_icons_2_grouped.cc
@@ -21,7 +21,7 @@ static int done = 0;
21#define NUM 512 21#define NUM 512
22#define ICON_SIZE 64 22#define ICON_SIZE 64
23 23
24static efl::eina::list<evas::image> images; 24static efl::eina::array<evas::image> images;
25static efl::eina::list<evas::text> texts; 25static efl::eina::list<evas::text> texts;
26 26
27static const char *icons[] = 27static const char *icons[] =
@@ -54,7 +54,7 @@ static void _setup(void)
54 images.push_back(o1); 54 images.push_back(o1);
55 eo_do(o1._eo_ptr(), efl_file_set(build_path(icons[i % 13]), NULL)); // XXX 55 eo_do(o1._eo_ptr(), efl_file_set(build_path(icons[i % 13]), NULL)); // XXX
56 o1.fill_set(0, 0, ICON_SIZE, ICON_SIZE); 56 o1.fill_set(0, 0, ICON_SIZE, ICON_SIZE);
57 o1.evas::object::size_set(win_w, ICON_SIZE); 57 o1.evas::object::size_set(ICON_SIZE, ICON_SIZE);
58 o1.visibility_set(true); 58 o1.visibility_set(true);
59 59
60 evas::text o2(efl::eo::parent = canvas); 60 evas::text o2(efl::eo::parent = canvas);
@@ -68,16 +68,10 @@ static void _setup(void)
68 { 68 {
69 img.evas::object::raise(); 69 img.evas::object::raise();
70 } 70 }
71 efl::eina::list<evas::image>::iterator 71 for (int i = 0; i < NUM; i++)
72 it1 = images.begin(),
73 it2 = images.begin();
74 for (int i = 0; i < NUM; i++, ++it1)
75 { 72 {
76 if (i > 13) 73 if (i > 13)
77 { 74 images[i].evas::object::stack_above(images[i - 13]);
78 (*it1).evas::object::stack_above(*it2);
79 ++it2; // XXX
80 }
81 } 75 }
82 done = 0; 76 done = 0;
83} 77}
@@ -94,7 +88,7 @@ static void _cleanup(void)
94 88
95 for (evas::text& t : texts) 89 for (evas::text& t : texts)
96 { 90 {
97 t.visibility_set(false); // XXX 91 //t.visibility_set(false); // XXX
98 t.parent_set(efl::eo::base(nullptr)); 92 t.parent_set(efl::eo::base(nullptr));
99 } 93 }
100 texts.clear(); 94 texts.clear();
@@ -106,18 +100,13 @@ static void _loop(double t, int f)
106 Evas_Coord x, y, tw, th, cent; 100 Evas_Coord x, y, tw, th, cent;
107 x = 0; 101 x = 0;
108 y = 0 - f; 102 y = 0 - f;
109 efl::eina::list<evas::image>::iterator 103 efl::eina::array<evas::image>::iterator img = images.begin();
110 it1 = images.begin(), 104 for (evas::text& txt : texts)
111 end1 = images.end();
112 efl::eina::list<evas::text>::iterator
113 it2 = texts.begin(),
114 end2 = texts.end();
115 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
116 { 105 {
117 (*it1).evas::object::position_set(x + 8, y); 106 (*img++).evas::object::position_set(x + 8, y);
118 (*it2).evas::object::size_get(&tw, &th); 107 txt.evas::object::size_get(&tw, &th);
119 cent = (ICON_SIZE + 16 - tw) / 2; 108 cent = (ICON_SIZE + 16 - tw) / 2;
120 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 109 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
121 x += ICON_SIZE + 16; 110 x += ICON_SIZE + 16;
122 if (x > win_w) 111 if (x > win_w)
123 { 112 {
diff --git a/src/bin/cxx/widgets_file_icons_2_same.cc b/src/bin/cxx/widgets_file_icons_2_same.cc
index 3802c64..861cf6e 100644
--- a/src/bin/cxx/widgets_file_icons_2_same.cc
+++ b/src/bin/cxx/widgets_file_icons_2_same.cc
@@ -69,18 +69,13 @@ static void _loop(double t, int f)
69 Evas_Coord x, y, tw, th, cent; 69 Evas_Coord x, y, tw, th, cent;
70 x = 0; 70 x = 0;
71 y = 0 - f; 71 y = 0 - f;
72 efl::eina::list<evas::image>::iterator 72 efl::eina::list<evas::image>::iterator img = images.begin();
73 it1 = images.begin(), 73 for (evas::text& txt : texts)
74 end1 = images.end();
75 efl::eina::list<evas::text>::iterator
76 it2 = texts.begin(),
77 end2 = texts.end();
78 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
79 { 74 {
80 (*it1).evas::object::position_set(x + 8, y); 75 (*img++).evas::object::position_set(x + 8, y);
81 (*it2).evas::object::size_get(&tw, &th); 76 txt.evas::object::size_get(&tw, &th);
82 cent = (ICON_SIZE + 16 - tw) / 2; 77 cent = (ICON_SIZE + 16 - tw) / 2;
83 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 78 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
84 x += ICON_SIZE + 16; 79 x += ICON_SIZE + 16;
85 if (x > win_w) 80 if (x > win_w)
86 { 81 {
diff --git a/src/bin/cxx/widgets_file_icons_2_same_grouped.cc b/src/bin/cxx/widgets_file_icons_2_same_grouped.cc
index 688f705..e928b27 100644
--- a/src/bin/cxx/widgets_file_icons_2_same_grouped.cc
+++ b/src/bin/cxx/widgets_file_icons_2_same_grouped.cc
@@ -48,9 +48,9 @@ static void _setup(void)
48 o2.evas::object::color_set(0, 0, 0, 255); 48 o2.evas::object::color_set(0, 0, 0, 255);
49 o2.visibility_set(true); 49 o2.visibility_set(true);
50 } 50 }
51 for (evas::image img : images) 51 for (evas::image& img : images)
52 { 52 {
53 img.raise(); 53 img.evas::object::raise();
54 } 54 }
55 55
56 done = 0; 56 done = 0;
@@ -59,12 +59,12 @@ static void _setup(void)
59/* cleanup */ 59/* cleanup */
60static void _cleanup(void) 60static void _cleanup(void)
61{ 61{
62 for (evas::image& i : images) 62 for (evas::image& img : images)
63 i.parent_set(efl::eo::base(nullptr)); 63 img.parent_set(efl::eo::base(nullptr));
64 images.clear(); 64 images.clear();
65 65
66 for (evas::text& t : texts) 66 for (evas::text& txt : texts)
67 t.parent_set(efl::eo::base(nullptr)); 67 txt.parent_set(efl::eo::base(nullptr));
68 texts.clear(); 68 texts.clear();
69} 69}
70 70
@@ -74,18 +74,13 @@ static void _loop(double t, int f)
74 Evas_Coord x, y, tw, th, cent; 74 Evas_Coord x, y, tw, th, cent;
75 x = 0; 75 x = 0;
76 y = 0 - f; 76 y = 0 - f;
77 efl::eina::list<evas::image>::iterator 77 efl::eina::list<evas::image>::iterator img = images.begin();
78 it1 = images.begin(), 78 for (evas::text& txt : texts)
79 end1 = images.end();
80 efl::eina::list<evas::text>::iterator
81 it2 = texts.begin(),
82 end2 = texts.end();
83 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
84 { 79 {
85 (*it1).evas::object::position_set(x + 8, y); 80 (*img++).evas::object::position_set(x + 8, y);
86 (*it2).evas::object::size_get(&tw, &th); 81 txt.evas::object::size_get(&tw, &th);
87 cent = (ICON_SIZE + 16 - tw) / 2; 82 cent = (ICON_SIZE + 16 - tw) / 2;
88 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 83 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
89 x += ICON_SIZE + 16; 84 x += ICON_SIZE + 16;
90 if (x > win_w) 85 if (x > win_w)
91 { 86 {
diff --git a/src/bin/cxx/widgets_file_icons_3.cc b/src/bin/cxx/widgets_file_icons_3.cc
index bae8f69..55dde91 100644
--- a/src/bin/cxx/widgets_file_icons_3.cc
+++ b/src/bin/cxx/widgets_file_icons_3.cc
@@ -83,19 +83,13 @@ static void _loop(double t, int f)
83 Evas_Coord x, y, tw, th, cent; 83 Evas_Coord x, y, tw, th, cent;
84 x = 0; 84 x = 0;
85 y = 0 - f; 85 y = 0 - f;
86 efl::eina::list<evas::image>::iterator 86 efl::eina::list<evas::image>::iterator img = images.begin();
87 it1 = images.begin(), 87 for (evas::text& txt : texts)
88 end1 = images.end();
89 efl::eina::list<evas::text>::iterator
90 it2 = texts.begin(),
91 end2 = texts.end();
92 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
93 { 88 {
94 (*it1).evas::object::position_set(x + 8, y); 89 (*img++).evas::object::position_set(x + 8, y);
95 (*it2).evas::object::size_get(&tw, &th); 90 txt.evas::object::size_get(&tw, &th);
96 cent = (ICON_SIZE + 16 - tw) / 2; 91 cent = (ICON_SIZE + 16 - tw) / 2;
97 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 92 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
98
99 x += ICON_SIZE + 16; 93 x += ICON_SIZE + 16;
100 if (x > win_w) 94 if (x > win_w)
101 { 95 {
diff --git a/src/bin/cxx/widgets_file_icons_4.cc b/src/bin/cxx/widgets_file_icons_4.cc
index 22ff1cd..49e00cf 100644
--- a/src/bin/cxx/widgets_file_icons_4.cc
+++ b/src/bin/cxx/widgets_file_icons_4.cc
@@ -53,7 +53,7 @@ static void _setup(void)
53 images.push_back(o1); 53 images.push_back(o1);
54 eo_do(o1._eo_ptr(), efl_file_set(build_path(icons[i % 13]), NULL)); 54 eo_do(o1._eo_ptr(), efl_file_set(build_path(icons[i % 13]), NULL));
55 o1.fill_set(0, 0, ICON_SIZE, ICON_SIZE); 55 o1.fill_set(0, 0, ICON_SIZE, ICON_SIZE);
56 o1.size_set(ICON_SIZE, ICON_SIZE); 56 o1.evas::object::size_set(ICON_SIZE, ICON_SIZE);
57 o1.visibility_set(true); 57 o1.visibility_set(true);
58 58
59 evas::text o2(efl::eo::parent = canvas); 59 evas::text o2(efl::eo::parent = canvas);
@@ -72,6 +72,7 @@ static void _cleanup(void)
72 for (evas::image& i : images) 72 for (evas::image& i : images)
73 i.parent_set(efl::eo::base(nullptr)); 73 i.parent_set(efl::eo::base(nullptr));
74 images.clear(); 74 images.clear();
75
75 for (evas::text& t : texts) 76 for (evas::text& t : texts)
76 t.parent_set(efl::eo::base(nullptr)); 77 t.parent_set(efl::eo::base(nullptr));
77 texts.clear(); 78 texts.clear();
@@ -83,18 +84,13 @@ static void _loop(double t, int f)
83 Evas_Coord x, y, tw, th, cent; 84 Evas_Coord x, y, tw, th, cent;
84 x = 0; 85 x = 0;
85 y = 0 - f; 86 y = 0 - f;
86 efl::eina::list<evas::image>::iterator 87 efl::eina::list<evas::image>::iterator img = images.begin();
87 it1 = images.begin(), 88 for (evas::text& txt : texts)
88 end1 = images.end();
89 efl::eina::list<evas::text>::iterator
90 it2 = texts.begin(),
91 end2 = texts.end();
92 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
93 { 89 {
94 (*it1).evas::object::position_set(x + 8, y); 90 (*img++).evas::object::position_set(x + 8, y);
95 (*it2).evas::object::size_get(&tw, &th); 91 txt.evas::object::size_get(&tw, &th);
96 cent = (ICON_SIZE + 16 - tw) / 2; 92 cent = (ICON_SIZE + 16 - tw) / 2;
97 (*it2).evas::object::position_set(x + cent, y + ICON_SIZE + 4); 93 txt.evas::object::position_set(x + cent, y + ICON_SIZE + 4);
98 x += ICON_SIZE + 16; 94 x += ICON_SIZE + 16;
99 if (x > win_w) 95 if (x > win_w)
100 { 96 {
diff --git a/src/bin/cxx/widgets_list_1.cc b/src/bin/cxx/widgets_list_1.cc
index 2d820b6..3f0c5fc 100644
--- a/src/bin/cxx/widgets_list_1.cc
+++ b/src/bin/cxx/widgets_list_1.cc
@@ -70,7 +70,7 @@ static void _setup(void)
70 images.push_back(o1); 70 images.push_back(o1);
71 o1.filled_set(1); 71 o1.filled_set(1);
72 o1.border_set(2, 2, 2, 2); 72 o1.border_set(2, 2, 2, 2);
73 eo_do(o1._eo_ptr(), efl_file_set(build_path("pan.png"), NULL)); 73 eo_do(o1._eo_ptr(), efl_file_set(build_path("pan.png"), NULL)); // XXX
74 o1.evas::object::size_set(win_w, ICON_SIZE); 74 o1.evas::object::size_set(win_w, ICON_SIZE);
75 o1.visibility_set(true); 75 o1.visibility_set(true);
76 76
@@ -103,18 +103,13 @@ static void _loop(double t, int f)
103 Evas_Coord x, y, tw, th, cent; 103 Evas_Coord x, y, tw, th, cent;
104 x = 0; 104 x = 0;
105 y = 0 - f; 105 y = 0 - f;
106 efl::eina::list<evas::image>::iterator 106 efl::eina::list<evas::image>::iterator img = images.begin();
107 it1 = images.begin(), 107 for (evas::text& txt : texts)
108 end1 = images.end();
109 efl::eina::list<evas::text>::iterator
110 it2 = texts.begin(),
111 end2 = texts.end();
112 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
113 { 108 {
114 (*it1).evas::object::position_set(x, y); 109 (*img++).evas::object::position_set(x, y);
115 (*it2).evas::object::size_get(&tw, &th); 110 txt.evas::object::size_get(&tw, &th);
116 cent = (ICON_SIZE - th) / 2; 111 cent = (ICON_SIZE - th) / 2;
117 (*it2).evas::object::position_set(x + 8, y + cent); 112 txt.evas::object::position_set(x + 8, y + cent);
118 y += ICON_SIZE; 113 y += ICON_SIZE;
119 } 114 }
120 FPS_STD(NAME); 115 FPS_STD(NAME);
diff --git a/src/bin/cxx/widgets_list_1_grouped.cc b/src/bin/cxx/widgets_list_1_grouped.cc
index 11e9569..9e32ea6 100644
--- a/src/bin/cxx/widgets_list_1_grouped.cc
+++ b/src/bin/cxx/widgets_list_1_grouped.cc
@@ -109,18 +109,13 @@ static void _loop(double t, int f)
109 Evas_Coord x, y, tw, th, cent; 109 Evas_Coord x, y, tw, th, cent;
110 x = 0; 110 x = 0;
111 y = 0 - f; 111 y = 0 - f;
112 efl::eina::list<evas::image>::iterator 112 efl::eina::list<evas::image>::iterator img = images.begin();
113 it1 = images.begin(), 113 for (evas::text& txt : texts)
114 end1 = images.end(); 114 {
115 efl::eina::list<evas::text>::iterator 115 (*img++).evas::object::position_set(x, y);
116 it2 = texts.begin(), 116 txt.evas::object::size_get(&tw, &th);
117 end2 = texts.end();
118 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
119 {
120 (*it1).evas::object::position_set(x, y);
121 (*it2).evas::object::size_get(&tw, &th);
122 cent = (ICON_SIZE - th) / 2; 117 cent = (ICON_SIZE - th) / 2;
123 (*it2).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 118 txt.evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
124 y += ICON_SIZE; 119 y += ICON_SIZE;
125 } 120 }
126 FPS_STD(NAME); 121 FPS_STD(NAME);
diff --git a/src/bin/cxx/widgets_list_2.cc b/src/bin/cxx/widgets_list_2.cc
index 06c3e13..d8debb5 100644
--- a/src/bin/cxx/widgets_list_2.cc
+++ b/src/bin/cxx/widgets_list_2.cc
@@ -102,18 +102,13 @@ static void _loop(double t, int f)
102 Evas_Coord x, y, tw, th, cent; 102 Evas_Coord x, y, tw, th, cent;
103 x = 0; 103 x = 0;
104 y = 0 - f; 104 y = 0 - f;
105 efl::eina::list<evas::image>::iterator 105 efl::eina::list<evas::image>::iterator img = images.begin();
106 it1 = images.begin(), 106 for (evas::text& txt : texts)
107 end1 = images.end();
108 efl::eina::list<evas::text>::iterator
109 it2 = texts.begin(),
110 end2 = texts.end();
111 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
112 { 107 {
113 (*it1).evas::object::position_set(x, y); 108 (*img++).evas::object::position_set(x, y);
114 (*it2).evas::object::size_get(&tw, &th); 109 txt.evas::object::size_get(&tw, &th);
115 cent = (ICON_SIZE - th) / 2; 110 cent = (ICON_SIZE - th) / 2;
116 (*it2).evas::object::position_set(x + 8, y + cent); 111 txt.evas::object::position_set(x + 8, y + cent);
117 y += ICON_SIZE; 112 y += ICON_SIZE;
118 } 113 }
119 FPS_STD(NAME); 114 FPS_STD(NAME);
diff --git a/src/bin/cxx/widgets_list_2_grouped.cc b/src/bin/cxx/widgets_list_2_grouped.cc
index 62b8b3f..facf8af 100644
--- a/src/bin/cxx/widgets_list_2_grouped.cc
+++ b/src/bin/cxx/widgets_list_2_grouped.cc
@@ -110,18 +110,13 @@ static void _loop(double t, int f)
110 Evas_Coord x, y, tw, th, cent; 110 Evas_Coord x, y, tw, th, cent;
111 x = 0; 111 x = 0;
112 y = 0 - f; 112 y = 0 - f;
113 efl::eina::list<evas::image>::iterator 113 efl::eina::list<evas::image>::iterator img = images.begin();
114 it1 = images.begin(), 114 for (evas::text& txt : texts)
115 end1 = images.end();
116 efl::eina::list<evas::text>::iterator
117 it2 = texts.begin(),
118 end2 = texts.end();
119 for (; it1 != end1 && it2 != end2; ++it1, ++it2)
120 { 115 {
121 (*it1).evas::object::position_set(x, y); 116 (*img++).evas::object::position_set(x, y);
122 (*it2).evas::object::size_get(&tw, &th); 117 txt.evas::object::size_get(&tw, &th);
123 cent = (ICON_SIZE - th) / 2; 118 cent = (ICON_SIZE - th) / 2;
124 (*it2).evas::object::position_set(x + 8, y + cent); 119 txt.evas::object::position_set(x + 8, y + cent);
125 y += ICON_SIZE; 120 y += ICON_SIZE;
126 } 121 }
127 FPS_STD(NAME); 122 FPS_STD(NAME);
diff --git a/src/bin/cxx/widgets_list_3.cc b/src/bin/cxx/widgets_list_3.cc
index ca11bd8..7ba26b6 100644
--- a/src/bin/cxx/widgets_list_3.cc
+++ b/src/bin/cxx/widgets_list_3.cc
@@ -134,24 +134,17 @@ static void _loop(double t, int f)
134 Evas_Coord x, y, tw, th, cent; 134 Evas_Coord x, y, tw, th, cent;
135 x = 0; 135 x = 0;
136 y = 0 - f; 136 y = 0 - f;
137 efl::eina::list<evas::image>::iterator 137
138 it1 = images.begin(), 138 efl::eina::list<evas::image>::iterator img = images.begin();
139 end1 = images.end(); 139 efl::eina::list<evas::image>::iterator ico = icons.begin();
140 efl::eina::list<evas::image>::iterator 140 for (evas::text& txt : texts)
141 it2 = icons.begin(),
142 end2 = icons.end();
143 efl::eina::list<evas::text>::iterator
144 it3 = texts.begin(),
145 end3 = texts.end();
146 while (it1 != end1 && it2 != end2 && it3 != end3)
147 { 141 {
148 (*it1).evas::object::position_set(x, y); 142 (*img++).evas::object::position_set(x, y);
149 (*it2).evas::object::position_set(x + 4, y + 4); 143 (*ico++).evas::object::position_set(x + 4, y + 4);
150 (*it3).evas::object::size_get(&tw, &th); 144 txt.evas::object::size_get(&tw, &th);
151 cent = (ICON_SIZE - th) / 2; 145 cent = (ICON_SIZE - th) / 2;
152 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 146 txt.evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
153 y += ICON_SIZE; 147 y += ICON_SIZE;
154 ++it1; ++it2; ++it3;
155 } 148 }
156 FPS_STD(NAME); 149 FPS_STD(NAME);
157} 150}
diff --git a/src/bin/cxx/widgets_list_3_grouped.cc b/src/bin/cxx/widgets_list_3_grouped.cc
index eb14803..d542c42 100644
--- a/src/bin/cxx/widgets_list_3_grouped.cc
+++ b/src/bin/cxx/widgets_list_3_grouped.cc
@@ -22,10 +22,10 @@ static int done = 0;
22#define ICON_SIZE 64 22#define ICON_SIZE 64
23 23
24static efl::eina::list<evas::image> images; 24static efl::eina::list<evas::image> images;
25static evas::image *icons[NUM]; // XXX 25static efl::eina::array<evas::image> icons;
26static efl::eina::list<evas::text> texts; 26static efl::eina::list<evas::text> texts;
27 27
28static const char *_icons[] = 28static const char* _icons[] =
29{ 29{
30 "bug.png", 30 "bug.png",
31 "bulb.png", 31 "bulb.png",
@@ -95,13 +95,13 @@ static void _setup(void)
95 o1.evas::object::size_set(win_w, ICON_SIZE); 95 o1.evas::object::size_set(win_w, ICON_SIZE);
96 o1.visibility_set(true); 96 o1.visibility_set(true);
97 97
98 evas::image *o2 = new evas::image(efl::eo::parent = canvas); 98 evas::image o2(efl::eo::parent = canvas);
99 icons[i] = o2; 99 icons.push_back(o2);
100 o2->filled_set(1); 100 o2.filled_set(1);
101 o2->border_set(2, 2, 2, 2); 101 o2.border_set(2, 2, 2, 2);
102 eo_do(o2->_eo_ptr(), efl_file_set(build_path(_icons[i % 13]), NULL)); // XXX 102 eo_do(o2._eo_ptr(), efl_file_set(build_path(_icons[i % 13]), NULL)); // XXX
103 o2->evas::object::size_set(ICON_SIZE - 8, ICON_SIZE - 8); 103 o2.evas::object::size_set(ICON_SIZE - 8, ICON_SIZE - 8);
104 o2->visibility_set(true); 104 o2.visibility_set(true);
105 105
106 evas::text o3(efl::eo::parent = canvas); 106 evas::text o3(efl::eo::parent = canvas);
107 texts.push_back(o3); 107 texts.push_back(o3);
@@ -114,14 +114,14 @@ static void _setup(void)
114 { 114 {
115 img.raise(); 115 img.raise();
116 } 116 }
117 for (int i = 0; i < NUM; i++) // XXX 117 for (int i = 0; i < NUM; i++)
118 { 118 {
119 icons[i]->raise(); 119 icons[i].raise();
120 } 120 }
121 for (int i = 0; i < NUM; i++) // XXX 121 for (int i = 0; i < NUM; i++)
122 { 122 {
123 if (i > 13) 123 if (i > 13)
124 icons[i]->stack_above(*icons[i - 13]); 124 icons[i].stack_above(icons[i - 13]);
125 } 125 }
126 for (evas::text& text : texts) 126 for (evas::text& text : texts)
127 { 127 {
@@ -137,12 +137,12 @@ static void _cleanup(void)
137 i.parent_set(efl::eo::base(nullptr)); 137 i.parent_set(efl::eo::base(nullptr));
138 images.clear(); 138 images.clear();
139 139
140 for (int i = 0; i < NUM; ++i) // XXX 140 for (evas::image& i : icons)
141 { 141 {
142 icons[i]->parent_set(efl::eo::base(nullptr)); 142 i.visibility_set(false); // XXX
143 icons[i]->_reset(nullptr); 143 i.parent_set(efl::eo::base(nullptr));
144 delete icons[i];
145 } 144 }
145 icons.clear();
146 146
147 for (evas::text& t : texts) 147 for (evas::text& t : texts)
148 t.parent_set(efl::eo::base(nullptr)); 148 t.parent_set(efl::eo::base(nullptr));
@@ -155,22 +155,16 @@ static void _loop(double t, int f)
155 Evas_Coord x, y, tw, th, cent; 155 Evas_Coord x, y, tw, th, cent;
156 x = 0; 156 x = 0;
157 y = 0 - f; 157 y = 0 - f;
158 efl::eina::list<evas::image>::iterator 158 efl::eina::list<evas::image>::iterator img = images.begin();
159 it1 = images.begin(), 159 efl::eina::array<evas::image>::iterator ico = icons.begin();
160 end1 = images.end(); 160 for (evas::text& txt : texts)
161 efl::eina::list<evas::text>::iterator 161 {
162 it3 = texts.begin(), 162 (*img++).evas::object::position_set(x, y);
163 end3 = texts.end(); 163 (*ico++).evas::object::position_set(x + 4, y + 4);
164 int i2 = 0; 164 txt.evas::object::size_get(&tw, &th);
165 while(it1 != end1 && i2 != NUM && it3 != end3)
166 {
167 (*it1).evas::object::position_set(x, y);
168 icons[i2]->evas::object::position_set(x + 4, y + 4);
169 (*it3).evas::object::size_get(&tw, &th);
170 cent = (ICON_SIZE - th) / 2; 165 cent = (ICON_SIZE - th) / 2;
171 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 166 txt.evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
172 y += ICON_SIZE; 167 y += ICON_SIZE;
173 ++it1; ++i2; ++it3;
174 } 168 }
175 FPS_STD(NAME); 169 FPS_STD(NAME);
176} 170}
diff --git a/src/bin/cxx/widgets_list_4.cc b/src/bin/cxx/widgets_list_4.cc
index 71cac11..61fe485 100644
--- a/src/bin/cxx/widgets_list_4.cc
+++ b/src/bin/cxx/widgets_list_4.cc
@@ -135,24 +135,16 @@ static void _loop(double t, int f)
135 Evas_Coord x, y, tw, th, cent; 135 Evas_Coord x, y, tw, th, cent;
136 x = 0; 136 x = 0;
137 y = 0 - f; 137 y = 0 - f;
138 efl::eina::list<evas::image>::iterator 138 efl::eina::list<evas::image>::iterator img = images.begin();
139 it1 = images.begin(), 139 efl::eina::list<evas::image>::iterator ico = icons.begin();
140 end1 = images.end(); 140 for (evas::text& txt : texts)
141 efl::eina::list<evas::image>::iterator
142 it2 = icons.begin(),
143 end2 = icons.end();
144 efl::eina::list<evas::text>::iterator
145 it3 = texts.begin(),
146 end3 = texts.end();
147 while(it1 != end1 && it2 != end2 && it3 != end3)
148 { 141 {
149 (*it1).evas::object::position_set(x, y); 142 (*img++).evas::object::position_set(x, y);
150 (*it2).evas::object::position_set(x + 4, y + 4); 143 (*ico++).evas::object::position_set(x + 4, y + 4);
151 (*it3).evas::object::size_get(&tw, &th); 144 txt.evas::object::size_get(&tw, &th);
152 cent = (ICON_SIZE - th) / 2; 145 cent = (ICON_SIZE - th) / 2;
153 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 146 txt.evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
154 y += ICON_SIZE; 147 y += ICON_SIZE;
155 ++it1; ++it2; ++it3;
156 } 148 }
157 FPS_STD(NAME); 149 FPS_STD(NAME);
158} 150}
diff --git a/src/bin/cxx/widgets_list_4_grouped.cc b/src/bin/cxx/widgets_list_4_grouped.cc
index 3092108..1cb39e6 100644
--- a/src/bin/cxx/widgets_list_4_grouped.cc
+++ b/src/bin/cxx/widgets_list_4_grouped.cc
@@ -21,7 +21,7 @@ static int done = 0;
21#define NUM 512 21#define NUM 512
22#define ICON_SIZE 32 22#define ICON_SIZE 32
23static efl::eina::list<evas::image> images; 23static efl::eina::list<evas::image> images;
24static evas::image *icons[NUM]; // XXX 24static efl::eina::array<evas::image> icons;
25static efl::eina::list<evas::text> texts; 25static efl::eina::list<evas::text> texts;
26 26
27static const char *_icons[] = 27static const char *_icons[] =
@@ -94,13 +94,13 @@ static void _setup(void)
94 o1.evas::object::size_set(win_w, ICON_SIZE); 94 o1.evas::object::size_set(win_w, ICON_SIZE);
95 o1.visibility_set(true); 95 o1.visibility_set(true);
96 96
97 evas::image *o2 = new evas::image(efl::eo::parent = canvas); 97 evas::image o2(efl::eo::parent = canvas);
98 icons[i] = o2; 98 icons.push_back(o2);
99 o2->filled_set(1); 99 o2.filled_set(1);
100 o2->border_set(2, 2, 2, 2); 100 o2.border_set(2, 2, 2, 2);
101 eo_do(o2->_eo_ptr(), efl_file_set(build_path(_icons[i % 13]), NULL)); // XXX 101 eo_do(o2._eo_ptr(), efl_file_set(build_path(_icons[i % 13]), NULL)); // XXX
102 o2->evas::object::size_set(ICON_SIZE - 8, ICON_SIZE - 8); 102 o2.evas::object::size_set(ICON_SIZE - 8, ICON_SIZE - 8);
103 o2->visibility_set(true); 103 o2.visibility_set(true);
104 104
105 evas::text o3(efl::eo::parent = canvas); 105 evas::text o3(efl::eo::parent = canvas);
106 texts.push_back(o3); 106 texts.push_back(o3);
@@ -114,14 +114,16 @@ static void _setup(void)
114 { 114 {
115 img.raise(); 115 img.raise();
116 } 116 }
117 for (int i = 0; i < NUM; i++) // XXX 117 for (evas::image& ico : icons)
118 { 118 {
119 icons[i]->raise(); 119 ico.raise();
120 } 120 }
121 for (int i = 0; i < NUM; i++) // XXX 121 for (int i = 0; i < NUM; i++)
122 { 122 {
123 if (i > 13) 123 if (i > 13)
124 icons[i]->stack_above(*icons[i - 13]); 124 {
125 icons[i].stack_above(icons[i - 13]);
126 }
125 } 127 }
126 for (evas::text& text : texts) 128 for (evas::text& text : texts)
127 { 129 {
@@ -136,12 +138,12 @@ static void _cleanup()
136 i.parent_set(efl::eo::base(nullptr)); 138 i.parent_set(efl::eo::base(nullptr));
137 images.clear(); 139 images.clear();
138 140
139 for (int i = 0; i < NUM; i++) // XXX 141 for (evas::image& i : icons)
140 { 142 {
141 icons[i]->parent_set(efl::eo::base(nullptr)); 143 i.visibility_set(false); // XXX
142 icons[i]->_reset(nullptr); 144 i.parent_set(efl::eo::base(nullptr));
143 delete icons[i];
144 } 145 }
146 icons.clear();
145 147
146 for (evas::text& t : texts) 148 for (evas::text& t : texts)
147 t.parent_set(efl::eo::base(nullptr)); 149 t.parent_set(efl::eo::base(nullptr));
@@ -154,22 +156,16 @@ static void _loop(double t, int f)
154 Evas_Coord x, y, tw, th, cent; 156 Evas_Coord x, y, tw, th, cent;
155 x = 0; 157 x = 0;
156 y = 0 - f; 158 y = 0 - f;
157 efl::eina::list<evas::image>::iterator 159 efl::eina::list<evas::image>::iterator img = images.begin();
158 it1 = images.begin(), 160 efl::eina::array<evas::image>::iterator ico = icons.begin();
159 end1 = images.end(); 161 for (evas::text& txt : texts)
160 efl::eina::list<evas::text>::iterator
161 it3 = texts.begin(),
162 end3 = texts.end();
163 int i2 = 0;
164 while(it1 != end1 && i2 != NUM && it3 != end3)
165 { 162 {
166 (*it1).evas::object::position_set(x, y); 163 (*img++).evas::object::position_set(x, y);
167 icons[i2]->evas::object::position_set(x + 4, y + 4); 164 (*ico++).evas::object::position_set(x + 4, y + 4);
168 (*it3).evas::object::size_get(&tw, &th); 165 txt.evas::object::size_get(&tw, &th);
169 cent = (ICON_SIZE - th) / 2; 166 cent = (ICON_SIZE - th) / 2;
170 (*it3).evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent); 167 txt.evas::object::position_set(x + 8 + ICON_SIZE + 8, y + cent);
171 y += ICON_SIZE; 168 y += ICON_SIZE;
172 ++it1; ++i2; ++it3;
173 } 169 }
174 FPS_STD(NAME); 170 FPS_STD(NAME);
175} 171}