Tom Hacohen
490eebabea
Eo base: Mark class methods.
...
Use the new @class attribute to mark class methods.
2014-07-24 15:35:00 +01:00
Cedric BAIL
3dcc172f57
eo: make parent_set a O(1) operation instead of O(n).
...
This does impact performance quite significantly when you have a lot
of children.
2014-07-06 13:15:21 +02:00
Tom Hacohen
6eb3bda426
Eo base: Start generating eo_base from the .eo file.
2014-06-03 11:28:02 +01:00
Tom Hacohen
d9263e6571
Eo base: rename event_freeze_get to event_freeze_count_get.
...
This is needed because of a possible clash between the method event_freeze
and the property event_freeze with bindings.
2014-06-02 12:50:23 +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
1e1104584f
Eo legacy events: Add missing addition to hash table.
...
This rendered the whole thing useless.
Found thanks to coverity.
CID 1216616
CID 1216617
2014-05-29 09:24:28 +01:00
Tom Hacohen
50a6e371a1
Eo: Support mixing legacy and non-legacy callbacks.
2014-05-28 12:28:18 +01:00
Tom Hacohen
c58b3401c3
Eo/evas events: Move legacy events dynamic generator to eo.
2014-05-28 12:28:17 +01:00
Tom Hacohen
cdea54dd40
Eo callbacks: Fix a possible issue of corrupted callback list.
...
This happens when we delete more than one callback at the beginning
of the list (i.e 2 or more) in one go.
2014-05-16 14:33:36 +01:00
Tom Hacohen
ecc445b47c
Eo: Don't write to pointer after free.
...
Fixes coverity: CID 1039898.
2014-05-16 14:33:36 +01:00
Tom Hacohen
9b265b0065
Revert "Eo: Fix deref after free."
...
Coverity found the issue, but it's an issue we've already fixed in the
past. I don't know how it got lost, but it seems like someone did a bad
merge. Probably when migrating to Eo2.
This reverts commit 831c20464d
.
2014-05-16 14:33:00 +01:00
Tom Hacohen
831c20464d
Eo: Fix deref after free.
...
In some rare cases it was possible for a pointer to be referenced after
it was already freed. This is now fixed thanks to coverity.
@fix
CID 1039898
2014-05-16 14:28:57 +01:00
Tom Hacohen
1fe084b78c
Eo: Made some functions class functions again.
...
This broke in the transition to Eo2.
2014-05-01 13:58:27 +01:00
Lukasz Stanislawski
80b1ca8e43
eo: fix broken children iterator, remove redundant fields.
...
@fix
Summary: Tests added.
Reviewers: raster, JackDanielZ, tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D763
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-04-17 19:36:12 +02:00
Tom Hacohen
8c025ee4d9
Eo: Renamed eo files from eo2* to eo*.
2014-04-10 04:20:21 +01:00
Tom Hacohen
3c46e7dab8
Eo2: Removed a lot of Eo1 code.
2014-04-10 04:20:21 +01:00
Jérémy Zurcher
2490a1bef2
eo2: better op_descs integration
...
struct _Eo_Class_Description swallows
Eo2_Op_Description *descs2;
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
f05f51dd60
eo2: _Eo_Class_Description swallows op_descs
...
remove OpDescs argument from macros,
eo2_get_op_id() uses binary search
2014-04-10 04:20:15 +01:00
Tom Hacohen
c5af1a7305
Eo: Add an error message when old parent is wrong.
...
This is an addition to raster's fix in
55d8156414
(eo - base class protection against NULL old_parent_pd)
2013-11-26 10:10:24 +00:00
Carsten Haitzler
55d8156414
eo - base class protection against NULL old_parent_pd
...
bug T569 still shows that we have cases where, during e shutdown, we
still get eo_data_scope_get() return NULL for a parent object.
whatever this is, segfaulting is much worse than protecting and
marching on. so protect
2013-11-26 17:03:50 +09:00
Tom Hacohen
cad3cf30a4
Eo: Check parent is valid in eo_parent_set.
...
This is an extension to raster's 0355a6a296
(eo - fix _parent_set in base clase when old_parent_pd is NULL).
I also added an error message in case this check fails.
2013-11-20 12:23:18 +00:00
Carsten Haitzler
0355a6a296
eo - fix _parent_set in base clase when old_parent_pd is NULL
...
this should fix T538
2013-11-20 20:25:33 +09:00
Tom Hacohen
a52751d065
Eo: Fixed potential infinite loop with child deletion.
...
It looks like it should get into a loop for every object that has
children.
2013-11-08 12:11:27 +00:00
Tom Hacohen
c7addf4083
Changed Eo class names to be consistent.
...
All the class names are now of the format: Lib_Type_Subtype_Extra.
2013-11-07 11:17:52 +00:00
Carsten Haitzler
69e27abdc3
eina - and e3fl in general - stop using eina_error_get/set - useless really
2013-10-11 16:50:40 +09:00
Cedric Bail
435caae51a
eo: use Eina_Spinlock instead of Eina_Lock.
...
This is an ABI/API break for Eo, you will need to rebuild everything that use Eo.
2013-10-11 11:08:17 +09:00
Tom Hacohen
104a57b58a
Eo callbacks: Fix a possible issue of corrupted callback list.
...
This happens when we delete more than one callback at the beginning
of the list (i.e 2 or more) in one go.
2013-09-30 14:16:46 +01:00
Tom Hacohen
f5d4a807c8
Eo: Don't write to pointer after free.
...
Fixes coverity: CID 1039898.
2013-09-30 14:15:37 +01:00
Daniel Zaoui
334ac705f3
Eo: fix when detaching the composite of its parent ... that has to exist
2013-09-29 08:50:32 +03:00
Tom Hacohen
832fc5b5ce
Manually revert "eo: replace Eo_Class with Eo"
...
This reverts commit ee1b0833ed
I did it manually because the code changed too much.
We actually want this type, it makes things more clear and easier to
understand.
2013-09-27 16:40:32 +01:00
Tom Hacohen
2a82ff95e4
Eo: unify the class func and normal func prototypes.
...
Conflicts:
src/lib/eo/eo.c
2013-09-27 14:01:47 +01:00
Jérémy Zurcher
41bd91379e
eo: _Eo -> _Eo_Object
...
Conflicts:
src/lib/eo/eo.c
2013-09-27 14:01:46 +01:00
Jérémy Zurcher
ee1b0833ed
eo: replace Eo_Class with Eo
2013-09-27 14:01:46 +01:00
Cedric Bail
936a8072f2
eo: make eo_parent_get/set part of eo_base_class.
2013-09-25 13:34:18 +09:00
Cedric Bail
cecd19803e
eo: let's handle memory allocation gracefully.
2013-07-16 20:03:48 +09:00
Cedric Bail
166e89baac
Revert "eo: try to fix callback array to work on other system."
...
This reverts commit e89f32d28d
.
2013-07-16 15:18:16 +09:00
Cedric Bail
ebb36c98a8
eo: micro optimization speed up callback call by 3%.
2013-07-16 13:45:36 +09:00
Cedric Bail
e89f32d28d
eo: try to fix callback array to work on other system.
2013-07-16 13:41:27 +09:00
Cedric Bail
cb5dbb55c3
eo: reporting error here just make the caller code more complex for nothing valuable.
2013-07-05 10:18:19 +09:00
Cedric Bail
cc012b754c
eo: little micro optimization.
2013-07-01 18:35:55 +09:00
Cedric Bail
dcf65a8eec
eo: add a new macro to make the code easier to read and use it.
2013-06-28 15:28:30 +09:00
Cedric Bail
7849c5de32
eo: 30% speed improvement in message propagation.
2013-06-28 10:18:39 +09:00
Tom Hacohen
6e3f555fe4
Eo: Made del event an hot event (we always want to get it).
2013-05-21 15:07:41 +01:00
Cedric Bail
1db92f9ac0
eo: some event should not be frozen.
2013-05-20 18:17:29 +09:00
Daniel Willmann
7f87d9891d
eo: Fix incorrect pointer allocation
...
We want to allocate sizeof(Eo_Dbg_Info) - not sizeof(Eo_Dbg_Info *)
bytes.
2013-04-24 23:27:48 +01:00
Tom Hacohen
269e3a7797
Eo: Fixed an error in in _eo_callback_remove and a few minor things.
...
The other things are not really issues but more about silencing clang.
Thanks to clang-analyzer.
2013-04-12 17:17:38 +01:00
Tom Hacohen
263e54d705
Eo: Moved the debug info functions to the base class code.
2013-04-12 13:49:26 +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
Tom Hacohen
45fdd4574e
Eo base: Reduce object memory footprint.
2013-04-11 17:04:42 +01:00
Tom Hacohen
c226a11bfe
Eo callbacks: Improve memory footprint of callbacks.
...
We don't really need a double-linked-list with a pointer to the last item.
This saves us 2 pointers per callback, which is a decent improvement.
2013-04-11 15:07:07 +01:00