### Library
ecore_eolian_files_legacy = \
- lib/ecore/efl_timer.eo \
lib/ecore/ecore_poller.eo \
lib/ecore/ecore_exe.eo \
lib/ecore/ecore_animator.eo
ecore_eolian_files = \
- $(ecore_eolian_files_legacy) \
lib/ecore/efl_loop.eo \
- lib/ecore/ecore_parent.eo
+ lib/ecore/efl_loop_user.eo \
+ lib/ecore/efl_timer.eo \
+ lib/ecore/ecore_parent.eo \
+ $(ecore_eolian_files_legacy)
ecore_eolian_type_files = \
lib/ecore/ecore_types.eot
lib/ecore/ecore_idler.c \
lib/ecore/ecore_job.c \
lib/ecore/ecore_main.c \
+lib/ecore/efl_loop_user.c \
lib/ecore/ecore_pipe.c \
lib/ecore/ecore_poller.c \
lib/ecore/ecore_time.c \
#include "efl_loop.eo.h"
+#include "efl_loop_user.eo.h"
+
/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
EAPI Eo *ecore_main_loop_get(void);
--- /dev/null
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Ecore.h>
+
+#include "ecore_private.h"
+
+typedef struct _Efl_Loop_User_Data Efl_Loop_User_Data;
+struct _Efl_Loop_User_Data
+{
+};
+
+static Efl_Loop *
+_efl_loop_user_loop_get(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED)
+{
+ return eo_provider_find(obj, EFL_LOOP_CLASS);
+}
+
+static void
+_efl_loop_user_eo_base_parent_set(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED, Eo_Base *parent)
+{
+ if (parent != NULL && eo_provider_find(parent, EFL_LOOP_CLASS) == NULL)
+ return ;
+
+ eo_parent_set(eo_super(obj, EFL_LOOP_USER_CLASS), parent);
+}
+
+#include "efl_loop_user.eo.c"
--- /dev/null
+class Efl.Loop_User (Eo.Base)
+{
+ [[An Efl.Loop_User is a class that require one of the parent to provide
+ an Efl.Loop interface when doing provider_find. It will enforce this by
+ only allowing parent that provide such interface or NULL.]]
+ legacy_prefix: null;
+ methods {
+ loop_get {
+ return: Efl.Loop *;
+ }
+ }
+ implements {
+ Eo.Base.parent.set;
+ }
+}
\ No newline at end of file