2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>EFL Gesture Momentum class</summary>
14 /// <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>
15 [Efl.Canvas.GestureMomentum.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public class GestureMomentum : Efl.Canvas.Gesture
19 /// <summary>Pointer to the native class description.</summary>
20 public override System.IntPtr NativeClass
24 if (((object)this).GetType() == typeof(GestureMomentum))
26 return GetEflClassStatic();
30 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
35 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
36 efl_canvas_gesture_momentum_class_get();
37 /// <summary>Initializes a new instance of the <see cref="GestureMomentum"/> class.</summary>
38 /// <param name="parent">Parent instance.</param>
39 public GestureMomentum(Efl.Object parent= null
40 ) : base(efl_canvas_gesture_momentum_class_get(), parent)
42 FinishInstantiation();
45 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
46 /// Do not call this constructor directly.</summary>
47 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
48 protected GestureMomentum(ConstructingHandle ch) : base(ch)
52 /// <summary>Initializes a new instance of the <see cref="GestureMomentum"/> class.
53 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
54 /// <param name="wh">The native pointer to be wrapped.</param>
55 protected GestureMomentum(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
59 /// <summary>Initializes a new instance of the <see cref="GestureMomentum"/> class.
60 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
61 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
62 /// <param name="parent">The Efl.Object parent of this instance.</param>
63 protected GestureMomentum(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
67 /// <summary>Gets momentum value</summary>
68 /// <returns>The momentum vector</returns>
69 virtual public Eina.Vector2 GetMomentum() {
70 var _ret_var = Efl.Canvas.GestureMomentum.NativeMethods.efl_gesture_momentum_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
71 Eina.Error.RaiseIfUnhandledException();
74 private static IntPtr GetEflClassStatic()
76 return Efl.Canvas.GestureMomentum.efl_canvas_gesture_momentum_class_get();
78 /// <summary>Wrapper for native methods and virtual method delegates.
79 /// For internal use by generated code only.</summary>
80 public new class NativeMethods : Efl.Canvas.Gesture.NativeMethods
82 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
83 /// <summary>Gets the list of Eo operations to override.</summary>
84 /// <returns>The list of Eo operations to be overload.</returns>
85 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
87 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
88 var methods = Efl.Eo.Globals.GetUserMethods(type);
90 if (efl_gesture_momentum_get_static_delegate == null)
92 efl_gesture_momentum_get_static_delegate = new efl_gesture_momentum_get_delegate(momentum_get);
95 if (methods.FirstOrDefault(m => m.Name == "GetMomentum") != null)
97 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_momentum_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_momentum_get_static_delegate) });
100 descs.AddRange(base.GetEoOps(type));
103 /// <summary>Returns the Eo class for the native methods of this class.</summary>
104 /// <returns>The native class pointer.</returns>
105 public override IntPtr GetEflClass()
107 return Efl.Canvas.GestureMomentum.efl_canvas_gesture_momentum_class_get();
110 #pragma warning disable CA1707, CS1591, SA1300, SA1600
113 private delegate Eina.Vector2.NativeStruct efl_gesture_momentum_get_delegate(System.IntPtr obj, System.IntPtr pd);
116 public delegate Eina.Vector2.NativeStruct efl_gesture_momentum_get_api_delegate(System.IntPtr obj);
118 public static Efl.Eo.FunctionWrapper<efl_gesture_momentum_get_api_delegate> efl_gesture_momentum_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_momentum_get_api_delegate>(Module, "efl_gesture_momentum_get");
120 private static Eina.Vector2.NativeStruct momentum_get(System.IntPtr obj, System.IntPtr pd)
122 Eina.Log.Debug("function efl_gesture_momentum_get was called");
123 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
126 Eina.Vector2 _ret_var = default(Eina.Vector2);
129 _ret_var = ((GestureMomentum)ws.Target).GetMomentum();
133 Eina.Log.Warning($"Callback error: {e.ToString()}");
134 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
142 return efl_gesture_momentum_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
146 private static efl_gesture_momentum_get_delegate efl_gesture_momentum_get_static_delegate;
148 #pragma warning restore CA1707, CS1591, SA1300, SA1600
157 #pragma warning disable CS1591
158 public static class Efl_CanvasGestureMomentum_ExtensionMethods {
160 #pragma warning restore CS1591