Add missing _loop and FNAME.

Convert o_texts[] to eina::list<evas::text>.
Convert o_icons[] to eina::list<evas::image>.
This commit is contained in:
Savio Sena 2014-09-23 22:34:56 -03:00
parent bbb7e27b03
commit ad066eb17e
31 changed files with 876 additions and 293 deletions

View File

@ -44,9 +44,36 @@ static void _setup(void)
done = 0;
}
/* cleanup */
static void _cleanup()
{
images.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < MANYNUM; i++)
{
eo_do(o_images[i], evas_obj_size_get(&w, &h));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -23,16 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
evas::canvas canvas(::eo_ref(G_evas));
for (int i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
eo_do(o,
efl_file_set(build_path("logo.png"), NULL),
efl_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o.file_set(build_path("logo.png"), "");
o.smooth_scale_set(0);
o.visibility_set(true);
}
done = 0;
}
@ -66,6 +64,12 @@ static void _loop(double t, int f)
FPS_STD(NAME);
}
/* cleanup */
static void _cleanup(void)
{
images.clear();
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{

View File

@ -13,6 +13,7 @@
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_blend_solid_middle_unscaled_capi.h"
/* standard var */
static int done = 0;

View File

@ -1,15 +1,19 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME rect_blend_start
#define NAME "Rect Blend"
#define ICON "rect.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "rect_blend_capi.h"
/* standard var */
static int done = 0;
@ -19,15 +23,14 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
int r, g, b, a;
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
o = eo_add(EVAS_RECTANGLE_CLASS, G_evas);
images[i] = o;
a = rnd()&0xff;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
@ -40,13 +43,41 @@ static void _setup(void)
}
/* cleanup */
static void _cleanup(void)
static void _cleanup()
{
images.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(images[i]);
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h));
}
FPS_STD(NAME);
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,15 +1,19 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME rect_blend_few_start
#define NAME "Rect Blend Few"
#define ICON "rect.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "rect_blend_few_capi.h"
#undef OBNUM
#define OBNUM 3
@ -44,10 +48,38 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
images.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i], evas_obj_position_set(x, y),
evas_obj_size_set(w, h));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,15 +1,19 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME rect_blend_pow2_start
#define NAME "Rect Blend Power 2"
#define ICON "rect.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "rect_blend_pow2_capi.h"
/* standard var */
static int done = 0;
@ -19,10 +23,9 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
int r, g, b, a;
@ -43,11 +46,38 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(images[i]);
images.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -46,9 +46,13 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,15 +1,19 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME rect_solid_start
#define NAME "Rect Solid"
#define ICON "rect.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "rect_solid_capi.h"
/* standard var */
static int done = 0;
@ -19,22 +23,19 @@ static efl::eina::list<evas::image> images;
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
srnd();
for (i = 0; i < OBNUM; i++)
for (int i = 0; i < OBNUM; i++)
{
int r, g, b, a;
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
a = 0xff;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
b = ((rnd()&0xff) * a) / 255;
eo_do(o,
evas_obj_color_set(r, g, b, a),
evas_obj_visibility_set(EINA_TRUE));
o.color_set(r, g, b, a);
o.visibility_set(true);
}
done = 0;
}
@ -42,11 +43,38 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(images[i]);
images.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -45,8 +45,31 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
eo_do(o_images[i], evas_obj_position_set(x, y),
evas_obj_size_set(w, h));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}

View File

