Commit Graph

28652 Commits

Author SHA1 Message Date
Vinícius dos Santos Oliveira 052d691232 fix compilation under Ubuntu-like systems 2015-06-02 17:30:59 -03:00
Vinícius dos Santos Oliveira 09265accc2 Initial bindings for Ecore_Idle 2015-06-02 14:14:32 -03:00
Vinícius dos Santos Oliveira 8d2fc96d1e Initial bindings for Ecore_Job 2015-06-02 14:14:10 -03:00
Vinícius dos Santos Oliveira fe5508a40d Initial bindings for Ecore_Event 2015-06-02 14:13:47 -03:00
Vinícius dos Santos Oliveira 6f53186765 Initial bindings for Ecore_Timer 2015-06-02 14:13:30 -03:00
Vinícius dos Santos Oliveira d44cf0f62f Initial binding for Ecore_Mainloop 2015-06-02 14:13:13 -03:00
Vinícius dos Santos Oliveira fca3e3aac0 Initial binding for Ecore
This commit adds the binding for the init group.
2015-06-02 14:12:49 -03:00
Vinícius dos Santos Oliveira 2200d9b5ba fix build error when nodejs is built with --shared-libuv 2015-06-02 14:12:03 -03:00
Felipe Magno de Almeida 9857af34dd eolian-js: Fixed crashes in nodejs 2015-04-13 16:38:28 -03:00
Felipe Magno de Almeida 53fb6585c2 js: Fixed conditional for JavaScript bindings in Makefiles 2015-02-10 19:28:01 -02:00
Felipe Magno de Almeida b9a4f79d76 eina-js: Fixed .gitignore's for JavaScript binding generation 2015-01-23 18:56:49 -02:00
Felipe Magno de Almeida 36c21bfb76 eina-js: Fixed running eina_js_suite.js test with compilation in-source
When compilation is done in source, require('eina_js_suite') finds eina_js_suite.js instead of eina_js_suite.node. Renamed module to avoid clashes
2015-01-23 18:51:56 -02:00
Felipe Magno de Almeida 70a523e297 eina-js: Fixed tests 2015-01-16 23:03:16 -02:00
Felipe Magno de Almeida 5f77d8639a eina-js: Fixes to iterator and value tests compatibilizataion 2015-01-13 20:23:42 -02:00
Felipe Magno de Almeida d59ec44336 eina-js: Fixed some tests for new compatibility 2015-01-13 18:49:57 -02:00
Felipe Magno de Almeida 5ce444d4ce eina-js: Add variable to define to which dependency eina-js was compiled against 2015-01-13 16:33:53 -02:00
Felipe Magno de Almeida 48f7ed1115 eina-js: Added NODE_INCLUDE_HEADER to eina-js.pc.in 2015-01-13 00:24:31 -02:00
Felipe Magno de Almeida 94a8a95710 js: Fix libuv function prototype outside #ifdef guard 2015-01-13 00:15:43 -02:00
Felipe Magno de Almeida e3d4c7fb1e Fixed node/node.h include hardcoded 2015-01-12 22:46:23 -02:00
Felipe Magno de Almeida 0167274e44 ecore: Fixed libuv integration with configure.ac conditionals 2015-01-12 21:47:37 -02:00
Felipe Magno de Almeida 7a262ec083 eina-js: Fixed header installation 2015-01-12 19:47:36 -02:00
Felipe Magno de Almeida b2da868a83 js: Fixed include V8_INCLUDE_HEADER and UV_INCLUDE_HEADER macros for dependencies 2015-01-12 19:14:50 -02:00
Felipe Magno de Almeida ecd24069cc Fixed HAVE_JS 2015-01-12 12:19:31 -02:00
Felipe Magno de Almeida 1d4145c273 Fixed tests 2015-01-11 13:35:47 -02:00
Felipe Magno de Almeida 9f8624603d Fixed logging error macro use 2015-01-11 10:53:31 -02:00
Felipe Magno de Almeida 5b3f2e5bb2 Added switch-case for EOLIAN_UNRESOLVED 2015-01-11 10:48:08 -02:00
Felipe Magno de Almeida 60062b90bd Fixed passing test path for native code and v8::String compatibility_new 2015-01-11 10:47:38 -02:00
Felipe Magno de Almeida 2e2417259a Removed wrong dependency on Eolian_JS 2015-01-10 16:06:23 -02:00
Felipe Magno de Almeida ead4804b3b js: removed wrong dependency to v8 2015-01-10 16:06:08 -02:00
Felipe Magno de Almeida 4ca7763f60 Fixed string v8 NewFromUtf8 workaround and _v8_get_context 2015-01-09 22:45:35 -02:00
Felipe Magno de Almeida 83cc60e9c2 Fixes for compatibility 2015-01-09 04:05:43 -02:00
Felipe Magno de Almeida a090a65bb3 Fixes with libv8 alone 2015-01-09 01:45:51 -02:00
Felipe Magno de Almeida c892457bc1 eina-js: Fixes for container for compatibilization 2015-01-08 16:56:24 -02:00
Felipe Magno de Almeida 9c21c73672 eina-js: Compatibilization of Eina JS containers 2015-01-08 16:02:04 -02:00
Felipe Magno de Almeida c1d3adfc6e Started testing compatibilization with nodejs 2015-01-08 00:34:29 -02:00
Felipe Magno de Almeida 583b069c5b Continue work on compatilization with v8 versions 2015-01-07 19:21:08 -02:00
Felipe Magno de Almeida ebd3514937 Started compatibilization for nodejs/libv8/libuv
Modified configure.ac to allow compatibilization for versions of libv8 etc.
2015-01-06 20:05:47 -02:00
Vinícius dos Santos Oliveira d9c64b3697 [eina_js] added binding for Eina_Iterator 2015-01-02 16:50:13 -03:00
Vinícius dos Santos Oliveira 5c59f25b21 [eina_js] fix: test was using wrong specification storage for array
Now the test is passing, but weird messages like the following are still
happenning:

    CRI<26264>: lib/eina/eina_array.c:181 eina_array_accessor_clone() *** Eina Magic Check Failed at 0x1633a30 !!!
        Input handle is wrong type
        Expected: 9876123b - Eina Array
        Supplied: 00007f1d - (unknown)
    *** NAUGHTY PROGRAMMER!!!
    *** SPANK SPANK SPANK!!!
    *** Now go fix your code. Tut tut tut!

