EAPI EAPI_WEAK const Efl_Event_Description _EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD_STATE_CHANGED =
   EFL_EVENT_DESCRIPTION("image,preload_state,changed");
EAPI EAPI_WEAK const Efl_Event_Description _EFL_GFX_IMAGE_EVENT_IMAGE_RESIZED =
   EFL_EVENT_DESCRIPTION("image,resized");

static Eina_Error
__eolian_efl_gfx_image_smooth_scale_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   Eina_Bool cval;
   if (!eina_value_bool_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_gfx_image_smooth_scale_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_smooth_scale_set, EFL_FUNC_CALL(smooth_scale), Eina_Bool smooth_scale);

static Eina_Value
__eolian_efl_gfx_image_smooth_scale_get_reflect(const Eo *obj)
{
   Eina_Bool val = efl_gfx_image_smooth_scale_get(obj);
   return eina_value_bool_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_smooth_scale_get, Eina_Bool, EINA_TRUE /* true */);
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_scale_method_set, EFL_FUNC_CALL(scale_method), Efl_Gfx_Image_Scale_Method scale_method);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_scale_method_get, Efl_Gfx_Image_Scale_Method, 0 /* Efl.Gfx.Image_Scale_Method.none */);

static Eina_Error
__eolian_efl_gfx_image_can_upscale_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   Eina_Bool cval;
   if (!eina_value_bool_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_gfx_image_can_upscale_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_can_upscale_set, EFL_FUNC_CALL(upscale), Eina_Bool upscale);

static Eina_Value
__eolian_efl_gfx_image_can_upscale_get_reflect(const Eo *obj)
{
   Eina_Bool val = efl_gfx_image_can_upscale_get(obj);
   return eina_value_bool_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_can_upscale_get, Eina_Bool, EINA_TRUE /* true */);

static Eina_Error
__eolian_efl_gfx_image_can_downscale_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   Eina_Bool cval;
   if (!eina_value_bool_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_gfx_image_can_downscale_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_can_downscale_set, EFL_FUNC_CALL(downscale), Eina_Bool downscale);

static Eina_Value
__eolian_efl_gfx_image_can_downscale_get_reflect(const Eo *obj)
{
   Eina_Bool val = efl_gfx_image_can_downscale_get(obj);
   return eina_value_bool_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_can_downscale_get, Eina_Bool, EINA_TRUE /* true */);

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

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_ratio_get, double, 1.000000);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_content_region_get, Eina_Rect, (EINA_RECT_EMPTY()));
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_border_insets_set, EFL_FUNC_CALL(l, r, t, b), int l, int r, int t, int b);
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV_CONST(efl_gfx_image_border_insets_get, EFL_FUNC_CALL(l, r, t, b), int *l, int *r, int *t, int *b);

static Eina_Error
__eolian_efl_gfx_image_border_insets_scale_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_gfx_image_border_insets_scale_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_border_insets_scale_set, EFL_FUNC_CALL(scale), double scale);

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

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_border_insets_scale_get, double, 1.000000);
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_center_fill_mode_set, EFL_FUNC_CALL(fill), Efl_Gfx_Center_Fill_Mode fill);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_center_fill_mode_get, Efl_Gfx_Center_Fill_Mode, 1 /* Efl.Gfx.Center_Fill_Mode.default */);
static void
_efl_gfx_image_stretch_region_set_ownership_fallback(Eina_Iterator *horizontal, Eina_Iterator *vertical)
{
   eina_iterator_free(horizontal);
   eina_iterator_free(vertical);
}

EAPI EAPI_WEAK EFL_FUNC_BODYV_FALLBACK(efl_gfx_image_stretch_region_set, Eina_Error, 0, _efl_gfx_image_stretch_region_set_ownership_fallback(horizontal, vertical);, EFL_FUNC_CALL(horizontal, vertical), Eina_Iterator *horizontal, Eina_Iterator *vertical);
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV_CONST(efl_gfx_image_stretch_region_get, EFL_FUNC_CALL(horizontal, vertical), Eina_Iterator **horizontal, Eina_Iterator **vertical);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_size_get, Eina_Size2D, ((Eina_Size2D){0}));
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_content_hint_set, EFL_FUNC_CALL(hint), Efl_Gfx_Image_Content_Hint hint);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_content_hint_get, Efl_Gfx_Image_Content_Hint, 0 /* Efl.Gfx.Image_Content_Hint.none */);
EAPI EAPI_WEAK EFL_VOID_FUNC_BODYV(efl_gfx_image_scale_hint_set, EFL_FUNC_CALL(hint), Efl_Gfx_Image_Scale_Hint hint);
EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_scale_hint_get, Efl_Gfx_Image_Scale_Hint, 0 /* Efl.Gfx.Image_Scale_Hint.none */);

static Eina_Value
__eolian_efl_gfx_image_image_load_error_get_reflect(const Eo *obj)
{
   Eina_Error val = efl_gfx_image_load_error_get(obj);
   return eina_value_int_init(val);
}

EAPI EAPI_WEAK EFL_FUNC_BODY_CONST(efl_gfx_image_load_error_get, Eina_Error, 0);

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

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef EFL_GFX_IMAGE_EXTRA_OPS
#define EFL_GFX_IMAGE_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(efl_gfx_image_smooth_scale_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_smooth_scale_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_scale_method_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_scale_method_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_can_upscale_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_can_upscale_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_can_downscale_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_can_downscale_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_ratio_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_content_region_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_border_insets_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_border_insets_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_border_insets_scale_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_border_insets_scale_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_center_fill_mode_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_center_fill_mode_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_stretch_region_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_stretch_region_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_size_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_content_hint_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_content_hint_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_scale_hint_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_scale_hint_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_gfx_image_load_error_get, NULL),
      EFL_GFX_IMAGE_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"smooth_scale", __eolian_efl_gfx_image_smooth_scale_set_reflect, __eolian_efl_gfx_image_smooth_scale_get_reflect},
      {"can_upscale", __eolian_efl_gfx_image_can_upscale_set_reflect, __eolian_efl_gfx_image_can_upscale_get_reflect},
      {"can_downscale", __eolian_efl_gfx_image_can_downscale_set_reflect, __eolian_efl_gfx_image_can_downscale_get_reflect},
      {"ratio", NULL, __eolian_efl_gfx_image_ratio_get_reflect},
      {"border_insets_scale", __eolian_efl_gfx_image_border_insets_scale_set_reflect, __eolian_efl_gfx_image_border_insets_scale_get_reflect},
      {"image_load_error", NULL, __eolian_efl_gfx_image_image_load_error_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_gfx_image_class_desc = {
   EO_VERSION,
   "Efl.Gfx.Image",
   EFL_CLASS_TYPE_INTERFACE,
   0,
   _efl_gfx_image_class_initializer,
   NULL,
   NULL
};

EFL_DEFINE_CLASS(efl_gfx_image_interface_get, &_efl_gfx_image_class_desc, NULL, NULL);
