Fixed cxx/image_blend_border test.

This commit is contained in:
Savio Sena 2014-08-24 08:21:57 -03:00
parent 155888f2c5
commit 6b928ebec4
2 changed files with 25 additions and 22 deletions

View File

@ -3,28 +3,19 @@
# include <config.h>
#endif
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_blend_border_start_cxx
#define NAME "Image Blend Border (C++)"
#define ICON "blend.png"
#include "Eo.h"
#include "Evas.h"
#include "main.hh"
#include "Eo.hh"
#include "Eina.hh"
#include "Evas.hh"
namespace _ctx {
evas::canvas evas;
#include "main.h"
#define EXPEDITE_CXX_TEST_IMPL
#include "image_blend_border_cxx.h"
efl::eina::list<evas::image> images;
}
/* standard var */
static int done = 0;
@ -34,10 +25,12 @@ static void _setup()
{
int i;
Evas_Object *o;
evas::canvas canvas(G_evas);
for (i = 0; i < OBNUM; i++)
{
evas::image o(efl::eo::parent = _ctx::evas);
_ctx::images.push_back(o);
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
o.file_set(::build_path("bar.png"), ""); // XXX
o.border_set(6, 6, 6, 6);
o.visibility_set(true);
@ -48,7 +41,7 @@ static void _setup()
/* cleanup */
static void _cleanup()
{
_ctx::images.clear();
images.clear();
}
/* loop - do things */
@ -57,7 +50,7 @@ static void _loop(double t, int f)
int i = 0;
Evas_Coord x, y, w, h, w0, h0;
for (auto it = _ctx::images.begin(), end = _ctx::images.end(); it != end; it++, i++)
for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
{
w0 = 80;
h0 = 80;

View File

@ -1,6 +1,8 @@
#ifndef IMAGE_BLEND_BORDER_CXX_HH
#define IMAGE_BLEND_BORDER_CXX_HH
#ifdef HAVE_CONFIG_H
# include <config.h>
#ifdef __cplusplus
extern "C" {
#endif
#undef FNAME
@ -8,8 +10,8 @@
#undef ICON
/* metadata */
#define FNAME image_blend_border_start
#define NAME "Image Blend Border"
#define FNAME image_blend_border_cxx_start
#define NAME "Image Blend Border (C++)"
#define ICON "blend.png"
#ifdef UI
@ -20,6 +22,14 @@ _ui_menu_item_add(ICON, NAME, FNAME);
void FNAME(void);
#endif
#ifndef EXPEDITE_CXX_TEST_IMPL
#undef FNAME
#undef NAME
#undef ICON
#endif
#ifdef __cplusplus
}
#endif
#endif // IMAGE_BLEND_BORDER_CXX_HH