2410e8d3ee65c4ef78444884093ba3ad36abbee7
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_gesture_recognizer.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 Recognizer abstract class</summary>
13 [Efl.Canvas.GestureRecognizer.NativeMethods]
14 public abstract class GestureRecognizer : 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(GestureRecognizer))
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\r)] internal static extern System.IntPtr
33         efl_canvas_gesture_recognizer_class_get();
34     /// <summary>Initializes a new instance of the <see cref="GestureRecognizer"/> class.</summary>
35     /// <param name="parent">Parent instance.</param>
36     public GestureRecognizer(Efl.Object parent= null
37             ) : base(efl_canvas_gesture_recognizer_class_get(), typeof(GestureRecognizer), parent)
38     {
39         FinishInstantiation();
40     }
41
42     /// <summary>Initializes a new instance of the <see cref="GestureRecognizer"/> 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 GestureRecognizer(System.IntPtr raw) : base(raw)
46     {
47             }
48
49     [Efl.Eo.PrivateNativeClass]
50     private class GestureRecognizerRealized : GestureRecognizer
51     {
52         private GestureRecognizerRealized(IntPtr ptr) : base(ptr)
53         {
54         }
55     }
56     /// <summary>Initializes a new instance of the <see cref="GestureRecognizer"/> class.
57     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
58     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
59     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
60     /// <param name="parent">The Efl.Object parent of this instance.</param>
61     protected GestureRecognizer(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
62     {
63     }
64
65     /// <summary>Verifies if the given object is equal to this one.</summary>
66     /// <param name="instance">The object to compare to.</param>
67     /// <returns>True if both objects point to the same native object.</returns>
68     public override bool Equals(object instance)
69     {
70         var other = instance as Efl.Object;
71         if (other == null)
72         {
73             return false;
74         }
75         return this.NativeHandle == other.NativeHandle;
76     }
77
78     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
79     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
80     public override int GetHashCode()
81     {
82         return this.NativeHandle.ToInt32();
83     }
84
85     /// <summary>Turns the native pointer into a string representation.</summary>
86     /// <returns>A string with the type and the native pointer for this object.</returns>
87     public override String ToString()
88     {
89         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
90     }
91
92     /// <summary>This property holds the config value for the recognizer</summary>
93     /// <param name="name">propery name</param>
94     /// <returns>value of the property</returns>
95     virtual public Eina.Value GetConfig(System.String name) {
96                                  var _ret_var = Efl.Canvas.GestureRecognizer.NativeMethods.efl_gesture_recognizer_config_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),name);
97         Eina.Error.RaiseIfUnhandledException();
98                         return _ret_var;
99  }
100     /// <summary>This function is called to create a new Efl.Canvas.Gesture object for the given target</summary>
101     /// <param name="target">The target widget</param>
102     /// <returns>Returns the Efl.Canvas.Gesture event object</returns>
103     virtual public Efl.Canvas.Gesture Create(Efl.Object target) {
104                                  var _ret_var = Efl.Canvas.GestureRecognizer.NativeMethods.efl_gesture_recognizer_create_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),target);
105         Eina.Error.RaiseIfUnhandledException();
106                         return _ret_var;
107  }
108     /// <summary>Handles the given event for the watched object.
109     /// Updates the state of the gesture object as required, and returns a suitable result for the current recognition step.</summary>
110     /// <param name="gesture">The gesture object</param>
111     /// <param name="watched">The watched object</param>
112     /// <param name="kw_event">The pointer event</param>
113     /// <returns>Returns the Efl.Canvas.Gesture event object</returns>
114     virtual public Efl.Canvas.GestureRecognizerResult Recognize(Efl.Canvas.Gesture gesture, Efl.Object watched, Efl.Canvas.GestureTouch kw_event) {
115                                                                                  var _ret_var = Efl.Canvas.GestureRecognizer.NativeMethods.efl_gesture_recognizer_recognize_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),gesture, watched, kw_event);
116         Eina.Error.RaiseIfUnhandledException();
117                                                         return _ret_var;
118  }
119     /// <summary>This function is called by the framework to reset a given gesture.</summary>
120     /// <param name="gesture">The gesture object</param>
121     virtual public void Reset(Efl.Canvas.Gesture gesture) {
122                                  Efl.Canvas.GestureRecognizer.NativeMethods.efl_gesture_recognizer_reset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),gesture);
123         Eina.Error.RaiseIfUnhandledException();
124                          }
125     private static IntPtr GetEflClassStatic()
126     {
127         return Efl.Canvas.GestureRecognizer.efl_canvas_gesture_recognizer_class_get();
128     }
129     /// <summary>Wrapper for native methods and virtual method delegates.
130     /// For internal use by generated code only.</summary>
131     public new class NativeMethods : Efl.Object.NativeMethods
132     {
133         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas\r);
134         /// <summary>Gets the list of Eo operations to override.</summary>
135         /// <returns>The list of Eo operations to be overload.</returns>
136         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
137         {
138             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
139             var methods = Efl.Eo.Globals.GetUserMethods(type);
140
141             if (efl_gesture_recognizer_config_get_static_delegate == null)
142             {
143                 efl_gesture_recognizer_config_get_static_delegate = new efl_gesture_recognizer_config_get_delegate(config_get);
144             }
145
146             if (methods.FirstOrDefault(m => m.Name == "GetConfig") != null)
147             {
148                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_config_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_config_get_static_delegate) });
149             }
150
151             if (efl_gesture_recognizer_create_static_delegate == null)
152             {
153                 efl_gesture_recognizer_create_static_delegate = new efl_gesture_recognizer_create_delegate(create);
154             }
155
156             if (methods.FirstOrDefault(m => m.Name == "Create") != null)
157             {
158                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_create"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_create_static_delegate) });
159             }
160
161             if (efl_gesture_recognizer_recognize_static_delegate == null)
162             {
163                 efl_gesture_recognizer_recognize_static_delegate = new efl_gesture_recognizer_recognize_delegate(recognize);
164             }
165
166             if (methods.FirstOrDefault(m => m.Name == "Recognize") != null)
167             {
168                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_recognize"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_recognize_static_delegate) });
169             }
170
171             if (efl_gesture_recognizer_reset_static_delegate == null)
172             {
173                 efl_gesture_recognizer_reset_static_delegate = new efl_gesture_recognizer_reset_delegate(reset);
174             }
175
176             if (methods.FirstOrDefault(m => m.Name == "Reset") != null)
177             {
178                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_recognizer_reset"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_recognizer_reset_static_delegate) });
179             }
180
181             descs.AddRange(base.GetEoOps(type));
182             return descs;
183         }
184         /// <summary>Returns the Eo class for the native methods of this class.</summary>
185         /// <returns>The native class pointer.</returns>
186         public override IntPtr GetEflClass()
187         {
188             return Efl.Canvas.GestureRecognizer.efl_canvas_gesture_recognizer_class_get();
189         }
190
191         #pragma warning disable CA1707, SA1300, SA1600
192
193         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
194         private delegate Eina.Value efl_gesture_recognizer_config_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name);
195
196         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
197         public delegate Eina.Value efl_gesture_recognizer_config_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name);
198
199         public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_config_get_api_delegate> efl_gesture_recognizer_config_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_config_get_api_delegate>(Module, "efl_gesture_recognizer_config_get");
200
201         private static Eina.Value config_get(System.IntPtr obj, System.IntPtr pd, System.String name)
202         {
203             Eina.Log.Debug("function efl_gesture_recognizer_config_get was called");
204             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
205             if (wrapper != null)
206             {
207                                     Eina.Value _ret_var = default(Eina.Value);
208                 try
209                 {
210                     _ret_var = ((GestureRecognizer)wrapper).GetConfig(name);
211                 }
212                 catch (Exception e)
213                 {
214                     Eina.Log.Warning($"Callback error: {e.ToString()}");
215                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
216                 }
217
218                         return _ret_var;
219
220             }
221             else
222             {
223                 return efl_gesture_recognizer_config_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name);
224             }
225         }
226
227         private static efl_gesture_recognizer_config_get_delegate efl_gesture_recognizer_config_get_static_delegate;
228
229         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
230         private delegate Efl.Canvas.Gesture efl_gesture_recognizer_create_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object target);
231
232         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
233         public delegate Efl.Canvas.Gesture efl_gesture_recognizer_create_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object target);
234
235         public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_create_api_delegate> efl_gesture_recognizer_create_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_create_api_delegate>(Module, "efl_gesture_recognizer_create");
236
237         private static Efl.Canvas.Gesture create(System.IntPtr obj, System.IntPtr pd, Efl.Object target)
238         {
239             Eina.Log.Debug("function efl_gesture_recognizer_create was called");
240             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
241             if (wrapper != null)
242             {
243                                     Efl.Canvas.Gesture _ret_var = default(Efl.Canvas.Gesture);
244                 try
245                 {
246                     _ret_var = ((GestureRecognizer)wrapper).Create(target);
247                 }
248                 catch (Exception e)
249                 {
250                     Eina.Log.Warning($"Callback error: {e.ToString()}");
251                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
252                 }
253
254                         return _ret_var;
255
256             }
257             else
258             {
259                 return efl_gesture_recognizer_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), target);
260             }
261         }
262
263         private static efl_gesture_recognizer_create_delegate efl_gesture_recognizer_create_static_delegate;
264
265         
266         private delegate Efl.Canvas.GestureRecognizerResult efl_gesture_recognizer_recognize_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Gesture gesture, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object watched, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.GestureTouch kw_event);
267
268         
269         public delegate Efl.Canvas.GestureRecognizerResult efl_gesture_recognizer_recognize_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Gesture gesture, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object watched, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.GestureTouch kw_event);
270
271         public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_recognize_api_delegate> efl_gesture_recognizer_recognize_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_recognize_api_delegate>(Module, "efl_gesture_recognizer_recognize");
272
273         private static Efl.Canvas.GestureRecognizerResult recognize(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Gesture gesture, Efl.Object watched, Efl.Canvas.GestureTouch kw_event)
274         {
275             Eina.Log.Debug("function efl_gesture_recognizer_recognize was called");
276             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
277             if (wrapper != null)
278             {
279                                                                                     Efl.Canvas.GestureRecognizerResult _ret_var = default(Efl.Canvas.GestureRecognizerResult);
280                 try
281                 {
282                     _ret_var = ((GestureRecognizer)wrapper).Recognize(gesture, watched, kw_event);
283                 }
284                 catch (Exception e)
285                 {
286                     Eina.Log.Warning($"Callback error: {e.ToString()}");
287                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
288                 }
289
290                                                         return _ret_var;
291
292             }
293             else
294             {
295                 return efl_gesture_recognizer_recognize_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), gesture, watched, kw_event);
296             }
297         }
298
299         private static efl_gesture_recognizer_recognize_delegate efl_gesture_recognizer_recognize_static_delegate;
300
301         
302         private delegate void efl_gesture_recognizer_reset_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Gesture gesture);
303
304         
305         public delegate void efl_gesture_recognizer_reset_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Gesture gesture);
306
307         public static Efl.Eo.FunctionWrapper<efl_gesture_recognizer_reset_api_delegate> efl_gesture_recognizer_reset_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_recognizer_reset_api_delegate>(Module, "efl_gesture_recognizer_reset");
308
309         private static void reset(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Gesture gesture)
310         {
311             Eina.Log.Debug("function efl_gesture_recognizer_reset was called");
312             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
313             if (wrapper != null)
314             {
315                                     
316                 try
317                 {
318                     ((GestureRecognizer)wrapper).Reset(gesture);
319                 }
320                 catch (Exception e)
321                 {
322                     Eina.Log.Warning($"Callback error: {e.ToString()}");
323                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
324                 }
325
326                         
327             }
328             else
329             {
330                 efl_gesture_recognizer_reset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), gesture);
331             }
332         }
333
334         private static efl_gesture_recognizer_reset_delegate efl_gesture_recognizer_reset_static_delegate;
335
336         #pragma warning restore CA1707, SA1300, SA1600
337
338 }
339 }
340 }
341
342 }
343