1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
10 /// <summary>Efl spring interpolator class</summary>
11 [Efl.SpringInterpolator.NativeMethods]
12 public class SpringInterpolator : Efl.Object, Efl.IInterpolator
14 ///<summary>Pointer to the native class description.</summary>
15 public override System.IntPtr NativeClass
19 if (((object)this).GetType() == typeof(SpringInterpolator))
21 return GetEflClassStatic();
25 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
30 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
31 efl_spring_interpolator_class_get();
32 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.</summary>
33 /// <param name="parent">Parent instance.</param>
34 public SpringInterpolator(Efl.Object parent= null
35 ) : base(efl_spring_interpolator_class_get(), typeof(SpringInterpolator), parent)
37 FinishInstantiation();
40 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
41 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
42 /// <param name="raw">The native pointer to be wrapped.</param>
43 protected SpringInterpolator(System.IntPtr raw) : base(raw)
47 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
48 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
49 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
50 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
51 /// <param name="parent">The Efl.Object parent of this instance.</param>
52 protected SpringInterpolator(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
56 /// <summary>Factors property</summary>
57 /// <param name="factor1">First factor of the interpolation function.</param>
58 /// <param name="factor2">Second factor of the interpolation function.</param>
59 virtual public void GetFactors(out double factor1, out double factor2) {
60 Efl.SpringInterpolator.NativeMethods.efl_spring_interpolator_factors_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out factor1, out factor2);
61 Eina.Error.RaiseIfUnhandledException();
63 /// <summary>Factors property</summary>
64 /// <param name="factor1">First factor of the interpolation function.</param>
65 /// <param name="factor2">Second factor of the interpolation function.</param>
66 virtual public void SetFactors(double factor1, double factor2) {
67 Efl.SpringInterpolator.NativeMethods.efl_spring_interpolator_factors_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),factor1, factor2);
68 Eina.Error.RaiseIfUnhandledException();
70 /// <summary>Interpolate the given value.</summary>
71 /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
72 /// <returns>Output value calculated by interpolating the input value.</returns>
73 virtual public double Interpolate(double progress) {
74 var _ret_var = Efl.IInterpolatorConcrete.NativeMethods.efl_interpolator_interpolate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),progress);
75 Eina.Error.RaiseIfUnhandledException();
78 private static IntPtr GetEflClassStatic()
80 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
82 /// <summary>Wrapper for native methods and virtual method delegates.
83 /// For internal use by generated code only.</summary>
84 public new class NativeMethods : Efl.Object.NativeMethods
86 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
87 /// <summary>Gets the list of Eo operations to override.</summary>
88 /// <returns>The list of Eo operations to be overload.</returns>
89 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
91 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
92 var methods = Efl.Eo.Globals.GetUserMethods(type);
94 if (efl_spring_interpolator_factors_get_static_delegate == null)
96 efl_spring_interpolator_factors_get_static_delegate = new efl_spring_interpolator_factors_get_delegate(factors_get);
99 if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null)
101 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_spring_interpolator_factors_get"), func = Marshal.GetFunctionPointerForDelegate(efl_spring_interpolator_factors_get_static_delegate) });
104 if (efl_spring_interpolator_factors_set_static_delegate == null)
106 efl_spring_interpolator_factors_set_static_delegate = new efl_spring_interpolator_factors_set_delegate(factors_set);
109 if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null)
111 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_spring_interpolator_factors_set"), func = Marshal.GetFunctionPointerForDelegate(efl_spring_interpolator_factors_set_static_delegate) });
114 if (efl_interpolator_interpolate_static_delegate == null)
116 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
119 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
121 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_interpolator_interpolate"), func = Marshal.GetFunctionPointerForDelegate(efl_interpolator_interpolate_static_delegate) });
124 descs.AddRange(base.GetEoOps(type));
127 /// <summary>Returns the Eo class for the native methods of this class.</summary>
128 /// <returns>The native class pointer.</returns>
129 public override IntPtr GetEflClass()
131 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
134 #pragma warning disable CA1707, CS1591, SA1300, SA1600
137 private delegate void efl_spring_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2);
140 public delegate void efl_spring_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2);
142 public static Efl.Eo.FunctionWrapper<efl_spring_interpolator_factors_get_api_delegate> efl_spring_interpolator_factors_get_ptr = new Efl.Eo.FunctionWrapper<efl_spring_interpolator_factors_get_api_delegate>(Module, "efl_spring_interpolator_factors_get");
144 private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2)
146 Eina.Log.Debug("function efl_spring_interpolator_factors_get was called");
147 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
150 factor1 = default(double); factor2 = default(double);
153 ((SpringInterpolator)ws.Target).GetFactors(out factor1, out factor2);
157 Eina.Log.Warning($"Callback error: {e.ToString()}");
158 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
165 efl_spring_interpolator_factors_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out factor1, out factor2);
169 private static efl_spring_interpolator_factors_get_delegate efl_spring_interpolator_factors_get_static_delegate;
172 private delegate void efl_spring_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2);
175 public delegate void efl_spring_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2);
177 public static Efl.Eo.FunctionWrapper<efl_spring_interpolator_factors_set_api_delegate> efl_spring_interpolator_factors_set_ptr = new Efl.Eo.FunctionWrapper<efl_spring_interpolator_factors_set_api_delegate>(Module, "efl_spring_interpolator_factors_set");
179 private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2)
181 Eina.Log.Debug("function efl_spring_interpolator_factors_set was called");
182 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
188 ((SpringInterpolator)ws.Target).SetFactors(factor1, factor2);
192 Eina.Log.Warning($"Callback error: {e.ToString()}");
193 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
200 efl_spring_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2);
204 private static efl_spring_interpolator_factors_set_delegate efl_spring_interpolator_factors_set_static_delegate;
207 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
210 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
212 public static Efl.Eo.FunctionWrapper<efl_interpolator_interpolate_api_delegate> efl_interpolator_interpolate_ptr = new Efl.Eo.FunctionWrapper<efl_interpolator_interpolate_api_delegate>(Module, "efl_interpolator_interpolate");
214 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
216 Eina.Log.Debug("function efl_interpolator_interpolate was called");
217 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
220 double _ret_var = default(double);
223 _ret_var = ((SpringInterpolator)ws.Target).Interpolate(progress);
227 Eina.Log.Warning($"Callback error: {e.ToString()}");
228 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
236 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
240 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
242 #pragma warning restore CA1707, CS1591, SA1300, SA1600