expedite-cxx: Remove XXX and made some minor improvements.

This commit is contained in:
Savio S. Machado 2014-10-13 12:35:40 -03:00
parent 3434b132b8
commit bc5d56877e
25 changed files with 87 additions and 86 deletions

View File

@ -51,7 +51,7 @@ static void _cleanup(void)
static void _loop(double t, int f)
{
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));
eo_do(text, evas_obj_text_filter_program_set(buf));

View File

@ -1,4 +1,4 @@
// XXX DONE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@ -26,7 +26,7 @@ static void _setup()
evas::canvas canvas(::eo_ref(G_evas));
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);
eo_do(o._eo_ptr(), efl_file_set(build_path("bar.png"), NULL)); // XXX
o.border_set(6, 6, 6, 6);

View File

@ -1,4 +1,4 @@
// XXX DONE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,4 +1,4 @@
// XXX DONE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,4 +1,4 @@
// XXX DONE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -60,7 +60,7 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i = 0; // XXX
int i = 0;
for (evas::image& img : images)
{
if (i < (OBNUM / 2))

View File

@ -63,7 +63,7 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i = 0; // XXX
int i = 0;
for (evas::image& img : images)
{
if (i < (OBNUM / 2))

View File

@ -62,7 +62,7 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
int i = 0; // XXX
int i = 0;
for (evas::image& img : images)
{
if (i > (OBNUM / 2))

View File

@ -41,8 +41,8 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (evas::image o : images)
o.visibility_set(false); // XXX
for (evas::image& img : images)
img.visibility_set(false); // XXX
images.clear();
}

View File

@ -54,11 +54,13 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
if (images.empty()) return; // XXX
int a = f & 0x1f;
a = ((a << 3) | (a >> 2)) & 0xff;
evas::image img = images.back();
img.evas::object::color_set(a, a, a, a);
if (!images.empty())
{
int a = f & 0x1f;
a = ((a << 3) | (a >> 2)) & 0xff;
evas::image img = images.back();
img.evas::object::color_set(a, a, a, a);
}
FPS_STD(NAME);
}

View File

@ -63,7 +63,7 @@ static void _loop(double t, int f)
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
data = static_cast<unsigned int*>(img.data_get(1));
st = img.stride_get(); // XXX
st = img.stride_get();
st = st >> 2;
p = data;
for (y = 0; y < h; y++)

View File

@ -49,7 +49,7 @@ static void _setup(void)
fread(vp, 320 * 240, 1, 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;
for (int y = 0; y < 480; y++)
{

View File

@ -33,7 +33,7 @@ static void _setup(void)
char buf[256];
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
o1.fill_set(0, 0, 256, 256);
o1.evas::object::size_set(256, 256);
@ -42,7 +42,7 @@ static void _setup(void)
images.push_back(o1);
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
o2.fill_set(0, 0, 256, 256);
o2.size_set(256, 256);

View File

@ -50,24 +50,24 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
int i = 0; // XXX
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
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);
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, 1, 255, 0, 0, 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, 0, 255, 255, 255, 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, 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_set(m);
++i;

View File

@ -37,7 +37,7 @@ static void _setup(void)
evas::text o(efl::eo::parent = canvas);
texts.push_back(o);
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 *))],

View File

@ -129,21 +129,21 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
Evas_Coord x, y, w, h, w0, h0;
int i = 0;
if (!text_block) goto fps; // XXX
w0 = 160;
h0 = 120;
w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2);
h = 50 + ((1.0 + sin((double)(f + (i * 19)) / (52.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (86.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2);
text_block->evas::object::position_set(x, y);
text_block->evas::object::size_set(w, 5000);
fps:
if (text_block)
{
Evas_Coord x, y, w, h, w0, h0;
int i = 0;
w0 = 160;
h0 = 120;
w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2);
h = 50 + ((1.0 + sin((double)(f + (i * 19)) / (52.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (86.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2);
text_block->evas::object::position_set(x, y);
text_block->evas::object::size_set(w, 5000);
}
FPS_STD(NAME);
}

View File

@ -99,19 +99,20 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
Evas_Coord x, y, w, h, w0, h0;
int i = 0;
if (!text_block) goto fps; // XXX
text_block->size_native_get(&w0, &h0);
w = w0;
h = h0;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (31.1 * SLOW)) * (w0 / (2 * 2));
y = (win_h / 2) - (h / 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::size_set(w, h);
fps:
if (text_block)
{
Evas_Coord x, y, w, h, w0, h0;
int i = 0;
text_block->size_native_get(&w0, &h0);
w = w0;
h = h0;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (31.1 * SLOW)) * (w0 / (2 * 2));
y = (win_h / 2) - (h / 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::size_set(w, h);
}
FPS_STD(NAME);
}

View File

@ -111,26 +111,27 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
Evas_Textblock_Cursor *cur;
static Evas_Textblock_Cursor *cur2;
if (!text_block) goto fps; // XXX
cur = text_block->cursor_get();
evas_textblock_cursor_text_append(cur, "*");
evas_textblock_cursor_char_delete(cur);
evas_textblock_cursor_paragraph_char_first(cur);
if (!cur2)
if (text_block)
{
cur2 = text_block->cursor_new();
evas_textblock_cursor_paragraph_last(cur2);
evas_textblock_cursor_paragraph_char_first(cur2);
Evas_Textblock_Cursor *cur;
static Evas_Textblock_Cursor *cur2;
cur = text_block->cursor_get();
evas_textblock_cursor_text_append(cur, "*");
evas_textblock_cursor_char_delete(cur);
evas_textblock_cursor_paragraph_char_first(cur);
if (!cur2)
{
cur2 = text_block->cursor_new();
evas_textblock_cursor_paragraph_last(cur2);
evas_textblock_cursor_paragraph_char_first(cur2);
}
if (!evas_textblock_cursor_compare(cur, cur2))
evas_textblock_cursor_paragraph_first(cur);
else
evas_textblock_cursor_paragraph_next(cur);
}
if (!evas_textblock_cursor_compare(cur, cur2))
evas_textblock_cursor_paragraph_first(cur);
else
evas_textblock_cursor_paragraph_next(cur);
fps:
FPS_STD(NAME);
}

View File

@ -24,7 +24,7 @@ static int done = 0;
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *icons[] = // XXX
static const char *icons[] =
{
"bug.png",
"bulb.png",

View File

@ -23,7 +23,7 @@ static int done = 0;
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *icons[] = // XXX
static const char *icons[] =
{
"bug.png",
"bulb.png",

View File

@ -87,10 +87,7 @@ static void _cleanup(void)
images.clear();
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();
}

View File

@ -24,7 +24,7 @@ static int done = 0;
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *icons[] = // XXX
static const char *icons[] =
{
"e.png",
};

View File

@ -24,7 +24,7 @@ static int done = 0;
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *labels[] = // XXX
static const char *labels[] =
{
"Andrew",
"Alex",

View File

@ -24,7 +24,7 @@ static int done = 0;
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *labels[] = // XXX
static const char *labels[] =
{
"Andrew",
"Alex",

View File

@ -25,7 +25,7 @@ static efl::eina::list<evas::image> images;
static efl::eina::list<evas::image> icons;
static efl::eina::list<evas::text> texts;
static const char *_icons[] = // XXX
static const char *_icons[] =
{
"bug.png",
"bulb.png",