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