Commit Graph

414 Commits

Author SHA1 Message Date
Daniel Kolesa 7da0549970 eolian: make eolian_file_parse return unit 2017-05-30 17:15:53 +02:00
Lauro Moura 52d2681869 efl_js: Export efl.Loop 2017-02-22 18:56:30 -03:00
Lauro Moura 659edb609a efl_js: Use efl_add_ref for saner refcount.
efl_add was messing up the refcount in objects with parents on the JS
side.
2017-02-22 18:56:30 -03:00
Lauro Moura 26f6254225 js: Raise exception to js instead of crashing 2017-02-22 18:56:30 -03:00
Lauro Moura 4f327dc04e efl_js: Update register functions. 2017-02-22 18:56:30 -03:00
Ivan Furs 808fcf4dae eina_file: add eina_file_unlink
Test Plan: split  D4423 - unlink

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, NikaWhite, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric, vtorri, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4485

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Daniel Kolesa 95181f2d36 eolian: move base function doc API into implements
This allows us to unify retrieval of docs for both regular and
overridden funcs without having two separate APIs. It's currently
missing validation and docgen is still not adjusted properly for
it either, but at least there's this. Enables retrieval of docs
for overridden funcs by default as well.
2017-01-19 15:09:07 +01:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Daniel Kolesa 35c5e89269 eolian: remove/add APIs and clean up implements system
As there is no need to have separate is_auto, is_empty and
is_pure_virtual for functions and implements (each function has
its own base implement by default) I removed the function ones.
Instead, I added a way to retrieve a function's base implement
so that you can instead do the checks on the implement even when
you only have the function.

I also moved base implement build directly into the parser instead
of the database filler. That allows for significant cleanup. I
also removed distinction of implement pointers in Eolian_Function
for get and set as implements now always contain an entire thing
so the pointer was always the same anyway.

Things should still behave more or less the same, but ordering
of generated functions has changed because ordering of implements
has changed.
2017-01-16 15:55:06 +01:00
Daniel Kolesa 692ae7adb6 eolian: use consistent pure_virtual naming in API
Previously one API used just virtual (incorrect) and one used
virtual_pure (which just sounds weird). So unify with a single
name, pure_virtual, similar as in other lanugages.

This does not change eo file syntax yet.
2017-01-13 15:40:29 +01:00
Daniel Kolesa a70645e154 eolian: consistent and cleaner error values from APIs
Now all error/unknown/etc values returned from APIs are zero,
previously it was a mix of zeroes and minus ones. Also, some
enums that had no error/invalid value before have one now, which
allows for better distinction between what is an error and what
is an intended result.
2017-01-13 15:26:05 +01:00
Daniel Kolesa baaa482ebf eolian: fine-grained is_auto/is_empty for implements 2017-01-11 19:26:21 +01:00
Felipe Magno de Almeida ae822a396c eina-cxx: Add visit_unsafe to eina::variant and make ~variant possibly noexcept
visit_unsafe member function visits the variant but assumes the
pre-condition that the variant is not empty. This avoids the
possibility of throwing an exception when the destructors
of the types used in variant are also guaranteed to be
noexcept.

CID 1367508
2016-12-20 15:33:57 -03:00
Felipe Magno de Almeida 3704173017 eina-cxx: Add move constructor and move assignment operator for eina::variant
CID 1362797
2016-12-20 15:26:35 -03:00
Daniel Kolesa c813e94606 eolian: unary expr eval for floats and add a signed number mask
This adds a new mask for all signed numbers (sint + float) and
fixes unary expr evaluation for floats, as well as fixes eval
error messages.
2016-12-14 18:23:16 +01:00
Daniel Kolesa 2f5db8c7d5 docgen: migrate to new Eolian-provided tokenizer 2016-12-09 17:19:03 +01:00
Daniel Kolesa e8d1ddd86c elua: add bindings to new Eolian APIs 2016-12-08 17:20:22 +01:00
Felipe Magno de Almeida b06d2510de eolian-js: Fix compilation of JavaScript binding 2016-11-29 16:43:09 -02:00
Daniel Kolesa 8002b3b24e eolian: remove parsing of pointers and the corresponding APIs
Everything should be done via the new ptr() system now.
2016-11-10 16:20:19 +01:00
Cedric BAIL 90c7a8a680 bindings: remove Eina_Promise reference from JS binding. 2016-11-07 13:43:11 -08:00
Cedric BAIL 6ee17d8f2d bindings: remove Eina_Promise from C++ bindings. 2016-11-07 12:03:55 -08:00
Felipe Magno de Almeida 137dd4864d eina-cxx: eolian-cxx: Fix correct usage of is_eolian_object traits 2016-11-03 17:59:20 -02:00
Daniel Kolesa f399e77a92 eolian: rename is_ref API to is_ptr to match syntax 2016-11-03 14:22:21 +01:00
Felipe Magno de Almeida a09ad5af7f js: Fix calling setAlignedInternalPointerField without a aligned value 2016-10-25 15:43:19 -02:00
Felipe Magno de Almeida 4cd2bd8a66 js: Fix Makefile location and linking of efl.node and tests 2016-10-25 15:43:19 -02:00
Daniel Kolesa 82ef73ca18 eolian: remove type silencing stuff entirely
this was useful during transition, but not anymore
2016-10-25 18:02:23 +02:00
Felipe Magno de Almeida 297415cc53 js: Fix compilation of new data types in JS binding 2016-10-25 12:23:34 -02:00
Lauro Moura 500ed1e40b efl_js: Export Canvas Object and Group 2016-10-25 12:23:34 -02:00
Lauro Moura 611498f035 ecore_js: Add missing HandleScope to addTimeline 2016-10-25 12:23:34 -02:00
Lauro Moura 620454e43d efl_js: Enable Ethumb support for Elm. 2016-10-25 12:23:34 -02:00
Lauro Moura 508edf78c6 efl_js: Update after eo/efl api changes 2016-10-25 12:23:34 -02:00
Lauro Moura 4f52588b3c efl_js: Update JS examples
Changing imports, functions, etc.

