forked from enlightenment/expedite
Fixed cxx/image_blend_border test.
This commit is contained in:
parent
22f097ed64
commit
2351346646
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue