#ifndef EFL_GENERATED_EVAS_POLYGON_HH
#define EFL_GENERATED_EVAS_POLYGON_HH

#include <Eo.h>
#include <Eo.hh>

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

#include "canvas/evas_object.eo.hh"

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

   evas_polygon(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : evas_polygon(_c0(_p))
   {}

   /// @brief Copy Constructor.
   ///
   evas_polygon(evas_polygon const& other)
      : evas_object(eo_ref(other._eo_ptr()))
   {}

   ~evas_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_OBJ_POLYGON_CLASS);
   }

private:
   static Eo* _c0(efl::eo::parent_type _p)
   {
      return eo_add_custom(EVAS_OBJ_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());
}

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

      void point_add(Evas_Coord x, Evas_Coord y)
      {
         eo_do(static_cast<T*>(this)->_eo_ptr(), ::evas_obj_polygon_point_add(x, y));
      }

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

   };
};

inline Eo_Class const* get_eo_class(tag<::evas_polygon>)
{
   return (EVAS_OBJ_POLYGON_CLASS);
}

} } }
#endif // EFL_GENERATED_EVAS_POLYGON_HH