I tracked these messages down to `eina_accessor_clone` function, called
inside the efl::eina::accessor copy constructor.

Maybe it's related to used version of the eina. Needs to rebase and
investigate further.
2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira c9f40600f0 [eina_js] Eina_Log binding finished
There's a minor improvement to do, though.

The efl::eina::stringshare "stealing" ctor has a wrong parameter type
and this prevents it from being used in the binding itself. It should
be fixed and the "TODO" comments on the code added by this commit will
help on the change.
2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira e7003affa2 [eina_js] add binding for accessor 2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira f250ae0c47 eina-js: binding for Eina_Error added
It's a function that check if an error is set and convert to a
JavaScript exception. The exception object is well specified and
useful, giving sane information about the object and following a
model similar to the one used by the Eina_Value binding.
2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira 8412ec8918 eina_js: upgraded to new v8 version. 2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira 5c9ffed096 eina_js: now eina_value JS side correctly handle errors
The only work still missing is the investigation on why tests are
failing with string types. Maybe it's a bug on eina-cxx. Needs to be
investigate.
2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira 9065b4bed8 eina_js: refactor to allow storages other than v8::Local in input args 2015-01-02 16:50:12 -03:00
Vinícius dos Santos Oliveira fcfe91bcb2 eina_js: moved implementation of register_*_value out of the headers 2015-01-02 16:50:11 -03:00
Vinícius dos Santos Oliveira 391ebe306f eina_js: initial binding for Eina_Value
There is value_cast, which can be used to convert back and forth between
efl::eina::value and v8::Local<v8::Value>. value_cast will throw
std::bad_cast if conversion fails.

There is also `register_*_value` functions to setup the global object
that act like a bridge between the C++ code and the JavaScript code.

There are several tests also.

The JavaScript code will use a non-idiomatic API which needs to manually
clean the resources. Ideally, we'd allow construction in the familiar
`new eina_value(42)` way, but the `this` JavaScript reference is exposed
to C++ code through V8 as `v8::Local<v8::Value>`, which cannot be used
to register finalizers. Finalizers support is only supported in
`v8::Persistent`.

Future work include:

- Fix failing tests.
  - Need to investigate why the code below fails:

    ```
    efl::eina::get<std::string>(efl::eina::value(std::string("Matroška")));
    efl::eina::get<efl::eina::stringshare>(efl::eina::value(std::string("Matroška")));
    ```
- The bridge between JavaScript and C++ code (`register_*_value`
  functions) isn't handling all errors as it should. Implement and add
  tests.
- Move most of the code out of the headers. Currently I'm stumbling upon
  a linking problem.
2015-01-02 16:50:11 -03:00
Felipe Magno de Almeida df7028f3f5 js: Added more compatibilization 2014-12-16 17:40:11 -02:00
Felipe Magno de Almeida 173db82492 Added header for compatibilization to v8 versions 2014-12-11 19:56:17 -02:00
Felipe Magno de Almeida ae3da5f067 Fixes argument numbers for events, removes excessive logging 2014-12-11 17:47:10 -02:00