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 accelerate interpolator class
12 /// output = 1 - sin(Pi / 2 + input * Pi / 2);</summary>
13 /// <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>
14 [Efl.AccelerateInterpolator.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public class AccelerateInterpolator : Efl.Object, Efl.IInterpolator
18 /// <summary>Pointer to the native class description.</summary>
19 public override System.IntPtr NativeClass
23 if (((object)this).GetType() == typeof(AccelerateInterpolator))
25 return GetEflClassStatic();
29 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
34 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
35 efl_accelerate_interpolator_class_get();
36 /// <summary>Initializes a new instance of the <see cref="AccelerateInterpolator"/> class.</summary>
37 /// <param name="parent">Parent instance.</param>
38 public AccelerateInterpolator(Efl.Object parent= null
39 ) : base(efl_accelerate_interpolator_class_get(), parent)
41 FinishInstantiation();
44 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
45 /// Do not call this constructor directly.</summary>
46 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
47 protected AccelerateInterpolator(ConstructingHandle ch) : base(ch)
51 /// <summary>Initializes a new instance of the <see cref="AccelerateInterpolator"/> class.
52 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
53 /// <param name="wh">The native pointer to be wrapped.</param>
54 protected AccelerateInterpolator(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
58 /// <summary>Initializes a new instance of the <see cref="AccelerateInterpolator"/> class.
59 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
60 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
61 /// <param name="parent">The Efl.Object parent of this instance.</param>
62 protected AccelerateInterpolator(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
66 /// <summary>Factor property</summary>
67 /// <returns>Factor of the interpolation function.</returns>
68 virtual public double GetFactor() {
69 var _ret_var = Efl.AccelerateInterpolator.NativeMethods.efl_accelerate_interpolator_factor_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
70 Eina.Error.RaiseIfUnhandledException();
73 /// <summary>Factor property</summary>
74 /// <param name="factor">Factor of the interpolation function.</param>
75 virtual public void SetFactor(double factor) {
76 Efl.AccelerateInterpolator.NativeMethods.efl_accelerate_interpolator_factor_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),factor);
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>Factor property</summary>
88 /// <value>Factor of the interpolation function.</value>
89 public double Factor {
90 get { return GetFactor(); }
91 set { SetFactor(value); }
93 private static IntPtr GetEflClassStatic()
95 return Efl.AccelerateInterpolator.efl_accelerate_interpolator_class_get();
97 /// <summary>Wrapper for native methods and virtual method delegates.
98 /// For internal use by generated code only.</summary>
99 public new class NativeMethods : Efl.Object.NativeMethods
101 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
102 /// <summary>Gets the list of Eo operations to override.</summary>
103 /// <returns>The list of Eo operations to be overload.</returns>
104 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
106 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
107 var methods = Efl.Eo.Globals.GetUserMethods(type);
109 if (efl_accelerate_interpolator_factor_get_static_delegate == null)
111 efl_accelerate_interpolator_factor_get_static_delegate = new efl_accelerate_interpolator_factor_get_delegate(factor_get);
114 if (methods.FirstOrDefault(m => m.Name == "GetFactor") != null)
116 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_accelerate_interpolator_factor_get"), func = Marshal.GetFunctionPointerForDelegate(efl_accelerate_interpolator_factor_get_static_delegate) });
119 if (efl_accelerate_interpolator_factor_set_static_delegate == null)
121 efl_accelerate_interpolator_factor_set_static_delegate = new efl_accelerate_interpolator_factor_set_delegate(factor_set);
124 if (methods.FirstOrDefault(m => m.Name == "SetFactor") != null)
126 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_accelerate_interpolator_factor_set"), func = Marshal.GetFunctionPointerForDelegate(efl_accelerate_interpolator_factor_set_static_delegate) });
129 if (efl_interpolator_interpolate_static_delegate == null)
131 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
134 if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
136 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) });
139 descs.AddRange(base.GetEoOps(type));
142 /// <summary>Returns the Eo class for the native methods of this class.</summary>
143 /// <returns>The native class pointer.</returns>
144 public override IntPtr GetEflClass()
146 return Efl.AccelerateInterpolator.efl_accelerate_interpolator_class_get();
149 #pragma warning disable CA1707, CS1591, SA1300, SA1600
152 private delegate double efl_accelerate_interpolator_factor_get_delegate(System.IntPtr obj, System.IntPtr pd);
155 public delegate double efl_accelerate_interpolator_factor_get_api_delegate(System.IntPtr obj);
157 public static Efl.Eo.FunctionWrapper<efl_accelerate_interpolator_factor_get_api_delegate> efl_accelerate_interpolator_factor_get_ptr = new Efl.Eo.FunctionWrapper<efl_accelerate_interpolator_factor_get_api_delegate>(Module, "efl_accelerate_interpolator_factor_get");
159 private static double factor_get(System.IntPtr obj, System.IntPtr pd)
161 Eina.Log.Debug("function efl_accelerate_interpolator_factor_get was called");
162 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
165 double _ret_var = default(double);
168 _ret_var = ((AccelerateInterpolator)ws.Target).GetFactor();
172 Eina.Log.Warning($"Callback error: {e.ToString()}");
173 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
181 return efl_accelerate_interpolator_factor_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
185 private static efl_accelerate_interpolator_factor_get_delegate efl_accelerate_interpolator_factor_get_static_delegate;
188 private delegate void efl_accelerate_interpolator_factor_set_delegate(System.IntPtr obj, System.IntPtr pd, double factor);
191 public delegate void efl_accelerate_interpolator_factor_set_api_delegate(System.IntPtr obj, double factor);
193 public static Efl.Eo.FunctionWrapper<efl_accelerate_interpolator_factor_set_api_delegate> efl_accelerate_interpolator_factor_set_ptr = new Efl.Eo.FunctionWrapper<efl_accelerate_interpolator_factor_set_api_delegate>(Module, "efl_accelerate_interpolator_factor_set");
195 private static void factor_set(System.IntPtr obj, System.IntPtr pd, double factor)
197 Eina.Log.Debug("function efl_accelerate_interpolator_factor_set was called");
198 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
204 ((AccelerateInterpolator)ws.Target).SetFactor(factor);
208 Eina.Log.Warning($"Callback error: {e.ToString()}");
209 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
216 efl_accelerate_interpolator_factor_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), factor);
220 private static efl_accelerate_interpolator_factor_set_delegate efl_accelerate_interpolator_factor_set_static_delegate;
223 private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd, double progress);
226 public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj, double progress);
228 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");
230 private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
232 Eina.Log.Debug("function efl_interpolator_interpolate was called");
233 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
236 double _ret_var = default(double);
239 _ret_var = ((AccelerateInterpolator)ws.Target).Interpolate(progress);
243 Eina.Log.Warning($"Callback error: {e.ToString()}");
244 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
252 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
256 private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
258 #pragma warning restore CA1707, CS1591, SA1300, SA1600
265 #pragma warning disable CS1591
266 public static class EflAccelerateInterpolator_ExtensionMethods {
267 public static Efl.BindableProperty<double> Factor<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.AccelerateInterpolator, T>magic = null) where T : Efl.AccelerateInterpolator {
268 return new Efl.BindableProperty<double>("factor", fac);
272 #pragma warning restore CS1591