Also export "cast" function for all eolian_js generated classes.
2016-10-25 12:23:34 -02:00
Lauro Moura c08eedfd11 eo_js: Instead of abort, throw an Exception
* When the constructor fails
* On cast error.
2016-10-25 12:23:34 -02:00
Lauro Moura 7869eeed53 eina_js: Fix log color persistence.
The c_ptr() passed to eina_log_register was being lost when saving the string
into the map.
2016-10-25 12:23:34 -02:00
Lauro Moura ae3c74d879 efl_js: Update registration functions
After the Elm -> Efl.Ui and other changes.

Also add extern C guards around private header (elm_widget).
2016-10-25 12:23:34 -02:00
Lauro Moura 4ce9a42456 eo_js: Update event callback after return removal. 2016-10-25 12:23:34 -02:00
Felipe Magno de Almeida 17da4b5b9d eo-cxx: Fix compilation and warnings in clang 2016-10-20 04:52:18 -02:00
Jean-Philippe Andre 7c2259adc8 elm: Remove elm app client/server implementation & APIs
This removes EO APIs related to an unmaintained client/server
model for applications. The reasons for this removal are the
following:
- unused
- no support in E
- relies on dbus as the sole transport layer
- unmaintained since the original patches
- only EO API (iow: beta, never released API)

I've also never seen the test cases (in elementary_test) actually
work.

According to Gustavo (k-s), the original author of this feature
is not involved in EFL at the moment, and unlikely to be in the
near future.

Note that terminology has in the past used those APIs when it
was still using some beta EO APIs. This code is now long gone,
removed in terminology commit 3ffcbadd6f9881472db6 (2014/12/13,
for version 0.8.0)

If someone wants to step in and maintain the implementation,
protocol and (EO) API, then feel free to revert this patch
and revive the feature. But it will need to be more solid than
this implementation.
2016-10-20 14:55:48 +09:00
Felipe Magno de Almeida 88419e5e87 eina-cxx: Implement aligned_union for GCC 4.9 2016-09-22 19:27:56 -03:00
Felipe Magno de Almeida 10293e6520 eo-cxx: Add progress to future and promise 2016-09-20 23:30:29 -03:00
Felipe Magno de Almeida 5df0b6765b eo-cxx: Replace for ENOMEM to avoid warnings 2016-09-14 00:55:51 -03:00
Felipe Magno de Almeida 5e735fe762 eo-cxx: Fix race promises 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida 3339f03964 eo-cxx: Add promise type 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida e0b444f95f eo-cxx: Add race promises through eina::variant 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida 2bdad3f1d6 eo-cxx: race for promises 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida dbed78ad3b eina-cxx: Moved variant to eina C++ 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida a63cfcafc7 eolian-cxx: Implement future template class for C++ 2016-09-11 23:44:05 -03:00
Stefan Schmidt 6bc1dc6d83 cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation
Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation
warnings.
2016-09-05 10:39:24 +02:00
Jean-Philippe Andre b4e20fd632 js: Switch to Efl_Event
I haven't tested the compilation... but I guess this can't hurt.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre ff0952abda cxx: Fix compilation (Efl_Event) 2016-09-01 11:57:43 +09:00
Felipe Magno de Almeida f8a6568d5c eolian-cxx: Fix compilation break with Eo rename to EFL 2016-08-15 15:14:53 -03:00
Felipe Magno de Almeida f4a90dcde2 eolian-cxx: Fix compilation break from changes in Eo nomenclature
Rename of classes and function calls in generated code and C++ headers
2016-08-11 16:24:15 -03:00
Felipe Magno de Almeida d2dd1e744a eo-cxx: Fix C++ use of new _eo_add_end signature 2016-07-12 17:28:38 -03:00
Daniel Kolesa 41abda37f6 elua: event method fixes in eolian bindings 2016-07-12 11:09:05 +01:00
Daniel Kolesa 96b960c953 elua: support is_restart for events in eolian api 2016-07-07 15:15:03 +01:00
Felipe Magno de Almeida 1c402f62a9 eolian-cxx: Fix generation for ref generic_values and Eolian classes 2016-07-05 16:32:11 -03:00
Daniel Kolesa ab2e608239 eolian: add support for static and terminated arrays
Adds two new type types, STATIC_ARRAY and TERMINATED_ARRAY. Static arrays are
only allowed as struct members right now - they translate to regular C static
arrays (allowing them elsewhere wouldn't be good, as C isn't very good at
working with the size information). Terminated arrays are basically sequences
of data terminated at the end. The base type of static arrays can be any type
that is not marked ref (explicit ref may get allowed later). The base type of
terminated arrays has the same restriction plus that it has to be either
implicitly reference type (i.e. translating to pointer in C), integer type
or a character. In case of ref types, the terminator is NULL. In case of
integer types, the terminator is a zero. In case of character types, the
terminator is also a zero (null terminator like C strings).

