[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_polygon.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Canvas {
11
12 /// <summary>Low-level polygon object</summary>
13 [Efl.Canvas.Polygon.NativeMethods]
14 public class Polygon : Efl.Canvas.Object, Efl.Eo.IWrapper
15 {
16     ///<summary>Pointer to the native class description.</summary>
17     public override System.IntPtr NativeClass
18     {
19         get
20         {
21             if (((object)this).GetType() == typeof(Polygon))
22             {
23                 return GetEflClassStatic();
24             }
25             else
26             {
27                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
28             }
29         }
30     }
31
32     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
33         efl_canvas_polygon_class_get();
34     /// <summary>Initializes a new instance of the <see cref="Polygon"/> class.</summary>
35     /// <param name="parent">Parent instance.</param>
36     public Polygon(Efl.Object parent= null
37             ) : base(efl_canvas_polygon_class_get(), typeof(Polygon), parent)
38     {
39         FinishInstantiation();
40     }
41
42     /// <summary>Initializes a new instance of the <see cref="Polygon"/> class.
43     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
44     /// <param name="raw">The native pointer to be wrapped.</param>
45     protected Polygon(System.IntPtr raw) : base(raw)
46     {
47             }
48
49     /// <summary>Initializes a new instance of the <see cref="Polygon"/> class.
50     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
51     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
52     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
53     /// <param name="parent">The Efl.Object parent of this instance.</param>
54     protected Polygon(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
55     {
56     }
57
58     /// <summary>Verifies if the given object is equal to this one.</summary>
59     /// <param name="instance">The object to compare to.</param>
60     /// <returns>True if both objects point to the same native object.</returns>
61     public override bool Equals(object instance)
62     {
63         var other = instance as Efl.Object;
64         if (other == null)
65         {
66             return false;
67         }
68         return this.NativeHandle == other.NativeHandle;
69     }
70
71     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
72     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
73     public override int GetHashCode()
74     {
75         return this.NativeHandle.ToInt32();
76     }
77
78     /// <summary>Turns the native pointer into a string representation.</summary>
79     /// <returns>A string with the type and the native pointer for this object.</returns>
80     public override String ToString()
81     {
82         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
83     }
84
85     /// <summary>Adds the given point to the given evas polygon object.</summary>
86     /// <param name="pos">A point coordinate.</param>
87     virtual public void AddPoint(Eina.Position2D pos) {
88          Eina.Position2D.NativeStruct _in_pos = pos;
89                         Efl.Canvas.Polygon.NativeMethods.efl_canvas_polygon_point_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),_in_pos);
90         Eina.Error.RaiseIfUnhandledException();
91                          }
92     /// <summary>Removes all of the points from the given evas polygon object.</summary>
93     virtual public void ClearPoints() {
94          Efl.Canvas.Polygon.NativeMethods.efl_canvas_polygon_points_clear_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
95         Eina.Error.RaiseIfUnhandledException();
96          }
97     private static IntPtr GetEflClassStatic()
98     {
99         return Efl.Canvas.Polygon.efl_canvas_polygon_class_get();
100     }
101     /// <summary>Wrapper for native methods and virtual method delegates.
102     /// For internal use by generated code only.</summary>
103     public new class NativeMethods : Efl.Canvas.Object.NativeMethods
104     {
105         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
106         /// <summary>Gets the list of Eo operations to override.</summary>
107         /// <returns>The list of Eo operations to be overload.</returns>
108         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
109         {
110             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
111             var methods = Efl.Eo.Globals.GetUserMethods(type);
112
113             if (efl_canvas_polygon_point_add_static_delegate == null)
114             {
115                 efl_canvas_polygon_point_add_static_delegate = new efl_canvas_polygon_point_add_delegate(point_add);
116             }
117
118             if (methods.FirstOrDefault(m => m.Name == "AddPoint") != null)
119             {
120                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_polygon_point_add"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_polygon_point_add_static_delegate) });
121             }
122
123             if (efl_canvas_polygon_points_clear_static_delegate == null)
124             {
125                 efl_canvas_polygon_points_clear_static_delegate = new efl_canvas_polygon_points_clear_delegate(points_clear);
126             }
127
128             if (methods.FirstOrDefault(m => m.Name == "ClearPoints") != null)
129             {
130                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_polygon_points_clear"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_polygon_points_clear_static_delegate) });
131             }
132
133             descs.AddRange(base.GetEoOps(type));
134             return descs;
135         }
136         /// <summary>Returns the Eo class for the native methods of this class.</summary>
137         /// <returns>The native class pointer.</returns>
138         public override IntPtr GetEflClass()
139         {
140             return Efl.Canvas.Polygon.efl_canvas_polygon_class_get();
141         }
142
143         #pragma warning disable CA1707, SA1300, SA1600
144
145         
146         private delegate void efl_canvas_polygon_point_add_delegate(System.IntPtr obj, System.IntPtr pd,  Eina.Position2D.NativeStruct pos);
147
148         
149         public delegate void efl_canvas_polygon_point_add_api_delegate(System.IntPtr obj,  Eina.Position2D.NativeStruct pos);
150
151         public static Efl.Eo.FunctionWrapper<efl_canvas_polygon_point_add_api_delegate> efl_canvas_polygon_point_add_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_polygon_point_add_api_delegate>(Module, "efl_canvas_polygon_point_add");
152
153         private static void point_add(System.IntPtr obj, System.IntPtr pd, Eina.Position2D.NativeStruct pos)
154         {
155             Eina.Log.Debug("function efl_canvas_polygon_point_add was called");
156             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
157             if (wrapper != null)
158             {
159         Eina.Position2D _in_pos = pos;
160                             
161                 try
162                 {
163                     ((Polygon)wrapper).AddPoint(_in_pos);
164                 }
165                 catch (Exception e)
166                 {
167                     Eina.Log.Warning($"Callback error: {e.ToString()}");
168                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
169                 }
170
171                         
172             }
173             else
174             {
175                 efl_canvas_polygon_point_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), pos);
176             }
177         }
178
179         private static efl_canvas_polygon_point_add_delegate efl_canvas_polygon_point_add_static_delegate;
180
181         
182         private delegate void efl_canvas_polygon_points_clear_delegate(System.IntPtr obj, System.IntPtr pd);
183
184         
185         public delegate void efl_canvas_polygon_points_clear_api_delegate(System.IntPtr obj);
186
187         public static Efl.Eo.FunctionWrapper<efl_canvas_polygon_points_clear_api_delegate> efl_canvas_polygon_points_clear_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_polygon_points_clear_api_delegate>(Module, "efl_canvas_polygon_points_clear");
188
189         private static void points_clear(System.IntPtr obj, System.IntPtr pd)
190         {
191             Eina.Log.Debug("function efl_canvas_polygon_points_clear was called");
192             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
193             if (wrapper != null)
194             {
195             
196                 try
197                 {
198                     ((Polygon)wrapper).ClearPoints();
199                 }
200                 catch (Exception e)
201                 {
202                     Eina.Log.Warning($"Callback error: {e.ToString()}");
203                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
204                 }
205
206         
207             }
208             else
209             {
210                 efl_canvas_polygon_points_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
211             }
212         }
213
214         private static efl_canvas_polygon_points_clear_delegate efl_canvas_polygon_points_clear_static_delegate;
215
216         #pragma warning restore CA1707, SA1300, SA1600
217
218 }
219 }
220 }
221
222 }
223