summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx/colourable.c
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-06-19 23:54:36 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-06-19 23:54:36 +0100
commitbdd5cf5219a24a7ed46d54cbc13a52ff6851e5fe (patch)
tree6e5c0a006479fda7154b9212117247a489651022 /src/examples/eolian_cxx/colourable.c
parent35f0cd2680653b2a2bf1f7e430a91f78b7b792bb (diff)
Eolian-Cxx: Corrected the syntax of the .eo examples and added missing includes.
Summary: Just updating the .eo's to match the new syntax. Reviewers: cedric, q66, tasn, JackDanielZ Reviewed By: q66 CC: felipealmeida, smohanty, woohyun, cedric Differential Revision: https://phab.enlightenment.org/D1067
Diffstat (limited to 'src/examples/eolian_cxx/colourable.c')
-rw-r--r--src/examples/eolian_cxx/colourable.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index 3e289583dd..9bbcce24c8 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -40,7 +40,7 @@ typedef struct _Colourable_Data Colourable_Data;
40 Colourable_Data *wd = eo_data_scope_get(o, MY_CLASS) 40 Colourable_Data *wd = eo_data_scope_get(o, MY_CLASS)
41 41
42void 42void
43_colourable_constructor(Eo *obj, Colourable_Data *self) 43_colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
44{ 44{
45 if(!_colourable_impl_logdomain) 45 if(!_colourable_impl_logdomain)
46 { 46 {
@@ -52,7 +52,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self)
52} 52}
53 53
54void 54void
55_colourable_destructor(Eo *obj, Colourable_Data *self) 55_colourable_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
56{ 56{
57 if(_colourable_impl_logdomain) 57 if(_colourable_impl_logdomain)
58 { 58 {
@@ -98,13 +98,13 @@ _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
98} 98}
99 99
100void 100void
101_colourable_print_colour(Eo *obj, Colourable_Data *self) 101_colourable_print_colour(Eo *obj EINA_UNUSED, Colourable_Data *self EINA_UNUSED)
102{ 102{
103 DBG("_colourable_print_colour() ==> 0x%2.x 0x%2.x 0x%2.x\n", self->r, self->g, self->b); 103 DBG("_colourable_print_colour() ==> 0x%2.x 0x%2.x 0x%2.x\n", self->r, self->g, self->b);
104} 104}
105 105
106int 106int
107_colourable_colour_mask(Eo *obj, Colourable_Data *self, int mask) 107_colourable_colour_mask(Eo *obj EINA_UNUSED, Colourable_Data *self, int mask)
108{ 108{
109 int masked_rgb = 109 int masked_rgb =
110 (((self->r << 16)& 0x00ff0000) | 110 (((self->r << 16)& 0x00ff0000) |
@@ -115,7 +115,7 @@ _colourable_colour_mask(Eo *obj, Colourable_Data *self, int mask)
115} 115}
116 116
117void 117void
118_colourable_composite_colour_get(Eo *obj, Colourable_Data *self, int* r, int* g, int* b) 118_colourable_composite_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self, int* r, int* g, int* b)
119{ 119{
120 *r = self->r; 120 *r = self->r;
121 *g = self->g; 121 *g = self->g;
@@ -125,7 +125,7 @@ _colourable_composite_colour_get(Eo *obj, Colourable_Data *self, int* r, int* g,
125} 125}
126 126
127void 127void
128_colourable_composite_colour_set(Eo *obj, Colourable_Data *self, int r, int g, int b) 128_colourable_composite_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int r, int g, int b)
129{ 129{
130 self->r = r; 130 self->r = r;
131 self->g = g; 131 self->g = g;
@@ -136,7 +136,7 @@ _colourable_composite_colour_set(Eo *obj, Colourable_Data *self, int r, int g, i
136} 136}
137 137
138int 138int
139_colourable_colour_get(Eo *obj, Colourable_Data *self) 139_colourable_colour_get(Eo *obj EINA_UNUSED, Colourable_Data *self)
140{ 140{
141 int rgb = 141 int rgb =
142 ((self->r << 16)& 0x00ff0000) | 142 ((self->r << 16)& 0x00ff0000) |
@@ -147,7 +147,7 @@ _colourable_colour_get(Eo *obj, Colourable_Data *self)
147} 147}
148 148
149void 149void
150_colourable_colour_set(Eo *obj, Colourable_Data *self, int rgb) 150_colourable_colour_set(Eo *obj EINA_UNUSED, Colourable_Data *self, int rgb)
151{ 151{
152 self->r = (rgb & 0x00ff0000) >> 16; 152 self->r = (rgb & 0x00ff0000) >> 16;
153 self->g = (rgb & 0x0000ff00) >> 8; 153 self->g = (rgb & 0x0000ff00) >> 8;
@@ -156,10 +156,4 @@ _colourable_colour_set(Eo *obj, Colourable_Data *self, int rgb)
156 return; 156 return;
157} 157}
158 158
159static void
160_user_colourable_class_constructor(Eo_Class *klass)
161{
162 DBG("_colourable_class_constructor()\n");
163}
164
165#include "colourable.eo.c" 159#include "colourable.eo.c"