summaryrefslogtreecommitdiff
path: root/src/lib/eo (follow)
AgeCommit message (Collapse)Author
2019-07-26eo: remove Efl_Event definition (replace with builtin)Daniel Kolesa
2019-07-23eolian: start to express ownership transfereMarcel Hollerbach
before @owned was not even expressed in the api definitions of the generated APIs, this adds support for it. @owned is now expressed with EFL_TRANSFER_OWNERSHIP in a arguments. And that preprocessor directive is documented. Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Differential Revision: https://phab.enlightenment.org/D9369
2019-07-19eo: add helper for checking the ownable stateMarcel Hollerbach
if a object is ownable, then there is one free reference. If not, a error will be printed. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9332
2019-07-17eo: add ability to register provider on the Eo object directly.Cedric BAIL
This should reduce the need for custom implementation of efl_object_provider_bind. It also enable the ability to register provider from user code on any Efl_Object. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9292
2019-07-17eolian: add builtin binbuf and event typesDaniel Kolesa
Binbuf is like strbuf and allows not using the Eina opaque wrapper now, which will remove some ptr(). And event translates to Efl.Event because otherwise there would be no way to get rid of void_ptr.
2019-07-15Revert "Revert "efl: prevent usage of some Eina.* stub types in stable APIs""Vitor Sousa
EFL# support for slice and rw_slice was added in a previous commit. So now it is safe to undo the reversion of this commit. This reverts commit 25ef604467b083d1f5ff2c7f9a1a82e660e04443.
2019-07-08Revert "efl: prevent usage of some Eina.* stub types in stable APIs"Vitor Sousa
C# does not support `slice` and `rw_slice` yet. Reverting until proper support lands. This reverts commit ec7bc0eddd7abc77d28605b0a6f0aea2e246a0ee.
2019-07-08efl: prevent usage of some Eina.* stub types in stable APIsDaniel Kolesa
2019-06-25eo: add an API entry for custom instantiation of Eo objects for binding usageVitor Sousa
Add a new function in the Eo API in order to provide more options on object instantiation for binding creators. For the Eo lib to be able to construct objects that inherit from bindings in many languages we should provide a way for bindings to call different kinds of constructors, in a way that simply overriding the `efl_constructor` method is not enough. We need a way to differentiate at construction time if the Eo is being constructed from C or from the binding, because if it is the former we need too call the inherited object constructor from C and instantiate a new object, and if it is the later we need to avoid instantiating a new object because we are already in the middle of the process of creating a new one. `efl_constructor` alone does not provide any way of distinguishing between those situations, so, being able to pass additional information for efl_add_start (like a custom constructor pointer) is necessary to make the right distinction. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9070
2019-05-29eo: add events to track the ownership status of an Eo objectVitor Sousa
Some user code may want to track an object ownership in regard to whether it is kept by just one owner or shared between many owners. This is specially true for code provided by bindings to other programming languages, where different kinds of resource management may take place. The event `ownership,unique` is triggered whenever the object refcount goes from two to one, as a signal that it has just one owner from now on. The event `ownership,shared` is triggered whenever the object refcount goes from one to two, as a signal that it has multiple owners from now on. It will not trigger when further increasing the refcount to any value beyond two. We also add benchmarks for sharing (i.e. increasing the refcount) and them unsharing objects, in order to evaluate the performance impact of this patch. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8678
2019-05-26eolian: rename @warn_unused and its associated APIDaniel Kolesa
@warn_unused in syntax is now called @no_unused - this is because "warning about unused" is a C thing (or rather, an extension to C) and various languages might want to use stricter behavior for this. Its associated API does the reverse now - it lets you query whether being unused is allowed at all. This is to match future behavior of Eolian (once it supports versioning) that will likely reverse it. @feature
2019-05-26eolian: remove param @nonullDaniel Kolesa
This has been deprecated for a while and is not strictly necessary - as a part of an effort to stabilize Eolian, remove this. Eolian will eventually gain support for versioning and use a reversed behavior (i.e. no NULL by default), but the API it wlll use for that will be very different. Features can always be added, it's much harder to drop them. @feature
2019-05-21eolian: remove @nullable keywordDaniel Kolesa
This was an experiment that never properly took off and was never used by any generator. Its use was highly variable, so it could not be relied upon. We will still want to reverse the current behavior eventually (no null by default), but that will be done with eo file versioning in the future. @feature
2019-05-16Eo: replace Evil.h with evil_private.hVincent Torri
Test Plan: compilation Reviewers: q66, raster, zmike Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8905
2019-05-09eolian: move from eo_prefix to c_prefixDaniel Kolesa
2019-04-02docs: Fix common misspellings in H filesXavi Artigas
Fixed all appearances of words from this list in H files: https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02docs: Fix common misspellings in EO filesXavi Artigas
Fixed all appearances of words from this list in EO files: https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02eo: Correctly name Realized classes.Lauro Moura
The previous preprocessor rule was generating strings like "\"Efl.App\"_Realized. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8527
2019-03-29docs: Add Eina.Value extern to eina_types.eotXavi Artigas
Eina.Values are built-in eolian types, accessed through any_value and any_value_ptr. However, these types cannot be used in doc references. Adding a placeholder extern struct Eina.Value causes no harm, and will allow referencing the type from EO docs later on. In C#, Eina.Value is defined in the manual binding code so the doc reference resolves to a valid type. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8510
2019-03-28docs: Document event info calling conventionXavi Artigas
Both at the emitter (efl_event_callback_call) and the receiver (info field in the Efl.Event structure). The Events tutorial should repeat this. Fixes T7760 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8486
2019-03-27eo: refactor auto_unref logic used by efl_part.Cedric BAIL
This bring no functional change to Eo and efl_part. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8357
2019-03-27eo: enforce auto_unref logic at the end of efl_unref execution.Cedric BAIL
This allow for the safe use of efl_ref/efl_unref around an efl_part without calling any function on that part. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8358
2019-03-22docs: Add @since 1.22 to all stable classes' EO docsXavi Artigas
Summary: Previous @since tags have already been removed from eo files. Test Plan: Everything builds, but stable classes now have Since tags in the docs. Reviewers: zmike, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8446
2019-03-20docs: Remove obsolete @since tags from EO filesXavi Artigas
Summary: All legacy @since tags have already moved to the *.legacy.h files. EO files are now devoid of @since tags (except some eldbus still needed for legacy). Upcoming patches will add @since 1.22 to those APIs which come out of beta in this release. APIs marked @beta do not need @since tags. Test Plan: Everything builds, EO docs (like DocFX) have no Since tags. Reviewers: zmike, bu5hm4n, lauromoura, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8430
2019-03-15eo: efl_object_legacy_only_event_description_get is an internal only ↵Cedric BAIL
function, make it so. Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8361
2019-03-14build: add a option to disable eo file installationMarcel Hollerbach
Summary: this is done because .eo files are not stable, and in order to stop people depending on it, its better for now to disable the installation of them for now. ref T7676 Reviewers: stefan_schmidt, cedric, zmike, devilhorns Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7676 Differential Revision: https://phab.enlightenment.org/D7897
2019-03-12eo: Fix missing varags cleanupChristopher Michael
Summary: Coverity reports that va_end is never called for p_list when we error out of this function. This patch adds a missing va_end before we error out of here. Fixes Coverity CID1399080 @fix Depends on D8315 Reviewers: raster, cedric, q66, zmike, bu5hm4n, stefan Reviewed By: q66 Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8316
2019-03-08eo: make reflection getter const function.Cedric BAIL
Getter are usually not modifying there object. This is going to put a strong limit on what a getter property for MVVM is, as it will prevent any side effect on getting a property from a View. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7969
2019-03-08eo: fix reflectionMarcel Hollerbach
Summary: the DFS tree walk was accidently stopped by a too early return statement. We should only return if we found a reflection entry, if not, then we should continue our search Depends on D7996 Reviewers: cedric, zmike, q66, segfaultxavi Reviewed By: cedric, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7997
2019-03-06eo: mark efl_object stableMarcel Hollerbach
fix T7557 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8000
2019-03-01eo: improve error message by giving an idea where the error come from.Cedric BAIL
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D8090
2019-03-01eo: obtaining the Eo object attached to an Eina_Value is actually a const ↵Cedric BAIL
operation on the Eina_Value. Summary: Depends on D8077 Reviewers: segfaultxavi, zmike Reviewed By: segfaultxavi, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8078
2019-02-22Revert "eo: fix to remove unreachable loop"Jaehyun Cho
This reverts commit f02b82a49e12c0d02bb3f438046e1ceb93d1643b.
2019-02-22eo: fix to remove unreachable loopJaehyun Cho
2019-02-21eo: add efl_property_reflection_exist to be able to know if a property is ↵Cedric BAIL
available on an object. Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7937
2019-02-21eo: return an Eina_Value error when a get for a property is not implemented.Cedric BAIL
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7936
2019-02-21eo: make reflection setter able to return an error code in case of failure.Cedric BAIL
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7935
2019-02-21efl_loop / efl_app: make efl_app / efl_loop abstractMarcel Hollerbach
this is done inorder to ensure that noone ever thinks of creating theire own app/loop object. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7982
2019-02-21eo: add API for querying the class typeMarcel Hollerbach
a class can be a interface mixin abstract or regular. This adds a API for getting this information
2019-02-14Remove warnings when building without EFL_BETA_API_SUPPORTXavi Artigas
Summary: efl_alive_get should be a method defined in efl_object.eo, protected by EFL_BETA_API_SUPPORT while that class is still @beta. Instead, it is defined in Eo.h, so the BETA guard has to be defined manually. This was causing some unsighly warnings during "make" and "make check" (implicit declaration of function ‘efl_invalidating_get’) Test Plan: make && make check do not throw that warning anymore Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7958
2019-02-14Mark BETA classes individuallyXavi Artigas
Summary: Instead of surrounding all the #include "*.eo.h" lines in Efl.h with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark all classes as @beta in the eo files. This will allow taking them out of beta one by one as we deem them stable enough. Otherwise, the current procedure involves moving the #include line out of the ifdef block, which is cumbersome and messes include order. Depends on D7950 Fixes T7692 Test Plan: Nothing changes Reviewers: zmike, bu5hm4n, cedric Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7692 Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14eo: declare Eo stableMarcel Hollerbach
Summary: This declares the main part of Eo.h as stable, except the domain api for now. We don't have a user of that API for now, nor do we have bindings supporting threads, lets wait with this bit until we have bindings for this, so we can test it. Further more, this does not stabilize the composition API of efl_object.eo.h, reason for this is, that we might want to overthink the solution we have with events, as we might want to forward events per default. Depends on D7931 Reviewers: stefan_schmidt, cedric, zmike, segfaultxavi Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7932
2019-02-13eo: remove class functions from eoMarcel Hollerbach
As in the previous commit explained, we want to get rid of class functions in eo, and make them just c functions right away. This commit removes the class parameter from the eo_class_function_set call, and adjusts the tests to not depend on class functions anymore. Class functions are now not tested anymore, tests that used them as a way to test *things* are adjusted to test them now with object functions, tests that just tested the working of class functions are dropped. This fixes T7675. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7902
2019-02-13eolian: drop class function overridingMarcel Hollerbach
Until this commit eo did class functions as part of the vtable, which enabled those functions to be overwritten in classes inheriting another class. However in task T7675 we decided that this is not really good for bindings, as most OOP languages do not support this sort of feature. After this commit eolian realizes class function completly outside of the vtable, the c-symbol that is the class funciton is now just directly redirecting to a implementation, without the involvement of the vtable. This also means a change to the syntax created by eo: Calling before: class_function(CLASS_A); Calling after: class_function(); Implementation before: class_function(const Eo *obj, void *pd) { ... } Implementation after: class_function(void) { ... } This fixes T7675. Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br> Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Differential Revision: https://phab.enlightenment.org/D7901
2019-02-12build: also build eo-tests with debug profileMarcel Hollerbach
this checks that eo-dbg is also working in the same manner as normal eo Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D7911
2019-02-12eo: efl_isa with a EFL_OVERRIDE_CLASS should return trueMarcel Hollerbach
this is important, as basically every single class etc. can be a EFL_OVERRIDE_CLASS. This makes efl_override work with eo_debug. Differential Revision: https://phab.enlightenment.org/D7910
2019-02-12eo: fix typoMarcel Hollerbach
this while loop is actaully iterating obj->xref, therefore we should not take the pointer of data_xrefs. Differential Revision: https://phab.enlightenment.org/D7908
2019-02-11docs: Update efl_object lifecycle docsXavi Artigas
Summary: Explained the different phases, added method refs and removed outdated links. Ref T7557 Reviewers: zmike, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7557 Differential Revision: https://phab.enlightenment.org/D7903
2019-02-08eo: lets drop efl_interfacesMarcel Hollerbach
its not required anymore, our wonderfull new syntax solves the original problem it was trying to solve. fixes T7565 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7893
2019-02-07eo: here comes reflection APIMarcel Hollerbach
this adds support in eo to generate a reflection API. To get the actaul reflection to the klass, the API efl_class_reflection_table_set needs to be called, the table in the end can be generated by eolian. Reflection API is inherited by the extended class. This means, if you have two reflection tables, first, the most upperst is called, then the next lower one is called. For now this API accepts NULL setter or getter, and will ignore them silently when they are called. fix T7681 Differential Revision: https://phab.enlightenment.org/D7879