summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio Sena <savio.sena@acm.org>2014-08-24 08:21:57 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-16 19:35:18 -0300
commit23513466461616e499c8e755e22154700e80bec3 (patch)
treea266f0b2143785466139990b4b9262ab023f7eb8
parent22f097ed64953f31d2532fc00e881167a56e9b38 (diff)
Fixed cxx/image_blend_border test.
-rw-r--r--src/bin/cxx/image_blend_border.cc29
-rw-r--r--src/bin/cxx/image_blend_border_cxx.c18
2 files changed, 25 insertions, 22 deletions
diff --git a/src/bin/cxx/image_blend_border.cc b/src/bin/cxx/image_blend_border.cc
index cf4970c..86e7490 100644
--- a/src/bin/cxx/image_blend_border.cc
+++ b/src/bin/cxx/image_blend_border.cc
@@ -3,28 +3,19 @@
3# include <config.h> 3# include <config.h>
4#endif 4#endif
5 5
6#undef FNAME
7#undef NAME
8#undef ICON
9
10/* metadata */
11#define FNAME image_blend_border_start_cxx
12#define NAME "Image Blend Border (C++)"
13#define ICON "blend.png"
14
15#include "Eo.h" 6#include "Eo.h"
16#include "Evas.h" 7#include "Evas.h"
17 8
18#include "main.hh"
19
20#include "Eo.hh" 9#include "Eo.hh"
21#include "Eina.hh" 10#include "Eina.hh"
22#include "Evas.hh" 11#include "Evas.hh"
23 12
24namespace _ctx { 13#include "main.h"
25evas::canvas evas; 14
15#define EXPEDITE_CXX_TEST_IMPL
16#include "image_blend_border_cxx.h"
17
26efl::eina::list<evas::image> images; 18efl::eina::list<evas::image> images;
27}
28 19
29/* standard var */ 20/* standard var */
30static int done = 0; 21static int done = 0;
@@ -34,10 +25,12 @@ static void _setup()
34{ 25{
35 int i; 26 int i;
36 Evas_Object *o; 27 Evas_Object *o;
28 evas::canvas canvas(G_evas);
29
37 for (i = 0; i < OBNUM; i++) 30 for (i = 0; i < OBNUM; i++)
38 { 31 {
39 evas::image o(efl::eo::parent = _ctx::evas); 32 evas::image o(efl::eo::parent = canvas);
40 _ctx::images.push_back(o); 33 images.push_back(o);
41 o.file_set(::build_path("bar.png"), ""); // XXX 34 o.file_set(::build_path("bar.png"), ""); // XXX
42 o.border_set(6, 6, 6, 6); 35 o.border_set(6, 6, 6, 6);
43 o.visibility_set(true); 36 o.visibility_set(true);
@@ -48,7 +41,7 @@ static void _setup()
48/* cleanup */ 41/* cleanup */
49static void _cleanup() 42static void _cleanup()
50{ 43{
51 _ctx::images.clear(); 44 images.clear();
52} 45}
53 46
54/* loop - do things */ 47/* loop - do things */
@@ -57,7 +50,7 @@ static void _loop(double t, int f)
57 int i = 0; 50 int i = 0;
58 Evas_Coord x, y, w, h, w0, h0; 51 Evas_Coord x, y, w, h, w0, h0;
59 52
60 for (auto it = _ctx::images.begin(), end = _ctx::images.end(); it != end; it++, i++) 53 for (auto it = images.begin(), end = images.end(); it != end; it++, i++)
61 { 54 {
62 w0 = 80; 55 w0 = 80;
63 h0 = 80; 56 h0 = 80;
diff --git a/src/bin/cxx/image_blend_border_cxx.c b/src/bin/cxx/image_blend_border_cxx.c
index 73bb9ec..48bed1d 100644
--- a/src/bin/cxx/image_blend_border_cxx.c
+++ b/src/bin/cxx/image_blend_border_cxx.c
@@ -1,6 +1,8 @@
1#ifndef IMAGE_BLEND_BORDER_CXX_HH
2#define IMAGE_BLEND_BORDER_CXX_HH
1 3
2#ifdef HAVE_CONFIG_H 4#ifdef __cplusplus
3# include <config.h> 5extern "C" {
4#endif 6#endif
5 7
6#undef FNAME 8#undef FNAME
@@ -8,8 +10,8 @@
8#undef ICON 10#undef ICON
9 11
10/* metadata */ 12/* metadata */
11#define FNAME image_blend_border_start 13#define FNAME image_blend_border_cxx_start
12#define NAME "Image Blend Border" 14#define NAME "Image Blend Border (C++)"
13#define ICON "blend.png" 15#define ICON "blend.png"
14 16
15#ifdef UI 17#ifdef UI
@@ -20,6 +22,14 @@ _ui_menu_item_add(ICON, NAME, FNAME);
20void FNAME(void); 22void FNAME(void);
21#endif 23#endif
22 24
25#ifndef EXPEDITE_CXX_TEST_IMPL
23#undef FNAME 26#undef FNAME
24#undef NAME 27#undef NAME
25#undef ICON 28#undef ICON
29#endif
30
31#ifdef __cplusplus
32}
33#endif
34
35#endif // IMAGE_BLEND_BORDER_CXX_HH