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 [Efl.Eo.BindingEntity]
13 public class SpringInterpolator : Efl.Object, Efl.IInterpolator
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass
20 if (((object)this).GetType() == typeof(SpringInterpolator))
22 return GetEflClassStatic();
26 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
32 efl_spring_interpolator_class_get();
33 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.</summary>
34 /// <param name="parent">Parent instance.</param>
35 public SpringInterpolator(Efl.Object parent= null
36 ) : base(efl_spring_interpolator_class_get(), parent)
38 FinishInstantiation();
41 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
42 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
43 protected SpringInterpolator(ConstructingHandle ch) : base(ch)
47 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
48 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
49 /// <param name="wh">The native pointer to be wrapped.</param>
50 protected SpringInterpolator(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
54 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
55 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
56 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
57 /// <param name="parent">The Efl.Object parent of this instance.</param>
58 protected SpringInterpolator(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
62 /// <summary>Factors property</summary>
63 /// <param name="factor1">First factor of the interpolation function.</param>
64 /// <param name="factor2">Second factor of the interpolation function.</param>
65 virtual public void GetFactors(out double factor1, out double factor2) {
66 Efl.SpringInterpolator.NativeMethods.efl_spring_interpolator_factors_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out factor1, out factor2);
67 Eina.Error.RaiseIfUnhandledException();
69 /// <summary>Factors property</summary>
70 /// <param name="factor1">First factor of the interpolation function.</param>
71 /// <param name="factor2">Second factor of the interpolation function.</param>
72 virtual public void SetFactors(double factor1, double factor2) {
73 Efl.SpringInterpolator.NativeMethods.efl_spring_interpolator_factors_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),factor1, factor2);
74 Eina.Error.RaiseIfUnhandledException();
76 /// <summary>Interpolate the given value.</summary>
77 /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
78 /// <returns>Output value calculated by interpolating the input value.</returns>
79 virtual public double Interpolate(double progress) {
80 var _ret_var = Efl.IInterpolatorConcrete.NativeMethods.efl_interpolator_interpolate_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),progress);
81 Eina.Error.RaiseIfUnhandledException();
84 private static IntPtr GetEflClassStatic()
86 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
88 /// <summary>Wrapper for native methods and virtual method delegates.
89 /// For internal use by generated code only.</summary>
90 public new class NativeMethods : Efl.Object.NativeMethods
92 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
93 /// <summary>Gets the list of Eo operations to override.</summary>
94 /// <returns>The list of Eo operations to be overload.</returns>
95 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
97 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
98 var methods = Efl.Eo.Globals.GetUserMethods(type);
100 if (efl_spring_interpolator_factors_get_static_delegate == null)
102 efl_spring_interpolator_factors_get_static_delegate = new efl_spring_interpolator_factors_get_delegate(factors_get);
105 if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null)
107 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) });
110 if (efl_spring_interpolator_factors_set_static_delegate == null)
112 efl_spring_interpolator_factors_set_static_delegate = new efl_spring_interpolator_factors_set_delegate(factors_set);
115 if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null)
117 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) });
120 if (efl_interpolator_interpolate_static_delegate == null)
122 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
125 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
127 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) });
130 descs.AddRange(base.GetEoOps(type));
133 /// <summary>Returns the Eo class for the native methods of this class.</summary>
134 /// <returns>The native class pointer.</returns>
135 public override IntPtr GetEflClass()
137 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
140 #pragma warning disable CA1707, CS1591, SA1300, SA1600
143 private delegate void efl_spring_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2);
146 public delegate void efl_spring_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2);
148 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");
150 private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2)
152 Eina.Log.Debug("function efl_spring_interpolator_factors_get was called");
153 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
156 factor1 = default(double); factor2 = default(double);
159 ((SpringInterpolator)ws.Target).GetFactors(out factor1, out factor2);
163 Eina.Log.Warning($"Callback error: {e.ToString()}");
164 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
171 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);
175 private static efl_spring_interpolator_factors_get_delegate efl_spring_interpolator_factors_get_static_delegate;
178 private delegate void efl_spring_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2);
181 public delegate void efl_spring_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2);
183 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");
185 private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2)
187 Eina.Log.Debug("function efl_spring_interpolator_factors_set was called");
188 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
194 ((SpringInterpolator)ws.Target).SetFactors(factor1, factor2);
198 Eina.Log.Warning($"Callback error: {e.ToString()}");
199 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
206 efl_spring_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2);
210 private static efl_spring_interpolator_factors_set_delegate efl_spring_interpolator_factors_set_static_delegate;
213 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
216 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
218 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");
220 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
222 Eina.Log.Debug("function efl_interpolator_interpolate was called");
223 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
226 double _ret_var = default(double);
229 _ret_var = ((SpringInterpolator)ws.Target).Interpolate(progress);
233 Eina.Log.Warning($"Callback error: {e.ToString()}");
234 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
242 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
246 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
248 #pragma warning restore CA1707, CS1591, SA1300, SA1600