diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2016-01-29 21:43:06 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2016-02-01 13:51:13 -0800 |
commit | 9f1107f42cfe487c7057487f231b5405e4b6e56d (patch) | |
tree | d97b55175408b22da15a617a2c20b2ae44845b1e | |
parent | 27baa524bc2ac7fe58c70b73388265484b1ef0db (diff) | |
download | efl-9f1107f42cfe487c7057487f231b5405e4b6e56d.tar.gz |
eo: make callback,add and callback,del a hot event
This is absolutely necessary as there is no way to track callback other than
with this method and we would be blind to any callback registered during a freeze
(specifically when think interact in all out stack).
Also this should definitively be a patch on just the .eo file, but I can't
figure out how to do so.
-rw-r--r-- | src/lib/eo/Eo.h | 7 | ||||
-rw-r--r-- | src/lib/eo/eo_base.eo | 4 | ||||
-rw-r--r-- | src/lib/eo/eo_base_class.c | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 4eb13cd607..2a025058e7 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -1020,6 +1020,12 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const eo_event_callback_array_priority_add(array, \ EO_CALLBACK_PRIORITY_DEFAULT, data) +EOAPI extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_ADD; +EOAPI extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_DEL; + +#define EO_BASE_EVENT_CALLBACK_ADD (&(_EO_BASE_EVENT_CALLBACK_ADD)) +#define EO_BASE_EVENT_CALLBACK_DEL (&(_EO_BASE_EVENT_CALLBACK_DEL)) + /** * @} */ @@ -1032,6 +1038,7 @@ EINA_DEPRECATED static inline const Eo_Event_Description* _EO_EV_DEL(void) { ret #define EO_EV_CALLBACK_DEL _EO_EV_CALLBACK_DEL() #define EO_EV_DEL _EO_EV_DEL() + /** * @} */ diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index c4fa2b8b21..9bcfe9dc24 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -289,8 +289,8 @@ abstract Eo.Base () class.destructor; } events { - callback,add; [[A callback was added.]] - callback,del; [[A callback was deleted.]] +/* callback,add; [[A callback was added.]] + callback,del; [[A callback was deleted.]] */ del; [[Obj is being deleted.]] } } diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 64c6df343f..5b0cd10c2a 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -36,6 +36,11 @@ typedef struct void *data; } Eo_Generic_Data_Node; +EOAPI const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_ADD = + EO_EVENT_DESCRIPTION_HOT("callback,add"); +EOAPI const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_DEL = + EO_EVENT_DESCRIPTION_HOT("callback,del"); + static void _eo_generic_data_node_free(Eo_Generic_Data_Node *node) { |