Commit Graph

166 Commits

Author SHA1 Message Date
Tom Hacohen 7ebf9d879d Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to
around 20KiB more of saving in private dirty pages in elementary.

This also looks a bit better and feels a bit cleaner.

Breaks API and ABI.
2016-09-09 11:14:35 +01:00
Tom Hacohen 5ad71f1486 Eo: don't allow object override to introduce previously undefined functions. 2016-09-09 11:14:05 +01:00
Carsten Haitzler fe81fff89b eo test suite - finish off the tests so we're testing all the features
testing all the core features of eo domains now. yes it could be a lot
more extensive but it tests the important day to day cases. this is
the case across most of our tests too - they dont really stress things
out a lot.
2016-09-09 18:53:20 +09:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00
Carsten Haitzler 150cc62a0d eo domain tests - make a start on them with some basic ones
this adds tests for some of the basic domain tests. doing the
inter-thread ones is going to be much more.... fun.
2016-09-08 18:39:38 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Tom Hacohen a8ccb191c6 Adjust the EFL to the Eo class_initilizer changes. 2016-09-05 16:03:17 +01:00
Tom Hacohen c8c0bbcfcf Efl object: rename EFL_OBJECT_OVERRIDE_OPS_DEFINE.
It is now called EFL_OPS_DEFINE as it's used for general purpose ops
definition.
2016-09-05 16:03:16 +01:00
Cedric BAIL 3ab60a1564 eo: store registered callbacks in an array instead of a single chained list. 2016-09-02 10:19:45 -07:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen a6f126af12 Efl object: Don't pass events to eo class creation.
This was never used and there is no plan to ever use it. I'm going to
soon add a different mechanism with which it will be possible to provide
them again to Eo if ever needed without breaking ABI. Though it's
unlikely it will ever be.
2016-08-23 14:47:28 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre ec9107dc1f eo: Fix override test case to match new policy
The new policy is a lot more restrictive.
Honestly, I don't like it.
2016-07-21 14:03:10 +09:00
Jean-Philippe Andre 3029227fa1 eo: Change eo_override to avoid struct passing and GCC construct
This is a (minor) API & ABI break in Eo.h!

I say minor as eo_override shouldn't be used yet (EO is unstable
and this patch includes all the use cases in EFL).

I'm not very happy about the new form of the macro, but it avoids
two things:
- passing in a struct (valid in C, but never used in EFL)
- using a GCC construct to create structs on the fly

It was inspired by the event array define, but I don't think
we need the runtime memcpy here.

See also:
https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html
2016-07-19 17:55:07 +09:00
Cedric BAIL 7bb8afe4f9 eo: fix tests after renaming. 2016-07-13 16:17:16 -07:00
Carsten Haitzler f8fd74f8d2 eo base - add weak object refs as per jpeg needs
so after some discussion with jpeg, weak referenced keys are also a
good idea. these need del track handling to be weak, so i made strong
reffed keys also do del tracking again as it's just nice to do this
and be more robust. also added and improved the test suites for this
key value stuff.

@feature
2016-07-07 18:41:23 +09:00
Tom Hacohen 6998f3a8d2 Eo event: Add a test for stopping callbacks within another callback.
This tests that stopping callbacks is correctly preserved inside the
call and does not affect any surrounding callback calls.
2016-06-20 18:02:00 +01:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Stefan Schmidt ecdbde7493 eo: remove now longer needed EO_BASE_BETA define from code base
This was needed when the eo composite object was still in beta. Since commit
d7c45e41d4 this is no longer the case. No beta
part left in eo base so we can safely remove this define.
2016-06-20 10:07:30 +02:00
Jean-Philippe Andre 2d995fdedc tests: Use EO_CALLBACKS_ARRAY_DEFINE in all tests
This should make them work on Windows, too.
2016-06-16 13:10:34 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Tom Hacohen 7b2b623180 Eo: Fix compilation for people using GCC.
Apparently you can't cast when initializing static consts, even if
the cast is to the same type. This commit splits the macro used
so we have an additional one that casts and thus works with
eo_override().
2016-05-20 16:16:17 +01:00
Tom Hacohen 5f46df619b Eo tests: Fix compilation warnings with eoid disabled. 2016-05-20 11:39:36 +01:00
Tom Hacohen 06f65ab2b1 Eo: Implement eo_override() to enable overriding functions of objects.
This change lets you override the functions of objects so that those
functions will be called instead of the functions of the class. This
lets you change objects on the fly and makes using the delegate pattern
easier (no need to create a class every time anymore).
You can see the newly added tests (in this commit) for usage examples.

