Commit Graph

264 Commits

Author SHA1 Message Date
Vitor Sousa a85348b70b efl js: Update Javascript binding to compile with new Eolian API
Reword test method names to check naming convention.
2016-03-18 17:46:38 -03:00
Stefan Schmidt e981bfc4e8 cxx: follow eoid to eo_self rename in cxx generator and bindings
Bringing efl back to a building state with cxx enabled.
2016-03-16 21:11:17 +01:00
Tom Hacohen 72c6236038 Revert "cxx: Migrate C++ binding to the new eo_add syntax"
This reverts commit 48f62ad686.
2016-03-11 12:29:03 +00:00
Vitor Sousa 7973126165 eo_cxx: correct constness of basic Eo C++ wrapper functions 2016-03-09 18:52:10 -03:00
Vitor Sousa 48f62ad686 cxx: Migrate C++ binding to the new eo_add syntax 2016-03-09 15:46:19 -03:00
Vitor Sousa f1a6ff2956 eo_cxx: Fix unused parameter warning when no constructor is required
Test Plan: compile elm

Reviewers: stefan_schmidt

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3778
2016-03-08 10:49:36 -03:00
Stefan Schmidt c634239b63 cxx bindings: get rid of Eo_Event2
This follows the change in EO and fixes some build breaks.
2016-03-07 14:18:56 +01:00
Vitor Sousa 9cbda57bf0 eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
2016-03-03 16:05:40 -03:00
Felipe Magno de Almeida 5c7d78d104 eolian-cxx: Partial fix for generation without eo_do 2016-03-03 16:05:40 -03:00
Daniel Kolesa 863212f84a eolian: more old type api removals 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8614ee1e91 elua: update eolian bindings to new typedecl api 2016-03-03 18:58:11 +00:00
Felipe Magno de Almeida d40b046685 eolian-cxx: Fix C++ events with new Eo_Event_Cb signature 2016-02-29 11:01:04 -03:00
Daniel Kolesa 30bc1d285b eolian: allow silencing of type errors in validation
This allows generators to silence type errors in validation in order
to reduce duplicate error messages when generating multiple files.
Also adjusted the C generator to only emit type errors when generating
Eo header files.

@feature
2016-02-10 16:05:07 +00:00
Felipe Magno de Almeida 3a33ef45bd eina-cxx: Fix instantiating eina domain without eina_init
Added eina_init to eina_domain initialization as to force eina_init to
happen before initialization of global eina domains. This fixes
eolian_js domain in src/bin/eolian_js.
2016-02-03 21:18:08 -02:00
Daniel Kolesa c95350016d eolian: add parsing and generation of hot events
Unfreezable events can now be marked @hot.

@feature
2016-02-02 17:55:01 +00:00
Lauro Moura bc67b215ac js: fix binding after namespace change of connector
Summary:
Update register function after change introduced in
the commit dc56052150
changed the native API.

@fix

Reviewers: q66, cedric, felipealmeida

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-07 16:27:57 -08:00
Stefan Schmidt 2fef60b718 eina_js: Fix documentation generation
Summary:
Fix doxygen's documentation generation.
A bug in doxygen makes it fail with the _libv8_property_callback_info_test
class.
We put a #ifndef EFL_DOXYGEN around it to avoid it being seen by doxygen.

Add a NOTE comment about this.

ref T3005

@fix

Test Plan: make doc must succeed

Reviewers: felipealmeida, stefan_schmidt

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3534
2016-01-05 17:28:29 +01:00
Felipe Magno de Almeida d05a14671e eo-cxx: Removed pessimization use of std::move
Local variables, when returned, are already moved or copy-elised. The
use of std::move removes the possibility of copy-elision, making it
possibly slower. Removed the wrong std::move use.
2015-12-29 11:38:50 -02:00
Felipe Magno de Almeida a14b4bf497 eldbus-cxx: Fixed infinite recursion with post-increment operator
The pre-increment operator was being defined twice and being
implemented as a post-increment. Modified declaration to be
post-increment as it was supposed to be.
2015-12-29 11:37:27 -02:00
Felipe Magno de Almeida 7033cb5d83 eina-cxx: Fixed wrong uses of using directive
Changed using directive for types to typedef's to bring their definitions from base type. Avoiding compilation errors with clang.
2015-12-29 11:36:11 -02:00
Felipe Magno de Almeida a3db1dddd3 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
2015-12-23 23:59:40 -02:00
Daniel Kolesa b3867ce395 eolian: turn "undefined type" into its own EOLIAN_TYPE 2015-11-19 14:05:16 +00:00
Daniel Kolesa beacff7959 elua: add eolian_type_aliased_base_get to lua bindings 2015-11-19 13:19:22 +00:00
Felipe Magno de Almeida c2132a0666 eolian-cxx: Fix inheritance from C++ classes after Eo ABI breakage
Fixed removal of op field from Eo_Op_Description and removed
unnecessary use of internal Eo API to implement the Eo API function
for theh constructor of the inherited class.
2015-09-30 17:55:16 -05:00
Tom Hacohen 37f84b7e96 Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway
it's a good opportunity to drop this.

