#pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { /// Efl bounce interpolator class [Efl.BounceInterpolator.NativeMethods] [Efl.Eo.BindingEntity] public class BounceInterpolator : Efl.Object, Efl.IInterpolator { ///Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(BounceInterpolator)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr efl_bounce_interpolator_class_get(); /// Initializes a new instance of the class. /// Parent instance. public BounceInterpolator(Efl.Object parent= null ) : base(efl_bounce_interpolator_class_get(), parent) { FinishInstantiation(); } /// Constructor to be used when objects are expected to be constructed from native code. /// Tag struct storing the native handle of the object being constructed. protected BounceInterpolator(ConstructingHandle ch) : base(ch) { } /// Initializes a new instance of the class. /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. protected BounceInterpolator(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } /// Initializes a new instance of the class. /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. protected BounceInterpolator(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { } /// Factors property /// First factor of the interpolation function. /// Second factor of the interpolation function. virtual public void GetFactors(out double factor1, out double factor2) { Efl.BounceInterpolator.NativeMethods.efl_bounce_interpolator_factors_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out factor1, out factor2); Eina.Error.RaiseIfUnhandledException(); } /// Factors property /// First factor of the interpolation function. /// Second factor of the interpolation function. virtual public void SetFactors(double factor1, double factor2) { Efl.BounceInterpolator.NativeMethods.efl_bounce_interpolator_factors_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),factor1, factor2); Eina.Error.RaiseIfUnhandledException(); } /// Interpolate the given value. /// Input value mapped from 0.0 to 1.0. /// Output value calculated by interpolating the input value. virtual public double Interpolate(double progress) { 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); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } private static IntPtr GetEflClassStatic() { return Efl.BounceInterpolator.efl_bounce_interpolator_class_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.Object.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore); /// Gets the list of Eo operations to override. /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); var methods = Efl.Eo.Globals.GetUserMethods(type); if (efl_bounce_interpolator_factors_get_static_delegate == null) { efl_bounce_interpolator_factors_get_static_delegate = new efl_bounce_interpolator_factors_get_delegate(factors_get); } if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_bounce_interpolator_factors_get"), func = Marshal.GetFunctionPointerForDelegate(efl_bounce_interpolator_factors_get_static_delegate) }); } if (efl_bounce_interpolator_factors_set_static_delegate == null) { efl_bounce_interpolator_factors_set_static_delegate = new efl_bounce_interpolator_factors_set_delegate(factors_set); } if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_bounce_interpolator_factors_set"), func = Marshal.GetFunctionPointerForDelegate(efl_bounce_interpolator_factors_set_static_delegate) }); } if (efl_interpolator_interpolate_static_delegate == null) { efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate); } if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null) { 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) }); } descs.AddRange(base.GetEoOps(type)); return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.BounceInterpolator.efl_bounce_interpolator_class_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 private delegate void efl_bounce_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2); public delegate void efl_bounce_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2); public static Efl.Eo.FunctionWrapper efl_bounce_interpolator_factors_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_bounce_interpolator_factors_get"); private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2) { Eina.Log.Debug("function efl_bounce_interpolator_factors_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { factor1 = default(double); factor2 = default(double); try { ((BounceInterpolator)ws.Target).GetFactors(out factor1, out factor2); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_bounce_interpolator_factors_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out factor1, out factor2); } } private static efl_bounce_interpolator_factors_get_delegate efl_bounce_interpolator_factors_get_static_delegate; private delegate void efl_bounce_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2); public delegate void efl_bounce_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2); public static Efl.Eo.FunctionWrapper efl_bounce_interpolator_factors_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_bounce_interpolator_factors_set"); private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2) { Eina.Log.Debug("function efl_bounce_interpolator_factors_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((BounceInterpolator)ws.Target).SetFactors(factor1, factor2); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_bounce_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2); } } private static efl_bounce_interpolator_factors_set_delegate efl_bounce_interpolator_factors_set_static_delegate; private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress); public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress); public static Efl.Eo.FunctionWrapper efl_interpolator_interpolate_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_interpolator_interpolate"); private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress) { Eina.Log.Debug("function efl_interpolator_interpolate was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { double _ret_var = default(double); try { _ret_var = ((BounceInterpolator)ws.Target).Interpolate(progress); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress); } } private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } }