Commit Graph

16 Commits

Author SHA1 Message Date
Marcel Hollerbach 46885653bc eo: remove class functions from eo
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-13 16:59:59 +01:00
Jean-Philippe Andre b96722cfb8 eo: Add API efl_data_scope_safe_get
This is a safe version of efl_data_scope_get, meaning that it will
return NULL if the object is not of the required type, or if there
is no data for that class, or if the given class was used as an
interface (and isn't a mixin).

@feature
2017-06-14 16:54:11 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Marcel Hollerbach c66695bedb eo: replace loop_get with object_find
Summary:
object_find is more generic, so other mechanisms can also reuse the
code.
The object itself has to support the function, so there is no need for
eo_isa which would have a negative performance impact.
The base class implementation calls interface_get on the parent, so a
override of the function can just call the super function to continue in
the recursion.

Test Plan: just run the eo test suite

Reviewers: raster, tasn, jpeg

Reviewed By: tasn, jpeg

Subscribers: felipealmeida, netstar, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3909
2016-05-04 10:43:55 +02:00
Tom Hacohen c6159e042b Eo tests: Also test function calls in reinit test.
Since we cache ops we also need to check function calls work
when we reinit eo, not just class_get functions.

This commit essentially verifies that
5284b62e93 was done correctly.
2016-04-06 11:15:24 +01:00
Tom Hacohen 23a6b12183 Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen 8780da1fbd Eo tests: Update tests according to the new syntax
These tests don't use eolian, but are plain Eo, so they need manual
updating.
2016-03-03 09:58:08 +00:00
Tom Hacohen ab6d7b44df Eo: add a regression test for broken callback comparison.
This bug was fixed in d889da6b12, but it was too
late at night to start hacking on extracting a regression test and adding it to
the suite, so adding it now.

This test makes sure that we only fallback to string comparison with legacy
events.
2015-09-29 09:17:48 +01:00
Tom Hacohen 6cb22bae35 Eo: Add eo_do_part.
This is a convenience macro to be used by the common pattern of getting
a part and then immediately calling functions on it. For example,
  without this macro, you'd have to write code like:

Eo *part;
eo_do(obj, part = efl_part_name_get("partname"));
eo_do(part, a_set(7));

while using the helper function trims it to:

eo_do_part(obj, efl_part_name_get("partname"), a_set(7));

@feature
2015-05-06 17:56:05 +01:00
Jérémy Zurcher 2fb5a54610 eo2: add tests for method call error msgs 2014-04-10 04:20:20 +01:00
Jérémy Zurcher d497459f93 eo2: add tests for call stack grow and shrink 2014-04-10 04:20:20 +01:00
Tom Hacohen 08b28211b6 eo2: migrated the eo-suite test to eo2. 2014-04-10 04:20:19 +01:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Tom Hacohen 3e11c380c9 Eo: Added eo_event_callback_array_* functions.
These functions let you pass an array of callbacks instead of just one.
It's more memory efficient to use this if you just add a bulk of events
on the same object.

This commits breaks ABI, and breaks API of the EO_EV_CALLBACK_ADD/DEL
signals (the event info passed).
2013-04-12 12:02:49 +01:00
Vincent Torri 3b5a3448b7 merge: add eo
SVN revision: 77072
2012-09-26 06:56:52 +00:00