This may cause a slight performance issues with legacy events, such as
smart callbacks. This shouldn't really be a problem as we've migrated away from
them. If it does, we need to migrate the remaining parts. Only relevant
for callbacks that are added before the classes are created, which
shouldn't be possible except for smart, only for old evas callbacks.
2015-09-28 15:09:16 +01:00
Stefan Schmidt b94f9254b1 bindings/eina_cxx: add eina_cxx group as link to main page to find API docs 2015-08-11 14:04:51 +02:00
Daniel Kolesa 825349c7b8 eolian: improve function_full_c_name_get API
It's now generalized to work properly with legacy functions
as well as correctly append suffixes. Thus, it can be easily
used with the documentation generator and in other places.

@feature
2015-07-08 12:10:20 +01:00
Daniel Kolesa cd7a78f2a5 eolian: add API: eolian_declaration_get_by_name
Sorry for last minute new API, but this one is necessary to implement
proper verification of references in docs, which I would like to have
in 1.15. It allows you to retrieve any kind of declaration by full
namespace, so that you can check for an existence of an Eolian decl,
rather than checking every type individually.

@feature
2015-07-07 10:57:24 +01:00
Vitor Sousa dae35333fd eolian_cxx: Use C++ wrappers instead of native types as parameters
Summary:
Using C++ wrapper types in the signature of methods of the generated
classes.
Now, when the type is an Eo type defined in Eolian, eolian_cxx will detect
it and use the equivalent C++ wrapper.

Types defined in Eolian no longer need to be specified in the lookup table,
so removed them from there.

Disable wrapping of non-const char*. The current wrapper (unique_ptr) is
not suited for some required operations like ownership acquisition from
C code.

Fix constructing properties that only have the "set" method.

Fix translation of non-const parameters.

Modified Makefiles to allow proper inclusion of evas_cxx headers required
by some tests and examples.

Move one auxiliary function to another reader to make it more accessible.

@feature

Reviewers: felipealmeida, q66, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2752
2015-06-24 15:23:01 +01:00
Daniel Kolesa 51f49642b4 eolian: remove the outdated and ugly database printer (needs rework) 2015-06-17 14:26:07 +01:00
Daniel Kolesa cf2e94e11b elua: unexpose "old" documentation api from eolian bindings 2015-06-10 17:36:33 +01:00
Daniel Kolesa 944e9eb5b0 elua: bind recent eolian APIs to eolian lua api 2015-06-10 17:30:42 +01:00
Daniel Kolesa 934cfb621c eo_cxx: remove unused parameter 2015-05-29 11:10:41 +01:00
Tom Hacohen 52d998f475 Eo base: Remove the free_func parameter from key_data_set.
This was not really useful and against the Eolian guidelines.
While I promised I won't break things until the 27th, I was ill
(still am), so I'm giving myself a 1 day pass. :P
2015-05-28 17:47:59 +01:00
Daniel Kolesa 3aabb41d1d elua: make eo bindings work with the new generated format 2015-05-28 15:54:35 +01:00
Daniel Kolesa a7dea04b26 eolian: merge eo_file_parse and eot_file_parse 2015-05-22 17:32:21 +01:00
Vitor Sousa f45f3e9f13 eina_cxx, eldbus_cxx: Fix perfect forwarding of arguments
Summary:
Changed some std::move clauses to std::forward<Type> in order to allow
perfect forwarding.

@fix

Reviewers: felipealmeida, JackDanielZ, tasn, q66

Reviewed By: q66

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2508
2015-05-22 10:31:18 +01:00
Daniel Kolesa 54974b074b eolian: remove const_get/const_set support
This was made obsolete by per-accessor values. It was
also hacky and i've wanted to remove it for a while.
2015-05-20 18:05:45 +01:00
Daniel Kolesa 6b91b1bd12 eolian: allow keys/values in property get/set
Sometimes it is necessary to specify a different set of values for a
getter or a setter. This commit allows such specializations. This also
renders @const_get and @const_set useless (soon to be removed).

To function correctly, this required adjustment of several public APIs
as well as deprecation of eolian_function_parameter_get_by_name.

This function was not used in any generator and was pretty much
useless in the first place, so it was removed.

