#ifndef EFL_GENERATED_EVAS_POLYGON_HH
#define EFL_GENERATED_EVAS_POLYGON_HH

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

#include <eo_cxx_interop.hh>

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

#include "evas_object.eo.hh"

namespace evas {

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

   /// @brief nullptr_t Constructor.
   ///
   /// Constructs an empty (null) object.
   ///
   explicit polygon(std::nullptr_t)
      : evas::object(nullptr)
   {}

   /// @brief Call the object's constructor.
   /// Should not be used with #eo_do. Only use it with #eo_do_super.
   ///
   polygon(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : polygon(_c0(_p))
   {}

   /// @brief Copy Constructor.
   ///
   polygon(polygon const& other)
      : evas::object(eo_ref(other._eo_ptr()))
   {}

   ~polygon() {}

   /// @brief Adds the given point to the given evas polygon object.
   /// @ingroup Evas_Polygon_Group
   ///
   /// @param x The X coordinate of the given point.
   /// @param y The Y coordinate of the given point.
   ///
   void point_add(Evas_Coord x_, Evas_Coord y_) const
   {
      eo_do(_eo_ptr(), ::evas_obj_polygon_point_add(x_, y_));
   }

   /// @brief Removes all of the points from the given evas polygon object.
   ///
   void points_clear() const
   {
      eo_do(_eo_ptr(), ::evas_obj_polygon_points_clear());
   }

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

private:
   static Eo* _c0(efl::eo::parent_type _p)
   {
      return eo_add_ref(EVAS_POLYGON_CLASS, _p._eo_raw, eo_constructor());
   }

};
} 

template <typename T>
void evas_polygon_point_add_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, Evas_Coord x_, Evas_Coord y_)
{
   static_cast<T*>(self->this_)->point_add(x_, y_);
}

template <typename T>
void evas_polygon_points_clear_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   static_cast<T*>(self->this_)->points_clear();
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< evas::polygon >
{
   template <typename T>
   struct type
   {
      virtual void point_add(Evas_Coord x_, Evas_Coord y_)
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::evas_obj_polygon_point_add(x_, y_));
      }

      virtual void points_clear()
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::evas_obj_polygon_points_clear());
      }

   };
};


template<>
struct operation_description_class_size< evas::polygon >
{
   static const int value = 2;
};

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

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

   return 0;
}
inline void
call_constructor(tag< evas::polygon >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<evas::polygon, ::std::tuple<> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::eo_constructor());
}

inline void
call_constructor(tag< evas::polygon >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<evas::polygon, ::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< evas::polygon>
{
   template <typename U>
   struct type
   {
      operator evas::polygon() const
      {
         return evas::polygon(eo_ref(static_cast<U const*>(this)->_eo_ptr()));
      }

      void point_add(Evas_Coord x_, Evas_Coord y_)
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::evas_obj_polygon_point_add(x_, y_));
      }

      void points_clear()
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::evas_obj_polygon_points_clear());
      }

   };
};

inline Eo_Class const* get_eo_class(tag<evas::polygon>)
{
   return (EVAS_POLYGON_CLASS);
}

} } }
#endif // EFL_GENERATED_EVAS_POLYGON_HH