@feature
2016-05-20 10:25:00 +01:00
Tom Hacohen b5511464a1 Eo: Remove useless test.
We no longer have a call stack, so there's no need to have
this test.
2016-05-20 10:25:00 +01:00
Tom Hacohen 96624b9725 Eo: Fix singleton pattern and add a test to make sure it works. 2016-05-18 13:31:30 +01:00
Cedric Bail 443948e3bd eo: fix borked test. 2016-05-18 02:20:13 -07: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
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Tom Hacohen e9c4e7bf76 Eo name: Rename Eo.Base.id to Eo.Base.name.
This is there to reduce confusion with Eo_Id and also the name
is just better.
2016-05-17 16:00:13 +01:00
Tom Hacohen 6cacef2503 Eo abstract class: Rename to Eo.Class. 2016-05-12 14:33:40 +01:00
Tom Hacohen 537b138a23 Eo composite: change composite objects to not be tied to parent
This commit breaks behaviour!
Re-parenting no longer detaches composite objects, so watch out.

Now you can have an object be a composite object of an object although
it's not its child. This allows widgets to do things like having an
object as the child of a child object while still making it a composite
object to the main object.

With this change, composite objects don't keep a reference to the child,
but instead composite "bonds" are implicitly removed when either the
parent or the child are destructed.
2016-05-05 16:45:12 +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
Stefan Schmidt a41f9ad870 tests: eo: switch to generic eo_key_del, fix build
Since 5e09d1307b we use the generic eo_key_del
for all of these.
2016-04-21 11:41:44 +02: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
Carsten Haitzler 26b5eb8a26 eo base - add loop_get for base class
base class objects will ask their parent object to get the loop. this
means it recurses all objects regardless of type until it finds an
object that returns a proper loop object - eg a loop object returns
itself, a window, gfx/ui object returns the mainloop object etc. etc.

@feature
2016-04-21 15:19:36 +09:00
Carsten Haitzler bc4d43a1cc eo base: names - add finding functions to fund by name
this finds child objects by walking the child tree searching children
by using the search string which can be name, class:name and both
class and name can also be a glob.

@feature
2016-04-20 18:29:41 +09:00
Carsten Haitzler 45456d9e82 eo base - add value keys in addition to object and void ptr data keys
eina value would allow any value to be attached to an eo object and
also be freed nicely too. this would allow any generic data to go
there without overloading a void * that us c coders love to abuse.

@feature
2016-04-19 18:36:57 +09:00
Carsten Haitzler 96142eef96 eo - add object comments - esp useful for erigo and gui builders
also useful for debugging and more. this also makes both name/id and
comment an extension blob of ram so objects dont keep growing
boundlessly in memory usage/size

@feature
2016-04-19 17:21:21 +09:00
Carsten Haitzler 86e7d642d5 eo - add object names/ids esp useful for erigo as it wants object names
also evas objects have names too, so add this as this was discussed
and now the feature is in. there is nothing to find objects by name
yet. that's more api's and features to add after this.

@feature
2016-04-19 16:34:53 +09:00
Carsten Haitzler 8be56c9498 eo - add object sotrage in generic values with ref/unref
this adds eo_key_obj_set/get/del() like with data but for object
handles so the obj is ref'd as long as the key and parent obj exists
and then unreffed on deletion. it also tracks deletion of reffed
objects like weak refs and then removes the key automatically.

