aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc
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-19 17:05:28 -0200
commit844228b4060c77a41db6232103d8a5a20cd2bf95 (patch)
tree50aa3427c700318e3932b92702aac91a3dec586d /src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc
parentEvas textblock: Fix some indentation and formatting. (diff)
downloadefl-devs/felipealmeida/js-20151219.tar.gz
efl-js: JavaScript Eolian bindingdevs/felipealmeida/js-20151219
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 'src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc')
-rw-r--r--src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc b/src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc
new file mode 100644
index 0000000000..dbdd016a34
--- /dev/null
+++ b/src/tests/eolian_js/eolian_js_test_eolian_js_binding.cc
@@ -0,0 +1,44 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Eo_Js.hh>
+#include <Eina.hh>
+#include <Eo.hh>
+
+#include <check.h>
+
+
+#include <iostream>
+#include <cassert>
+#include <fstream>
+
+typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;
+
+#include "constructor_method_class.eo.js.cc"
+#include "test_object.eo.js.cc"
+
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# define EAPI __declspec(dllimport)
+#else
+# ifdef __GNUC__
+# if __GNUC__ >= 4
+# define EAPI __attribute__ ((visibility("default")))
+# else
+# define EAPI
+# endif
+# else
+# define EAPI
+# endif
+#endif /* ! _WIN32 */
+
+void eolian_js_test_register_eolian_js_binding(v8::Handle<v8::Object> exports)
+{
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ test::register_object(exports, isolate);
+ register_constructor_method_class(exports, isolate);
+}