summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-05-10 11:10:24 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2016-05-10 11:10:24 +0200
commit26f309112e7dd3d41ce12b04d7b990304673ec97 (patch)
tree7983b5a1181473e5f2b760923fe7ef46fa1552e5 /src/examples
parentfeebf5977989467042d93ac2f2d8885d23ec0a7f (diff)
examples: eolian_cxx: fix some problems after changing the colourable namespace
Fix commit 3e8db298f70932ce7b2f5296d44b262a615ea87c the namepsace changed but only a few files have been fixed for this. Many files did still not compile with make examples. I fixed some more but stopped at the cxx files with the hope that the original author would actually do this.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/eolian_cxx/colourable.c60
-rw-r--r--src/examples/eolian_cxx/colourable_cxx.cc4
-rw-r--r--src/examples/eolian_cxx/colourable_stub.c4
-rw-r--r--src/examples/eolian_cxx/colourablesquare.c32
-rw-r--r--src/examples/eolian_cxx/colourablesquare_cxx.cc6
-rw-r--r--src/examples/eolian_cxx/colourablesquare_stub.c6
6 files changed, 56 insertions, 56 deletions
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index 0c132c4509..dd2cc11833 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -6,16 +6,16 @@
6 6
7#include "Eo.h" 7#include "Eo.h"
8#include "Eina.h" 8#include "Eina.h"
9#include "colourable.eo.h" 9#include "ns_colourable.eo.h"
10 10
11#define MY_CLASS COLOURABLE_CLASS 11#define MY_CLASS NS_COLOURABLE_CLASS
12 12
13static int _colourable_impl_logdomain; 13static int _ns_colourable_impl_logdomain;
14 14
15#ifdef DBG 15#ifdef DBG
16#undef DBG 16#undef DBG
17#endif 17#endif
18#define DBG(...) EINA_LOG_DOM_DBG(_colourable_impl_logdomain, __VA_ARGS__) 18#define DBG(...) EINA_LOG_DOM_DBG(_ns_colourable_impl_logdomain, __VA_ARGS__)
19 19
20struct _Colourable_Data 20struct _Colourable_Data
21{ 21{
@@ -27,102 +27,102 @@ struct _Colourable_Data
27typedef struct _Colourable_Data Colourable_Data; 27typedef struct _Colourable_Data Colourable_Data;
28 28
29Eo * 29Eo *
30_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 30_ns_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
31{ 31{
32 if(!_colourable_impl_logdomain) 32 if(!_ns_colourable_impl_logdomain)
33 { 33 {
34 _colourable_impl_logdomain 34 _ns_colourable_impl_logdomain
35 = eina_log_domain_register("colourable", EINA_COLOR_BLUE); 35 = eina_log_domain_register("colourable", EINA_COLOR_BLUE);
36 } 36 }
37 DBG("_colourable_constructor(%p, %p)\n", obj, MY_CLASS); 37 DBG("_ns_colourable_constructor(%p, %p)\n", obj, MY_CLASS);
38 return eo_constructor(eo_super(obj, MY_CLASS)); 38 return eo_constructor(eo_super(obj, MY_CLASS));
39} 39}
40 40
41void 41void
42_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 42_ns_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
43{ 43{
44 if(_colourable_impl_logdomain) 44 if(_ns_colourable_impl_logdomain)
45 { 45 {
46 eina_log_domain_unregister(_colourable_impl_logdomain); 46 eina_log_domain_unregister(_ns_colourable_impl_logdomain);
47 _colourable_impl_logdomain = 0; 47 _ns_colourable_impl_logdomain = 0;
48 } 48 }
49 DBG("_colourable_destructor()\n"); 49 DBG("_ns_colourable_destructor()\n");
50 eo_destructor(eo_super(obj, MY_CLASS)); 50 eo_destructor(eo_super(obj, MY_CLASS));
51} 51}
52 52
53void 53void
54_colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb) 54_ns_colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
55{ 55{
56 if(!_colourable_impl_logdomain) 56 if(!_ns_colourable_impl_logdomain)
57 { 57 {
58 _colourable_impl_logdomain 58 _ns_colourable_impl_logdomain
59 = eina_log_domain_register("colourable", EINA_COLOR_BLUE); 59 = eina_log_domain_register("colourable", EINA_COLOR_BLUE);
60 } 60 }
61 61
62 self->r = (rgb & 0x00ff0000) >> 16; 62 self->r = (rgb & 0x00ff0000) >> 16;
63 self->g = (rgb & 0x0000ff00) >> 8; 63 self->g = (rgb & 0x0000ff00) >> 8;
64 self->b = rgb & 0x000000ff; 64 self->b = rgb & 0x000000ff;
65 DBG("_colourable_rgb_24bits_constructor(0x%.6x)\n", (int)rgb); 65 DBG("_ns_colourable_rgb_24bits_constructor(0x%.6x)\n", (int)rgb);
66 eo_constructor(eo_super(obj, MY_CLASS)); 66 eo_constructor(eo_super(obj, MY_CLASS));
67} 67}
68 68
69void 69void
70_colourable_print_colour(Eo *obj EINA_UNUSED, Colourable_Data *self EINA_UNUSED) 70_ns_colourable_print_colour(Eo *obj EINA_UNUSED, Colourable_Data *self EINA_UNUSED)
71{ 71{
72 DBG("_colourable_print_colour() ==> 0x%2.x 0x%2.x 0x%2.x\n", self->r, self->g, self->b); 72 DBG("_ns_colourable_print_colour() ==> 0x%2.x 0x%2.x 0x%2.x\n", self->r, self->g, self->b);
73} 73}
74 74
75int 75int
76_colourable_colour_mask(Eo *obj EINA_UNUSED, Colourable_Data *self, int mask) 76_ns_colourable_colour_mask(Eo *obj EINA_UNUSED, Colourable_Data *self, int mask)
77{ 77{
78 int masked_rgb = 78 int masked_rgb =
79 (((self->r << 16)& 0x00ff0000) | 79 (((self->r << 16)& 0x00ff0000) |
80 ((self->g << 8) & 0x0000ff00) | 80 ((self->g << 8) & 0x0000ff00) |
81 (self->b & 0x000000ff)) & mask; 81 (self->b & 0x000000ff)) & mask;
82 DBG("_colourable_colour_mask() ==> 0x%2.x\n", (unsigned int)masked_rgb); 82 DBG("_ns_colourable_colour_mask() ==> 0x%2.x\n", (unsigned int)masked_rgb);
83 return masked_rgb; 83 return masked_rgb;
84} 84}
85 85
86void 86void
87_colourable_composite_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self, int* r, int* g, int* b) 87_ns_colourable_composite_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self, int* r, int* g, int* b)
88{ 88{
89 *r = self->r; 89 *r = self->r;
90 *g = self->g; 90 *g = self->g;
91 *b = self->b; 91 *b = self->b;
92 DBG("_colourable_composite_colour_get() ==> 0x%2.x 0x%2.x 0x%2.x\n", *r, *g, *b); 92 DBG("_ns_colourable_composite_colour_get() ==> 0x%2.x 0x%2.x 0x%2.x\n", *r, *g, *b);
93 return; 93 return;
94} 94}
95 95
96void 96void
97_colourable_composite_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int r, int g, int b) 97_ns_colourable_composite_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int r, int g, int b)
98{ 98{
99 self->r = r; 99 self->r = r;
100 self->g = g; 100 self->g = g;
101 self->b = b; 101 self->b = b;
102 DBG("_colourable_composite_colour_set(0x%2.x, 0x%2.x, 0x%2.x)\n", 102 DBG("_ns_colourable_composite_colour_set(0x%2.x, 0x%2.x, 0x%2.x)\n",
103 (int)self->r, (int)self->g, (int)self->b); 103 (int)self->r, (int)self->g, (int)self->b);
104 return; 104 return;
105} 105}
106 106
107int 107int
108_colourable_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self) 108_ns_colourable_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self)
109{ 109{
110 int rgb = 110 int rgb =
111 ((self->r << 16)& 0x00ff0000) | 111 ((self->r << 16)& 0x00ff0000) |
112 ((self->g << 8) & 0x0000ff00) | 112 ((self->g << 8) & 0x0000ff00) |
113 (self->b & 0x000000ff); 113 (self->b & 0x000000ff);
114 DBG("_colourable_colour_get() ==> 0x%.6x\n", (unsigned int)rgb); 114 DBG("_ns_colourable_colour_get() ==> 0x%.6x\n", (unsigned int)rgb);
115 return rgb; 115 return rgb;
116} 116}
117 117
118void 118void
119_colourable_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int rgb) 119_ns_colourable_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int rgb)
120{ 120{
121 self->r = (rgb & 0x00ff0000) >> 16; 121 self->r = (rgb & 0x00ff0000) >> 16;
122 self->g = (rgb & 0x0000ff00) >> 8; 122 self->g = (rgb & 0x0000ff00) >> 8;
123 self->b = rgb & 0x000000ff; 123 self->b = rgb & 0x000000ff;
124 DBG("_colourable_colour_set(0x%.6x)\n", (unsigned int)rgb); 124 DBG("_ns_colourable_colour_set(0x%.6x)\n", (unsigned int)rgb);
125 return; 125 return;
126} 126}
127 127
128#include "colourable.eo.c" 128#include "ns_colourable.eo.c"
diff --git a/src/examples/eolian_cxx/colourable_cxx.cc b/src/examples/eolian_cxx/colourable_cxx.cc
index f1f6beca82..513e3dc4ba 100644
--- a/src/examples/eolian_cxx/colourable_cxx.cc
+++ b/src/examples/eolian_cxx/colourable_cxx.cc
@@ -12,10 +12,10 @@
12extern "C" 12extern "C"
13{ 13{
14#include "colourable_stub.h" 14#include "colourable_stub.h"
15#include "colourable.eo.h" 15#include "ns_colourable.eo.h"
16} 16}
17 17
18#define MY_CLASS COLOURABLE_CLASS 18#define MY_CLASS NS_COLOURABLE_CLASS
19 19
20static efl::eina::log_domain domain("colourable"); 20static efl::eina::log_domain domain("colourable");
21 21
diff --git a/src/examples/eolian_cxx/colourable_stub.c b/src/examples/eolian_cxx/colourable_stub.c
index a427cc5ccf..8adb4b14b2 100644
--- a/src/examples/eolian_cxx/colourable_stub.c
+++ b/src/examples/eolian_cxx/colourable_stub.c
@@ -8,5 +8,5 @@
8#include "Eina.h" 8#include "Eina.h"
9 9
10#include "colourable_stub.h" 10#include "colourable_stub.h"
11#include "colourable.eo.h" 11#include "ns_colourable.eo.h"
12#include "colourable.eo.c" 12#include "ns_colourable.eo.c"
diff --git a/src/examples/eolian_cxx/colourablesquare.c b/src/examples/eolian_cxx/colourablesquare.c
index 0804d361dc..f367c59ae4 100644
--- a/src/examples/eolian_cxx/colourablesquare.c
+++ b/src/examples/eolian_cxx/colourablesquare.c
@@ -6,17 +6,17 @@
6 6
7#include "Eo.h" 7#include "Eo.h"
8 8
9#include "colourable.eo.h" 9#include "ns_colourable.eo.h"
10#include "colourablesquare.eo.h" 10#include "ns_colourablesquare.eo.h"
11 11
12#define MY_CLASS COLOURABLESQUARE_CLASS 12#define MY_CLASS NS_COLOURABLESQUARE_CLASS
13 13
14static int _colourablesquare_impl_logdomain; 14static int _ns_colourablesquare_impl_logdomain;
15 15
16#ifdef DBG 16#ifdef DBG
17#undef DBG 17#undef DBG
18#endif 18#endif
19#define DBG(...) EINA_LOG_DOM_DBG(_colourablesquare_impl_logdomain, __VA_ARGS__) 19#define DBG(...) EINA_LOG_DOM_DBG(_ns_colourablesquare_impl_logdomain, __VA_ARGS__)
20 20
21struct _ColourableSquare_Data 21struct _ColourableSquare_Data
22{ 22{
@@ -25,36 +25,36 @@ struct _ColourableSquare_Data
25typedef struct _ColourableSquare_Data ColourableSquare_Data; 25typedef struct _ColourableSquare_Data ColourableSquare_Data;
26 26
27static void 27static void
28_colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int size) 28_ns_colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int size)
29{ 29{
30 if(!_colourablesquare_impl_logdomain) 30 if(!_ns_colourablesquare_impl_logdomain)
31 { 31 {
32 _colourablesquare_impl_logdomain 32 _ns_colourablesquare_impl_logdomain
33 = eina_log_domain_register 33 = eina_log_domain_register
34 ("colourablesquare", EINA_COLOR_LIGHTBLUE); 34 ("colourablesquare", EINA_COLOR_LIGHTBLUE);
35 } 35 }
36 self->size = size; 36 self->size = size;
37 DBG("_colourablesquare_constructor(%d)\n", size); 37 DBG("_ns_colourablesquare_constructor(%d)\n", size);
38 eo_constructor(eo_super(obj, MY_CLASS)); 38 eo_constructor(eo_super(obj, MY_CLASS));
39} 39}
40 40
41static int 41static int
42_colourablesquare_size_get(Eo *obj EINA_UNUSED, ColourableSquare_Data *self) 42_ns_colourablesquare_size_get(Eo *obj EINA_UNUSED, ColourableSquare_Data *self)
43{ 43{
44 DBG("_colourablesquare_size_get() => %d\n", self->size); 44 DBG("_ns_colourablesquare_size_get() => %d\n", self->size);
45 return self->size; 45 return self->size;
46} 46}
47 47
48static void 48static void
49_colourablesquare_size_print(Eo *obj EINA_UNUSED, ColourableSquare_Data *self) 49_ns_colourablesquare_size_print(Eo *obj EINA_UNUSED, ColourableSquare_Data *self)
50{ 50{
51 DBG("_colourablesquare_size_print() ==> %d\n", self->size); 51 DBG("_ns_colourablesquare_size_print() ==> %d\n", self->size);
52} 52}
53 53
54static void 54static void
55_colourablesquare_size_set(Eo *obj EINA_UNUSED, ColourableSquare_Data *self EINA_UNUSED, int size) 55_ns_colourablesquare_size_set(Eo *obj EINA_UNUSED, ColourableSquare_Data *self EINA_UNUSED, int size)
56{ 56{
57 DBG("_colourablesquare_size_set(%d)\n", size); 57 DBG("_ns_colourablesquare_size_set(%d)\n", size);
58} 58}
59 59
60#include "colourablesquare.eo.c" 60#include "ns_colourablesquare.eo.c"
diff --git a/src/examples/eolian_cxx/colourablesquare_cxx.cc b/src/examples/eolian_cxx/colourablesquare_cxx.cc
index 6908f732fd..b4c92b8e88 100644
--- a/src/examples/eolian_cxx/colourablesquare_cxx.cc
+++ b/src/examples/eolian_cxx/colourablesquare_cxx.cc
@@ -12,11 +12,11 @@
12extern "C" 12extern "C"
13{ 13{
14#include "colourablesquare_stub.h" 14#include "colourablesquare_stub.h"
15#include "colourable.eo.h" 15#include "ns_colourable.eo.h"
16#include "colourablesquare.eo.h" 16#include "ns_colourablesquare.eo.h"
17} 17}
18 18
19#define MY_CLASS COLOURABLESQUARE_CLASS 19#define MY_CLASS NS_COLOURABLESQUARE_CLASS
20 20
21static efl::eina::log_domain domain("colourablesquare"); 21static efl::eina::log_domain domain("colourablesquare");
22 22
diff --git a/src/examples/eolian_cxx/colourablesquare_stub.c b/src/examples/eolian_cxx/colourablesquare_stub.c
index 276130c762..b352b229b7 100644
--- a/src/examples/eolian_cxx/colourablesquare_stub.c
+++ b/src/examples/eolian_cxx/colourablesquare_stub.c
@@ -7,6 +7,6 @@
7#include "Eo.h" 7#include "Eo.h"
8 8
9#include "colourablesquare_stub.h" 9#include "colourablesquare_stub.h"
10#include "colourable.eo.h" 10#include "ns_colourable.eo.h"
11#include "colourablesquare.eo.h" 11#include "ns_colourablesquare.eo.h"
12#include "colourablesquare.eo.c" 12#include "ns_colourablesquare.eo.c"