[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_gesture_long_tap.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
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; }
12 }
13 /// <summary>EFL Gesture Long Tap class</summary>
14 [GestureLongTapNativeInherit]
15 public class GestureLongTap : Efl.Canvas.Gesture, Efl.Eo.IWrapper
16 {
17     ///<summary>Pointer to the native class description.</summary>
18     public override System.IntPtr NativeClass {
19         get {
20             if (((object)this).GetType() == typeof (GestureLongTap))
21                 return Efl.Canvas.GestureLongTapNativeInherit.GetEflClassStatic();
22             else
23                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
24         }
25     }
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
31             ) :
32         base(efl_canvas_gesture_long_tap_class_get(), typeof(GestureLongTap), parent)
33     {
34         FinishInstantiation();
35     }
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)
38     {
39                 RegisterEventProxies();
40     }
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)
45     {
46         var other = obj as Efl.Object;
47         if (other == null)
48             return false;
49         return this.NativeHandle == other.NativeHandle;
50     }
51     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
52     public override int GetHashCode()
53     {
54         return this.NativeHandle.ToInt32();
55     }
56     ///<summary>Turns the native pointer into a string representation.</summary>
57     public override String ToString()
58     {
59         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
60     }
61 private static object GestureLongTapEvtKey = new object();
62     /// <summary>Event for tap gesture</summary>
63     public event EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args> GestureLongTapEvt
64     {
65         add {
66             lock (eventLock) {
67                 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
68                 if (AddNativeEventHandler(efl.Libs.Evas, key, this.evt_GestureLongTapEvt_delegate)) {
69                     eventHandlers.AddHandler(GestureLongTapEvtKey , value);
70                 } else
71                     Eina.Log.Error($"Error adding proxy for event {key}");
72             }
73         }
74         remove {
75             lock (eventLock) {
76                 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
77                 if (RemoveNativeEventHandler(key, this.evt_GestureLongTapEvt_delegate)) { 
78                     eventHandlers.RemoveHandler(GestureLongTapEvtKey , value);
79                 } else
80                     Eina.Log.Error($"Error removing proxy for event {key}");
81             }
82         }
83     }
84     ///<summary>Method to raise event GestureLongTapEvt.</summary>
85     public void On_GestureLongTapEvt(Efl.Canvas.GestureLongTapGestureLongTapEvt_Args e)
86     {
87         EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args> evt;
88         lock (eventLock) {
89         evt = (EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args>)eventHandlers[GestureLongTapEvtKey];
90         }
91         evt?.Invoke(this, e);
92     }
93     Efl.EventCb evt_GestureLongTapEvt_delegate;
94     private void on_GestureLongTapEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
95     {
96         Efl.Canvas.GestureLongTapGestureLongTapEvt_Args args = new Efl.Canvas.GestureLongTapGestureLongTapEvt_Args();
97       args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Canvas.Gesture);
98         try {
99             On_GestureLongTapEvt(args);
100         } catch (Exception e) {
101             Eina.Log.Error(e.ToString());
102             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
103         }
104     }
105
106     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
107     protected override void RegisterEventProxies()
108     {
109         base.RegisterEventProxies();
110         evt_GestureLongTapEvt_delegate = new Efl.EventCb(on_GestureLongTapEvt_NativeCallback);
111     }
112     private static IntPtr GetEflClassStatic()
113     {
114         return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
115     }
116 }
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)
120     {
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));
124         return descs;
125     }
126     public override IntPtr GetEflClass()
127     {
128         return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
129     }
130     public static new  IntPtr GetEflClassStatic()
131     {
132         return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
133     }
134 }
135 } }