@feature
2016-06-30 16:59:21 +01:00
Felipe Magno de Almeida b09c1f8093 eolian-cxx: Added stringshare 2016-06-21 16:35:09 -03:00
Felipe Magno de Almeida 9be8f029af eolian-cxx: Remove Eina_Bool from event function wrapper 2016-06-20 19:35:50 -03:00
Felipe Magno de Almeida b97a156ac4 eolian-cxx: Work with @inout parameter of void type 2016-06-16 21:48:07 -03:00
Felipe Magno de Almeida 7e0692b5f3 eolian-cxx: Remove warning about unused parameter 2016-06-15 17:49:56 -03:00
Felipe Magno de Almeida 512fb7f39b eina-cxx: Add overload for std::nullptr_t to stringview 2016-06-15 15:50:04 -03:00
Felipe Magno de Almeida 8906998ef2 eolian-cxx: Add support for ref parameters and correct ownership handling 2016-06-14 22:44:02 -03:00
Felipe Magno de Almeida e5884c95fa eolian-cxx: Fix C++ compilation for lacking .eo files being generated 2016-06-13 01:17:18 -03:00
Daniel Kolesa 33c147f6d4 eolian: remove the unnecessary subtypes API
Inner type can now be retrieved as a base type of the type.
If the type has two inner types or more, there is a new API that allows you to
get the second inner type by calling it on the first one (same would apply to
getting third via second etc.).

This API is simpler to use and doesn't require an iterator.
2016-06-10 14:28:19 +01:00
Daniel Kolesa 375179b47f eolian: support @protected for accessors (get/set)
Previously it was only possible to set it for the whole property.

@feature
2016-06-09 16:55:24 +01:00
Felipe Magno de Almeida 343b88a735 eolian-cxx: Fix some C++ quirks that makes clang warn about 2016-06-08 12:55:19 -03:00
Daniel Kolesa b87c4f6de8 eolian: refine the ref system to suit more cases
Now references are first class (but still restricted to one level). Unlike
pointers they only mark the type instead of introducing a whole new type.
2016-06-08 15:49:09 +01:00
Daniel Kolesa 7cf7cba88e eolian: remove the c_type_named_get APIs
These have inconsistent behavior and are generally unnecessary, so I'm
removing them. Use the c_type_get funcs instead.
2016-06-06 15:50:15 +01:00
Daniel Kolesa 9752c44a48 eolian: add a new references system to help replace pointers
It's now possible to mark struct fields and function params as "references",
which causes them to become pointers in C (in bindings, they become whatever
is necessary). They're not a part of the type and are much more restricted
than pointers, allowing bindings to be easier. This system will be gradually
utilized and expanded as required.

