1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>EFL Gesture Flick class</summary>
13 [Efl.Canvas.GestureFlick.NativeMethods]
14 public class GestureFlick : Efl.Canvas.Gesture
16 ///<summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(GestureFlick))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
33 efl_canvas_gesture_flick_class_get();
34 /// <summary>Initializes a new instance of the <see cref="GestureFlick"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public GestureFlick(Efl.Object parent= null
37 ) : base(efl_canvas_gesture_flick_class_get(), typeof(GestureFlick), parent)
39 FinishInstantiation();
42 /// <summary>Initializes a new instance of the <see cref="GestureFlick"/> class.
43 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
44 /// <param name="raw">The native pointer to be wrapped.</param>
45 protected GestureFlick(System.IntPtr raw) : base(raw)
49 /// <summary>Initializes a new instance of the <see cref="GestureFlick"/> class.
50 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
51 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
52 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
53 /// <param name="parent">The Efl.Object parent of this instance.</param>
54 protected GestureFlick(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
58 /// <summary>Gets flick gesture momentum value</summary>
59 /// <returns>The momentum vector</returns>
60 virtual public Eina.Vector2 GetMomentum() {
61 var _ret_var = Efl.Canvas.GestureFlick.NativeMethods.efl_gesture_flick_momentum_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
62 Eina.Error.RaiseIfUnhandledException();
65 /// <summary>Gets flick direction angle</summary>
66 /// <returns>The angle value</returns>
67 virtual public double GetAngle() {
68 var _ret_var = Efl.Canvas.GestureFlick.NativeMethods.efl_gesture_flick_angle_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
69 Eina.Error.RaiseIfUnhandledException();
72 private static IntPtr GetEflClassStatic()
74 return Efl.Canvas.GestureFlick.efl_canvas_gesture_flick_class_get();
76 /// <summary>Wrapper for native methods and virtual method delegates.
77 /// For internal use by generated code only.</summary>
78 public new class NativeMethods : Efl.Canvas.Gesture.NativeMethods
80 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
81 /// <summary>Gets the list of Eo operations to override.</summary>
82 /// <returns>The list of Eo operations to be overload.</returns>
83 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
85 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
86 var methods = Efl.Eo.Globals.GetUserMethods(type);
88 if (efl_gesture_flick_momentum_get_static_delegate == null)
90 efl_gesture_flick_momentum_get_static_delegate = new efl_gesture_flick_momentum_get_delegate(momentum_get);
93 if (methods.FirstOrDefault(m => m.Name == "GetMomentum") != null)
95 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_flick_momentum_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_flick_momentum_get_static_delegate) });
98 if (efl_gesture_flick_angle_get_static_delegate == null)
100 efl_gesture_flick_angle_get_static_delegate = new efl_gesture_flick_angle_get_delegate(angle_get);
103 if (methods.FirstOrDefault(m => m.Name == "GetAngle") != null)
105 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_flick_angle_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_flick_angle_get_static_delegate) });
108 descs.AddRange(base.GetEoOps(type));
111 /// <summary>Returns the Eo class for the native methods of this class.</summary>
112 /// <returns>The native class pointer.</returns>
113 public override IntPtr GetEflClass()
115 return Efl.Canvas.GestureFlick.efl_canvas_gesture_flick_class_get();
118 #pragma warning disable CA1707, CS1591, SA1300, SA1600
121 private delegate Eina.Vector2.NativeStruct efl_gesture_flick_momentum_get_delegate(System.IntPtr obj, System.IntPtr pd);
124 public delegate Eina.Vector2.NativeStruct efl_gesture_flick_momentum_get_api_delegate(System.IntPtr obj);
126 public static Efl.Eo.FunctionWrapper<efl_gesture_flick_momentum_get_api_delegate> efl_gesture_flick_momentum_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_flick_momentum_get_api_delegate>(Module, "efl_gesture_flick_momentum_get");
128 private static Eina.Vector2.NativeStruct momentum_get(System.IntPtr obj, System.IntPtr pd)
130 Eina.Log.Debug("function efl_gesture_flick_momentum_get was called");
131 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
134 Eina.Vector2 _ret_var = default(Eina.Vector2);
137 _ret_var = ((GestureFlick)ws.Target).GetMomentum();
141 Eina.Log.Warning($"Callback error: {e.ToString()}");
142 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
150 return efl_gesture_flick_momentum_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
154 private static efl_gesture_flick_momentum_get_delegate efl_gesture_flick_momentum_get_static_delegate;
157 private delegate double efl_gesture_flick_angle_get_delegate(System.IntPtr obj, System.IntPtr pd);
160 public delegate double efl_gesture_flick_angle_get_api_delegate(System.IntPtr obj);
162 public static Efl.Eo.FunctionWrapper<efl_gesture_flick_angle_get_api_delegate> efl_gesture_flick_angle_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_flick_angle_get_api_delegate>(Module, "efl_gesture_flick_angle_get");
164 private static double angle_get(System.IntPtr obj, System.IntPtr pd)
166 Eina.Log.Debug("function efl_gesture_flick_angle_get was called");
167 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
170 double _ret_var = default(double);
173 _ret_var = ((GestureFlick)ws.Target).GetAngle();
177 Eina.Log.Warning($"Callback error: {e.ToString()}");
178 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
186 return efl_gesture_flick_angle_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
190 private static efl_gesture_flick_angle_get_delegate efl_gesture_flick_angle_get_static_delegate;
192 #pragma warning restore CA1707, CS1591, SA1300, SA1600