[EflSharp] Update Circle and efl cs files (#819)
[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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Canvas {
11
12 ///<summary>Event argument wrapper for event <see cref="Efl.Canvas.GestureLongTap.GestureLongTapEvt"/>.</summary>
13 public class GestureLongTapGestureLongTapEvt_Args : EventArgs {
14     ///<summary>Actual event payload.</summary>
15     public Efl.Canvas.Gesture arg { get; set; }
16 }
17 /// <summary>EFL Gesture Long Tap class</summary>
18 [Efl.Canvas.GestureLongTap.NativeMethods]
19 public class GestureLongTap : Efl.Canvas.Gesture, Efl.Eo.IWrapper
20 {
21     ///<summary>Pointer to the native class description.</summary>
22     public override System.IntPtr NativeClass
23     {
24         get
25         {
26             if (((object)this).GetType() == typeof(GestureLongTap))
27             {
28                 return GetEflClassStatic();
29             }
30             else
31             {
32                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33             }
34         }
35     }
36
37     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
38         efl_canvas_gesture_long_tap_class_get();
39     /// <summary>Initializes a new instance of the <see cref="GestureLongTap"/> class.</summary>
40     /// <param name="parent">Parent instance.</param>
41     public GestureLongTap(Efl.Object parent= null
42             ) : base(efl_canvas_gesture_long_tap_class_get(), typeof(GestureLongTap), parent)
43     {
44         FinishInstantiation();
45     }
46
47     /// <summary>Initializes a new instance of the <see cref="GestureLongTap"/> class.
48     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
49     /// <param name="raw">The native pointer to be wrapped.</param>
50     protected GestureLongTap(System.IntPtr raw) : base(raw)
51     {
52             }
53
54     /// <summary>Initializes a new instance of the <see cref="GestureLongTap"/> class.
55     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
56     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
57     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
58     /// <param name="parent">The Efl.Object parent of this instance.</param>
59     protected GestureLongTap(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
60     {
61     }
62
63     /// <summary>Verifies if the given object is equal to this one.</summary>
64     /// <param name="instance">The object to compare to.</param>
65     /// <returns>True if both objects point to the same native object.</returns>
66     public override bool Equals(object instance)
67     {
68         var other = instance as Efl.Object;
69         if (other == null)
70         {
71             return false;
72         }
73         return this.NativeHandle == other.NativeHandle;
74     }
75
76     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
77     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
78     public override int GetHashCode()
79     {
80         return this.NativeHandle.ToInt32();
81     }
82
83     /// <summary>Turns the native pointer into a string representation.</summary>
84     /// <returns>A string with the type and the native pointer for this object.</returns>
85     public override String ToString()
86     {
87         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
88     }
89
90     /// <summary>Event for tap gesture</summary>
91     public event EventHandler<Efl.Canvas.GestureLongTapGestureLongTapEvt_Args> GestureLongTapEvt
92     {
93         add
94         {
95             lock (eventLock)
96             {
97                 var wRef = new WeakReference(this);
98                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
99                 {
100                     var obj = wRef.Target as Efl.Eo.IWrapper;
101                     if (obj != null)
102                     {
103                                                 Efl.Canvas.GestureLongTapGestureLongTapEvt_Args args = new Efl.Canvas.GestureLongTapGestureLongTapEvt_Args();
104                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Canvas.Gesture);
105                         try
106                         {
107                             value?.Invoke(obj, args);
108                         }
109                         catch (Exception e)
110                         {
111                             Eina.Log.Error(e.ToString());
112                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
113                         }
114                     }
115                 };
116
117                 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
118                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
119             }
120         }
121
122         remove
123         {
124             lock (eventLock)
125             {
126                 string key = "_EFL_EVENT_GESTURE_LONG_TAP";
127                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
128             }
129         }
130     }
131     ///<summary>Method to raise event GestureLongTapEvt.</summary>
132     public void OnGestureLongTapEvt(Efl.Canvas.GestureLongTapGestureLongTapEvt_Args e)
133     {
134         var key = "_EFL_EVENT_GESTURE_LONG_TAP";
135         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
136         if (desc == IntPtr.Zero)
137         {
138             Eina.Log.Error($"Failed to get native event {key}");
139             return;
140         }
141
142         IntPtr info = e.arg.NativeHandle;
143         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
144     }
145     private static IntPtr GetEflClassStatic()
146     {
147         return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
148     }
149     /// <summary>Wrapper for native methods and virtual method delegates.
150     /// For internal use by generated code only.</summary>
151     public new class NativeMethods : Efl.Canvas.Gesture.NativeMethods
152     {
153         /// <summary>Gets the list of Eo operations to override.</summary>
154         /// <returns>The list of Eo operations to be overload.</returns>
155         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
156         {
157             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
158             descs.AddRange(base.GetEoOps(type));
159             return descs;
160         }
161         /// <summary>Returns the Eo class for the native methods of this class.</summary>
162         /// <returns>The native class pointer.</returns>
163         public override IntPtr GetEflClass()
164         {
165             return Efl.Canvas.GestureLongTap.efl_canvas_gesture_long_tap_class_get();
166         }
167
168         #pragma warning disable CA1707, SA1300, SA1600
169
170         #pragma warning restore CA1707, SA1300, SA1600
171
172 }
173 }
174 }
175
176 }
177