@ -35,9 +35,13 @@ static void _setup(void)
done = 0;
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -53,14 +53,41 @@ static void _setup(void)
done = 0;
}
/* cleanup */
static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]);
char buf[1024];
const char *strs[] = {
"Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I",
"Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy",
"Fiddly", "Family", "Lair", "Monkeys", "Magazine"
};
for (i = 0; i < OBNUM; i++)
{
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 *))]);
eo_do(o_texts[i], efl_text_set(buf));
}
FPS_STD(NAME);
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,21 +1,25 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME text_styles_start
#define NAME "Text Styles"
#define ICON "text.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "text_styles_capi.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_texts[OBNUM];
static eina::list<evas::text> texts;
/* setup */
static void _setup(void)
@ -45,9 +49,36 @@ static void _setup(void)
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
eo_do(o_texts[i], evas_obj_size_get(&w, &h));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
eo_do(o_texts[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -56,9 +56,13 @@ static void _setup(void)
done = 0;
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -59,8 +59,12 @@ static void _setup(void)
}
/* cleanup */
static void _cleanup(void)
{
eo_del(o_text);
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}

View File

@ -1,21 +1,25 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME textblock_basic_start
#define NAME "Textblock Basic"
#define ICON "text.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "textblock_basic_capi.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_text;
static evas::text text;
/* setup */
static void _setup(void)
@ -122,9 +126,37 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
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);
eo_do(o_text,
evas_obj_position_set(x, y),
evas_obj_size_set(w, 5000));
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -91,9 +91,13 @@ static void _setup(void)
}
/* cleanup */
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,21 +1,25 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME textblock_text_append_start
#define NAME "Textblock text_append"
#define ICON "text.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "textblock_text_append_capi.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_text;
static evas::text text;
/* setup */
static void _setup(void)
@ -105,12 +109,39 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
eo_del(o_text);
}
/* loop - do things */
static void _loop(double t, int f)
{
Evas_Textblock_Cursor *cur;
static Evas_Textblock_Cursor *cur2;
eo_do(o_text, cur = evas_obj_textblock_cursor_get());
evas_textblock_cursor_text_append(cur, "*");
evas_textblock_cursor_char_delete(cur);
extern "C" static void _key(char *key)
evas_textblock_cursor_paragraph_char_first(cur);
if (!cur2)
{
eo_do(o_text, cur2 = evas_obj_textblock_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);
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,25 +1,30 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_file_icons_start
#define NAME "Widgets File Icons"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_file_icons_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static const char *icons[] =
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> text;
static const char *icons[] = // XXX
{
"bug.png",
"bulb.png",
@ -42,9 +47,8 @@ static const char *icons[] =
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < NUM; i++)
for (int i = 0; i < NUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -68,16 +72,17 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_del(o_texts[i]);
}
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -73,9 +73,13 @@ static void _cleanup(void)
eo_del(o_texts[i]);
}
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,23 +1,28 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_file_icons_2_grouped_start
#define NAME "Widgets File Icons 2 Grouped"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_file_icons_2_grouped_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static efl::eina::list<evas::text> texts;
static const char *icons[] =
{
@ -75,16 +80,40 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_del(o_texts[i]);
}
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x + 8, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE + 16 - tw) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4));
x += ICON_SIZE + 16;
if (x > win_w)
{
x = 0;
y += ICON_SIZE + 16;
}
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -16,10 +16,11 @@ static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static const char *icons[] =
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *icons[] = // XXX
{
"e.png",
};
@ -51,16 +52,40 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_del(o_texts[i]);
}
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x + 8, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE + 16 - tw) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4));
x += ICON_SIZE + 16;
if (x > win_w)
{
x = 0;
y += ICON_SIZE + 16;
}
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -73,9 +73,13 @@ static void _cleanup(void)
eo_del(o_texts[i]);
}
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,15 +1,19 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_file_icons_4_start
#define NAME "Widgets File Icons 4"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_file_icons_4_capi.h"
/* standard var */
static int done = 0;
@ -17,7 +21,7 @@ static int done = 0;
#define NUM 512
#define ICON_SIZE 96
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static efl::eina::list<evas::text> texts;
static const char *icons[] =
{
@ -66,16 +70,40 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_del(o_texts[i]);
}
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x + 8, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE + 16 - tw) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4));
x += ICON_SIZE + 16;
if (x > win_w)
{
x = 0;
y += ICON_SIZE + 16;
}
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,23 +1,29 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_1_start
#define NAME "Widgets List"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "cxx/widgets_list_1._capich"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static efl::eina::list<evas::text> texts;
static const char *labels[] =
{
@ -83,11 +89,35 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -93,9 +93,13 @@ static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,25 +1,30 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_2_start
#define NAME "Widgets List 2"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_list_2_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 32
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static const char *labels[] =
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *labels[] = // XXX
{
"Andrew",
"Alex",
@ -83,11 +88,35 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,25 +1,30 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_2_grouped_start
#define NAME "Widgets List 2 Grouped"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_list_2_grouped_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_texts[NUM];
static const char *labels[] =
static efl::eina::list<evas::image> images;
static efl::eina::list<evas::text> texts;
static const char *labels[] = // XXX
{
"Andrew",
"Alex",
@ -91,11 +96,35 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < NUM; i++)
images.clear();
texts.clear();
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,15 +1,4 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_3_start
#define NAME "Widgets List 3"
#define ICON "widgets.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
@ -79,9 +68,8 @@ static const char *labels[] =
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < NUM; i++)
for (int i = 0; i < NUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -115,10 +103,39 @@ static void _cleanup(void)
int i;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_del(o_images[i]);
eo_del(o_icons[i]);
eo_del(o_texts[i]);
}
}
extern "C" static void _key(char *key)
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,24 +1,29 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_3_grouped_start
#define NAME "Widgets List 3 Grouped"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_list_3_grouped_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 64
static efl::eina::list<evas::image> images;
static Evas_Object *o_icons[NUM];
static Evas_Object *o_texts[NUM];
static efl::eina::list<evas::image> icons;
static efl::eina::list<evas::text> texts;
static const char *icons[] =
{
@ -128,14 +133,38 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
images.clear();
icons.clear();
texts.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -1,26 +1,31 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME widgets_list_4_start
#define NAME "Widgets List 4"
#define ICON "widgets.png"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PROTO
# ifndef UI
# include "main.h"
#include "Eo.h"
#include "Evas.h"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "widgets_list_4_capi.h"
/* standard var */
static int done = 0;
/* private data */
#define NUM 512
#define ICON_SIZE 32
static efl::eina::list<evas::image> images;
static Evas_Object *o_icons[NUM];
static Evas_Object *o_texts[NUM];
static const char *icons[] =
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
{
"bug.png",
"bulb.png",
@ -112,10 +117,18 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
int i;
images.clear();
icons.clear();
texts.clear();
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}

View File

@ -79,9 +79,8 @@ static const char *labels[] =
/* setup */
static void _setup(void)
{
int i;
evas::canvas canvas(::eo_ref(G_evas));
for (i = 0; i < NUM; i++)
for (int i = 0; i < NUM; i++)
{
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
@ -125,16 +124,37 @@ static void _setup(void)
done = 0;
}
/* cleanup */
static void _cleanup(void)
static void _cleanup()
{
images.clear();
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, tw, th, cent;
x = 0;
y = 0 - f;
for (i = 0; i < NUM; i++)
{
eo_del(images[i]);
eo_do(o_images[i], evas_obj_position_set(x, y));
eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4));
eo_do(o_texts[i], evas_obj_size_get(&tw, &th));
cent = (ICON_SIZE - th) / 2;
eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent));
y += ICON_SIZE;
}
FPS_STD(NAME);
}
extern "C" static void _key(char *key)
static void _key(char *key)
{
KEY_STD;
}
extern "C" void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
}