03ec8d6eba8924d15a6c8c60504dff48c0a7c590
[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.ComponentModel;
7 namespace Efl { namespace Gfx { 
8 /// <summary>Efl graphics gradient interface</summary>
9 [IGradientNativeInherit]
10 public interface IGradient : 
11     Efl.Eo.IWrapper, IDisposable
12 {
13     /// <summary>Get the list of color stops.</summary>
14 /// <param name="colors">Color stops list</param>
15 /// <param name="length">Length of the list</param>
16 /// <returns></returns>
17 void GetStop( out Efl.Gfx.GradientStop colors,  out uint length);
18     /// <summary>Set the list of color stops for the gradient</summary>
19 /// <param name="colors">Color stops list</param>
20 /// <param name="length">Length of the list</param>
21 /// <returns></returns>
22 void SetStop( ref Efl.Gfx.GradientStop colors,  uint length);
23     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
24 /// <returns>Spread type to be used</returns>
25 Efl.Gfx.GradientSpread GetSpread();
26     /// <summary>Specifies the spread method that should be used for this gradient.</summary>
27 /// <param name="s">Spread type to be used</param>
28 /// <returns></returns>
29 void SetSpread( Efl.Gfx.GradientSpread s);
30                     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
31 /// <value>Spread type to be used</value>
32     Efl.Gfx.GradientSpread Spread {
33         get ;
34         set ;
35     }
36 }
37 /// <summary>Efl graphics gradient interface</summary>
38 sealed public class IGradientConcrete : 
39
40 IGradient
41     
42 {
43     ///<summary>Pointer to the native class description.</summary>
44     public System.IntPtr NativeClass {
45         get {
46             if (((object)this).GetType() == typeof (IGradientConcrete))
47                 return Efl.Gfx.IGradientNativeInherit.GetEflClassStatic();
48             else
49                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
50         }
51     }
52     private  System.IntPtr handle;
53     ///<summary>Pointer to the native instance.</summary>
54     public System.IntPtr NativeHandle {
55         get { return handle; }
56     }
57     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
58         efl_gfx_gradient_interface_get();
59     ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
60     private IGradientConcrete(System.IntPtr raw)
61     {
62         handle = raw;
63         RegisterEventProxies();
64     }
65     ///<summary>Destructor.</summary>
66     ~IGradientConcrete()
67     {
68         Dispose(false);
69     }
70     ///<summary>Releases the underlying native instance.</summary>
71     void Dispose(bool disposing)
72     {
73         if (handle != System.IntPtr.Zero) {
74             Efl.Eo.Globals.efl_unref(handle);
75             handle = System.IntPtr.Zero;
76         }
77     }
78     ///<summary>Releases the underlying native instance.</summary>
79     public void Dispose()
80     {
81         Dispose(true);
82         GC.SuppressFinalize(this);
83     }
84     ///<summary>Verifies if the given object is equal to this one.</summary>
85     public override bool Equals(object obj)
86     {
87         var other = obj as Efl.Object;
88         if (other == null)
89             return false;
90         return this.NativeHandle == other.NativeHandle;
91     }
92     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
93     public override int GetHashCode()
94     {
95         return this.NativeHandle.ToInt32();
96     }
97     ///<summary>Turns the native pointer into a string representation.</summary>
98     public override String ToString()
99     {
100         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
101     }
102     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
103      void RegisterEventProxies()
104     {
105     }
106     /// <summary>Get the list of color stops.</summary>
107     /// <param name="colors">Color stops list</param>
108     /// <param name="length">Length of the list</param>
109     /// <returns></returns>
110     public void GetStop( out Efl.Gfx.GradientStop colors,  out uint length) {
111                          var _out_colors = new System.IntPtr();
112                                 Efl.Gfx.IGradientNativeInherit.efl_gfx_gradient_stop_get_ptr.Value.Delegate(this.NativeHandle, out _out_colors,  out length);
113         Eina.Error.RaiseIfUnhandledException();
114         colors = Eina.PrimitiveConversion.PointerToManaged<Efl.Gfx.GradientStop>(_out_colors);
115                                  }
116     /// <summary>Set the list of color stops for the gradient</summary>
117     /// <param name="colors">Color stops list</param>
118     /// <param name="length">Length of the list</param>
119     /// <returns></returns>
120     public void SetStop( ref Efl.Gfx.GradientStop colors,  uint length) {
121          Efl.Gfx.GradientStop.NativeStruct _in_colors = colors;
122                                                 Efl.Gfx.IGradientNativeInherit.efl_gfx_gradient_stop_set_ptr.Value.Delegate(this.NativeHandle, ref _in_colors,  length);
123         Eina.Error.RaiseIfUnhandledException();
124                         colors = _in_colors;
125                  }
126     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
127     /// <returns>Spread type to be used</returns>
128     public Efl.Gfx.GradientSpread GetSpread() {
129          var _ret_var = Efl.Gfx.IGradientNativeInherit.efl_gfx_gradient_spread_get_ptr.Value.Delegate(this.NativeHandle);
130         Eina.Error.RaiseIfUnhandledException();
131         return _ret_var;
132  }
133     /// <summary>Specifies the spread method that should be used for this gradient.</summary>
134     /// <param name="s">Spread type to be used</param>
135     /// <returns></returns>
136     public void SetSpread( Efl.Gfx.GradientSpread s) {
137                                  Efl.Gfx.IGradientNativeInherit.efl_gfx_gradient_spread_set_ptr.Value.Delegate(this.NativeHandle, s);
138         Eina.Error.RaiseIfUnhandledException();
139                          }
140     /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
141 /// <value>Spread type to be used</value>
142     public Efl.Gfx.GradientSpread Spread {
143         get { return GetSpread(); }
144         set { SetSpread( value); }
145     }
146     private static IntPtr GetEflClassStatic()
147     {
148         return Efl.Gfx.IGradientConcrete.efl_gfx_gradient_interface_get();
149     }
150 }
151 public class IGradientNativeInherit  : Efl.Eo.NativeClass{
152     public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
153     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
154     {
155         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
156         var methods = Efl.Eo.Globals.GetUserMethods(type);
157         if (efl_gfx_gradient_stop_get_static_delegate == null)
158             efl_gfx_gradient_stop_get_static_delegate = new efl_gfx_gradient_stop_get_delegate(stop_get);
159         if (methods.FirstOrDefault(m => m.Name == "GetStop") != null)
160             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)});
161         if (efl_gfx_gradient_stop_set_static_delegate == null)
162             efl_gfx_gradient_stop_set_static_delegate = new efl_gfx_gradient_stop_set_delegate(stop_set);
163         if (methods.FirstOrDefault(m => m.Name == "SetStop") != null)
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         if (efl_gfx_gradient_spread_get_static_delegate == null)
166             efl_gfx_gradient_spread_get_static_delegate = new efl_gfx_gradient_spread_get_delegate(spread_get);
167         if (methods.FirstOrDefault(m => m.Name == "GetSpread") != null)
168             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)});
169         if (efl_gfx_gradient_spread_set_static_delegate == null)
170             efl_gfx_gradient_spread_set_static_delegate = new efl_gfx_gradient_spread_set_delegate(spread_set);
171         if (methods.FirstOrDefault(m => m.Name == "SetSpread") != null)
172             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)});
173         return descs;
174     }
175     public override IntPtr GetEflClass()
176     {
177         return Efl.Gfx.IGradientConcrete.efl_gfx_gradient_interface_get();
178     }
179     public static  IntPtr GetEflClassStatic()
180     {
181         return Efl.Gfx.IGradientConcrete.efl_gfx_gradient_interface_get();
182     }
183
184
185      private delegate void efl_gfx_gradient_stop_get_delegate(System.IntPtr obj, System.IntPtr pd,   out System.IntPtr colors,   out uint length);
186
187
188      public delegate void efl_gfx_gradient_stop_get_api_delegate(System.IntPtr obj,   out System.IntPtr colors,   out uint length);
189      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");
190      private static void stop_get(System.IntPtr obj, System.IntPtr pd,  out System.IntPtr colors,  out uint length)
191     {
192         Eina.Log.Debug("function efl_gfx_gradient_stop_get was called");
193         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
194         if(wrapper != null) {
195                                     Efl.Gfx.GradientStop _out_colors = default(Efl.Gfx.GradientStop);
196         length = default(uint);                            
197             try {
198                 ((IGradient)wrapper).GetStop( out _out_colors,  out length);
199             } catch (Exception e) {
200                 Eina.Log.Warning($"Callback error: {e.ToString()}");
201                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
202             }
203         colors = Eina.PrimitiveConversion.ManagedToPointerAlloc(_out_colors);
204                                         } else {
205             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);
206         }
207     }
208     private static efl_gfx_gradient_stop_get_delegate efl_gfx_gradient_stop_get_static_delegate;
209
210
211      private delegate void efl_gfx_gradient_stop_set_delegate(System.IntPtr obj, System.IntPtr pd,   ref Efl.Gfx.GradientStop.NativeStruct colors,   uint length);
212
213
214      public delegate void efl_gfx_gradient_stop_set_api_delegate(System.IntPtr obj,   ref Efl.Gfx.GradientStop.NativeStruct colors,   uint length);
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      private static void stop_set(System.IntPtr obj, System.IntPtr pd,  ref Efl.Gfx.GradientStop.NativeStruct colors,  uint length)
217     {
218         Eina.Log.Debug("function efl_gfx_gradient_stop_set was called");
219         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
220         if(wrapper != null) {
221                     Efl.Gfx.GradientStop _in_colors = colors;
222                                                     
223             try {
224                 ((IGradient)wrapper).SetStop( ref _in_colors,  length);
225             } catch (Exception e) {
226                 Eina.Log.Warning($"Callback error: {e.ToString()}");
227                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
228             }
229                         colors = _in_colors;
230                         } else {
231             efl_gfx_gradient_stop_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  ref colors,  length);
232         }
233     }
234     private static efl_gfx_gradient_stop_set_delegate efl_gfx_gradient_stop_set_static_delegate;
235
236
237      private delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_delegate(System.IntPtr obj, System.IntPtr pd);
238
239
240      public delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_api_delegate(System.IntPtr obj);
241      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");
242      private static Efl.Gfx.GradientSpread spread_get(System.IntPtr obj, System.IntPtr pd)
243     {
244         Eina.Log.Debug("function efl_gfx_gradient_spread_get was called");
245         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
246         if(wrapper != null) {
247                         Efl.Gfx.GradientSpread _ret_var = default(Efl.Gfx.GradientSpread);
248             try {
249                 _ret_var = ((IGradient)wrapper).GetSpread();
250             } catch (Exception e) {
251                 Eina.Log.Warning($"Callback error: {e.ToString()}");
252                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
253             }
254         return _ret_var;
255         } else {
256             return efl_gfx_gradient_spread_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
257         }
258     }
259     private static efl_gfx_gradient_spread_get_delegate efl_gfx_gradient_spread_get_static_delegate;
260
261
262      private delegate void efl_gfx_gradient_spread_set_delegate(System.IntPtr obj, System.IntPtr pd,   Efl.Gfx.GradientSpread s);
263
264
265      public delegate void efl_gfx_gradient_spread_set_api_delegate(System.IntPtr obj,   Efl.Gfx.GradientSpread s);
266      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");
267      private static void spread_set(System.IntPtr obj, System.IntPtr pd,  Efl.Gfx.GradientSpread s)
268     {
269         Eina.Log.Debug("function efl_gfx_gradient_spread_set was called");
270         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
271         if(wrapper != null) {
272                                                 
273             try {
274                 ((IGradient)wrapper).SetSpread( s);
275             } catch (Exception e) {
276                 Eina.Log.Warning($"Callback error: {e.ToString()}");
277                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
278             }
279                                 } else {
280             efl_gfx_gradient_spread_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  s);
281         }
282     }
283     private static efl_gfx_gradient_spread_set_delegate efl_gfx_gradient_spread_set_static_delegate;
284 }
285 } }