#ifndef EFL_GENERATED_EFL_IMAGE_HH
#define EFL_GENERATED_EFL_IMAGE_HH

extern "C"
{
#include <Efl.h>
}
#include <Eo.hh>

#include <eo_cxx_interop.hh>

extern "C"
{
#include "efl_image.eo.h"
}


namespace efl {

struct image
      : efl::eo::base
{
   /// @brief Eo Constructor.
   ///
   /// Constructs the object from an Eo* pointer stealing its ownership.
   ///
   /// @param eo The Eo object pointer.
   ///
   explicit image(Eo* eo)
      : efl::eo::base(eo)
   {}

   /// @brief nullptr_t Constructor.
   ///
   /// Constructs an empty (null) object.
   ///
   explicit image(std::nullptr_t)
      : efl::eo::base(nullptr)
   {}

   /// @brief Copy Constructor.
   ///
   image(image const& other)
      : efl::eo::base(eo_ref(other._eo_ptr()))
   {}

   ~image() {}

   /// @brief Check if an image  can be animated (have multiple frames)
   ///
   /// @return whether the image support animation
   ///
   /// @param is_animated If it's animated or not.
   ///
   bool animated_get() const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::efl_image_animated_get());
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

   /// @param w The new width of the image's load size.
   /// @param h The new height of the image's load size.
   ///
   void load_size_get(int* w_, int* h_) const
   {
      eo_do(_eo_ptr(), ::efl_image_load_size_get(w_, h_));
   }

   /// @brief Set the loading size of an image. The image will be loaded into memory as if it was
   /// the set size instead of the original size. This can save a lot of memory, and is
   /// important for scalable types like svg.
   ///
   /// @param w The new width of the image's load size.
   /// @param h The new height of the image's load size.
   ///
   void load_size_set(int w_, int h_) const
   {
      eo_do(_eo_ptr(), ::efl_image_load_size_set(w_, h_));
   }

   /// @brief Retrieves whether the given image is using high-quality
   /// image scaling algorithm.
   ///
   /// @return Whether smooth scale is being used.
   ///
   /// @param smooth_scale Whether to use smooth scale or not.
   ///
   bool smooth_scale_get() const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::efl_image_smooth_scale_get());
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

   /// @brief Sets whether to use high-quality image scaling algorithm on the
   /// given image.
   ///
   /// When enabled, a higher quality image scaling algorithm is used when
   /// scaling images to sizes other than the source image's original
   /// one. This gives better results but is more computationally
   /// expensive.
   ///
   /// @param smooth_scale Whether to use smooth scale or not.
   ///
   void smooth_scale_set(bool smooth_scale_) const
   {
      eo_do(_eo_ptr(), ::efl_image_smooth_scale_set(efl::eolian::to_c(smooth_scale_)));
   }

   /// @brief The native ration of the image object
   ///
   /// @param ratio The image's ratio
   ///
   double ratio_get() const
   {
      double _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::efl_image_ratio_get());
      return _tmp_ret;
   }

   static Eo_Class const* _eo_class()
   {
      return(EFL_IMAGE_INTERFACE);
   }

private:
};
} 

template <typename T>
bool efl_image_animated_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   return static_cast<T*>(self->this_)->animated_get();
}

template <typename T>
void efl_image_load_size_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, int* w_, int* h_)
{
   static_cast<T*>(self->this_)->load_size_get(w_, h_);
}

template <typename T>
void efl_image_load_size_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, int w_, int h_)
{
   static_cast<T*>(self->this_)->load_size_set(w_, h_);
}

template <typename T>
bool efl_image_smooth_scale_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   return static_cast<T*>(self->this_)->smooth_scale_get();
}

template <typename T>
void efl_image_smooth_scale_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, Eina_Bool smooth_scale_)
{
   static_cast<T*>(self->this_)->smooth_scale_set(efl::eolian::to_cxx<bool>(smooth_scale_, std::tuple<std::false_type>()));
}

template <typename T>
double efl_image_ratio_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   return static_cast<T*>(self->this_)->ratio_get();
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< efl::image >
{
   template <typename T>
   struct type
   {
      virtual bool animated_get()
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::efl_image_animated_get());
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      virtual void load_size_get(int* w_, int* h_)
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::efl_image_load_size_get(w_, h_));
      }

      virtual void load_size_set(int w_, int h_)
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::efl_image_load_size_set(w_, h_));
      }

      virtual bool smooth_scale_get()
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::efl_image_smooth_scale_get());
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      virtual void smooth_scale_set(bool smooth_scale_)
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::efl_image_smooth_scale_set(efl::eolian::to_c(smooth_scale_)));
      }

      virtual double ratio_get()
      {
         double _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::efl_image_ratio_get());
            return _tmp_ret;
      }

   };
};


template<>
struct operation_description_class_size< efl::image >
{
   static const int value = 6;
};

template <typename T>
int initialize_operation_description(efl::eo::detail::tag<efl::image>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   ops[0].func = reinterpret_cast<void*>(& ::efl_image_animated_get_wrapper<T>);
   ops[0].api_func = reinterpret_cast<void*>(& ::efl_image_animated_get);
   ops[0].op = EO_OP_OVERRIDE;
   ops[0].op_type = EO_OP_TYPE_REGULAR;
   ops[0].doc = NULL;

   ops[1].func = reinterpret_cast<void*>(& ::efl_image_load_size_get_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::efl_image_load_size_get);
   ops[1].op = EO_OP_OVERRIDE;
   ops[1].op_type = EO_OP_TYPE_REGULAR;
   ops[1].doc = NULL;

   ops[2].func = reinterpret_cast<void*>(& ::efl_image_load_size_set_wrapper<T>);
   ops[2].api_func = reinterpret_cast<void*>(& ::efl_image_load_size_set);
   ops[2].op = EO_OP_OVERRIDE;
   ops[2].op_type = EO_OP_TYPE_REGULAR;
   ops[2].doc = NULL;

   ops[3].func = reinterpret_cast<void*>(& ::efl_image_smooth_scale_get_wrapper<T>);
   ops[3].api_func = reinterpret_cast<void*>(& ::efl_image_smooth_scale_get);
   ops[3].op = EO_OP_OVERRIDE;
   ops[3].op_type = EO_OP_TYPE_REGULAR;
   ops[3].doc = NULL;

   ops[4].func = reinterpret_cast<void*>(& ::efl_image_smooth_scale_set_wrapper<T>);
   ops[4].api_func = reinterpret_cast<void*>(& ::efl_image_smooth_scale_set);
   ops[4].op = EO_OP_OVERRIDE;
   ops[4].op_type = EO_OP_TYPE_REGULAR;
   ops[4].doc = NULL;

   ops[5].func = reinterpret_cast<void*>(& ::efl_image_ratio_get_wrapper<T>);
   ops[5].api_func = reinterpret_cast<void*>(& ::efl_image_ratio_get);
   ops[5].op = EO_OP_OVERRIDE;
   ops[5].op_type = EO_OP_TYPE_REGULAR;
   ops[5].doc = NULL;

   return 0;
}
inline void
call_constructor(tag< efl::image >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<efl::image, ::std::tuple<efl::eo::parent_type> > const& args)
{
   eo_do_super(eo, cls, ::eo_constructor());
   eo_do(eo, ::eo_parent_set(args.get<0>()._eo_raw));
}

template<>
struct extension_inheritance< efl::image>
{
   template <typename U>
   struct type
   {
      operator efl::image() const
      {
         return efl::image(eo_ref(static_cast<U const*>(this)->_eo_ptr()));
      }

      bool animated_get()
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::efl_image_animated_get());
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      void load_size_get(int* w_, int* h_)
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::efl_image_load_size_get(w_, h_));
      }

      void load_size_set(int w_, int h_)
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::efl_image_load_size_set(w_, h_));
      }

      bool smooth_scale_get()
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::efl_image_smooth_scale_get());
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      void smooth_scale_set(bool smooth_scale_)
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::efl_image_smooth_scale_set(efl::eolian::to_c(smooth_scale_)));
      }

      double ratio_get()
      {
         double _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::efl_image_ratio_get());
            return _tmp_ret;
      }

   };
};

inline Eo_Class const* get_eo_class(tag<efl::image>)
{
   return (EFL_IMAGE_INTERFACE);
}

} } }
#endif // EFL_GENERATED_EFL_IMAGE_HH

