[Security] Fix PrivacyPrivilegeManager.RequestPermissions crash issue (#1651)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_gesture.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 namespace Canvas {
12
13 /// <summary>EFL Gesture abstract class
14 /// A gesture class defines a method that spcific gesture event and privides information about the gesture&apos;s type, state, and associated pointer information.
15 /// 
16 /// For cetain gesture types, additional methods are defined to provide meaningful gesture information to the user.</summary>
17 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
18 [Efl.Canvas.Gesture.NativeMethods]
19 [Efl.Eo.BindingEntity]
20 public abstract class Gesture : Efl.Object
21 {
22     /// <summary>Pointer to the native class description.</summary>
23     public override System.IntPtr NativeClass
24     {
25         get
26         {
27             if (((object)this).GetType() == typeof(Gesture))
28             {
29                 return GetEflClassStatic();
30             }
31             else
32             {
33                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
34             }
35         }
36     }
37
38     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
39         efl_canvas_gesture_class_get();
40     /// <summary>Initializes a new instance of the <see cref="Gesture"/> class.</summary>
41     /// <param name="parent">Parent instance.</param>
42     public Gesture(Efl.Object parent= null
43             ) : base(efl_canvas_gesture_class_get(), parent)
44     {
45         FinishInstantiation();
46     }
47
48     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
49     /// Do not call this constructor directly.</summary>
50     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
51     protected Gesture(ConstructingHandle ch) : base(ch)
52     {
53     }
54
55     /// <summary>Initializes a new instance of the <see cref="Gesture"/> class.
56     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
57     /// <param name="wh">The native pointer to be wrapped.</param>
58     protected Gesture(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
59     {
60     }
61
62     [Efl.Eo.PrivateNativeClass]
63     private class GestureRealized : Gesture
64     {
65         private GestureRealized(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
66         {
67         }
68     }
69     /// <summary>Initializes a new instance of the <see cref="Gesture"/> class.
70     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
71     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
72     /// <param name="parent">The Efl.Object parent of this instance.</param>
73     protected Gesture(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
74     {
75     }
76
77     /// <summary>This property holds the current state of the gesture.</summary>
78     /// <returns>gesture state</returns>
79     virtual public Efl.Canvas.GestureState GetState() {
80          var _ret_var = Efl.Canvas.Gesture.NativeMethods.efl_gesture_state_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
81         Eina.Error.RaiseIfUnhandledException();
82         return _ret_var;
83  }
84     /// <summary>This property holds the current state of the gesture.</summary>
85     /// <param name="state">gesture state</param>
86     virtual public void SetState(Efl.Canvas.GestureState state) {
87                                  Efl.Canvas.Gesture.NativeMethods.efl_gesture_state_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),state);
88         Eina.Error.RaiseIfUnhandledException();
89                          }
90     /// <summary>This property holds the hotspot of the current gesture.</summary>
91     /// <returns>hotspot co-ordinate</returns>
92     virtual public Eina.Position2D GetHotspot() {
93          var _ret_var = Efl.Canvas.Gesture.NativeMethods.efl_gesture_hotspot_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
94         Eina.Error.RaiseIfUnhandledException();
95         return _ret_var;
96  }
97     /// <summary>This property holds the hotspot of the current gesture.</summary>
98     /// <param name="hotspot">hotspot co-ordinate</param>
99     virtual public void SetHotspot(Eina.Position2D hotspot) {
100          Eina.Position2D.NativeStruct _in_hotspot = hotspot;
101                         Efl.Canvas.Gesture.NativeMethods.efl_gesture_hotspot_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),_in_hotspot);
102         Eina.Error.RaiseIfUnhandledException();
103                          }
104     /// <summary>This property holds the timestamp of the current gesture.</summary>
105     /// <returns>The timestamp</returns>
106     virtual public uint GetTimestamp() {
107          var _ret_var = Efl.Canvas.Gesture.NativeMethods.efl_gesture_timestamp_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
108         Eina.Error.RaiseIfUnhandledException();
109         return _ret_var;
110  }
111     /// <summary>This property holds the timestamp of the current gesture.</summary>
112     /// <param name="timestamp">The timestamp</param>
113     virtual public void SetTimestamp(uint timestamp) {
114                                  Efl.Canvas.Gesture.NativeMethods.efl_gesture_timestamp_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),timestamp);
115         Eina.Error.RaiseIfUnhandledException();
116                          }
117     /// <summary>This property holds the current state of the gesture.</summary>
118     /// <value>gesture state</value>
119     public Efl.Canvas.GestureState State {
120         get { return GetState(); }
121         set { SetState(value); }
122     }
123     /// <summary>This property holds the hotspot of the current gesture.</summary>
124     /// <value>hotspot co-ordinate</value>
125     public Eina.Position2D Hotspot {
126         get { return GetHotspot(); }
127         set { SetHotspot(value); }
128     }
129     /// <summary>This property holds the timestamp of the current gesture.</summary>
130     /// <value>The timestamp</value>
131     public uint Timestamp {
132         get { return GetTimestamp(); }
133         set { SetTimestamp(value); }
134     }
135     private static IntPtr GetEflClassStatic()
136     {
137         return Efl.Canvas.Gesture.efl_canvas_gesture_class_get();
138     }
139     /// <summary>Wrapper for native methods and virtual method delegates.
140     /// For internal use by generated code only.</summary>
141     public new class NativeMethods : Efl.Object.NativeMethods
142     {
143         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
144         /// <summary>Gets the list of Eo operations to override.</summary>
145         /// <returns>The list of Eo operations to be overload.</returns>
146         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
147         {
148             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
149             var methods = Efl.Eo.Globals.GetUserMethods(type);
150
151             if (efl_gesture_state_get_static_delegate == null)
152             {
153                 efl_gesture_state_get_static_delegate = new efl_gesture_state_get_delegate(state_get);
154             }
155
156             if (methods.FirstOrDefault(m => m.Name == "GetState") != null)
157             {
158                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_state_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_state_get_static_delegate) });
159             }
160
161             if (efl_gesture_state_set_static_delegate == null)
162             {
163                 efl_gesture_state_set_static_delegate = new efl_gesture_state_set_delegate(state_set);
164             }
165
166             if (methods.FirstOrDefault(m => m.Name == "SetState") != null)
167             {
168                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_state_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_state_set_static_delegate) });
169             }
170
171             if (efl_gesture_hotspot_get_static_delegate == null)
172             {
173                 efl_gesture_hotspot_get_static_delegate = new efl_gesture_hotspot_get_delegate(hotspot_get);
174             }
175
176             if (methods.FirstOrDefault(m => m.Name == "GetHotspot") != null)
177             {
178                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_hotspot_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_hotspot_get_static_delegate) });
179             }
180
181             if (efl_gesture_hotspot_set_static_delegate == null)
182             {
183                 efl_gesture_hotspot_set_static_delegate = new efl_gesture_hotspot_set_delegate(hotspot_set);
184             }
185
186             if (methods.FirstOrDefault(m => m.Name == "SetHotspot") != null)
187             {
188                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_hotspot_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_hotspot_set_static_delegate) });
189             }
190
191             if (efl_gesture_timestamp_get_static_delegate == null)
192             {
193                 efl_gesture_timestamp_get_static_delegate = new efl_gesture_timestamp_get_delegate(timestamp_get);
194             }
195
196             if (methods.FirstOrDefault(m => m.Name == "GetTimestamp") != null)
197             {
198                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_timestamp_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_timestamp_get_static_delegate) });
199             }
200
201             if (efl_gesture_timestamp_set_static_delegate == null)
202             {
203                 efl_gesture_timestamp_set_static_delegate = new efl_gesture_timestamp_set_delegate(timestamp_set);
204             }
205
206             if (methods.FirstOrDefault(m => m.Name == "SetTimestamp") != null)
207             {
208                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_timestamp_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_timestamp_set_static_delegate) });
209             }
210
211             descs.AddRange(base.GetEoOps(type));
212             return descs;
213         }
214         /// <summary>Returns the Eo class for the native methods of this class.</summary>
215         /// <returns>The native class pointer.</returns>
216         public override IntPtr GetEflClass()
217         {
218             return Efl.Canvas.Gesture.efl_canvas_gesture_class_get();
219         }
220
221         #pragma warning disable CA1707, CS1591, SA1300, SA1600
222
223         
224         private delegate Efl.Canvas.GestureState efl_gesture_state_get_delegate(System.IntPtr obj, System.IntPtr pd);
225
226         
227         public delegate Efl.Canvas.GestureState efl_gesture_state_get_api_delegate(System.IntPtr obj);
228
229         public static Efl.Eo.FunctionWrapper<efl_gesture_state_get_api_delegate> efl_gesture_state_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_state_get_api_delegate>(Module, "efl_gesture_state_get");
230
231         private static Efl.Canvas.GestureState state_get(System.IntPtr obj, System.IntPtr pd)
232         {
233             Eina.Log.Debug("function efl_gesture_state_get was called");
234             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
235             if (ws != null)
236             {
237             Efl.Canvas.GestureState _ret_var = default(Efl.Canvas.GestureState);
238                 try
239                 {
240                     _ret_var = ((Gesture)ws.Target).GetState();
241                 }
242                 catch (Exception e)
243                 {
244                     Eina.Log.Warning($"Callback error: {e.ToString()}");
245                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
246                 }
247
248         return _ret_var;
249
250             }
251             else
252             {
253                 return efl_gesture_state_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
254             }
255         }
256
257         private static efl_gesture_state_get_delegate efl_gesture_state_get_static_delegate;
258
259         
260         private delegate void efl_gesture_state_set_delegate(System.IntPtr obj, System.IntPtr pd,  Efl.Canvas.GestureState state);
261
262         
263         public delegate void efl_gesture_state_set_api_delegate(System.IntPtr obj,  Efl.Canvas.GestureState state);
264
265         public static Efl.Eo.FunctionWrapper<efl_gesture_state_set_api_delegate> efl_gesture_state_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_state_set_api_delegate>(Module, "efl_gesture_state_set");
266
267         private static void state_set(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.GestureState state)
268         {
269             Eina.Log.Debug("function efl_gesture_state_set was called");
270             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
271             if (ws != null)
272             {
273                                     
274                 try
275                 {
276                     ((Gesture)ws.Target).SetState(state);
277                 }
278                 catch (Exception e)
279                 {
280                     Eina.Log.Warning($"Callback error: {e.ToString()}");
281                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
282                 }
283
284                         
285             }
286             else
287             {
288                 efl_gesture_state_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), state);
289             }
290         }
291
292         private static efl_gesture_state_set_delegate efl_gesture_state_set_static_delegate;
293
294         
295         private delegate Eina.Position2D.NativeStruct efl_gesture_hotspot_get_delegate(System.IntPtr obj, System.IntPtr pd);
296
297         
298         public delegate Eina.Position2D.NativeStruct efl_gesture_hotspot_get_api_delegate(System.IntPtr obj);
299
300         public static Efl.Eo.FunctionWrapper<efl_gesture_hotspot_get_api_delegate> efl_gesture_hotspot_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_hotspot_get_api_delegate>(Module, "efl_gesture_hotspot_get");
301
302         private static Eina.Position2D.NativeStruct hotspot_get(System.IntPtr obj, System.IntPtr pd)
303         {
304             Eina.Log.Debug("function efl_gesture_hotspot_get was called");
305             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
306             if (ws != null)
307             {
308             Eina.Position2D _ret_var = default(Eina.Position2D);
309                 try
310                 {
311                     _ret_var = ((Gesture)ws.Target).GetHotspot();
312                 }
313                 catch (Exception e)
314                 {
315                     Eina.Log.Warning($"Callback error: {e.ToString()}");
316                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317                 }
318
319         return _ret_var;
320
321             }
322             else
323             {
324                 return efl_gesture_hotspot_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
325             }
326         }
327
328         private static efl_gesture_hotspot_get_delegate efl_gesture_hotspot_get_static_delegate;
329
330         
331         private delegate void efl_gesture_hotspot_set_delegate(System.IntPtr obj, System.IntPtr pd,  Eina.Position2D.NativeStruct hotspot);
332
333         
334         public delegate void efl_gesture_hotspot_set_api_delegate(System.IntPtr obj,  Eina.Position2D.NativeStruct hotspot);
335
336         public static Efl.Eo.FunctionWrapper<efl_gesture_hotspot_set_api_delegate> efl_gesture_hotspot_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_hotspot_set_api_delegate>(Module, "efl_gesture_hotspot_set");
337
338         private static void hotspot_set(System.IntPtr obj, System.IntPtr pd, Eina.Position2D.NativeStruct hotspot)
339         {
340             Eina.Log.Debug("function efl_gesture_hotspot_set was called");
341             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
342             if (ws != null)
343             {
344         Eina.Position2D _in_hotspot = hotspot;
345                             
346                 try
347                 {
348                     ((Gesture)ws.Target).SetHotspot(_in_hotspot);
349                 }
350                 catch (Exception e)
351                 {
352                     Eina.Log.Warning($"Callback error: {e.ToString()}");
353                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
354                 }
355
356                         
357             }
358             else
359             {
360                 efl_gesture_hotspot_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), hotspot);
361             }
362         }
363
364         private static efl_gesture_hotspot_set_delegate efl_gesture_hotspot_set_static_delegate;
365
366         
367         private delegate uint efl_gesture_timestamp_get_delegate(System.IntPtr obj, System.IntPtr pd);
368
369         
370         public delegate uint efl_gesture_timestamp_get_api_delegate(System.IntPtr obj);
371
372         public static Efl.Eo.FunctionWrapper<efl_gesture_timestamp_get_api_delegate> efl_gesture_timestamp_get_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_timestamp_get_api_delegate>(Module, "efl_gesture_timestamp_get");
373
374         private static uint timestamp_get(System.IntPtr obj, System.IntPtr pd)
375         {
376             Eina.Log.Debug("function efl_gesture_timestamp_get was called");
377             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
378             if (ws != null)
379             {
380             uint _ret_var = default(uint);
381                 try
382                 {
383                     _ret_var = ((Gesture)ws.Target).GetTimestamp();
384                 }
385                 catch (Exception e)
386                 {
387                     Eina.Log.Warning($"Callback error: {e.ToString()}");
388                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
389                 }
390
391         return _ret_var;
392
393             }
394             else
395             {
396                 return efl_gesture_timestamp_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
397             }
398         }
399
400         private static efl_gesture_timestamp_get_delegate efl_gesture_timestamp_get_static_delegate;
401
402         
403         private delegate void efl_gesture_timestamp_set_delegate(System.IntPtr obj, System.IntPtr pd,  uint timestamp);
404
405         
406         public delegate void efl_gesture_timestamp_set_api_delegate(System.IntPtr obj,  uint timestamp);
407
408         public static Efl.Eo.FunctionWrapper<efl_gesture_timestamp_set_api_delegate> efl_gesture_timestamp_set_ptr = new Efl.Eo.FunctionWrapper<efl_gesture_timestamp_set_api_delegate>(Module, "efl_gesture_timestamp_set");
409
410         private static void timestamp_set(System.IntPtr obj, System.IntPtr pd, uint timestamp)
411         {
412             Eina.Log.Debug("function efl_gesture_timestamp_set was called");
413             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
414             if (ws != null)
415             {
416                                     
417                 try
418                 {
419                     ((Gesture)ws.Target).SetTimestamp(timestamp);
420                 }
421                 catch (Exception e)
422                 {
423                     Eina.Log.Warning($"Callback error: {e.ToString()}");
424                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
425                 }
426
427                         
428             }
429             else
430             {
431                 efl_gesture_timestamp_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), timestamp);
432             }
433         }
434
435         private static efl_gesture_timestamp_set_delegate efl_gesture_timestamp_set_static_delegate;
436
437         #pragma warning restore CA1707, CS1591, SA1300, SA1600
438
439 }
440 }
441 }
442
443 }
444
445 #if EFL_BETA
446 #pragma warning disable CS1591
447 public static class Efl_CanvasGesture_ExtensionMethods {
448     public static Efl.BindableProperty<Efl.Canvas.GestureState> State<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Canvas.Gesture, T>magic = null) where T : Efl.Canvas.Gesture {
449         return new Efl.BindableProperty<Efl.Canvas.GestureState>("state", fac);
450     }
451
452     public static Efl.BindableProperty<Eina.Position2D> Hotspot<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Canvas.Gesture, T>magic = null) where T : Efl.Canvas.Gesture {
453         return new Efl.BindableProperty<Eina.Position2D>("hotspot", fac);
454     }
455
456     public static Efl.BindableProperty<uint> Timestamp<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.Canvas.Gesture, T>magic = null) where T : Efl.Canvas.Gesture {
457         return new Efl.BindableProperty<uint>("timestamp", fac);
458     }
459
460 }
461 #pragma warning restore CS1591
462 #endif