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