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 Recognizer Long Tap 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.GestureRecognizerLongTap.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public class GestureRecognizerLongTap : Efl.Canvas.GestureRecognizer
19 /// <summary>Pointer to the native class description.</summary>
20 public override System.IntPtr NativeClass
24 if (((object)this).GetType() == typeof(GestureRecognizerLongTap))
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_recognizer_long_tap_class_get();
37 /// <summary>Initializes a new instance of the <see cref="GestureRecognizerLongTap"/> class.</summary>
38 /// <param name="parent">Parent instance.</param>
39 public GestureRecognizerLongTap(Efl.Object parent= null
40 ) : base(efl_canvas_gesture_recognizer_long_tap_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 GestureRecognizerLongTap(ConstructingHandle ch) : base(ch)
52 /// <summary>Initializes a new instance of the <see cref="GestureRecognizerLongTap"/> 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 GestureRecognizerLongTap(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
59 /// <summary>Initializes a new instance of the <see cref="GestureRecognizerLongTap"/> 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 GestureRecognizerLongTap(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
67 /// <summary>Sets the holding time to be recognized as a long tap.</summary>
68 /// <returns>Allowed time gap value</returns>
69 virtual public double GetTimeout() {
70 var _ret_var = Efl.Canvas.GestureRecognizerLongTap.NativeMethods.efl_gesture_recognizer_long_tap_timeout_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
71 Eina.Error.RaiseIfUnhandledException();
74 /// <summary>Sets the holding time to be recognized as a long tap.</summary>
75 /// <param name="time">Allowed time gap value</param>
76 virtual public void SetTimeout(double time) {
77 Efl.Canvas.GestureRecognizerLongTap.NativeMethods.efl_gesture_recognizer_long_tap_timeout_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),time);
78 Eina.Error.RaiseIfUnhandledException();
80 /// <summary>Sets the holding time to be recognized as a long tap.</summary>
81 /// <value>Allowed time gap value</value>
82 public double Timeout {
83 get { return GetTimeout(); }
84 set { SetTimeout(value); }
86 private static IntPtr GetEflClassStatic()
88 return Efl.Canvas.GestureRecognizerLongTap.efl_canvas_gesture_recognizer_long_tap_class_get();
90 /// <summary>Wrapper for native methods and virtual method delegates.
91 /// For internal use by generated code only.</summary>
92 public new class NativeMethods : Efl.Canvas.GestureRecognizer.NativeMethods
94 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
95 /// <summary>Gets the list of Eo operations to override.</summary>
96 /// <returns>The list of Eo operations to be overload.</returns>
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);
102 if (efl_gesture_recognizer_long_tap_timeout_get_static_delegate == null)
104 efl_gesture_recognizer_long_tap_timeout_get_static_delegate = new efl_gesture_recognizer_long_tap_timeout_get_delegate(timeout_get);
107 if (methods.FirstOrDefault(m => m.Name == "GetTimeout") != null)
109 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_long_tap_timeout_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_long_tap_timeout_get_static_delegate) });
112 if (efl_gesture_recognizer_long_tap_timeout_set_static_delegate == null)
114 efl_gesture_recognizer_long_tap_timeout_set_static_delegate = new efl_gesture_recognizer_long_tap_timeout_set_delegate(timeout_set);
117 if (methods.FirstOrDefault(m => m.Name == "SetTimeout") != null)
119 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_long_tap_timeout_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_long_tap_timeout_set_static_delegate) });
122 descs.AddRange(base.GetEoOps(type));
125 /// <summary>Returns the Eo class for the native methods of this class.</summary>
126 /// <returns>The native class pointer.</returns>
127 public override IntPtr GetEflClass()
129 return Efl.Canvas.GestureRecognizerLongTap.efl_canvas_gesture_recognizer_long_tap_class_get();
132 #pragma warning disable CA1707, CS1591, SA1300, SA1600
135 private delegate double efl_gesture_recognizer_long_tap_timeout_get_delegate(System.IntPtr obj, System.IntPtr pd);
138 public delegate double efl_gesture_recognizer_long_tap_timeout_get_api_delegate(System.IntPtr obj);
140 public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_long_tap_timeout_get_api_delegate> efl_gesture_recognizer_long_tap_timeout_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_long_tap_timeout_get_api_delegate>(Module, "efl_gesture_recognizer_long_tap_timeout_get");
142 private static double timeout_get(System.IntPtr obj, System.IntPtr pd)
144 Eina.Log.Debug("function efl_gesture_recognizer_long_tap_timeout_get was called");
145 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
148 double _ret_var = default(double);
151 _ret_var = ((GestureRecognizerLongTap)ws.Target).GetTimeout();
155 Eina.Log.Warning($"Callback error: {e.ToString()}");
156 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
164 return efl_gesture_recognizer_long_tap_timeout_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
168 private static efl_gesture_recognizer_long_tap_timeout_get_delegate efl_gesture_recognizer_long_tap_timeout_get_static_delegate;
171 private delegate void efl_gesture_recognizer_long_tap_timeout_set_delegate(System.IntPtr obj, System.IntPtr pd, double time);
174 public delegate void efl_gesture_recognizer_long_tap_timeout_set_api_delegate(System.IntPtr obj, double time);
176 public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_long_tap_timeout_set_api_delegate> efl_gesture_recognizer_long_tap_timeout_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_long_tap_timeout_set_api_delegate>(Module, "efl_gesture_recognizer_long_tap_timeout_set");
178 private static void timeout_set(System.IntPtr obj, System.IntPtr pd, double time)
180 Eina.Log.Debug("function efl_gesture_recognizer_long_tap_timeout_set was called");
181 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
187 ((GestureRecognizerLongTap)ws.Target).SetTimeout(time);
191 Eina.Log.Warning($"Callback error: {e.ToString()}");
192 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
199 efl_gesture_recognizer_long_tap_timeout_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), time);
203 private static efl_gesture_recognizer_long_tap_timeout_set_delegate efl_gesture_recognizer_long_tap_timeout_set_static_delegate;
205 #pragma warning restore CA1707, CS1591, SA1300, SA1600
214 #pragma warning disable CS1591
215 public static class Efl_CanvasGestureRecognizerLongTap_ExtensionMethods {
216 public static Efl.BindableProperty<double> Timeout<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Canvas.GestureRecognizerLongTap, T>magic = null) where T : Efl.Canvas.GestureRecognizerLongTap {
217 return new Efl.BindableProperty<double>("timeout", fac);
221 #pragma warning restore CS1591