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