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