summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx/colourable_stub.h
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-07-24 16:47:35 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-07-24 19:52:23 -0300
commit3e43bb57d85ab172f0d68e42f4c94f616ebf1d3f (patch)
treeefd31e885ac5c71d1cd6015ae2ccaadbcc343411 /src/examples/eolian_cxx/colourable_stub.h
parentfb82d67ab13b12534468a39ac29eb31d0d04cee5 (diff)
eolian-cxx: Added example of Eo implementation in C++.
Instead of implementing Eo functions in C we do it in C++ simply.
Diffstat (limited to 'src/examples/eolian_cxx/colourable_stub.h')
-rw-r--r--src/examples/eolian_cxx/colourable_stub.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/examples/eolian_cxx/colourable_stub.h b/src/examples/eolian_cxx/colourable_stub.h
new file mode 100644
index 0000000000..fbf913f404
--- /dev/null
+++ b/src/examples/eolian_cxx/colourable_stub.h
@@ -0,0 +1,31 @@
1#ifndef EFL_EXAMPLE_EOLIAN_CXX_COLOURABLE_STUB_H
2#define EFL_EXAMPLE_EOLIAN_CXX_COLOURABLE_STUB_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8struct _Colourable_Data
9{
10 int r;
11 int g;
12 int b;
13};
14typedef struct _Colourable_Data Colourable_Data;
15
16void _colourable_constructor(Eo *obj, Colourable_Data *self);
17void _colourable_rgb_composite_constructor(Eo *obj, Colourable_Data *self, int r, int g, int b);
18void _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb);
19void _colourable_print_colour(Eo *obj, Colourable_Data *self);
20void _colourable_print_colour(Eo *obj, Colourable_Data *self);
21int _colourable_colour_mask(Eo *obj, Colourable_Data *self, int mask);
22void _colourable_composite_colour_get(Eo *obj, Colourable_Data *self, int* r, int* g, int* b);
23void _colourable_composite_colour_set(Eo *obj, Colourable_Data *self, int r, int g, int b);
24int _colourable_colour_get(Eo *obj, Colourable_Data *self);
25void _colourable_colour_set(Eo *obj, Colourable_Data *self, int rgb);
26
27#ifdef __cplusplus
28}
29#endif
30
31#endif // EFL_EXAMPLE_EOLIAN_CXX_COLOURABLE_STUB_H