@fix
2015-05-20 17:42:44 +01:00
Daniel Kolesa 5c199857c9 eolian: distinguish between get/set for property keys/values retrieval 2015-05-20 17:03:37 +01:00
Daniel Kolesa 957a89168b eolian: precompute all enum field values (faster runtime, constness) 2015-05-13 18:10:02 +01:00
Daniel Kolesa d2365e6267 eolian: allow forced retrieval of enum field values 2015-05-13 17:57:03 +01:00
Daniel Kolesa ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Felipe Magno de Almeida eaa6961378 eina-cxx: Fix compilation error on clang
Clang implicitly deletes the default-constructor on range_ptrlist, which must be explicitly defined.
2015-04-14 01:06:57 -03:00
Vitor Sousa ce36f0be93 eolain_cxx: Fix C++ support for new Eolian features
Added optional constructor methods for C++ Eolian wrappers.
Changed the interface of wrappers' main constructors.
If there are optional constructor methods they should be passed as variadic
template argument at the end of the constructor.
To support variadic template arguments, the optional "parent" parameter is
now the first parameter and there is another constructor without the
"parent" parameter.

Checking for @optinal and @nullable attributes instead of @nonull.
Now @nonull is the default, and eina::optional is only used when @optional
or @nullable attribute is specified.

The names of constructor methods no longer have the class name prefixed.

Added unit tests for checking the binding of optional constructors.
Added new .eo file to be used in the test.

Changed the generated documentation of constructors.

Changed the efl::eo::inherit accordingly, to address these new features.
Now the constructor methods should be explicit called in the
efl::eo::inherit constructor, which will receive them via variadic
template arguments.

Added another constructor to efl::eo::inherit for passing the parent
object.

Updated some tests and examples to follow the new interface.

Removed some code that is no longer necessary.

Also, fix Eolian C++ support for constructing properties. fix
assertion when parsing constructing properties.

Now if a property is a constructing property eolian_cxx will generate a
constructor method that have the property name (without the "_set" suffix).
2015-04-14 01:06:57 -03:00
Vitor Sousa 72604d4957 eina_cxx: Add methods to get an eina::accessor from an eina::ptr_array
eina::ptr_array was missing the methods to get an eina::accessor from it.
Added these methods.
2015-04-14 01:06:57 -03:00
Vitor Sousa 5619c6bc8d eina_cxx: Fix compatibility between eina::optionals of convertible types
Now an eina::optional that wraps a specific type can be constructed or
have content assigned to it using another eina::optional that wraps a
different type, provided that the two wrapped types are convertible
between each other.

Added "disengage" member function to be able to disengage a R-value
eina::optional of different contained type.
It also adds for increased convenience.

Fix constructing an engaged eina::optional from an disengaged one.

Fix small assertion problem of trying to construct an eina::optional
already flagged as engaged.

Fix incorrect use of std::move. Changed it to std::forward.

Added constexpr property for trivial constructors.

Added auxiliary function "make_optional".

Added unit test to check compatibility between eina::optionals of
convertible types.
2015-04-14 01:06:57 -03:00
Vitor Sousa 5043dcb830 eo_cxx: Fix signal_connection disconnect crash
Fixed crash when disconnecting event inside of its own event callback.
Instead of deleting the callback object immediately during disconnection
(which causes the callback to be freed), the deletion is now scheduled
for later (using ecore_main_loop_thread_safe_call_async).

Updated some Makefiles to proper include ecore now that it is used in
all event wrappers.

Added a unit test to verify crashes under these circumstances.
2015-04-14 01:06:57 -03:00
Vitor Sousa 3b441cdf4a ecore_cxx: Fix perfect forward of callback argument 2015-04-14 01:06:57 -03:00
Vitor Sousa d530389898 eolian_cxx: Add protected methods and events to C++ wrappers and fixes
Using eina::string_view in eolian generated interfaces (instead of
std::string) to allow lightweight passing of both C strings and C++
std::string.

Also, No longer using eina::optional in generated headers for types
that already implements the concept of null state (like Eo wrappers
and eina_accessor).

Also fix allocating callback objects require by class methods
(i.e. static) in static vectors so the memory will be freed when the
programs exit.

Added a new test case for testing callbacks on class methods.

Moved method definitions and supplementary code from generated C++
wrappers to auxiliary header file (.eo.impl.hh) generated together
with the main ".eo.hh" file. Updated Makefiles to list such files in
the compilation and cleanup processes. Updated .gitignore to include
these new generated files.

Made general adjustments on the documentation of generated C++ wrappers

Added "PREDEFINED" preprocessor macro definition in the Doxyfile.in in
order to make some adjustments for better documentation in the C++
generated headers.  Excluding generation of documentation for classes
in the "eo_cxx" namespace (the namespace for "abstract" eolian C++
wrappers).  Now generating the documentation for the events too.
Hiding some auxiliary code from being documented. Some aesthetic
adjustments for generated white space. Generate documentation for the
main constructor of C++ wrappers and added auxiliary grammars to list
parameters names.
2015-04-14 01:06:57 -03:00