1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
8 /// <summary>Efl bounce interpolator class</summary>
9 [BounceInterpolatorNativeInherit]
10 public class BounceInterpolator : Efl.Object, Efl.Eo.IWrapper,Efl.IInterpolator
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (BounceInterpolator))
16 return Efl.BounceInterpolatorNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
22 efl_bounce_interpolator_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public BounceInterpolator(Efl.Object parent= null
27 base(efl_bounce_interpolator_class_get(), typeof(BounceInterpolator), parent)
29 FinishInstantiation();
31 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
32 protected BounceInterpolator(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37 protected BounceInterpolator(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38 ///<summary>Verifies if the given object is equal to this one.</summary>
39 public override bool Equals(object obj)
41 var other = obj as Efl.Object;
44 return this.NativeHandle == other.NativeHandle;
46 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47 public override int GetHashCode()
49 return this.NativeHandle.ToInt32();
51 ///<summary>Turns the native pointer into a string representation.</summary>
52 public override String ToString()
54 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
56 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
57 protected override void RegisterEventProxies()
59 base.RegisterEventProxies();
61 /// <summary>Factors property</summary>
62 /// <param name="factor1">First factor of the interpolation function.</param>
63 /// <param name="factor2">Second factor of the interpolation function.</param>
64 /// <returns></returns>
65 virtual public void GetFactors( out double factor1, out double factor2) {
66 Efl.BounceInterpolatorNativeInherit.efl_bounce_interpolator_factors_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), 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 /// <returns></returns>
73 virtual public void SetFactors( double factor1, double factor2) {
74 Efl.BounceInterpolatorNativeInherit.efl_bounce_interpolator_factors_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), factor1, factor2);
75 Eina.Error.RaiseIfUnhandledException();
77 /// <summary>Interpolate the given value.</summary>
78 /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
79 /// <returns>Output value calculated by interpolating the input value.</returns>
80 virtual public double Interpolate( double progress) {
81 var _ret_var = Efl.IInterpolatorNativeInherit.efl_interpolator_interpolate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), progress);
82 Eina.Error.RaiseIfUnhandledException();
85 private static IntPtr GetEflClassStatic()
87 return Efl.BounceInterpolator.efl_bounce_interpolator_class_get();
90 public class BounceInterpolatorNativeInherit : Efl.ObjectNativeInherit{
91 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Ecore);
92 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
94 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
95 var methods = Efl.Eo.Globals.GetUserMethods(type);
96 if (efl_bounce_interpolator_factors_get_static_delegate == null)
97 efl_bounce_interpolator_factors_get_static_delegate = new efl_bounce_interpolator_factors_get_delegate(factors_get);
98 if (methods.FirstOrDefault(m => m.Name == "GetFactors") != null)
99 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)});
100 if (efl_bounce_interpolator_factors_set_static_delegate == null)
101 efl_bounce_interpolator_factors_set_static_delegate = new efl_bounce_interpolator_factors_set_delegate(factors_set);
102 if (methods.FirstOrDefault(m => m.Name == "SetFactors") != null)
103 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)});
104 if (efl_interpolator_interpolate_static_delegate == null)
105 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
106 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
107 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)});
108 descs.AddRange(base.GetEoOps(type));
111 public override IntPtr GetEflClass()
113 return Efl.BounceInterpolator.efl_bounce_interpolator_class_get();
115 public static new IntPtr GetEflClassStatic()
117 return Efl.BounceInterpolator.efl_bounce_interpolator_class_get();
121 private delegate void efl_bounce_interpolator_factors_get_delegate(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2);
124 public delegate void efl_bounce_interpolator_factors_get_api_delegate(System.IntPtr obj, out double factor1, out double factor2);
125 public static Efl.Eo.FunctionWrapper<efl_bounce_interpolator_factors_get_api_delegate> efl_bounce_interpolator_factors_get_ptr = new Efl.Eo.FunctionWrapper<efl_bounce_interpolator_factors_get_api_delegate>(_Module, "efl_bounce_interpolator_factors_get");
126 private static void factors_get(System.IntPtr obj, System.IntPtr pd, out double factor1, out double factor2)
128 Eina.Log.Debug("function efl_bounce_interpolator_factors_get was called");
129 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
130 if(wrapper != null) {
131 factor1 = default(double); factor2 = default(double);
133 ((BounceInterpolator)wrapper).GetFactors( out factor1, out factor2);
134 } catch (Exception e) {
135 Eina.Log.Warning($"Callback error: {e.ToString()}");
136 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
139 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);
142 private static efl_bounce_interpolator_factors_get_delegate efl_bounce_interpolator_factors_get_static_delegate;
145 private delegate void efl_bounce_interpolator_factors_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2);
148 public delegate void efl_bounce_interpolator_factors_set_api_delegate(System.IntPtr obj, double factor1, double factor2);
149 public static Efl.Eo.FunctionWrapper<efl_bounce_interpolator_factors_set_api_delegate> efl_bounce_interpolator_factors_set_ptr = new Efl.Eo.FunctionWrapper<efl_bounce_interpolator_factors_set_api_delegate>(_Module, "efl_bounce_interpolator_factors_set");
150 private static void factors_set(System.IntPtr obj, System.IntPtr pd, double factor1, double factor2)
152 Eina.Log.Debug("function efl_bounce_interpolator_factors_set was called");
153 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
154 if(wrapper != null) {
157 ((BounceInterpolator)wrapper).SetFactors( factor1, factor2);
158 } catch (Exception e) {
159 Eina.Log.Warning($"Callback error: {e.ToString()}");
160 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
163 efl_bounce_interpolator_factors_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor1, factor2);
166 private static efl_bounce_interpolator_factors_set_delegate efl_bounce_interpolator_factors_set_static_delegate;
169 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
172 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
173 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");
174 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
176 Eina.Log.Debug("function efl_interpolator_interpolate was called");
177 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
178 if(wrapper != null) {
179 double _ret_var = default(double);
181 _ret_var = ((BounceInterpolator)wrapper).Interpolate( progress);
182 } catch (Exception e) {
183 Eina.Log.Warning($"Callback error: {e.ToString()}");
184 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
188 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
191 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;