summaryrefslogtreecommitdiff
path: root/src/tests/eolian_js/test_object.eo
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-09-01 15:08:49 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-12-23 23:59:40 -0200
commita3db1dddd3ba67c81118f7f2c0bc753dc8aac551 (patch)
tree233ee1be7bfa299bff560207135d20940c4e411f /src/tests/eolian_js/test_object.eo
parent1a3cb45f1cc7fdf8d481879e6bd7349d9cb0b3fa (diff)
efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files $ configure --with-js=nodejs and compile normally with: $ make $ make install To use, you have to require efl: efl = require('efl') The bindings is divided in two parts: generated and manually written. The generation uses the Eolian library for parsing Eo files and generate C++ code that is compiled against V8 interpreter library to create a efl.node file that can be required in a node.js instance. @feature
Diffstat (limited to '')
-rw-r--r--src/tests/eolian_js/test_object.eo305
1 files changed, 305 insertions, 0 deletions
diff --git a/src/tests/eolian_js/test_object.eo b/src/tests/eolian_js/test_object.eo
new file mode 100644
index 0000000..c292c24
--- /dev/null
+++ b/src/tests/eolian_js/test_object.eo
@@ -0,0 +1,305 @@
1enum Test.Enum_Ex {
2 first = 0,
3 second,
4 third,
5 fourth
6}
7
8struct Test.Struct_Ex {
9 value_int: int;
10 value_enum: Test.Enum_Ex;
11}
12
13class Test.Object (Eo.Base) {
14 legacy_prefix: null;
15 methods {
16 method_integral_in_a {
17 [[ tests integral in ]]
18 params { a: int; }
19 }
20 method_integral_out_a {
21 [[ tests integral out ]]
22 params { @out a: int; }
23 }
24 method_integral_inout {
25 [[ tests integral inout ]]
26 params { @inout a: int; }
27 }
28 method_integral_return_a {
29 [[ tests integral result ]]
30 return: int;
31 }
32 method_div_mod {
33 [[ tests mixed in, outs and result ]]
34 params {
35 a: int;
36 b: int;
37 @out quotient: int;
38 @out remainder: int;
39 }
40 return: bool;
41 }
42 method_and {
43 [[ tests boolean ]]
44 params {
45 a: bool;
46 b: bool;
47 }
48 return: bool;
49 }
50 method_modf {
51 [[ tests floating point ]]
52 params {
53 a: double;
54 @out int_part: double;
55 }
56 return: double;
57 }
58 method_uppercase {
59 [[ tests string ]]
60 params {
61 @inout str: char*;
62 }
63 }
64 method_in_null {
65 [[ tests null input ]]
66 params {
67 a: char*;
68 }
69 return: bool;
70 }
71 method_out_null {
72 [[ tests null output ]]
73 params {
74 @out a: char*;
75 }
76 return: bool;
77 }
78 method_inout_null {
79 [[ tests null output ]]
80 params {
81 @inout a: char*;
82 }
83 return: bool;
84 }
85 method_return_null {
86 [[ tests null return ]]
87 return: char*;
88 }
89 method_null {
90 [[ tests null values ]]
91 params {
92 in: char*;
93 @out out: char*;
94 @inout inout: char*;
95 }
96 return: char*;
97 }
98 method_array_at {
99 [[ tests array ]]
100 params {
101 array: array<int>*;
102 index: int;
103 }
104 return: int;
105 }
106 method_array_with_42 {
107 [[ tests parameters ]]
108 return: free(own(array<int> *), eina_array_free) @warn_unused;
109 }
110 method_array_in_array_out {
111 [[ tests parameters ]]
112 params {
113 @in a_in: array<int> *;
114 @out a_out: array<int> *;
115 }
116 }
117 method_array_of_objects {
118 params {
119 @in a_in: array<Test.Object *> *;
120 }
121 return: array<Test.Object *> *;
122 }
123 method_array_of_strings {
124 params {
125 @in a_in: array<const(char) *> *;
126 }
127 return: array<const(char) *> *;
128 }
129 method_array_of_ints {
130 params {
131 @in a_in: array<int> *;
132 }
133 return: array<int> *;
134 }
135 method_array_of_bools {
136 params {
137 @in a_in: array<bool> *;
138 }
139 return: array<bool> *;
140 }
141 method_array_of_doubles {
142 params {
143 @in a_in: array<double> *;
144 }
145 return: array<double> *;
146 }
147 method_array_of_enums {
148 params {
149 @in a_in: array<Test.Enum_Ex> *;
150 }
151 return: array<Test.Enum_Ex> *;
152 }
153 method_array_of_structs {
154 params {
155 @in a_in: array<Test.Struct_Ex> *;
156 }
157 return: array<Test.Struct_Ex> *;
158 }
159 method_list_with_42 {
160 [[ tests parameters ]]
161 return: free(own(list<int> *), eina_list_free) @warn_unused;
162 }
163 method_list_in_list_out {
164 [[ tests parameters ]]
165 params {
166 @in l_in: list<int> *;
167 @out l_out: list<int> *;
168 }
169 }
170 method_list_of_objects {
171 params {
172 @in l_in: list<Test.Object *> *;
173 }
174 return: list<Test.Object *> *;
175 }
176 method_list_of_strings {
177 params {
178 @in l_in: list<const(char) *> *;
179 }
180 return: list<const(char) *> *;
181 }
182 method_list_of_ints {
183 params {
184 @in l_in: list<int> *;
185 }
186 return: list<int> *;
187 }
188 method_list_of_bools {
189 params {
190 @in l_in: list<bool> *;
191 }
192 return: list<bool> *;
193 }
194 method_list_of_doubles {
195 params {
196 @in l_in: list<double> *;
197 }
198 return: list<double> *;
199 }
200 method_list_of_enums {
201 params {
202 @in l_in: list<Test.Enum_Ex> *;
203 }
204 return: list<Test.Enum_Ex> *;
205 }
206 method_list_of_structs {
207 params {
208 @in l_in: list<Test.Struct_Ex> *;
209 }
210 return: list<Test.Struct_Ex> *;
211 }
212 method_accessor_of_objects {
213 params {
214 @in a_in: accessor<Test.Object *> *;
215 }
216 return: accessor<Test.Object *> *;
217 }
218 method_accessor_of_strings {
219 params {
220 @in a_in: accessor<const(char) *> *;
221 }
222 return: accessor<const(char) *> *;
223 }
224 method_accessor_of_ints {
225 params {
226 @in a_in: accessor<int> *;
227 }
228 return: accessor<int> *;
229 }
230 method_accessor_of_bools {
231 params {
232 @in a_in: accessor<bool> *;
233 }
234 return: accessor<bool> *;
235 }
236 method_accessor_of_doubles {
237 params {
238 @in a_in: accessor<double> *;
239 }
240 return: accessor<double> *;
241 }
242 method_accessor_of_enums {
243 params {
244 @in a_in: accessor<Test.Enum_Ex> *;
245 }
246 return: accessor<Test.Enum_Ex> *;
247 }
248 method_accessor_of_structs {
249 params {
250 @in a_in: accessor<Test.Struct_Ex> *;
251 }
252 return: accessor<Test.Struct_Ex> *;
253 }
254 method_array_of_arrays_of_ints {
255 params {
256 @in a_in: array<array<int> *> *;
257 }
258 return: array<array<int> *> *;
259 }
260 method_list_of_lists_of_ints {
261 params {
262 @in l_in: list<list<int> *> *;
263 }
264 return: list<list<int> *> *;
265 }
266 method_array_of_lists_of_ints {
267 params {
268 @in a_in: array<list<int> *> *;
269 }
270 return: array<list<int> *> *;
271 }
272 method_list_of_arrays_of_ints {
273 params {
274 @in l_in: list<array<int> *> *;
275 }
276 return: list<array<int> *> *;
277 }
278 method_list_with_opaque_elements {
279 return: const(list<Elm.Calendar.Mark*>)*;
280 }
281 method_in_enum_return_enum {
282 params { e: Test.Enum_Ex; }
283 return: Test.Enum_Ex;
284 }
285 method_in_struct_return_struct {
286 params { e: Test.Struct_Ex *; }
287 return: Test.Struct_Ex *;
288 }
289 call_event {
290 }
291 event_repeated_event_name {
292 }
293 }
294 implements {
295 Eo.Base.finalize;
296 Eo.Base.constructor;
297 Eo.Base.destructor;
298 }
299 events {
300 test;
301 test,structarg: Test.Struct_Ex;
302 test,stringarg: const(char)*;
303 repeated,event,name;
304 }
305}