2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
11 /// <summary>Efl spring interpolator class</summary>
12 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
13 [Efl.SpringInterpolator.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public class SpringInterpolator : Efl.Object, Efl.IInterpolator
17 /// <summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass
22 if (((object)this).GetType() == typeof(SpringInterpolator))
24 return GetEflClassStatic();
28 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
34 efl_spring_interpolator_class_get();
35 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.</summary>
36 /// <param name="parent">Parent instance.</param>
37 public SpringInterpolator(Efl.Object parent= null
38 ) : base(efl_spring_interpolator_class_get(), parent)
40 FinishInstantiation();
43 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
44 /// Do not call this constructor directly.</summary>
45 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
46 protected SpringInterpolator(ConstructingHandle ch) : base(ch)
50 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
51 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
52 /// <param name="wh">The native pointer to be wrapped.</param>
53 protected SpringInterpolator(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
57 /// <summary>Initializes a new instance of the <see cref="SpringInterpolator"/> class.
58 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
59 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
60 /// <param name="parent">The Efl.Object parent of this instance.</param>
61 protected SpringInterpolator(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
65 /// <summary>Factors property</summary>
66 /// <param name="factor1">First factor of the interpolation function.</param>
67 /// <param name="factor2">Second factor of the interpolation function.</param>
68 virtual public void GetFactors(out double factor1, out double factor2) {
69 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);
70 Eina.Error.RaiseIfUnhandledException();
72 /// <summary>Factors property</summary>
73 /// <param name="factor1">First factor of the interpolation function.</param>
74 /// <param name="factor2">Second factor of the interpolation function.</param>
75 virtual public void SetFactors(double factor1, double factor2) {
76 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);
77 Eina.Error.RaiseIfUnhandledException();
79 /// <summary>Interpolate the given value.</summary>
80 /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
81 /// <returns>Output value calculated by interpolating the input value.</returns>
82 virtual public double Interpolate(double progress) {
83 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);
84 Eina.Error.RaiseIfUnhandledException();
87 /// <summary>Factors property</summary>
88 /// <value>First factor of the interpolation function.</value>
89 public (double, double) Factors {
91 double _out_factor1 = default(double);
92 double _out_factor2 = default(double);
93 GetFactors(out _out_factor1,out _out_factor2);
94 return (_out_factor1,_out_factor2);
96 set { SetFactors( value.Item1, value.Item2); }
98 private static IntPtr GetEflClassStatic()
100 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
102 /// <summary>Wrapper for native methods and virtual method delegates.
103 /// For internal use by generated code only.</summary>
104 public new class NativeMethods : Efl.Object.NativeMethods
106 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
107 /// <summary>Gets the list of Eo operations to override.</summary>
108 /// <returns>The list of Eo operations to be overload.</returns>
109 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
111 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
112 var methods = Efl.Eo.Globals.GetUserMethods(type);
114 if (efl_spring_interpolator_factors_get_static_delegate == null)
116 efl_spring_interpolator_factors_get_static_delegate = new efl_spring_interpolator_factors_get_delegate(factors_get);
119 if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null)
121 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) });
124 if (efl_spring_interpolator_factors_set_static_delegate == null)
126 efl_spring_interpolator_factors_set_static_delegate = new efl_spring_interpolator_factors_set_delegate(factors_set);
129 if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null)
131 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) });
134 if (efl_interpolator_interpolate_static_delegate == null)
136 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
139 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
141 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) });
144 descs.AddRange(base.GetEoOps(type));
147 /// <summary>Returns the Eo class for the native methods of this class.</summary>
148 /// <returns>The native class pointer.</returns>
149 public override IntPtr GetEflClass()
151 return Efl.SpringInterpolator.efl_spring_interpolator_class_get();
154 #pragma warning disable CA1707, CS1591, SA1300, SA1600
157 private delegate void efl_spring_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2);
160 public delegate void efl_spring_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2);
162 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");
164 private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2)
166 Eina.Log.Debug("function efl_spring_interpolator_factors_get was called");
167 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
170 factor1 = default(double); factor2 = default(double);
173 ((SpringInterpolator)ws.Target).GetFactors(out factor1, out factor2);
177 Eina.Log.Warning($"Callback error: {e.ToString()}");
178 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
185 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);
189 private static efl_spring_interpolator_factors_get_delegate efl_spring_interpolator_factors_get_static_delegate;
192 private delegate void efl_spring_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2);
195 public delegate void efl_spring_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2);
197 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");
199 private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2)
201 Eina.Log.Debug("function efl_spring_interpolator_factors_set was called");
202 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
208 ((SpringInterpolator)ws.Target).SetFactors(factor1, factor2);
212 Eina.Log.Warning($"Callback error: {e.ToString()}");
213 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
220 efl_spring_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2);
224 private static efl_spring_interpolator_factors_set_delegate efl_spring_interpolator_factors_set_static_delegate;
227 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
230 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
232 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");
234 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
236 Eina.Log.Debug("function efl_interpolator_interpolate was called");
237 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
240 double _ret_var = default(double);
243 _ret_var = ((SpringInterpolator)ws.Target).Interpolate(progress);
247 Eina.Log.Warning($"Callback error: {e.ToString()}");
248 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
256 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
260 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
262 #pragma warning restore CA1707, CS1591, SA1300, SA1600
269 #pragma warning disable CS1591
270 public static class EflSpringInterpolator_ExtensionMethods {
273 #pragma warning restore CS1591