#include "efl_app.eo.h"
#include "efl_appthread.eo.h"
+/* To be deprecated at some point */
+
+/** Please use efl_provider_register instead. */
+EAPI Eina_Bool efl_loop_register(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
+/** Please use efl_provider_unregister instead. */
+EAPI Eina_Bool efl_loop_unregister(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
+
/**
* @brief Quits the main loop once all the events currently on the queue have
* been processed.
return efl_provider_register(obj, klass, provider);
}
+EFL_FUNC_BODYV(efl_loop_register, Eina_Bool, EINA_FALSE, EFL_FUNC_CALL(klass, provider), const Efl_Class *klass, const Efl_Object *provider);
+
static Eina_Bool
_efl_loop_unregister(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED,
const Efl_Class *klass, const Efl_Object *provider)
return efl_provider_unregister(obj, klass, provider);
}
+EFL_FUNC_BODYV(efl_loop_unregister, Eina_Bool, EINA_FALSE, EFL_FUNC_CALL(klass, provider), const Efl_Class *klass, const Efl_Object *provider);
+
void
_efl_loop_messages_filter(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, void *handler_pd)
{
return NULL;
}
-#define EFL_LOOP_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process)
+#define EFL_LOOP_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process), \
+ EFL_OBJECT_OP_FUNC(efl_loop_register, _efl_loop_register), \
+ EFL_OBJECT_OP_FUNC(efl_loop_unregister, _efl_loop_unregister)
#include "efl_loop.eo.c"
}
return: future<void> @owned; [[The future handle.]]
}
- register {
- [[Will register a manager of a specific class to be answered by eo.provider_find.]]
- params {
- @in klass: const(Efl.Class); [[The class provided by the registered provider.]]
- @in provider: const(Efl.Object); [[The provider for the newly registered class that has to provide that said Efl.Class.]]
- }
- return: bool; [[$true if successfully register, $false otherwise.]]
- }
- unregister {
- [[Will unregister a manager of a specific class that was previously registered and answered by eo.provider_find.]]
- params {
- @in klass: const(Efl.Class); [[The class provided by the provider to unregister for.]]
- @in provider: const(Efl.Object); [[The provider for the registered class to unregister.]]
- }
- return: bool; [[$true if successfully unregistered, $false otherwise.]]
- }
}
events {
idle,enter @restart: void; [[Event occurs once the main loop enters the idle state.]]