1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
8 /// <summary>Efl decelerate interpolator class
9 /// output = sin(input * Pi / 2);</summary>
10 [DecelerateInterpolatorNativeInherit]
11 public class DecelerateInterpolator : Efl.Object, Efl.Eo.IWrapper,Efl.IInterpolator
13 ///<summary>Pointer to the native class description.</summary>
14 public override System.IntPtr NativeClass {
16 if (((object)this).GetType() == typeof (DecelerateInterpolator))
17 return Efl.DecelerateInterpolatorNativeInherit.GetEflClassStatic();
19 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
22 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
23 efl_decelerate_interpolator_class_get();
24 ///<summary>Creates a new instance.</summary>
25 ///<param name="parent">Parent instance.</param>
26 public DecelerateInterpolator(Efl.Object parent= null
28 base(efl_decelerate_interpolator_class_get(), typeof(DecelerateInterpolator), parent)
30 FinishInstantiation();
32 ///<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>
33 protected DecelerateInterpolator(System.IntPtr raw) : base(raw)
35 RegisterEventProxies();
37 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
38 protected DecelerateInterpolator(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
39 ///<summary>Verifies if the given object is equal to this one.</summary>
40 public override bool Equals(object obj)
42 var other = obj as Efl.Object;
45 return this.NativeHandle == other.NativeHandle;
47 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
48 public override int GetHashCode()
50 return this.NativeHandle.ToInt32();
52 ///<summary>Turns the native pointer into a string representation.</summary>
53 public override String ToString()
55 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
57 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
58 protected override void RegisterEventProxies()
60 base.RegisterEventProxies();
62 /// <summary>Factor property</summary>
63 /// <returns>Factor of the interpolation function.</returns>
64 virtual public double GetFactor() {
65 var _ret_var = Efl.DecelerateInterpolatorNativeInherit.efl_decelerate_interpolator_factor_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
66 Eina.Error.RaiseIfUnhandledException();
69 /// <summary>Factor property</summary>
70 /// <param name="factor">Factor of the interpolation function.</param>
71 /// <returns></returns>
72 virtual public void SetFactor( double factor) {
73 Efl.DecelerateInterpolatorNativeInherit.efl_decelerate_interpolator_factor_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), factor);
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.IInterpolatorNativeInherit.efl_interpolator_interpolate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), progress);
81 Eina.Error.RaiseIfUnhandledException();
84 /// <summary>Factor property</summary>
85 /// <value>Factor of the interpolation function.</value>
86 public double Factor {
87 get { return GetFactor(); }
88 set { SetFactor( value); }
90 private static IntPtr GetEflClassStatic()
92 return Efl.DecelerateInterpolator.efl_decelerate_interpolator_class_get();
95 public class DecelerateInterpolatorNativeInherit : Efl.ObjectNativeInherit{
96 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Ecore);
97 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
99 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
100 var methods = Efl.Eo.Globals.GetUserMethods(type);
101 if (efl_decelerate_interpolator_factor_get_static_delegate == null)
102 efl_decelerate_interpolator_factor_get_static_delegate = new efl_decelerate_interpolator_factor_get_delegate(factor_get);
103 if (methods.FirstOrDefault(m => m.Name == "GetFactor") != null)
104 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_decelerate_interpolator_factor_get"), func = Marshal.GetFunctionPointerForDelegate(efl_decelerate_interpolator_factor_get_static_delegate)});
105 if (efl_decelerate_interpolator_factor_set_static_delegate == null)
106 efl_decelerate_interpolator_factor_set_static_delegate = new efl_decelerate_interpolator_factor_set_delegate(factor_set);
107 if (methods.FirstOrDefault(m => m.Name == "SetFactor") != null)
108 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_decelerate_interpolator_factor_set"), func = Marshal.GetFunctionPointerForDelegate(efl_decelerate_interpolator_factor_set_static_delegate)});
109 if (efl_interpolator_interpolate_static_delegate == null)
110 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
111 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
112 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)});
113 descs.AddRange(base.GetEoOps(type));
116 public override IntPtr GetEflClass()
118 return Efl.DecelerateInterpolator.efl_decelerate_interpolator_class_get();
120 public static new IntPtr GetEflClassStatic()
122 return Efl.DecelerateInterpolator.efl_decelerate_interpolator_class_get();
126 private delegate double efl_decelerate_interpolator_factor_get_delegate(System.IntPtr obj, System.IntPtr pd);
129 public delegate double efl_decelerate_interpolator_factor_get_api_delegate(System.IntPtr obj);
130 public static Efl.Eo.FunctionWrapper<efl_decelerate_interpolator_factor_get_api_delegate> efl_decelerate_interpolator_factor_get_ptr = new Efl.Eo.FunctionWrapper<efl_decelerate_interpolator_factor_get_api_delegate>(_Module, "efl_decelerate_interpolator_factor_get");
131 private static double factor_get(System.IntPtr obj, System.IntPtr pd)
133 Eina.Log.Debug("function efl_decelerate_interpolator_factor_get was called");
134 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
135 if(wrapper != null) {
136 double _ret_var = default(double);
138 _ret_var = ((DecelerateInterpolator)wrapper).GetFactor();
139 } catch (Exception e) {
140 Eina.Log.Warning($"Callback error: {e.ToString()}");
141 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
145 return efl_decelerate_interpolator_factor_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
148 private static efl_decelerate_interpolator_factor_get_delegate efl_decelerate_interpolator_factor_get_static_delegate;
151 private delegate void efl_decelerate_interpolator_factor_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor);
154 public delegate void efl_decelerate_interpolator_factor_set_api_delegate(System.IntPtr obj, double factor);
155 public static Efl.Eo.FunctionWrapper<efl_decelerate_interpolator_factor_set_api_delegate> efl_decelerate_interpolator_factor_set_ptr = new Efl.Eo.FunctionWrapper<efl_decelerate_interpolator_factor_set_api_delegate>(_Module, "efl_decelerate_interpolator_factor_set");
156 private static void factor_set(System.IntPtr obj, System.IntPtr pd, double factor)
158 Eina.Log.Debug("function efl_decelerate_interpolator_factor_set was called");
159 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
160 if(wrapper != null) {
163 ((DecelerateInterpolator)wrapper).SetFactor( factor);
164 } catch (Exception e) {
165 Eina.Log.Warning($"Callback error: {e.ToString()}");
166 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
169 efl_decelerate_interpolator_factor_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor);
172 private static efl_decelerate_interpolator_factor_set_delegate efl_decelerate_interpolator_factor_set_static_delegate;
175 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
178 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
179 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");
180 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
182 Eina.Log.Debug("function efl_interpolator_interpolate was called");
183 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
184 if(wrapper != null) {
185 double _ret_var = default(double);
187 _ret_var = ((DecelerateInterpolator)wrapper).Interpolate( progress);
188 } catch (Exception e) {
189 Eina.Log.Warning($"Callback error: {e.ToString()}");
190 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
194 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
197 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;