@feature
2016-04-13 01:06:40 +09: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
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen 81240669e8 Revert "Ector and eo suite: Semi automatically migrate to the new eo_add."
This reverts commit df83edaeb6.
2016-03-11 12:29:03 +00:00
Tom Hacohen df83edaeb6 Ector and eo suite: Semi automatically migrate to the new eo_add.
There were some issues with the migration that required manual
intervention.
2016-03-09 16:09:14 +00:00
Carsten Haitzler 3df71ab0f6 eo del interceptor: add the ability to intercept deletions of eo objects
Imagine this. You have an object. You pass this object handle as a
message to another thread. Let's say it's not a UI object, so
something you might expect to be able to be accessed from multiple
threads. In order to keep the object alive you eo_ref() it when
placing the message on a queue and eo_unref() it once the message is
"done" in the other thread. If the original sender unref()ed the
object before the message is done, then the object will be destroyed
in the reciever thread. This is bad for objects "expecting" not to be
destroyed outside their owning thread.

This allows thius situation to be fixed. A constructor in a class of
an object can set up a delete interceptor. For example if we have a
"loop ownership" class you multi-ple-inherit from/use as a mixin. This
class will set up the interceptor to ensure that on destruction if
pthread_self() != owning loop thread id, then add object to "delete
me" queue on the owning loop and wake it up. the owning loop thread
will wake up and then process this queue and delete the queued objects
nicely and safely within the "owning context".

This can also be used in this same manner to defer deletion within a
loop "until later" in the same delete_me queue.

You can even use this as a caching mechanism for objects to prevernt
their actual destruction and instead place them in a cached area to be
picked from at a later date.

The uses are many for this and this is a basic building block for
future EFL features like generic messages where a message payload
could be an eo object and thus the above loop onwership issue can
happen and needs fixing.

This adds APIs, implementation, documentation (doxy reference) and tests.

@feature
2016-03-08 16:57:22 +09:00
Tom Hacohen 11b3e3ec89 Eo tests: Add tests for null (invalid) array callbacks. 2016-03-04 14:29:20 +00:00
Tom Hacohen b55ec7a34e Eo: remove the long deprecated eo_data_get.
It has been deprecated for a while, and now it's time to actually stop
using it.
2016-03-04 14:23:02 +00:00
Tom Hacohen 70e900db10 Eo tests: Test more cases with legacy events. 2016-03-04 14:21:08 +00:00
Tom Hacohen d72b336f69 Eo tests: add more eo_data_get tests. 2016-03-04 14:09:34 +00: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 f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 438e1db893 Manually semi-migrate files in preparation for the script
The migration scripts breaks with some weird cases, here I manually
migrated some parts, and just removed the eo_do from others without
actually migrating (so I could deal with that later).
2016-03-03 09:56:20 +00:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Vincent Torri d525034ec8 Test rework #17: Eo
I've only touched the suite/ subdir. Maybe we should merege the others into
the test suite in suite/
2016-02-16 12:41:06 +00:00
Cedric BAIL d576c4f3e8 eo: tests callback add and del return value. 2016-02-05 06:21:56 +01:00
Jean-Philippe Andre 9d76a44b78 Eo: Replace deprecated EO_EV_ by EO_BASE_EVENT_ 2016-01-21 13:10:05 +09:00
Tom Hacohen 8e2e7bd61e Eo events: Add a struct member marking if it's a legacy event or not.
My previous patch to this piece of code
(37f84b7e96), caused a significant
performance regression. This is such a hot path, that even accessing the
strings when we don't have to slows things down drastically. It makes
more sense to just store it in the structure.

This commit breaks ABI (though most people probably won't even need to
recompile anything else because of the memory layout).
It was discussed on IRC and was decided this is a big enough issue to
warrant a fix during the freeze.

@fix
2015-10-16 11:55:07 +01: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 d889da6b12 Eo legacy events: Fix broken callback comparison
Commit 37f84b7e96 introduced a few changes
to the callback matching mechanism that made it so sometimes callbacks
would be triggered for the wrong events. The problem was there because
of the support for legacy events that forces to do string comparison
instead of the usual pointer comparison. We should only do string
comparison when we are certain one of the callbacks is a legacy
generated one.

Regression tests will follow tomorrow. Way too late here for that.

Thanks to cedric for reporting.
2015-09-29 01:01:05 +01:00
Tom Hacohen 9328524da4 Eo: Remove EO_SENTINEL.
This was never really needed because we always had the count.
Removing this now because we are already breaking API and ABI.
2015-09-28 15:52:50 +01: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
Tom Hacohen acc158a2bf Revert "Revert "Eo base: Change parent_set to be an assignment of ref.""
Had to revert it until I pushed the changes to elm, which I had issues
with. Now the patch can safely go back in.

This reverts commit 37abea3831.
2015-08-26 10:47:06 +01:00
Tom Hacohen 37abea3831 Revert "Eo base: Change parent_set to be an assignment of ref."
Damn, this breaks some things. Reverting until fixed.

This reverts commit 9c78ee0bf4.
2015-08-26 10:33:24 +01:00
Tom Hacohen 9c78ee0bf4 Eo base: Change parent_set to be an assignment of ref.
After this change, parent_set assigns a ref, so for example:
  obj = eo_add(CLASS, parent); /* Ref is 1 */
  eo_do(obj, eo_parent_set(parent2)); /* Ref is 1 */
  eo_ref(obj); /* Ref is 2 */
  eo_do(obj, eo_parent_set(NULL)); /* Ref is 1, giving the ref to NULL */
  eo_do(obj, eo_parent_set(parent)); /* Ref is 1 */

This is following a discussion on the ML about commit
8689d54471.

@feature
2015-08-26 10:11:18 +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
Tom Hacohen 92fb2917cb Eo: Remove eo_error_set() and clean up finalizer()
This is another cleanup in perparation for the Eo stable release.
This is no longer needed thanks to the proper error reporting with
eo_constructor()'s new return value.

The finalizer change cleans it up a bit so it catches more cases/issues.
This also means that the finalizer cleans up the object in all cases,
and not only some.

@feature.
2015-05-20 16:25:38 +01:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Tom Hacohen e27f40111d Eo: Mark composite APIs as beta.
Until now we used @protected, but now we can finally properly use @beta.
2015-05-08 16:18:36 +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
Tom Hacohen 875bc15146 Eo tests: Add the needed define for accessing protected calls.
Fixes the warnings. Thanks to cedric for reporting.
2015-05-06 17:05:38 +01:00
Tom Hacohen a791d97bfc Eo: Remove GCCism and make it more portable.
This affects eo_do() and eo_add() that used to use the ({}) GCCism.
Following a discussion with Peter de Ridder after my talk at FOSDEM,
we've decided to reopen the GCCism (works with other gcc compatible
compilers like clang and intelc) discussion, and after a bit of back and
forth it was decided to make things more portable, at the cost of ease
of use.

For example:
if (eo_do(obj, visible_get()))
is no longer allowed, the portable alternative
Eina_Bool tmp;
if (eo_do_ret(obj, tmp, visible_get()))
is to be used instead.

However:
eo_do(obj, a = a_get(), b = b_get(), bool_set(!bool_get))
are still allowed and OK.

eo_do(obj, if (a_get()) return;);
is no longer allowed, but:
eo_do(obj, if (a_get()) something());
is still allowed.

For clarity, this commit only incorporates the Eo changes, and not the
EFL changes to make the efl conform with this change.

Thanks again to Peter de Ridder for triggering this important discussion
which led to this change.
2015-02-23 17:16:02 +00:00
Tom Hacohen e1c0928ea3 Eo id: Add regression tests to eo id sanity checks
Relevant commit: 0b86334a85
2014-10-22 11:43:45 +01:00
Tom Hacohen 01a487d881 Eo composite: Fix composite object functions to be eo functions.
For some reason, they were normal functions instead of eo functions,
which makes them harder to bind, less safe, and just wrong.
This commit fixes that.
2014-10-21 12:37:00 +01:00
Tom Hacohen a7560dbc61 Eo: Change eo_add/del/unref behaviour.
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
    preserves the old behaviour (for bindings).

eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
        to zombie-land even if still refed).
2014-09-25 17:38:45 +01:00
Tom Hacohen 6846978ebd Eo: Get rid of eo_add_custom.
We decided to deprecate this one in favour of setting thing in the
construction between the constructor and the finalizer.
2014-09-25 10:30:56 +01:00
Tom Hacohen 2a0937b889 Eo base: Add a property to indicate if the object is finalized;
This enables checking if an object is being created, or has already been
finalized. This is useful in functions that you want to allow
only during the creation phase (i.e inside the eo_add()).
2014-08-29 10:26:23 +01:00
Tom Hacohen 10626ff538 Eo: Fix and use the abstract class .eo file.
Until now it was just there, but never generated or used.
2014-06-03 09:19:19 +01:00
Tom Hacohen f92e5d50f9 Eo: Add eo_finalize. A func that's called at the end of eo_add.
This function lets you hook at the end of eo_add and override it for a
class. This is essentially the first step towards killing custom
constructors. Instead of having a custom constructor, you should just
do:
eo_add(CLASS, parent, a_set(3), b_set("eou"));
eo_constructor is called at the beginning for pre-init things.
eo_finalize is called at the end, for actually finalizing and doing
things. This cleans up the API and possibly saves a lot of things that
would have been stupid and slow in the past, like loading an elm widget
with an existing theme, and then changing the theme.

** This breaks Eo ABI, please recompile elementary and everything else that
creates eo objects.

@feature
2014-05-30 11:22:36 +01:00
Tom Hacohen 75b56c7589 Eo legacy events: Add legacy events tests.
These tests test mixing legacy events with eo events.
2014-05-28 12:28:18 +01:00
Tom Hacohen 3a0d62ffcf Ecore audio tests: Updated to Eo2. 2014-04-10 04:20:21 +01:00
Tom Hacohen 92cc33c46f Eo: EO_BASE_CLASS->EO_CLASS. 2014-04-10 04:20:21 +01:00
Tom Hacohen 374af9b9ca Eo: eo_base's data_*->key_data_*. 2014-04-10 04:20:21 +01:00
Tom Hacohen c32bb4fe95 Eo2: Updated naming Eo2->Eo. 2014-04-10 04:20:21 +01:00
Jérémy Zurcher 914dde776f eo2: fix uninitialized vars in tests
because of conditional execution of eo2_do() fct calls
these vars could end up not initialized.
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 055dd3c521 eo2: change the order of EO2_OP_FUNC* to put EAPI first.
This looks cleaner and more aligned. Also, it makes more sense as the
internal function is bound to the EAPI and not the other way around.
2014-04-10 04:20:20 +01:00
Tom Hacohen ebae305a9e eo2: fixed validity checks for eo2_do_super.
The class should be checked to be valid and non-null.
This fixes the issues with eo_suite.
2014-04-10 04:20:19 +01:00
Tom Hacohen c20c537528 eo2: use EO2_CLASS_DESCRIPTION_NOOPS everywhere. 2014-04-10 04:20:19 +01:00
Tom Hacohen ed14382f7c eo2: fixed a compliation issue in test suite. 2014-04-10 04:20:19 +01:00
Tom Hacohen 7d79b10bb6 eo2 suite: add an important FIXME. 2014-04-10 04:20:19 +01:00
Tom Hacohen 08b28211b6 eo2: migrated the eo-suite test to eo2. 2014-04-10 04:20:19 +01:00
Tom Hacohen d6ac2464bb Eo: Make eo_manual_free() return a success flag.
eo_manual_free() can fail in some cases, and it is useful for users of
this API to know about it in order to decide what to do.
2013-11-26 12:10:53 +00:00
Tom Hacohen 46a3f01465 Eo tests: Added a parent_set parameter validity test. 2013-11-20 12:23:18 +00:00
Jérémy Zurcher 9e246eadd0 eo: cover eo_class_get new behaviour 2013-10-13 00:00:13 +02:00