4f6f05bb74f53c5895866e1a7e65be31eb7ecc88
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_gesture_touch.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>EFL Gesture Touch class</summary>
13 [Efl.Canvas.GestureTouch.NativeMethods]
14 public class GestureTouch : Efl.Object, Efl.Eo.IWrapper
15 {
16     ///<summary>Pointer to the native class description.</summary>
17     public override System.IntPtr NativeClass
18     {
19         get
20         {
21             if (((object)this).GetType() == typeof(GestureTouch))
22             {
23                 return GetEflClassStatic();
24             }
25             else
26             {
27                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
28             }
29         }
30     }
31
32     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
33         efl_canvas_gesture_touch_class_get();
34     /// <summary>Initializes a new instance of the <see cref="GestureTouch"/> class.</summary>
35     /// <param name="parent">Parent instance.</param>
36     public GestureTouch(Efl.Object parent= null
37             ) : base(efl_canvas_gesture_touch_class_get(), typeof(GestureTouch), parent)
38     {
39         FinishInstantiation();
40     }
41
42     /// <summary>Initializes a new instance of the <see cref="GestureTouch"/> 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 GestureTouch(System.IntPtr raw) : base(raw)
46     {
47             }
48
49     /// <summary>Initializes a new instance of the <see cref="GestureTouch"/> 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 GestureTouch(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
55     {
56     }
57
58     /// <summary>Verifies if the given object is equal to this one.</summary>
59     /// <param name="instance">The object to compare to.</param>
60     /// <returns>True if both objects point to the same native object.</returns>
61     public override bool Equals(object instance)
62     {
63         var other = instance as Efl.Object;
64         if (other == null)
65         {
66             return false;
67         }
68         return this.NativeHandle == other.NativeHandle;
69     }
70
71     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
72     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
73     public override int GetHashCode()
74     {
75         return this.NativeHandle.ToInt32();
76     }
77
78     /// <summary>Turns the native pointer into a string representation.</summary>
79     /// <returns>A string with the type and the native pointer for this object.</returns>
80     public override String ToString()
81     {
82         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
83     }
84
85     /// <summary>Returns the first touch point.</summary>
86     /// <returns>The start position.</returns>
87     virtual public Eina.Vector2 GetStartPoint() {
88          var _ret_var = Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_start_point_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
89         Eina.Error.RaiseIfUnhandledException();
90         return _ret_var;
91  }
92     /// <summary>This property tells if the event is multi touch.</summary>
93     /// <returns>returns <c>true</c> if its a multi touch</returns>
94     virtual public bool GetMultiTouch() {
95          var _ret_var = Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_multi_touch_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
96         Eina.Error.RaiseIfUnhandledException();
97         return _ret_var;
98  }
99     /// <summary>This property holds the state of the touch event.</summary>
100     /// <returns>touch event state</returns>
101     virtual public Efl.Canvas.GestureTouchState GetState() {
102          var _ret_var = Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_state_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
103         Eina.Error.RaiseIfUnhandledException();
104         return _ret_var;
105  }
106     /// <summary>Touch point record method</summary>
107     /// <param name="tool">The finger id</param>
108     /// <param name="pos">Position of the event</param>
109     /// <param name="timestamp">The timestamp of the event</param>
110     /// <param name="action">action of the event</param>
111     virtual public void PointRecord(int tool, Eina.Vector2 pos, double timestamp, Efl.Pointer.Action action) {
112                  Eina.Vector2.NativeStruct _in_pos = pos;
113                                                                                         Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_point_record_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),tool, _in_pos, timestamp, action);
114         Eina.Error.RaiseIfUnhandledException();
115                                                                          }
116     /// <summary>Compute the distance between the last two events</summary>
117     /// <param name="tool">The finger id</param>
118     /// <returns>The distance vector.</returns>
119     virtual public Eina.Vector2 Delta(int tool) {
120                                  var _ret_var = Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_delta_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),tool);
121         Eina.Error.RaiseIfUnhandledException();
122                         return _ret_var;
123  }
124     /// <summary>Compute the distance between the first touch and the last event.</summary>
125     /// <param name="tool">The finger id</param>
126     /// <returns>The distance vector.</returns>
127     virtual public Eina.Vector2 Distance(int tool) {
128                                  var _ret_var = Efl.Canvas.GestureTouch.NativeMethods.efl_gesture_touch_distance_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),tool);
129         Eina.Error.RaiseIfUnhandledException();
130                         return _ret_var;
131  }
132     /// <summary>Returns the first touch point.</summary>
133 /// <value>The start position.</value>
134     public Eina.Vector2 StartPoint {
135         get { return GetStartPoint(); }
136     }
137     /// <summary>This property tells if the event is multi touch.</summary>
138 /// <value>returns <c>true</c> if its a multi touch</value>
139     public bool MultiTouch {
140         get { return GetMultiTouch(); }
141     }
142     /// <summary>This property holds the state of the touch event.</summary>
143 /// <value>touch event state</value>
144     public Efl.Canvas.GestureTouchState State {
145         get { return GetState(); }
146     }
147     private static IntPtr GetEflClassStatic()
148     {
149         return Efl.Canvas.GestureTouch.efl_canvas_gesture_touch_class_get();
150     }
151     /// <summary>Wrapper for native methods and virtual method delegates.
152     /// For internal use by generated code only.</summary>
153     public new class NativeMethods : Efl.Object.NativeMethods
154     {
155         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
156         /// <summary>Gets the list of Eo operations to override.</summary>
157         /// <returns>The list of Eo operations to be overload.</returns>
158         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
159         {
160             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
161             var methods = Efl.Eo.Globals.GetUserMethods(type);
162
163             if (efl_gesture_touch_start_point_get_static_delegate == null)
164             {
165                 efl_gesture_touch_start_point_get_static_delegate = new efl_gesture_touch_start_point_get_delegate(start_point_get);
166             }
167
168             if (methods.FirstOrDefault(m => m.Name == "GetStartPoint") != null)
169             {
170                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_start_point_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_start_point_get_static_delegate) });
171             }
172
173             if (efl_gesture_touch_multi_touch_get_static_delegate == null)
174             {
175                 efl_gesture_touch_multi_touch_get_static_delegate = new efl_gesture_touch_multi_touch_get_delegate(multi_touch_get);
176             }
177
178             if (methods.FirstOrDefault(m => m.Name == "GetMultiTouch") != null)
179             {
180                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_multi_touch_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_multi_touch_get_static_delegate) });
181             }
182
183             if (efl_gesture_touch_state_get_static_delegate == null)
184             {
185                 efl_gesture_touch_state_get_static_delegate = new efl_gesture_touch_state_get_delegate(state_get);
186             }
187
188             if (methods.FirstOrDefault(m => m.Name == "GetState") != null)
189             {
190                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_state_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_state_get_static_delegate) });
191             }
192
193             if (efl_gesture_touch_point_record_static_delegate == null)
194             {
195                 efl_gesture_touch_point_record_static_delegate = new efl_gesture_touch_point_record_delegate(point_record);
196             }
197
198             if (methods.FirstOrDefault(m => m.Name == "PointRecord") != null)
199             {
200                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_point_record"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_point_record_static_delegate) });
201             }
202
203             if (efl_gesture_touch_delta_static_delegate == null)
204             {
205                 efl_gesture_touch_delta_static_delegate = new efl_gesture_touch_delta_delegate(delta);
206             }
207
208             if (methods.FirstOrDefault(m => m.Name == "Delta") != null)
209             {
210                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_delta"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_delta_static_delegate) });
211             }
212
213             if (efl_gesture_touch_distance_static_delegate == null)
214             {
215                 efl_gesture_touch_distance_static_delegate = new efl_gesture_touch_distance_delegate(distance);
216             }
217
218             if (methods.FirstOrDefault(m => m.Name == "Distance") != null)
219             {
220                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_touch_distance"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_touch_distance_static_delegate) });
221             }
222
223             descs.AddRange(base.GetEoOps(type));
224             return descs;
225         }
226         /// <summary>Returns the Eo class for the native methods of this class.</summary>
227         /// <returns>The native class pointer.</returns>
228         public override IntPtr GetEflClass()
229         {
230             return Efl.Canvas.GestureTouch.efl_canvas_gesture_touch_class_get();
231         }
232
233         #pragma warning disable CA1707, SA1300, SA1600
234
235         
236         private delegate Eina.Vector2.NativeStruct efl_gesture_touch_start_point_get_delegate(System.IntPtr obj, System.IntPtr pd);
237
238         
239         public delegate Eina.Vector2.NativeStruct efl_gesture_touch_start_point_get_api_delegate(System.IntPtr obj);
240
241         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_start_point_get_api_delegate> efl_gesture_touch_start_point_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_start_point_get_api_delegate>(Module, "efl_gesture_touch_start_point_get");
242
243         private static Eina.Vector2.NativeStruct start_point_get(System.IntPtr obj, System.IntPtr pd)
244         {
245             Eina.Log.Debug("function efl_gesture_touch_start_point_get was called");
246             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
247             if (wrapper != null)
248             {
249             Eina.Vector2 _ret_var = default(Eina.Vector2);
250                 try
251                 {
252                     _ret_var = ((GestureTouch)wrapper).GetStartPoint();
253                 }
254                 catch (Exception e)
255                 {
256                     Eina.Log.Warning($"Callback error: {e.ToString()}");
257                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
258                 }
259
260         return _ret_var;
261
262             }
263             else
264             {
265                 return efl_gesture_touch_start_point_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
266             }
267         }
268
269         private static efl_gesture_touch_start_point_get_delegate efl_gesture_touch_start_point_get_static_delegate;
270
271         [return: MarshalAs(UnmanagedType.U1)]
272         private delegate bool efl_gesture_touch_multi_touch_get_delegate(System.IntPtr obj, System.IntPtr pd);
273
274         [return: MarshalAs(UnmanagedType.U1)]
275         public delegate bool efl_gesture_touch_multi_touch_get_api_delegate(System.IntPtr obj);
276
277         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_multi_touch_get_api_delegate> efl_gesture_touch_multi_touch_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_multi_touch_get_api_delegate>(Module, "efl_gesture_touch_multi_touch_get");
278
279         private static bool multi_touch_get(System.IntPtr obj, System.IntPtr pd)
280         {
281             Eina.Log.Debug("function efl_gesture_touch_multi_touch_get was called");
282             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
283             if (wrapper != null)
284             {
285             bool _ret_var = default(bool);
286                 try
287                 {
288                     _ret_var = ((GestureTouch)wrapper).GetMultiTouch();
289                 }
290                 catch (Exception e)
291                 {
292                     Eina.Log.Warning($"Callback error: {e.ToString()}");
293                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
294                 }
295
296         return _ret_var;
297
298             }
299             else
300             {
301                 return efl_gesture_touch_multi_touch_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
302             }
303         }
304
305         private static efl_gesture_touch_multi_touch_get_delegate efl_gesture_touch_multi_touch_get_static_delegate;
306
307         
308         private delegate Efl.Canvas.GestureTouchState efl_gesture_touch_state_get_delegate(System.IntPtr obj, System.IntPtr pd);
309
310         
311         public delegate Efl.Canvas.GestureTouchState efl_gesture_touch_state_get_api_delegate(System.IntPtr obj);
312
313         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_state_get_api_delegate> efl_gesture_touch_state_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_state_get_api_delegate>(Module, "efl_gesture_touch_state_get");
314
315         private static Efl.Canvas.GestureTouchState state_get(System.IntPtr obj, System.IntPtr pd)
316         {
317             Eina.Log.Debug("function efl_gesture_touch_state_get was called");
318             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
319             if (wrapper != null)
320             {
321             Efl.Canvas.GestureTouchState _ret_var = default(Efl.Canvas.GestureTouchState);
322                 try
323                 {
324                     _ret_var = ((GestureTouch)wrapper).GetState();
325                 }
326                 catch (Exception e)
327                 {
328                     Eina.Log.Warning($"Callback error: {e.ToString()}");
329                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
330                 }
331
332         return _ret_var;
333
334             }
335             else
336             {
337                 return efl_gesture_touch_state_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
338             }
339         }
340
341         private static efl_gesture_touch_state_get_delegate efl_gesture_touch_state_get_static_delegate;
342
343         
344         private delegate void efl_gesture_touch_point_record_delegate(System.IntPtr obj, System.IntPtr pd,  int tool,  Eina.Vector2.NativeStruct pos,  double timestamp,  Efl.Pointer.Action action);
345
346         
347         public delegate void efl_gesture_touch_point_record_api_delegate(System.IntPtr obj,  int tool,  Eina.Vector2.NativeStruct pos,  double timestamp,  Efl.Pointer.Action action);
348
349         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_point_record_api_delegate> efl_gesture_touch_point_record_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_point_record_api_delegate>(Module, "efl_gesture_touch_point_record");
350
351         private static void point_record(System.IntPtr obj, System.IntPtr pd, int tool, Eina.Vector2.NativeStruct pos, double timestamp, Efl.Pointer.Action action)
352         {
353             Eina.Log.Debug("function efl_gesture_touch_point_record was called");
354             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
355             if (wrapper != null)
356             {
357                 Eina.Vector2 _in_pos = pos;
358                                                                                             
359                 try
360                 {
361                     ((GestureTouch)wrapper).PointRecord(tool, _in_pos, timestamp, action);
362                 }
363                 catch (Exception e)
364                 {
365                     Eina.Log.Warning($"Callback error: {e.ToString()}");
366                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
367                 }
368
369                                                                         
370             }
371             else
372             {
373                 efl_gesture_touch_point_record_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), tool, pos, timestamp, action);
374             }
375         }
376
377         private static efl_gesture_touch_point_record_delegate efl_gesture_touch_point_record_static_delegate;
378
379         
380         private delegate Eina.Vector2.NativeStruct efl_gesture_touch_delta_delegate(System.IntPtr obj, System.IntPtr pd,  int tool);
381
382         
383         public delegate Eina.Vector2.NativeStruct efl_gesture_touch_delta_api_delegate(System.IntPtr obj,  int tool);
384
385         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_delta_api_delegate> efl_gesture_touch_delta_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_delta_api_delegate>(Module, "efl_gesture_touch_delta");
386
387         private static Eina.Vector2.NativeStruct delta(System.IntPtr obj, System.IntPtr pd, int tool)
388         {
389             Eina.Log.Debug("function efl_gesture_touch_delta was called");
390             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
391             if (wrapper != null)
392             {
393                                     Eina.Vector2 _ret_var = default(Eina.Vector2);
394                 try
395                 {
396                     _ret_var = ((GestureTouch)wrapper).Delta(tool);
397                 }
398                 catch (Exception e)
399                 {
400                     Eina.Log.Warning($"Callback error: {e.ToString()}");
401                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
402                 }
403
404                         return _ret_var;
405
406             }
407             else
408             {
409                 return efl_gesture_touch_delta_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), tool);
410             }
411         }
412
413         private static efl_gesture_touch_delta_delegate efl_gesture_touch_delta_static_delegate;
414
415         
416         private delegate Eina.Vector2.NativeStruct efl_gesture_touch_distance_delegate(System.IntPtr obj, System.IntPtr pd,  int tool);
417
418         
419         public delegate Eina.Vector2.NativeStruct efl_gesture_touch_distance_api_delegate(System.IntPtr obj,  int tool);
420
421         public static Efl.Eo.FunctionWrapper<efl_gesture_touch_distance_api_delegate> efl_gesture_touch_distance_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_touch_distance_api_delegate>(Module, "efl_gesture_touch_distance");
422
423         private static Eina.Vector2.NativeStruct distance(System.IntPtr obj, System.IntPtr pd, int tool)
424         {
425             Eina.Log.Debug("function efl_gesture_touch_distance was called");
426             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
427             if (wrapper != null)
428             {
429                                     Eina.Vector2 _ret_var = default(Eina.Vector2);
430                 try
431                 {
432                     _ret_var = ((GestureTouch)wrapper).Distance(tool);
433                 }
434                 catch (Exception e)
435                 {
436                     Eina.Log.Warning($"Callback error: {e.ToString()}");
437                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
438                 }
439
440                         return _ret_var;
441
442             }
443             else
444             {
445                 return efl_gesture_touch_distance_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), tool);
446             }
447         }
448
449         private static efl_gesture_touch_distance_delegate efl_gesture_touch_distance_static_delegate;
450
451         #pragma warning restore CA1707, SA1300, SA1600
452
453 }
454 }
455 }
456
457 }
458