[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_vg_gradient.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 namespace Vg {
13
14 /// <summary>Efl vectopr graphics gradient abstract class</summary>
15 [Efl.Canvas.Vg.Gradient.NativeMethods]
16 public abstract class Gradient : Efl.Canvas.Vg.Node, Efl.Eo.IWrapper,Efl.Gfx.IGradient
17 {
18     ///<summary>Pointer to the native class description.</summary>
19     public override System.IntPtr NativeClass
20     {
21         get
22         {
23             if (((object)this).GetType() == typeof(Gradient))
24             {
25                 return GetEflClassStatic();
26             }
27             else
28             {
29                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
30             }
31         }
32     }
33
34     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
35         efl_canvas_vg_gradient_class_get();
36     /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.</summary>
37     /// <param name="parent">Parent instance.</param>
38     public Gradient(Efl.Object parent= null
39             ) : base(efl_canvas_vg_gradient_class_get(), typeof(Gradient), parent)
40     {
41         FinishInstantiation();
42     }
43
44     /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.
45     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
46     /// <param name="raw">The native pointer to be wrapped.</param>
47     protected Gradient(System.IntPtr raw) : base(raw)
48     {
49             }
50
51     [Efl.Eo.PrivateNativeClass]
52     private class GradientRealized : Gradient
53     {
54         private GradientRealized(IntPtr ptr) : base(ptr)
55         {
56         }
57     }
58     /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.
59     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
60     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
61     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
62     /// <param name="parent">The Efl.Object parent of this instance.</param>
63     protected Gradient(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
64     {
65     }
66
67     /// <summary>Verifies if the given object is equal to this one.</summary>
68     /// <param name="instance">The object to compare to.</param>
69     /// <returns>True if both objects point to the same native object.</returns>
70     public override bool Equals(object instance)
71     {
72         var other = instance as Efl.Object;
73         if (other == null)
74         {
75             return false;
76         }
77         return this.NativeHandle == other.NativeHandle;
78     }
79
80     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
81     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
82     public override int GetHashCode()
83     {
84         return this.NativeHandle.ToInt32();
85     }
86
87     /// <summary>Turns the native pointer into a string representation.</summary>
88     /// <returns>A string with the type and the native pointer for this object.</returns>
89     public override String ToString()
90     {
91         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
92     }
93
94     /// <summary>Get the list of color stops.</summary>
95     /// <param name="colors">Color stops list</param>
96     /// <param name="length">Length of the list</param>
97     virtual public void GetStop(out Efl.Gfx.GradientStop colors, out uint length) {
98                          var _out_colors = new System.IntPtr();
99                                 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out _out_colors, out length);
100         Eina.Error.RaiseIfUnhandledException();
101         colors = Eina.PrimitiveConversion.PointerToManaged<Efl.Gfx.GradientStop>(_out_colors);
102                                  }
103     /// <summary>Set the list of color stops for the gradient</summary>
104     /// <param name="colors">Color stops list</param>
105     /// <param name="length">Length of the list</param>
106     virtual public void SetStop(ref Efl.Gfx.GradientStop colors, uint length) {
107          Efl.Gfx.GradientStop.NativeStruct _in_colors = colors;
108                                                 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),ref _in_colors, length);
109         Eina.Error.RaiseIfUnhandledException();
110                         colors = _in_colors;
111                  }
112     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
113     /// <returns>Spread type to be used</returns>
114     virtual public Efl.Gfx.GradientSpread GetSpread() {
115          var _ret_var = Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
116         Eina.Error.RaiseIfUnhandledException();
117         return _ret_var;
118  }
119     /// <summary>Specifies the spread method that should be used for this gradient.</summary>
120     /// <param name="s">Spread type to be used</param>
121     virtual public void SetSpread(Efl.Gfx.GradientSpread s) {
122                                  Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),s);
123         Eina.Error.RaiseIfUnhandledException();
124                          }
125     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
126 /// <value>Spread type to be used</value>
127     public Efl.Gfx.GradientSpread Spread {
128         get { return GetSpread(); }
129         set { SetSpread(value); }
130     }
131     private static IntPtr GetEflClassStatic()
132     {
133         return Efl.Canvas.Vg.Gradient.efl_canvas_vg_gradient_class_get();
134     }
135     /// <summary>Wrapper for native methods and virtual method delegates.
136     /// For internal use by generated code only.</summary>
137     public new class NativeMethods : Efl.Canvas.Vg.Node.NativeMethods
138     {
139         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
140         /// <summary>Gets the list of Eo operations to override.</summary>
141         /// <returns>The list of Eo operations to be overload.</returns>
142         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
143         {
144             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
145             var methods = Efl.Eo.Globals.GetUserMethods(type);
146
147             if (efl_gfx_gradient_stop_get_static_delegate == null)
148             {
149                 efl_gfx_gradient_stop_get_static_delegate = new efl_gfx_gradient_stop_get_delegate(stop_get);
150             }
151
152             if (methods.FirstOrDefault(m => m.Name == "GetStop") != null)
153             {
154                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_stop_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_stop_get_static_delegate) });
155             }
156
157             if (efl_gfx_gradient_stop_set_static_delegate == null)
158             {
159                 efl_gfx_gradient_stop_set_static_delegate = new efl_gfx_gradient_stop_set_delegate(stop_set);
160             }
161
162             if (methods.FirstOrDefault(m => m.Name == "SetStop") != null)
163             {
164                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_stop_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_stop_set_static_delegate) });
165             }
166
167             if (efl_gfx_gradient_spread_get_static_delegate == null)
168             {
169                 efl_gfx_gradient_spread_get_static_delegate = new efl_gfx_gradient_spread_get_delegate(spread_get);
170             }
171
172             if (methods.FirstOrDefault(m => m.Name == "GetSpread") != null)
173             {
174                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_spread_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_spread_get_static_delegate) });
175             }
176
177             if (efl_gfx_gradient_spread_set_static_delegate == null)
178             {
179                 efl_gfx_gradient_spread_set_static_delegate = new efl_gfx_gradient_spread_set_delegate(spread_set);
180             }
181
182             if (methods.FirstOrDefault(m => m.Name == "SetSpread") != null)
183             {
184                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_spread_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_spread_set_static_delegate) });
185             }
186
187             descs.AddRange(base.GetEoOps(type));
188             return descs;
189         }
190         /// <summary>Returns the Eo class for the native methods of this class.</summary>
191         /// <returns>The native class pointer.</returns>
192         public override IntPtr GetEflClass()
193         {
194             return Efl.Canvas.Vg.Gradient.efl_canvas_vg_gradient_class_get();
195         }
196
197         #pragma warning disable CA1707, SA1300, SA1600
198
199         
200         private delegate void efl_gfx_gradient_stop_get_delegate(System.IntPtr obj, System.IntPtr pd,  out System.IntPtr colors,  out uint length);
201
202         
203         public delegate void efl_gfx_gradient_stop_get_api_delegate(System.IntPtr obj,  out System.IntPtr colors,  out uint length);
204
205         public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_get_api_delegate> efl_gfx_gradient_stop_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_get_api_delegate>(Module, "efl_gfx_gradient_stop_get");
206
207         private static void stop_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length)
208         {
209             Eina.Log.Debug("function efl_gfx_gradient_stop_get was called");
210             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
211             if (wrapper != null)
212             {
213                         Efl.Gfx.GradientStop _out_colors = default(Efl.Gfx.GradientStop);
214         length = default(uint);                            
215                 try
216                 {
217                     ((Gradient)wrapper).GetStop(out _out_colors, out length);
218                 }
219                 catch (Exception e)
220                 {
221                     Eina.Log.Warning($"Callback error: {e.ToString()}");
222                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
223                 }
224
225         colors = Eina.PrimitiveConversion.ManagedToPointerAlloc(_out_colors);
226                                 
227             }
228             else
229             {
230                 efl_gfx_gradient_stop_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out colors, out length);
231             }
232         }
233
234         private static efl_gfx_gradient_stop_get_delegate efl_gfx_gradient_stop_get_static_delegate;
235
236         
237         private delegate void efl_gfx_gradient_stop_set_delegate(System.IntPtr obj, System.IntPtr pd,  ref Efl.Gfx.GradientStop.NativeStruct colors,  uint length);
238
239         
240         public delegate void efl_gfx_gradient_stop_set_api_delegate(System.IntPtr obj,  ref Efl.Gfx.GradientStop.NativeStruct colors,  uint length);
241
242         public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_set_api_delegate> efl_gfx_gradient_stop_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_set_api_delegate>(Module, "efl_gfx_gradient_stop_set");
243
244         private static void stop_set(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length)
245         {
246             Eina.Log.Debug("function efl_gfx_gradient_stop_set was called");
247             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
248             if (wrapper != null)
249             {
250         Efl.Gfx.GradientStop _in_colors = colors;
251                                                     
252                 try
253                 {
254                     ((Gradient)wrapper).SetStop(ref _in_colors, length);
255                 }
256                 catch (Exception e)
257                 {
258                     Eina.Log.Warning($"Callback error: {e.ToString()}");
259                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
260                 }
261
262                         colors = _in_colors;
263                 
264             }
265             else
266             {
267                 efl_gfx_gradient_stop_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref colors, length);
268             }
269         }
270
271         private static efl_gfx_gradient_stop_set_delegate efl_gfx_gradient_stop_set_static_delegate;
272
273         
274         private delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_delegate(System.IntPtr obj, System.IntPtr pd);
275
276         
277         public delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_api_delegate(System.IntPtr obj);
278
279         public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_get_api_delegate> efl_gfx_gradient_spread_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_get_api_delegate>(Module, "efl_gfx_gradient_spread_get");
280
281         private static Efl.Gfx.GradientSpread spread_get(System.IntPtr obj, System.IntPtr pd)
282         {
283             Eina.Log.Debug("function efl_gfx_gradient_spread_get was called");
284             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
285             if (wrapper != null)
286             {
287             Efl.Gfx.GradientSpread _ret_var = default(Efl.Gfx.GradientSpread);
288                 try
289                 {
290                     _ret_var = ((Gradient)wrapper).GetSpread();
291                 }
292                 catch (Exception e)
293                 {
294                     Eina.Log.Warning($"Callback error: {e.ToString()}");
295                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
296                 }
297
298         return _ret_var;
299
300             }
301             else
302             {
303                 return efl_gfx_gradient_spread_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
304             }
305         }
306
307         private static efl_gfx_gradient_spread_get_delegate efl_gfx_gradient_spread_get_static_delegate;
308
309         
310         private delegate void efl_gfx_gradient_spread_set_delegate(System.IntPtr obj, System.IntPtr pd,  Efl.Gfx.GradientSpread s);
311
312         
313         public delegate void efl_gfx_gradient_spread_set_api_delegate(System.IntPtr obj,  Efl.Gfx.GradientSpread s);
314
315         public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_set_api_delegate> efl_gfx_gradient_spread_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_set_api_delegate>(Module, "efl_gfx_gradient_spread_set");
316
317         private static void spread_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s)
318         {
319             Eina.Log.Debug("function efl_gfx_gradient_spread_set was called");
320             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
321             if (wrapper != null)
322             {
323                                     
324                 try
325                 {
326                     ((Gradient)wrapper).SetSpread(s);
327                 }
328                 catch (Exception e)
329                 {
330                     Eina.Log.Warning($"Callback error: {e.ToString()}");
331                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
332                 }
333
334                         
335             }
336             else
337             {
338                 efl_gfx_gradient_spread_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), s);
339             }
340         }
341
342         private static efl_gfx_gradient_spread_set_delegate efl_gfx_gradient_spread_set_static_delegate;
343
344         #pragma warning restore CA1707, SA1300, SA1600
345
346 }
347 }
348 }
349
350 }
351
352 }
353