1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Canvas {
8 ///<summary>Event argument wrapper for event <see cref="Efl.Canvas.GestureLongTap.GestureLongTapEvt"/>.</summary>
9 public class GestureLongTapGestureLongTapEvt_Args : EventArgs {
10 ///<summary>Actual event payload.</summary>
11 public Efl.Canvas.Gesture arg { get; set; }
13 /// <summary>EFL Gesture Long Tap class</summary>
14 [GestureLongTapNativeInherit]
15 public class GestureLongTap : Efl.Canvas.Gesture, Efl.Eo.IWrapper
17 ///<summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass {
20 if (((object)this).GetType() == typeof (GestureLongTap))
21 return Efl.Canvas.GestureLongTapNativeInherit.GetEflClassStatic();
23 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
26 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
27 efl_canvas_gesture_long_tap_class_get();
28 ///<summary>Creates a new instance.</summary>
29 ///<param name="parent">Parent instance.</param>
30 public GestureLongTap(Efl.Object parent= null
32 base(efl_canvas_gesture_long_tap_class_get(), typeof(GestureLongTap), parent)
34 FinishInstantiation();
36 ///<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>
37 protected GestureLongTap(System.IntPtr raw) : base(raw)
39 RegisterEventProxies();
41 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
42 protected GestureLongTap(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
43 ///<summary>Verifies if the given object is equal to this one.</summary>
44 public override bool Equals(object obj)
46 var other = obj as Efl.Object;
49 return this.NativeHandle == other.NativeHandle;
51 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
52 public override int GetHashCode()
54 return this.NativeHandle.ToInt32();
56 ///<summary>Turns the native pointer into a string representation.</summary>
57 public override String ToString()
59 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
61 private static object GestureLongTapEvtKey = new object();
62 /// <summary>Event for tap gesture</summary>
63 public event EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args> GestureLongTapEvt
67 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
68 if (AddNativeEventHandler(efl.Libs.Evas, key, this.evt_GestureLongTapEvt_delegate)) {
69 eventHandlers.AddHandler(GestureLongTapEvtKey , value);
71 Eina.Log.Error($"Error adding proxy for event {key}");
76 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
77 if (RemoveNativeEventHandler(key, this.evt_GestureLongTapEvt_delegate)) {
78 eventHandlers.RemoveHandler(GestureLongTapEvtKey , value);
80 Eina.Log.Error($"Error removing proxy for event {key}");
84 ///<summary>Method to raise event GestureLongTapEvt.</summary>
85 public void On_GestureLongTapEvt(Efl.Canvas.GestureLongTapGestureLongTapEvt_Args e)
87 EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args> evt;
89 evt = (EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args>)eventHandlers[GestureLongTapEvtKey];
93 Efl.EventCb evt_GestureLongTapEvt_delegate;
94 private void on_GestureLongTapEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
96 Efl.Canvas.GestureLongTapGestureLongTapEvt_Args args = new Efl.Canvas.GestureLongTapGestureLongTapEvt_Args();
97 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Canvas.Gesture);
99 On_GestureLongTapEvt(args);
100 } catch (Exception e) {
101 Eina.Log.Error(e.ToString());
102 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
106 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
107 protected override void RegisterEventProxies()
109 base.RegisterEventProxies();
110 evt_GestureLongTapEvt_delegate = new Efl.EventCb(on_GestureLongTapEvt_NativeCallback);
112 private static IntPtr GetEflClassStatic()
114 return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
117 public class GestureLongTapNativeInherit : Efl.Canvas.GestureNativeInherit{
118 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
119 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
121 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
122 var methods = Efl.Eo.Globals.GetUserMethods(type);
123 descs.AddRange(base.GetEoOps(type));
126 public override IntPtr GetEflClass()
128 return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
130 public static new IntPtr GetEflClassStatic()
132 return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();