Updated the code for the "inheritance helper" functions and classes
to be in conformance with the new wrapper architecture.
Member variable "parents" of efl::eo::eo_class struct was split in two
member variables, "ancestors" and "parents", the former containing all
Eo class ancestors and the later only the direct bases.
Changed all required files accordingly.
Check to avoid using biding string when the parameter is @out now matches
any variation of "char".
Add default constructor to efl::eo::concrete in order to allow it to be
NULL initialized in the "inheritance helper" classes.
Removed conflicting parent_set member function in the efl::eo::inherit
class.
Removed the "inheritance_extension_function" generator since it is no
longer used.
Overloaded address-of operator for C++ Eolian wrappers for implicit converting
to any ancestor pointer type when getting the object memory address.
Added new grammars to aid the creation of the pointer wrappers
responsible of doing the implicit conversions.
Added a unit test which checks the address-of overload for arbitrary classes.
Added new .eo files to be used in it.
Solved diamond inheritance problem by completely removing inheritance in
the abstract class.
All ancestors are inherited directly in the concrete class.
The algorithm that list the ancestors also avoid repetition.
Now concrete classes define methods too. This helps referring the correct
method directly by the object type (when there are methods with the same
name).
Moved the declaration and definition of constructor methods to the concrete
class, since they should not be used in derived classes.
Updated example that call "color_set".
With this model, if two ancestor classes have a method with the same name,
to call one of them from a derived class you must write the scoped name of
the member function in the wrapper.
In this case, either Evas.Object and Evas.SmartObject have a property
named "color".
Added "from_global" option to the full_name grammar too.
Using a new architecture in the generated files that simplify multiple
inheritance and allows the use of interface types as parameters.
No longer using a hand-crafted C++ header for eo_base.eo.
This file was added to the generation process.
Updated all files that are dependent in the hand-crafted eo_base
C++ header.
Now there is a class that contains the essentials functions of the former
eo::base wrapper and that is used to create (through inheritance) the
"concrete" classes for all Eo generated wrappers.
No longer binding any function or property that are protected, private or
legacy for now.
eolian_type_instance is now a struct with general information for the
whole type.
Added the new header file namespace_generator.hh to hold namespace
generation grammars.
Separated declaration and definition of Eo wrappers methods.
Referring for most objects by its full name (starting at the global
namespace ::) in the generated files.
Created additional helper grammars to avoid code replication.
Removed a TODO comment referring to a doubt about inheritance of
constructor methods.
Added a TODO comment regarding memory allocation for callbacks in static
member functions.
No longer reverting to the native type when the parameter has "@out"
direction.
Added "is_out" member variable to eolian_type class.
With that, generators can keep track of the direction of the parameters.
Also added helper functions "type_is_out" and "type_is_complex".
Created "to_native" functions in eo_cxx_interop.hh to convert binding types
from C++ arguments to the actual C function arguments.
Added static assertions in these functions to enforce compatibility
between the binding and the native type (Required by @out parameters).
Reworked the overload of the "to_c" function for eo::base derivated
objects. Now there is a overload that rely in the compatibility
between the native type and the wrapper, enabling a wrapper to be used as
an output parameter.
Added callbacks to the event EO_EV_DEL for deleting heap-allocated
function objects. This will enforce that the allocated memory,
necessary for maintaining these callable objects alive, is freed at
least when the underlaying Eo object is destroyed.
Functions and constructor methods are now able to have multiple
callback types.
Removed some unused generators, since they become inconsistent now that
functions are required to handle multiple callback types.
Allocating callback objects in the constructor methods instead of
delaying it until the final constructor is called.
Created some generators to avoid code repetition.
Now the generator parameters_forward_to_c replicate the behavior of the
generator parameters_list. The generator parameters_list was, then,
removed since it have a less intuitive name.
Added a TODO comment regarding the behaviour of simple not translating
callbacks that are not followed by a user data pointer.
The generator parameter_type was moved from "parameters_generator.hh" to
"type_generator.hh" for more consistency and convenience.
In convert.cc: Reading functions instead of implements to convert the
Eolian_Class. It avoids creation of methods that do not belong to the
class, in special it avoids calling the default constructor twice in the
generated code.
No longer generating one constructor in the C++ wrapper for each eolian
class constructor, since the correct behavior demands that all constructor
should be called. Now the wrappers have "constructor methods" that
must be called when creating a new object.
Updated test cases and examples to match the new interface. Some class
constructors and some test cases have to be removed since they were based
on the wrong assumption that constructors are mutually exclusive.
Created new generators for forwarding parameters and for looping over
the relevant parameters to the C++ wrapper executing a generic lambda.
Added a TODO comment regarding the call of constructor methods of all
base classes. Currently there is no base type with constructors, so this
situation should be discussed more.
Added a TODO comment regarding the way callback parameters are being
processed.
Added static assertion in the generated header to ensure that the wrapper
have the same size of Eo*, thus grating compatibility between these types.
Added static assertion in the generated header to ensure that the wrapper
have standard layout. This should ensure correct type sizes when dealing
with inheritance.
Created a test to ensure that eo::base and the eolian wrappers have the
same size of a Eo*.
Added eolian_cxx_test_wrapper.cc to the list of test source files in
Makefile_Eolian_Cxx.am.
Removed the eina_init call from the test suite main function to enforce
that each test case creates an instance of the eina::eina_init object.
Added an eina::eina_init object instanciation for each test case that
were lacking this code.
Created a specialization of the eina::accessor for C++ Eo wrappers.
Created an override of the "accessor" methods in the eina::list specialization
for Eo wrappers (in eina_list.hh). It is necessary to create accessors with the
correct type.
Created specializations of std::is_base_of to avoid compilation errors related
with _Eo_Opaque type.
Added new test cases in "eina_cxx_test_accessor.cc" to test the accessor
specialization.
Added efl::eina::eina_init to the existing test cases to correctly do the
on demand initialization required by the tests.
@fix
Argument count limit is now supported. The source has been cleaned up and
unified so that less code repeating is done. The module is now environment
safe, not depending on specific metatable being set on strings. More callbacks
have been added and error messages are now more descriptive.
Summary: Add new function for replacing string with using eina_stringshare_replace() and change _edje_if_string_free() to setup passed string to NULL.
@fix
Reviewers: raster, Hermet, seoz, cedric
Reviewed By: cedric
Subscribers: reutskiy.v.v
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D1835
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: Refine odd lines to delete _edje_timer
Test Plan: Run example using edc programs to change state
Reviewers: raster, cedric, woohyun, jaehwan, Hermet
Reviewed By: Hermet
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D1838
"Eina_Stringshare *" type is interchangeable with "const char *".
The "stealing" constructor from efl::eina::stringshare was incorrectly
using "char *" instead "const char *", preventing it from being used.
curl is dumb. it needs to poll its own fd for data, it gets confused with its own timeouts, and sometimes it forgets that it's supposed to be doing anything.
this fixes:
* connection timeout processing
* connection data processing order
also curl_multi_timeout calls are now done from a single function to handle all of this stupidness in one place
maybe backport after more testing...
Summary:
Without EGL_PLATFORM environment variable, eglInitialize() can be
failed because egl tried to load DRM platform instead of X11 platform and it
tried to handle XDisplay pointer as a gbm_device pointer as well.
The failure seems to be occured especially if the egl was built
with DRM platform as native platform.
This revision can prevent the failure by indicating proper egl platform using
EGL_PLATFORM environment variable.
@fix
Reviewers: gwanglim, jaehwan, seoz
Reviewed By: seoz
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1828
Summary:
Include sound samples, that uses in programs of this group in collections block.
@fix
Reviewers: cedric, Hermet, raster, reutskiy.v.v
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D1824
Summary:
Memory allocated to dir was not freed. so added code to free dir struct
@fix
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1814
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
eina_inarray_free was not called. So calling it to fix the memory leak.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1808
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
eina_inarray_new returns NULL if malloc fails. This check was not performed. So have added the check for the error case and returning NULL if any of it fails.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1807
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>