b1107ca2deaddfb8e8546ab9d459ef9e5714c1d1
[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.ComponentModel;
7 namespace Efl { namespace Canvas { 
8 /// <summary>EFL Gesture Touch class</summary>
9 [GestureTouchNativeInherit]
10 public class GestureTouch : Efl.Object, Efl.Eo.IWrapper
11 {
12     ///<summary>Pointer to the native class description.</summary>
13     public override System.IntPtr NativeClass {
14         get {
15             if (((object)this).GetType() == typeof (GestureTouch))
16                 return Efl.Canvas.GestureTouchNativeInherit.GetEflClassStatic();
17             else
18                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
19         }
20     }
21     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
22         efl_canvas_gesture_touch_class_get();
23     ///<summary>Creates a new instance.</summary>
24     ///<param name="parent">Parent instance.</param>
25     public GestureTouch(Efl.Object parent= null
26             ) :
27         base(efl_canvas_gesture_touch_class_get(), typeof(GestureTouch), parent)
28     {
29         FinishInstantiation();
30     }
31     ///<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>
32     protected GestureTouch(System.IntPtr raw) : base(raw)
33     {
34                 RegisterEventProxies();
35     }
36     ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37     protected GestureTouch(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38     ///<summary>Verifies if the given object is equal to this one.</summary>
39     public override bool Equals(object obj)
40     {
41         var other = obj as Efl.Object;
42         if (other == null)
43             return false;
44         return this.NativeHandle == other.NativeHandle;
45     }
46     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47     public override int GetHashCode()
48     {
49         return this.NativeHandle.ToInt32();
50     }
51     ///<summary>Turns the native pointer into a string representation.</summary>
52     public override String ToString()
53     {
54         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
55     }
56     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
57     protected override void RegisterEventProxies()
58     {
59         base.RegisterEventProxies();
60     }
61     /// <summary>Returns the first touch point.</summary>
62     /// <returns>The start position.</returns>
63     virtual public Eina.Vector2 GetStartPoint() {
64          var _ret_var = Efl.Canvas.GestureTouchNativeInherit.efl_gesture_touch_start_point_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
65         Eina.Error.RaiseIfUnhandledException();
66         return _ret_var;
67  }
68     /// <summary>This property tells if the event is multi touch.</summary>
69     /// <returns>returns <c>true</c> if its a multi touch</returns>
70     virtual public bool GetMultiTouch() {
71          var _ret_var = Efl.Canvas.GestureTouchNativeInherit.efl_gesture_touch_multi_touch_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
72         Eina.Error.RaiseIfUnhandledException();
73         return _ret_var;
74  }
75     /// <summary>This property holds the state of the touch event.</summary>
76     /// <returns>touch event state</returns>
77     virtual public Efl.Canvas.GestureTouchState GetState() {
78          var _ret_var = Efl.Canvas.GestureTouchNativeInherit.efl_gesture_touch_state_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
79         Eina.Error.RaiseIfUnhandledException();
80         return _ret_var;
81  }
82     /// <summary>Touch point record method</summary>
83     /// <param name="tool">The finger id</param>
84     /// <param name="pos">Position of the event</param>
85     /// <param name="timestamp">The timestamp of the event</param>
86     /// <param name="action">action of the event</param>
87     /// <returns></returns>
88     virtual public void PointRecord( int tool,  Eina.Vector2 pos,  double timestamp,  Efl.Pointer.Action action) {
89                  Eina.Vector2.NativeStruct _in_pos = pos;
90                                                                                         Efl.Canvas.GestureTouchNativeInherit.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);
91         Eina.Error.RaiseIfUnhandledException();
92                                                                          }
93     /// <summary>Compute the distance between the last two events</summary>
94     /// <param name="tool">The finger id</param>
95     /// <returns>The distance vector.</returns>
96     virtual public Eina.Vector2 Delta( int tool) {
97                                  var _ret_var = Efl.Canvas.GestureTouchNativeInherit.efl_gesture_touch_delta_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), tool);
98         Eina.Error.RaiseIfUnhandledException();
99                         return _ret_var;
100  }
101     /// <summary>Compute the distance between the first touch and the last event.</summary>
102     /// <param name="tool">The finger id</param>
103     /// <returns>The distance vector.</returns>
104     virtual public Eina.Vector2 Distance( int tool) {
105                                  var _ret_var = Efl.Canvas.GestureTouchNativeInherit.efl_gesture_touch_distance_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), tool);
106         Eina.Error.RaiseIfUnhandledException();
107                         return _ret_var;
108  }
109     /// <summary>Returns the first touch point.</summary>
110 /// <value>The start position.</value>
111     public Eina.Vector2 StartPoint {
112         get { return GetStartPoint(); }
113     }
114     /// <summary>This property tells if the event is multi touch.</summary>
115 /// <value>returns <c>true</c> if its a multi touch</value>
116     public bool MultiTouch {
117         get { return GetMultiTouch(); }
118     }
119     /// <summary>This property holds the state of the touch event.</summary>
120 /// <value>touch event state</value>
121     public Efl.Canvas.GestureTouchState State {
122         get { return GetState(); }
123     }
124     private static IntPtr GetEflClassStatic()
125     {
126         return Efl.Canvas.GestureTouch.efl_canvas_gesture_touch_class_get();
127     }
128 }
129 public class GestureTouchNativeInherit : Efl.ObjectNativeInherit{
130     public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
131     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
132     {
133         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
134         var methods = Efl.Eo.Globals.GetUserMethods(type);
135         if (efl_gesture_touch_start_point_get_static_delegate == null)
136             efl_gesture_touch_start_point_get_static_delegate = new efl_gesture_touch_start_point_get_delegate(start_point_get);
137         if (methods.FirstOrDefault(m => m.Name == "GetStartPoint") != null)
138             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)});
139         if (efl_gesture_touch_multi_touch_get_static_delegate == null)
140             efl_gesture_touch_multi_touch_get_static_delegate = new efl_gesture_touch_multi_touch_get_delegate(multi_touch_get);
141         if (methods.FirstOrDefault(m => m.Name == "GetMultiTouch") != null)
142             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)});
143         if (efl_gesture_touch_state_get_static_delegate == null)
144             efl_gesture_touch_state_get_static_delegate = new efl_gesture_touch_state_get_delegate(state_get);
145         if (methods.FirstOrDefault(m => m.Name == "GetState") != null)
146             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)});
147         if (efl_gesture_touch_point_record_static_delegate == null)
148             efl_gesture_touch_point_record_static_delegate = new efl_gesture_touch_point_record_delegate(point_record);
149         if (methods.FirstOrDefault(m => m.Name == "PointRecord") != null)
150             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)});
151         if (efl_gesture_touch_delta_static_delegate == null)
152             efl_gesture_touch_delta_static_delegate = new efl_gesture_touch_delta_delegate(delta);
153         if (methods.FirstOrDefault(m => m.Name == "Delta") != null)
154             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)});
155         if (efl_gesture_touch_distance_static_delegate == null)
156             efl_gesture_touch_distance_static_delegate = new efl_gesture_touch_distance_delegate(distance);
157         if (methods.FirstOrDefault(m => m.Name == "Distance") != null)
158             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)});
159         descs.AddRange(base.GetEoOps(type));
160         return descs;
161     }
162     public override IntPtr GetEflClass()
163     {
164         return Efl.Canvas.GestureTouch.efl_canvas_gesture_touch_class_get();
165     }
166     public static new  IntPtr GetEflClassStatic()
167     {
168         return Efl.Canvas.GestureTouch.efl_canvas_gesture_touch_class_get();
169     }
170
171
172      private delegate Eina.Vector2.NativeStruct efl_gesture_touch_start_point_get_delegate(System.IntPtr obj, System.IntPtr pd);
173
174
175      public delegate Eina.Vector2.NativeStruct efl_gesture_touch_start_point_get_api_delegate(System.IntPtr obj);
176      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");
177      private static Eina.Vector2.NativeStruct start_point_get(System.IntPtr obj, System.IntPtr pd)
178     {
179         Eina.Log.Debug("function efl_gesture_touch_start_point_get was called");
180         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
181         if(wrapper != null) {
182                         Eina.Vector2 _ret_var = default(Eina.Vector2);
183             try {
184                 _ret_var = ((GestureTouch)wrapper).GetStartPoint();
185             } catch (Exception e) {
186                 Eina.Log.Warning($"Callback error: {e.ToString()}");
187                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
188             }
189         return _ret_var;
190         } else {
191             return efl_gesture_touch_start_point_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
192         }
193     }
194     private static efl_gesture_touch_start_point_get_delegate efl_gesture_touch_start_point_get_static_delegate;
195
196
197      [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gesture_touch_multi_touch_get_delegate(System.IntPtr obj, System.IntPtr pd);
198
199
200      [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gesture_touch_multi_touch_get_api_delegate(System.IntPtr obj);
201      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");
202      private static bool multi_touch_get(System.IntPtr obj, System.IntPtr pd)
203     {
204         Eina.Log.Debug("function efl_gesture_touch_multi_touch_get was called");
205         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
206         if(wrapper != null) {
207                         bool _ret_var = default(bool);
208             try {
209                 _ret_var = ((GestureTouch)wrapper).GetMultiTouch();
210             } catch (Exception e) {
211                 Eina.Log.Warning($"Callback error: {e.ToString()}");
212                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
213             }
214         return _ret_var;
215         } else {
216             return efl_gesture_touch_multi_touch_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
217         }
218     }
219     private static efl_gesture_touch_multi_touch_get_delegate efl_gesture_touch_multi_touch_get_static_delegate;
220
221
222      private delegate Efl.Canvas.GestureTouchState efl_gesture_touch_state_get_delegate(System.IntPtr obj, System.IntPtr pd);
223
224
225      public delegate Efl.Canvas.GestureTouchState efl_gesture_touch_state_get_api_delegate(System.IntPtr obj);
226      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");
227      private static Efl.Canvas.GestureTouchState state_get(System.IntPtr obj, System.IntPtr pd)
228     {
229         Eina.Log.Debug("function efl_gesture_touch_state_get was called");
230         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
231         if(wrapper != null) {
232                         Efl.Canvas.GestureTouchState _ret_var = default(Efl.Canvas.GestureTouchState);
233             try {
234                 _ret_var = ((GestureTouch)wrapper).GetState();
235             } catch (Exception e) {
236                 Eina.Log.Warning($"Callback error: {e.ToString()}");
237                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
238             }
239         return _ret_var;
240         } else {
241             return efl_gesture_touch_state_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
242         }
243     }
244     private static efl_gesture_touch_state_get_delegate efl_gesture_touch_state_get_static_delegate;
245
246
247      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);
248
249
250      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);
251      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");
252      private static void point_record(System.IntPtr obj, System.IntPtr pd,  int tool,  Eina.Vector2.NativeStruct pos,  double timestamp,  Efl.Pointer.Action action)
253     {
254         Eina.Log.Debug("function efl_gesture_touch_point_record was called");
255         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
256         if(wrapper != null) {
257                             Eina.Vector2 _in_pos = pos;
258                                                                                             
259             try {
260                 ((GestureTouch)wrapper).PointRecord( tool,  _in_pos,  timestamp,  action);
261             } catch (Exception e) {
262                 Eina.Log.Warning($"Callback error: {e.ToString()}");
263                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
264             }
265                                                                                 } else {
266             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);
267         }
268     }
269     private static efl_gesture_touch_point_record_delegate efl_gesture_touch_point_record_static_delegate;
270
271
272      private delegate Eina.Vector2.NativeStruct efl_gesture_touch_delta_delegate(System.IntPtr obj, System.IntPtr pd,   int tool);
273
274
275      public delegate Eina.Vector2.NativeStruct efl_gesture_touch_delta_api_delegate(System.IntPtr obj,   int tool);
276      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");
277      private static Eina.Vector2.NativeStruct delta(System.IntPtr obj, System.IntPtr pd,  int tool)
278     {
279         Eina.Log.Debug("function efl_gesture_touch_delta was called");
280         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
281         if(wrapper != null) {
282                                                 Eina.Vector2 _ret_var = default(Eina.Vector2);
283             try {
284                 _ret_var = ((GestureTouch)wrapper).Delta( tool);
285             } catch (Exception e) {
286                 Eina.Log.Warning($"Callback error: {e.ToString()}");
287                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
288             }
289                         return _ret_var;
290         } else {
291             return efl_gesture_touch_delta_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  tool);
292         }
293     }
294     private static efl_gesture_touch_delta_delegate efl_gesture_touch_delta_static_delegate;
295
296
297      private delegate Eina.Vector2.NativeStruct efl_gesture_touch_distance_delegate(System.IntPtr obj, System.IntPtr pd,   int tool);
298
299
300      public delegate Eina.Vector2.NativeStruct efl_gesture_touch_distance_api_delegate(System.IntPtr obj,   int tool);
301      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");
302      private static Eina.Vector2.NativeStruct distance(System.IntPtr obj, System.IntPtr pd,  int tool)
303     {
304         Eina.Log.Debug("function efl_gesture_touch_distance was called");
305         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
306         if(wrapper != null) {
307                                                 Eina.Vector2 _ret_var = default(Eina.Vector2);
308             try {
309                 _ret_var = ((GestureTouch)wrapper).Distance( tool);
310             } catch (Exception e) {
311                 Eina.Log.Warning($"Callback error: {e.ToString()}");
312                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
313             }
314                         return _ret_var;
315         } else {
316             return efl_gesture_touch_distance_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  tool);
317         }
318     }
319     private static efl_gesture_touch_distance_delegate efl_gesture_touch_distance_static_delegate;
320 }
321 } }