expedite-cxx: Remove XXX and made some minor improvements.
This commit is contained in:
parent
3434b132b8
commit
bc5d56877e
|
@ -51,7 +51,7 @@ static void _cleanup(void)
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
char *str = "padding_set(%d);blur(%d,color=black);"; // XXX remove warning
|
char *str = "padding_set(%d);blur(%d,color=black);";
|
||||||
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||||
eo_do(text, evas_obj_text_filter_program_set(buf));
|
eo_do(text, evas_obj_text_filter_program_set(buf));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// XXX DONE
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,7 +26,7 @@ static void _setup()
|
||||||
evas::canvas canvas(::eo_ref(G_evas));
|
evas::canvas canvas(::eo_ref(G_evas));
|
||||||
for (int i = 0; i < OBNUM; i++)
|
for (int i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
evas::image o(efl::eo::parent = canvas); // XXX:
|
evas::image o(efl::eo::parent = canvas);
|
||||||
images.push_back(o);
|
images.push_back(o);
|
||||||
eo_do(o._eo_ptr(), efl_file_set(build_path("bar.png"), NULL)); // XXX
|
eo_do(o._eo_ptr(), efl_file_set(build_path("bar.png"), NULL)); // XXX
|
||||||
o.border_set(6, 6, 6, 6);
|
o.border_set(6, 6, 6, 6);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// XXX DONE
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// XXX DONE
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// XXX DONE
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void _cleanup()
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i = 0; // XXX
|
int i = 0;
|
||||||
for (evas::image& img : images)
|
for (evas::image& img : images)
|
||||||
{
|
{
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void _cleanup()
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i = 0; // XXX
|
int i = 0;
|
||||||
for (evas::image& img : images)
|
for (evas::image& img : images)
|
||||||
{
|
{
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
|
|
|
@ -62,7 +62,7 @@ static void _cleanup()
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i = 0; // XXX
|
int i = 0;
|
||||||
for (evas::image& img : images)
|
for (evas::image& img : images)
|
||||||
{
|
{
|
||||||
if (i > (OBNUM / 2))
|
if (i > (OBNUM / 2))
|
||||||
|
|
|
@ -41,8 +41,8 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
for (evas::image o : images)
|
for (evas::image& img : images)
|
||||||
o.visibility_set(false); // XXX
|
img.visibility_set(false); // XXX
|
||||||
images.clear();
|
images.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,13 @@ static void _cleanup(void)
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
if (images.empty()) return; // XXX
|
if (!images.empty())
|
||||||
|
{
|
||||||
int a = f & 0x1f;
|
int a = f & 0x1f;
|
||||||
a = ((a << 3) | (a >> 2)) & 0xff;
|
a = ((a << 3) | (a >> 2)) & 0xff;
|
||||||
evas::image img = images.back();
|
evas::image img = images.back();
|
||||||
img.evas::object::color_set(a, a, a, a);
|
img.evas::object::color_set(a, a, a, a);
|
||||||
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void _loop(double t, int f)
|
||||||
img.evas::object::size_set(w, h);
|
img.evas::object::size_set(w, h);
|
||||||
img.fill_set(0, 0, w, h);
|
img.fill_set(0, 0, w, h);
|
||||||
data = static_cast<unsigned int*>(img.data_get(1));
|
data = static_cast<unsigned int*>(img.data_get(1));
|
||||||
st = img.stride_get(); // XXX
|
st = img.stride_get();
|
||||||
st = st >> 2;
|
st = st >> 2;
|
||||||
p = data;
|
p = data;
|
||||||
for (y = 0; y < h; y++)
|
for (y = 0; y < h; y++)
|
||||||
|
|
|
@ -49,7 +49,7 @@ static void _setup(void)
|
||||||
fread(vp, 320 * 240, 1, f);
|
fread(vp, 320 * 240, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
unsigned char **data = static_cast<unsigned char**>(o.data_get(1)); // XXX
|
unsigned char **data = static_cast<unsigned char**>(o.data_get(1));
|
||||||
unsigned char **lp = data;
|
unsigned char **lp = data;
|
||||||
for (int y = 0; y < 480; y++)
|
for (int y = 0; y < 480; y++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void _setup(void)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
evas::image o1(efl::eo::parent = canvas);
|
evas::image o1(efl::eo::parent = canvas);
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX
|
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||||
eo_do(o1._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
eo_do(o1._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||||
o1.fill_set(0, 0, 256, 256);
|
o1.fill_set(0, 0, 256, 256);
|
||||||
o1.evas::object::size_set(256, 256);
|
o1.evas::object::size_set(256, 256);
|
||||||
|
@ -42,7 +42,7 @@ static void _setup(void)
|
||||||
images.push_back(o1);
|
images.push_back(o1);
|
||||||
|
|
||||||
evas::image o2(efl::eo::parent = canvas);
|
evas::image o2(efl::eo::parent = canvas);
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); // XXX
|
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||||
eo_do(o2._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
eo_do(o2._eo_ptr(), efl_file_set(build_path(buf), NULL)); // XXX
|
||||||
o2.fill_set(0, 0, 256, 256);
|
o2.fill_set(0, 0, 256, 256);
|
||||||
o2.size_set(256, 256);
|
o2.size_set(256, 256);
|
||||||
|
|
|
@ -50,24 +50,24 @@ static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
static Evas_Map *m = NULL;
|
static Evas_Map *m = NULL;
|
||||||
if (!m) m = evas_map_new(4);
|
if (!m) m = evas_map_new(4);
|
||||||
int i = 0; // XXX
|
int i = 0;
|
||||||
for (evas::image& img : images)
|
for (evas::image& img : images)
|
||||||
{
|
{
|
||||||
Evas_Coord w = 120;
|
Evas_Coord w = 120;
|
||||||
Evas_Coord h = 160;
|
Evas_Coord h = 160;
|
||||||
Evas_Coord x = (win_w / 2) - (w / 2);
|
Evas_Coord x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
|
|
||||||
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
|
::evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
|
||||||
|
|
||||||
evas_map_point_color_set(m, 0, 255, 255, 255, 255);
|
::evas_map_point_color_set(m, 0, 255, 255, 255, 255);
|
||||||
evas_map_point_color_set(m, 1, 255, 0, 0, 255);
|
::evas_map_point_color_set(m, 1, 255, 0, 0, 255);
|
||||||
evas_map_point_color_set(m, 2, 0, 0, 255, 255);
|
::evas_map_point_color_set(m, 2, 0, 0, 255, 255);
|
||||||
evas_map_point_color_set(m, 3, 0, 0, 0, 0);
|
::evas_map_point_color_set(m, 3, 0, 0, 0, 0);
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
::evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
img.map_enable_set(1);
|
img.map_enable_set(1);
|
||||||
img.map_set(m);
|
img.map_set(m);
|
||||||
++i;
|
++i;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static void _setup(void)
|
||||||
evas::text o(efl::eo::parent = canvas);
|
evas::text o(efl::eo::parent = canvas);
|
||||||
texts.push_back(o);
|
texts.push_back(o);
|
||||||
o.font_set("Vera-Bold", 20);
|
o.font_set("Vera-Bold", 20);
|
||||||
snprintf(buf, sizeof(buf), "%s %s %s %s.", // XXX
|
snprintf(buf, sizeof(buf), "%s %s %s %s.",
|
||||||
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
||||||
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
||||||
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
||||||
|
|
|
@ -129,10 +129,10 @@ static void _cleanup(void)
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
if (text_block)
|
||||||
|
{
|
||||||
Evas_Coord x, y, w, h, w0, h0;
|
Evas_Coord x, y, w, h, w0, h0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!text_block) goto fps; // XXX
|
|
||||||
w0 = 160;
|
w0 = 160;
|
||||||
h0 = 120;
|
h0 = 120;
|
||||||
w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2);
|
w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2);
|
||||||
|
@ -143,7 +143,7 @@ static void _loop(double t, int f)
|
||||||
y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2);
|
||||||
text_block->evas::object::position_set(x, y);
|
text_block->evas::object::position_set(x, y);
|
||||||
text_block->evas::object::size_set(w, 5000);
|
text_block->evas::object::size_set(w, 5000);
|
||||||
fps:
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,9 +99,10 @@ static void _cleanup(void)
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
if (text_block)
|
||||||
|
{
|
||||||
Evas_Coord x, y, w, h, w0, h0;
|
Evas_Coord x, y, w, h, w0, h0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if (!text_block) goto fps; // XXX
|
|
||||||
text_block->size_native_get(&w0, &h0);
|
text_block->size_native_get(&w0, &h0);
|
||||||
w = w0;
|
w = w0;
|
||||||
h = h0;
|
h = h0;
|
||||||
|
@ -111,7 +112,7 @@ static void _loop(double t, int f)
|
||||||
y += cos((double)(f + (i * 28)) / (19.6 * SLOW)) * (h0 / (2 * 2));
|
y += cos((double)(f + (i * 28)) / (19.6 * SLOW)) * (h0 / (2 * 2));
|
||||||
text_block->evas::object::position_set(x, y);
|
text_block->evas::object::position_set(x, y);
|
||||||
text_block->evas::object::size_set(w, h);
|
text_block->evas::object::size_set(w, h);
|
||||||
fps:
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,9 +111,10 @@ static void _cleanup(void)
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
if (text_block)
|
||||||
|
{
|
||||||
Evas_Textblock_Cursor *cur;
|
Evas_Textblock_Cursor *cur;
|
||||||
static Evas_Textblock_Cursor *cur2;
|
static Evas_Textblock_Cursor *cur2;
|
||||||
if (!text_block) goto fps; // XXX
|
|
||||||
|
|
||||||
cur = text_block->cursor_get();
|
cur = text_block->cursor_get();
|
||||||
evas_textblock_cursor_text_append(cur, "*");
|
evas_textblock_cursor_text_append(cur, "*");
|
||||||
|
@ -130,7 +131,7 @@ static void _loop(double t, int f)
|
||||||
evas_textblock_cursor_paragraph_first(cur);
|
evas_textblock_cursor_paragraph_first(cur);
|
||||||
else
|
else
|
||||||
evas_textblock_cursor_paragraph_next(cur);
|
evas_textblock_cursor_paragraph_next(cur);
|
||||||
fps:
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int done = 0;
|
||||||
static efl::eina::list<evas::image> images;
|
static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *icons[] = // XXX
|
static const char *icons[] =
|
||||||
{
|
{
|
||||||
"bug.png",
|
"bug.png",
|
||||||
"bulb.png",
|
"bulb.png",
|
||||||
|
|
|
@ -23,7 +23,7 @@ static int done = 0;
|
||||||
static efl::eina::list<evas::image> images;
|
static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *icons[] = // XXX
|
static const char *icons[] =
|
||||||
{
|
{
|
||||||
"bug.png",
|
"bug.png",
|
||||||
"bulb.png",
|
"bulb.png",
|
||||||
|
|
|
@ -87,10 +87,7 @@ static void _cleanup(void)
|
||||||
images.clear();
|
images.clear();
|
||||||
|
|
||||||
for (evas::text& t : texts)
|
for (evas::text& t : texts)
|
||||||
{
|
|
||||||
//t.visibility_set(false); // XXX
|
|
||||||
t.parent_set(efl::eo::base(nullptr));
|
t.parent_set(efl::eo::base(nullptr));
|
||||||
}
|
|
||||||
texts.clear();
|
texts.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int done = 0;
|
||||||
static efl::eina::list<evas::image> images;
|
static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *icons[] = // XXX
|
static const char *icons[] =
|
||||||
{
|
{
|
||||||
"e.png",
|
"e.png",
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int done = 0;
|
||||||
static efl::eina::list<evas::image> images;
|
static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *labels[] = // XXX
|
static const char *labels[] =
|
||||||
{
|
{
|
||||||
"Andrew",
|
"Andrew",
|
||||||
"Alex",
|
"Alex",
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int done = 0;
|
||||||
static efl::eina::list<evas::image> images;
|
static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *labels[] = // XXX
|
static const char *labels[] =
|
||||||
{
|
{
|
||||||
"Andrew",
|
"Andrew",
|
||||||
"Alex",
|
"Alex",
|
||||||
|
|
|
@ -25,7 +25,7 @@ static efl::eina::list<evas::image> images;
|
||||||
static efl::eina::list<evas::image> icons;
|
static efl::eina::list<evas::image> icons;
|
||||||
static efl::eina::list<evas::text> texts;
|
static efl::eina::list<evas::text> texts;
|
||||||
|
|
||||||
static const char *_icons[] = // XXX
|
static const char *_icons[] =
|
||||||
{
|
{
|
||||||
"bug.png",
|
"bug.png",
|
||||||
"bulb.png",
|
"bulb.png",
|
||||||
|
|
Loading…
Reference in New Issue