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 cubic_bezier interpolator class</summary>
11 [Efl.CubicBezierInterpolator.NativeMethods]
12 public class CubicBezierInterpolator : Efl.Object, Efl.Eo.IWrapper,Efl.IInterpolator
14 ///<summary>Pointer to the native class description.</summary>
15 public override System.IntPtr NativeClass
19 if (((object)this).GetType() == typeof(CubicBezierInterpolator))
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_cubic_bezier_interpolator_class_get();
32 /// <summary>Initializes a new instance of the <see cref="CubicBezierInterpolator"/> class.</summary>
33 /// <param name="parent">Parent instance.</param>
34 public CubicBezierInterpolator(Efl.Object parent= null
35 ) : base(efl_cubic_bezier_interpolator_class_get(), typeof(CubicBezierInterpolator), parent)
37 FinishInstantiation();
40 /// <summary>Initializes a new instance of the <see cref="CubicBezierInterpolator"/> 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 CubicBezierInterpolator(System.IntPtr raw) : base(raw)
47 /// <summary>Initializes a new instance of the <see cref="CubicBezierInterpolator"/> 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 CubicBezierInterpolator(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
56 /// <summary>Verifies if the given object is equal to this one.</summary>
57 /// <param name="instance">The object to compare to.</param>
58 /// <returns>True if both objects point to the same native object.</returns>
59 public override bool Equals(object instance)
61 var other = instance as Efl.Object;
66 return this.NativeHandle == other.NativeHandle;
69 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
70 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
71 public override int GetHashCode()
73 return this.NativeHandle.ToInt32();
76 /// <summary>Turns the native pointer into a string representation.</summary>
77 /// <returns>A string with the type and the native pointer for this object.</returns>
78 public override String ToString()
80 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
83 /// <summary>Factors property</summary>
84 /// <param name="factor1">First factor of the interpolation function.</param>
85 /// <param name="factor2">Second factor of the interpolation function.</param>
86 /// <param name="factor3">Third factor of the interpolation function.</param>
87 /// <param name="factor4">Fourth factor of the interpolation function.</param>
88 virtual public void GetFactors(out double factor1, out double factor2, out double factor3, out double factor4) {
89 Efl.CubicBezierInterpolator.NativeMethods.efl_cubic_bezier_interpolator_factors_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out factor1, out factor2, out factor3, out factor4);
90 Eina.Error.RaiseIfUnhandledException();
92 /// <summary>Factors property</summary>
93 /// <param name="factor1">First factor of the interpolation function.</param>
94 /// <param name="factor2">Second factor of the interpolation function.</param>
95 /// <param name="factor3">Third factor of the interpolation function.</param>
96 /// <param name="factor4">Fourth factor of the interpolation function.</param>
97 virtual public void SetFactors(double factor1, double factor2, double factor3, double factor4) {
98 Efl.CubicBezierInterpolator.NativeMethods.efl_cubic_bezier_interpolator_factors_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),factor1, factor2, factor3, factor4);
99 Eina.Error.RaiseIfUnhandledException();
101 /// <summary>Interpolate the given value.</summary>
102 /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
103 /// <returns>Output value calculated by interpolating the input value.</returns>
104 virtual public double Interpolate(double progress) {
105 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);
106 Eina.Error.RaiseIfUnhandledException();
109 private static IntPtr GetEflClassStatic()
111 return Efl.CubicBezierInterpolator.efl_cubic_bezier_interpolator_class_get();
113 /// <summary>Wrapper for native methods and virtual method delegates.
114 /// For internal use by generated code only.</summary>
115 public new class NativeMethods : Efl.Object.NativeMethods
117 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
118 /// <summary>Gets the list of Eo operations to override.</summary>
119 /// <returns>The list of Eo operations to be overload.</returns>
120 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
122 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
123 var methods = Efl.Eo.Globals.GetUserMethods(type);
125 if (efl_cubic_bezier_interpolator_factors_get_static_delegate == null)
127 efl_cubic_bezier_interpolator_factors_get_static_delegate = new efl_cubic_bezier_interpolator_factors_get_delegate(factors_get);
130 if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null)
132 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_cubic_bezier_interpolator_factors_get"), func = Marshal.GetFunctionPointerForDelegate(efl_cubic_bezier_interpolator_factors_get_static_delegate) });
135 if (efl_cubic_bezier_interpolator_factors_set_static_delegate == null)
137 efl_cubic_bezier_interpolator_factors_set_static_delegate = new efl_cubic_bezier_interpolator_factors_set_delegate(factors_set);
140 if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null)
142 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_cubic_bezier_interpolator_factors_set"), func = Marshal.GetFunctionPointerForDelegate(efl_cubic_bezier_interpolator_factors_set_static_delegate) });
145 if (efl_interpolator_interpolate_static_delegate == null)
147 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
150 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
152 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) });
155 descs.AddRange(base.GetEoOps(type));
158 /// <summary>Returns the Eo class for the native methods of this class.</summary>
159 /// <returns>The native class pointer.</returns>
160 public override IntPtr GetEflClass()
162 return Efl.CubicBezierInterpolator.efl_cubic_bezier_interpolator_class_get();
165 #pragma warning disable CA1707, SA1300, SA1600
168 private delegate void efl_cubic_bezier_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2, out double factor3, out double factor4);
171 public delegate void efl_cubic_bezier_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2, out double factor3, out double factor4);
173 public static Efl.Eo.FunctionWrapper<efl_cubic_bezier_interpolator_factors_get_api_delegate> efl_cubic_bezier_interpolator_factors_get_ptr = new Efl.Eo.FunctionWrapper<efl_cubic_bezier_interpolator_factors_get_api_delegate>(Module, "efl_cubic_bezier_interpolator_factors_get");
175 private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2, out double factor3, out double factor4)
177 Eina.Log.Debug("function efl_cubic_bezier_interpolator_factors_get was called");
178 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
181 factor1 = default(double); factor2 = default(double); factor3 = default(double); factor4 = default(double);
184 ((CubicBezierInterpolator)wrapper).GetFactors(out factor1, out factor2, out factor3, out factor4);
188 Eina.Log.Warning($"Callback error: {e.ToString()}");
189 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
196 efl_cubic_bezier_interpolator_factors_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out factor1, out factor2, out factor3, out factor4);
200 private static efl_cubic_bezier_interpolator_factors_get_delegate efl_cubic_bezier_interpolator_factors_get_static_delegate;
203 private delegate void efl_cubic_bezier_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2, double factor3, double factor4);
206 public delegate void efl_cubic_bezier_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2, double factor3, double factor4);
208 public static Efl.Eo.FunctionWrapper<efl_cubic_bezier_interpolator_factors_set_api_delegate> efl_cubic_bezier_interpolator_factors_set_ptr = new Efl.Eo.FunctionWrapper<efl_cubic_bezier_interpolator_factors_set_api_delegate>(Module, "efl_cubic_bezier_interpolator_factors_set");
210 private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2, double factor3, double factor4)
212 Eina.Log.Debug("function efl_cubic_bezier_interpolator_factors_set was called");
213 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
219 ((CubicBezierInterpolator)wrapper).SetFactors(factor1, factor2, factor3, factor4);
223 Eina.Log.Warning($"Callback error: {e.ToString()}");
224 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
231 efl_cubic_bezier_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2, factor3, factor4);
235 private static efl_cubic_bezier_interpolator_factors_set_delegate efl_cubic_bezier_interpolator_factors_set_static_delegate;
238 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
241 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
243 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");
245 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
247 Eina.Log.Debug("function efl_interpolator_interpolate was called");
248 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
251 double _ret_var = default(double);
254 _ret_var = ((CubicBezierInterpolator)wrapper).Interpolate(progress);
258 Eina.Log.Warning($"Callback error: {e.ToString()}");
259 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
267 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
271 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
273 #pragma warning restore CA1707, SA1300, SA1600