EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_IDLE_ENTER =
   EFL_EVENT_DESCRIPTION_RESTART("idle,enter");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_IDLE_EXIT =
   EFL_EVENT_DESCRIPTION_RESTART("idle,exit");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_IDLE =
   EFL_EVENT_DESCRIPTION_RESTART("idle");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_ARGUMENTS =
   EFL_EVENT_DESCRIPTION("arguments");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_POLL_HIGH =
   EFL_EVENT_DESCRIPTION("poll,high");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_POLL_MEDIUM =
   EFL_EVENT_DESCRIPTION("poll,medium");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_POLL_LOW =
   EFL_EVENT_DESCRIPTION("poll,low");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_LOOP_EVENT_QUIT =
   EFL_EVENT_DESCRIPTION("quit");

void _efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd);

EAPI EAPI_WEAK EFL_VOID_FUNC_BODY(efl_loop_iterate);

int _efl_loop_iterate_may_block(Eo *obj, Efl_Loop_Data *pd, int may_block);

EAPI EAPI_WEAK EFL_FUNC_BODYV(efl_loop_iterate_may_block, int, 0, EFL_FUNC_CALL(may_block), int may_block);

Eina_Value *_efl_loop_begin(Eo *obj, Efl_Loop_Data *pd);

EAPI EAPI_WEAK EFL_FUNC_BODY(efl_loop_begin, Eina_Value *, NULL);

void _efl_loop_quit(Eo *obj, Efl_Loop_Data *pd, Eina_Value exit_code);

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_loop_quit, EFL_FUNC_CALL(exit_code), Eina_Value exit_code);

Eina_Future *_efl_loop_job(Eo *obj, Efl_Loop_Data *pd);

EAPI EAPI_WEAK EFL_FUNC_BODY(efl_loop_job, Eina_Future *, NULL);

void _efl_loop_throttle_set(Eo *obj, Efl_Loop_Data *pd, double amount);


static Eina_Error
__eolian_efl_loop_throttle_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   double cval;
   if (!eina_value_double_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_loop_throttle_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_loop_throttle_set, EFL_FUNC_CALL(amount), double amount);

double _efl_loop_throttle_get(const Eo *obj, Efl_Loop_Data *pd);


static Eina_Value
__eolian_efl_loop_throttle_get_reflect(const Eo *obj)
{
   double val = efl_loop_throttle_get(obj);
   return eina_value_double_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_loop_throttle_get, double, 0);

void _efl_loop_time_set(Eo *obj, Efl_Loop_Data *pd, double timepoint);


static Eina_Error
__eolian_efl_loop_time_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   double cval;
   if (!eina_value_double_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_loop_time_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_loop_time_set, EFL_FUNC_CALL(timepoint), double timepoint);

double _efl_loop_time_get(const Eo *obj, Efl_Loop_Data *pd);


static Eina_Value
__eolian_efl_loop_time_get_reflect(const Eo *obj)
{
   double val = efl_loop_time_get(obj);
   return eina_value_double_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_loop_time_get, double, 0);

Eina_Future *_efl_loop_idle(Eo *obj, Efl_Loop_Data *pd);

EAPI EAPI_WEAK EFL_FUNC_BODY(efl_loop_idle, Eina_Future *, NULL);

Eina_Future *_efl_loop_timeout(Eo *obj, Efl_Loop_Data *pd, double time);

EAPI EAPI_WEAK EFL_FUNC_BODYV(efl_loop_timeout, Eina_Future *, NULL, EFL_FUNC_CALL(time), double time);

Efl_Object *_efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd);


void _efl_loop_efl_object_invalidate(Eo *obj, Efl_Loop_Data *pd);


void _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd);


Eina_Bool _efl_loop_efl_task_run(Eo *obj, Efl_Loop_Data *pd);


void _efl_loop_efl_task_end(Eo *obj, Efl_Loop_Data *pd);


static Eina_Bool
_efl_loop_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef EFL_LOOP_EXTRA_OPS
#define EFL_LOOP_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(efl_loop_iterate, _efl_loop_iterate),
      EFL_OBJECT_OP_FUNC(efl_loop_iterate_may_block, _efl_loop_iterate_may_block),
      EFL_OBJECT_OP_FUNC(efl_loop_begin, _efl_loop_begin),
      EFL_OBJECT_OP_FUNC(efl_loop_quit, _efl_loop_quit),
      EFL_OBJECT_OP_FUNC(efl_loop_job, _efl_loop_job),
      EFL_OBJECT_OP_FUNC(efl_loop_throttle_set, _efl_loop_throttle_set),
      EFL_OBJECT_OP_FUNC(efl_loop_throttle_get, _efl_loop_throttle_get),
      EFL_OBJECT_OP_FUNC(efl_loop_time_set, _efl_loop_time_set),
      EFL_OBJECT_OP_FUNC(efl_loop_time_get, _efl_loop_time_get),
      EFL_OBJECT_OP_FUNC(efl_loop_idle, _efl_loop_idle),
      EFL_OBJECT_OP_FUNC(efl_loop_timeout, _efl_loop_timeout),
      EFL_OBJECT_OP_FUNC(efl_constructor, _efl_loop_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_invalidate, _efl_loop_efl_object_invalidate),
      EFL_OBJECT_OP_FUNC(efl_destructor, _efl_loop_efl_object_destructor),
      EFL_OBJECT_OP_FUNC(efl_task_run, _efl_loop_efl_task_run),
      EFL_OBJECT_OP_FUNC(efl_task_end, _efl_loop_efl_task_end),
      EFL_LOOP_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"throttle", __eolian_efl_loop_throttle_set_reflect, __eolian_efl_loop_throttle_get_reflect},
      {"time", __eolian_efl_loop_time_set_reflect, __eolian_efl_loop_time_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}

static const Efl_Class_Description _efl_loop_class_desc = {
   EO_VERSION,
   "Efl.Loop",
   EFL_CLASS_TYPE_REGULAR_NO_INSTANT,
   sizeof(Efl_Loop_Data),
   _efl_loop_class_initializer,
   NULL,
   NULL
};

EFL_DEFINE_CLASS(efl_loop_class_get, &_efl_loop_class_desc, EFL_TASK_CLASS, NULL);