@feature
2016-06-06 15:28:10 +01:00
Felipe Magno de Almeida b2a07ca150 eo-cxx: Remove commented headers 2016-06-06 04:09:23 -03:00
Felipe Magno de Almeida 2a3d7860db eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Felipe Magno de Almeida 4d1b3191d9 eina-cxx: Add placeholder for futures in C++ binding 2016-06-06 02:50:36 -03:00
Felipe Magno de Almeida 710f97580a eina-cxx: Fix wrongful operator++ for iterator and docs 2016-06-06 02:50:13 -03:00
Felipe Magno de Almeida 7e1ce2d33d eina-cxx: Add c_str() to string_view 2016-06-06 02:49:47 -03:00
Felipe Magno de Almeida fec589cbdc eina-cxx: Restrict templated constructor 2016-06-06 02:49:28 -03:00
Felipe Magno de Almeida a1f2d03ecb eina-cxx: Add optional specialization for pointer types 2016-06-06 02:49:00 -03:00
Felipe Magno de Almeida 396fd5e3e1 eina-cxx: Added crange_array template typedef 2016-05-26 16:46:23 -03:00
Felipe Magno de Almeida 6e23780bb1 eolian-cxx: Fix generation of complex types in C++ binding
Fixed generation of complex types in C++ binding, with tests. This
problem came after the removal of the pointer types for top-level
complex types.
2016-05-23 17:34:50 -03:00
Felipe Magno de Almeida e3c8b280c6 c++: Reorganized C++ binding generation
Moved all generation to a single Makefile_Cxx.am file instead of
throughout the whole project. And fixed C++ generation on Elementary
after elm merge.
2016-05-23 15:05:50 -03:00
Felipe Magno de Almeida 5d5c04fd66 js fixes 2016-05-18 17:52:47 +02:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Tom Hacohen 1f4af666e8 Eo cxx: remove leftover usage of eo_del(). 2016-05-18 09:55:30 +01:00
Carsten Haitzler 43661180f7 efl - key/data/value/obj attach to eo objects - make these properties
the key data now is a property so they come out in bindings really
nicely like:

  obj.key_data["blah"] = x;

  x = obj.key_data["blah"];

etc.
2016-05-18 02:02:45 +09:00
Felipe Magno de Almeida 535a069a23 eolian-cxx: Remove .Base requirement
Remove requirement that class can't have the same name as another
class's namespace.
2016-04-21 18:31:53 -03:00
Carsten Haitzler 5e09d1307b eo base - remove the duplicated key dels and just do eo_key_del() now
this rationalizes all the duplicated key dels (key_data, key_obj and
key_value).
2016-04-21 18:02:31 +09:00
Daniel Kolesa 525dcaa6ab eolian: fix invalid type_type mapping in lua bindings 2016-04-18 16:09:21 +01:00
Daniel Kolesa d8285ce651 eolian: fix object scope def in lua bindings 2016-04-18 13:50:28 +01:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Felipe Magno de Almeida 62841aee3c eolian: Make promise eolian generation use macros for hooks
Modify the way hooks are defined and used by promise generation in
Eolian in the Eo API.

Instead of passing macro names as parameters to EO_FUNC_BODY macros,
just re-define the actual hooks when it is needed.
2016-04-11 01:28:50 -03:00
Felipe Magno de Almeida 944e11559c eo: add before and after macro hooks for API generation functions
Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:32:04 -07:00
Felipe Magno de Almeida 8c70b9cfd1 eo-cxx: Fix warning on weak symbols with inline functions
Removed the EOAPI which is not necessary as the function is already inlined
2016-04-05 15:42:21 -03:00
Daniel Kolesa 9b845e7135 eolian: add APIs to get all things of each type 2016-03-29 15:01:17 +01:00
Daniel Kolesa b1070f9478 eolian: fix typos in symbol names in lua bindings 2016-03-29 11:13:48 +01:00
Vitor Sousa 3e7f4c1dae eina_cxx: fix Coverity warning regarding uninitialized iterator member 2016-03-21 17:30:49 -03:00
Vitor Sousa afb6646393 efl js: Add clean up callbacks to deallocate memory used in v8::External
Add several garbage collector callbacks for cleaning allocated C and C++
data used inside v8:External objects.

Fix eo_unref of already freed object in eo_js_construct_from_eo.hh.

Ensure all structs are allocated with malloc.

Add test for garbage collection.
Had to created .sh script because shebang clause do not support multiple
arguments.
2016-03-18 17:47:09 -03:00
Vitor Sousa a6025b5d27 efl js: Finish Eina_Iterator binding 2016-03-18 17:47:09 -03:00
Lauro Moura 1422e62f30 efl js: Fix naming of manual binding functions.
Also removed references to the discarded manual binding "ecore_js_file".
2016-03-18 17:47:09 -03:00
Vitor Sousa c7550b2964 eina_cxx: Add missing methods to Eina C++ wrappers
Also fix release_native_handle type error on mutable ranges.
2016-03-18 17:47:09 -03:00
Vitor Sousa fd0cf8b764 eina_cxx: Add specialized eina::iterator for Eo* wrappers
Add specialization of eina::iterator for Eo* C++ wrappers.

Specialize ibegin/iend methods in eina::list and eina::array of
Eo* wrappers to use the new eina::iterator.

Add unit test.
2016-03-18 17:47:09 -03:00