diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 1096c62bdb..9c7dcfde94 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -29,22 +29,20 @@ struct _Efl_Loop_Promise_Simple_Data GENERIC_ALLOC_SIZE_DECLARE(Efl_Loop_Promise_Simple_Data); EOLIAN static Efl_Loop_Message_Handler * -_efl_loop_message_handler_get(Efl_Loop *loop, const Efl_Class *klass) +_efl_loop_message_handler_get(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const Efl_Class *klass) { Message_Handler mh = { 0 }, *mh2; - Efl_Loop_Data *ld = efl_data_scope_get(loop, EFL_LOOP_CLASS); unsigned int i, n; - if (!ld) return NULL; - n = eina_inarray_count(ld->message_handlers); + n = eina_inarray_count(pd->message_handlers); for (i = 0; i < n; i++) { - mh2 = eina_inarray_nth(ld->message_handlers, i); + mh2 = eina_inarray_nth(pd->message_handlers, i); if (mh2->klass == klass) return mh2->handler; } mh.klass = klass; - mh.handler = efl_add(klass, loop); - eina_inarray_push(ld->message_handlers, &mh); + mh.handler = efl_add(klass, obj); + eina_inarray_push(pd->message_handlers, &mh); return mh.handler; } diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 737c641cf4..4516c4c1a3 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -98,13 +98,12 @@ class @beta Efl.Loop extends Efl.Task } return: bool; [[$true if successfully unregistered, $false otherwise.]] } - message_handler_get @class { + message_handler_get { [[Get a message handler object that is created by and owned by the Efl.Loop object, so you can listen to this message type by listening to message events on the handler as well as send objects as events.]] params { - @in loop: Efl.Loop; [[The loop to get the object from.]] @in klass: const(Efl.Class); [[The class of the message object.]] } return: Efl.Loop_Message_Handler; [[The message handler to use.]]