[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_input_interface.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 Input {
11
12 /// <summary>An object implementing this interface can send pointer events.
13 /// Windows and canvas objects may send input events.
14 /// 
15 /// A &quot;pointer&quot; refers to the main pointing device, which could be a mouse, trackpad, finger, pen, etc... In other words, the finger id in any pointer event will always be 0.
16 /// 
17 /// A &quot;finger&quot; refers to a single point of input, usually in an absolute coordinates input device, and that can support more than one input position at at time (think multi-touch screens). The first finger (id 0) is sent along with a pointer event, so be careful to not handle those events twice. Note that if the input device can support &quot;hovering&quot;, it is entirely possible to receive move events without down coming first.
18 /// 
19 /// A &quot;key&quot; is a key press from a keyboard or equivalent type of input device. Long, repeated, key presses will always happen like this: down...up,down...up,down...up (not down...up or down...down...down...up).</summary>
20 [Efl.Input.IInterfaceConcrete.NativeMethods]
21 public interface IInterface : 
22     Efl.Eo.IWrapper, IDisposable
23 {
24     /// <summary>Check if input events from a given seat is enabled.</summary>
25 /// <param name="seat">The seat to act on.</param>
26 /// <returns><c>true</c> to enable events for a seat or <c>false</c> otherwise.</returns>
27 bool GetSeatEventFilter(Efl.Input.Device seat);
28     /// <summary>Add or remove a given seat to the filter list. If the filter list is empty this object will report mouse, keyboard and focus events from any seat, otherwise those events will only be reported if the event comes from a seat that is in the list.</summary>
29 /// <param name="seat">The seat to act on.</param>
30 /// <param name="enable"><c>true</c> to enable events for a seat or <c>false</c> otherwise.</param>
31 void SetSeatEventFilter(Efl.Input.Device seat, bool enable);
32             /// <summary>Main pointer move (current and previous positions are known).</summary>
33     event EventHandler<Efl.Input.IInterfacePointerMoveEvt_Args> PointerMoveEvt;
34     /// <summary>Main pointer button pressed (button id is known).</summary>
35     event EventHandler<Efl.Input.IInterfacePointerDownEvt_Args> PointerDownEvt;
36     /// <summary>Main pointer button released (button id is known).</summary>
37     event EventHandler<Efl.Input.IInterfacePointerUpEvt_Args> PointerUpEvt;
38     /// <summary>Main pointer button press was cancelled (button id is known). This can happen in rare cases when the window manager passes the focus to a more urgent window, for instance. You probably don&apos;t need to listen to this event, as it will be accompanied by an up event.</summary>
39     event EventHandler<Efl.Input.IInterfacePointerCancelEvt_Args> PointerCancelEvt;
40     /// <summary>Pointer entered a window or a widget.</summary>
41     event EventHandler<Efl.Input.IInterfacePointerInEvt_Args> PointerInEvt;
42     /// <summary>Pointer left a window or a widget.</summary>
43     event EventHandler<Efl.Input.IInterfacePointerOutEvt_Args> PointerOutEvt;
44     /// <summary>Mouse wheel event.</summary>
45     event EventHandler<Efl.Input.IInterfacePointerWheelEvt_Args> PointerWheelEvt;
46     /// <summary>Pen or other axis event update.</summary>
47     event EventHandler<Efl.Input.IInterfacePointerAxisEvt_Args> PointerAxisEvt;
48     /// <summary>Finger moved (current and previous positions are known).</summary>
49     event EventHandler<Efl.Input.IInterfaceFingerMoveEvt_Args> FingerMoveEvt;
50     /// <summary>Finger pressed (finger id is known).</summary>
51     event EventHandler<Efl.Input.IInterfaceFingerDownEvt_Args> FingerDownEvt;
52     /// <summary>Finger released (finger id is known).</summary>
53     event EventHandler<Efl.Input.IInterfaceFingerUpEvt_Args> FingerUpEvt;
54     /// <summary>Keyboard key press.</summary>
55     event EventHandler<Efl.Input.IInterfaceKeyDownEvt_Args> KeyDownEvt;
56     /// <summary>Keyboard key release.</summary>
57     event EventHandler<Efl.Input.IInterfaceKeyUpEvt_Args> KeyUpEvt;
58     /// <summary>All input events are on hold or resumed.</summary>
59     event EventHandler<Efl.Input.IInterfaceHoldEvt_Args> HoldEvt;
60     /// <summary>A focus in event.</summary>
61     event EventHandler<Efl.Input.IInterfaceFocusInEvt_Args> FocusInEvt;
62     /// <summary>A focus out event.</summary>
63     event EventHandler<Efl.Input.IInterfaceFocusOutEvt_Args> FocusOutEvt;
64 }
65 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerMoveEvt"/>.</summary>
66 public class IInterfacePointerMoveEvt_Args : EventArgs {
67     ///<summary>Actual event payload.</summary>
68     public Efl.Input.Pointer arg { get; set; }
69 }
70 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerDownEvt"/>.</summary>
71 public class IInterfacePointerDownEvt_Args : EventArgs {
72     ///<summary>Actual event payload.</summary>
73     public Efl.Input.Pointer arg { get; set; }
74 }
75 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerUpEvt"/>.</summary>
76 public class IInterfacePointerUpEvt_Args : EventArgs {
77     ///<summary>Actual event payload.</summary>
78     public Efl.Input.Pointer arg { get; set; }
79 }
80 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerCancelEvt"/>.</summary>
81 public class IInterfacePointerCancelEvt_Args : EventArgs {
82     ///<summary>Actual event payload.</summary>
83     public Efl.Input.Pointer arg { get; set; }
84 }
85 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerInEvt"/>.</summary>
86 public class IInterfacePointerInEvt_Args : EventArgs {
87     ///<summary>Actual event payload.</summary>
88     public Efl.Input.Pointer arg { get; set; }
89 }
90 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerOutEvt"/>.</summary>
91 public class IInterfacePointerOutEvt_Args : EventArgs {
92     ///<summary>Actual event payload.</summary>
93     public Efl.Input.Pointer arg { get; set; }
94 }
95 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerWheelEvt"/>.</summary>
96 public class IInterfacePointerWheelEvt_Args : EventArgs {
97     ///<summary>Actual event payload.</summary>
98     public Efl.Input.Pointer arg { get; set; }
99 }
100 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.PointerAxisEvt"/>.</summary>
101 public class IInterfacePointerAxisEvt_Args : EventArgs {
102     ///<summary>Actual event payload.</summary>
103     public Efl.Input.Pointer arg { get; set; }
104 }
105 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.FingerMoveEvt"/>.</summary>
106 public class IInterfaceFingerMoveEvt_Args : EventArgs {
107     ///<summary>Actual event payload.</summary>
108     public Efl.Input.Pointer arg { get; set; }
109 }
110 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.FingerDownEvt"/>.</summary>
111 public class IInterfaceFingerDownEvt_Args : EventArgs {
112     ///<summary>Actual event payload.</summary>
113     public Efl.Input.Pointer arg { get; set; }
114 }
115 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.FingerUpEvt"/>.</summary>
116 public class IInterfaceFingerUpEvt_Args : EventArgs {
117     ///<summary>Actual event payload.</summary>
118     public Efl.Input.Pointer arg { get; set; }
119 }
120 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.KeyDownEvt"/>.</summary>
121 public class IInterfaceKeyDownEvt_Args : EventArgs {
122     ///<summary>Actual event payload.</summary>
123     public Efl.Input.Key arg { get; set; }
124 }
125 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.KeyUpEvt"/>.</summary>
126 public class IInterfaceKeyUpEvt_Args : EventArgs {
127     ///<summary>Actual event payload.</summary>
128     public Efl.Input.Key arg { get; set; }
129 }
130 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.HoldEvt"/>.</summary>
131 public class IInterfaceHoldEvt_Args : EventArgs {
132     ///<summary>Actual event payload.</summary>
133     public Efl.Input.Hold arg { get; set; }
134 }
135 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.FocusInEvt"/>.</summary>
136 public class IInterfaceFocusInEvt_Args : EventArgs {
137     ///<summary>Actual event payload.</summary>
138     public Efl.Input.Focus arg { get; set; }
139 }
140 ///<summary>Event argument wrapper for event <see cref="Efl.Input.IInterface.FocusOutEvt"/>.</summary>
141 public class IInterfaceFocusOutEvt_Args : EventArgs {
142     ///<summary>Actual event payload.</summary>
143     public Efl.Input.Focus arg { get; set; }
144 }
145 /// <summary>An object implementing this interface can send pointer events.
146 /// Windows and canvas objects may send input events.
147 /// 
148 /// A &quot;pointer&quot; refers to the main pointing device, which could be a mouse, trackpad, finger, pen, etc... In other words, the finger id in any pointer event will always be 0.
149 /// 
150 /// A &quot;finger&quot; refers to a single point of input, usually in an absolute coordinates input device, and that can support more than one input position at at time (think multi-touch screens). The first finger (id 0) is sent along with a pointer event, so be careful to not handle those events twice. Note that if the input device can support &quot;hovering&quot;, it is entirely possible to receive move events without down coming first.
151 /// 
152 /// A &quot;key&quot; is a key press from a keyboard or equivalent type of input device. Long, repeated, key presses will always happen like this: down...up,down...up,down...up (not down...up or down...down...down...up).</summary>
153 sealed public class IInterfaceConcrete : 
154
155 IInterface
156     
157 {
158     ///<summary>Pointer to the native class description.</summary>
159     public System.IntPtr NativeClass
160     {
161         get
162         {
163             if (((object)this).GetType() == typeof(IInterfaceConcrete))
164             {
165                 return GetEflClassStatic();
166             }
167             else
168             {
169                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
170             }
171         }
172     }
173
174     private Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();
175     private readonly object eventLock = new object();
176     private  System.IntPtr handle;
177     ///<summary>Pointer to the native instance.</summary>
178     public System.IntPtr NativeHandle
179     {
180         get { return handle; }
181     }
182
183     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
184         efl_input_interface_interface_get();
185     /// <summary>Initializes a new instance of the <see cref="IInterface"/> class.
186     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
187     private IInterfaceConcrete(System.IntPtr raw)
188     {
189         handle = raw;
190     }
191     ///<summary>Destructor.</summary>
192     ~IInterfaceConcrete()
193     {
194         Dispose(false);
195     }
196
197     ///<summary>Releases the underlying native instance.</summary>
198     private void Dispose(bool disposing)
199     {
200         if (handle != System.IntPtr.Zero)
201         {
202             IntPtr h = handle;
203             handle = IntPtr.Zero;
204
205             IntPtr gcHandlePtr = IntPtr.Zero;
206             if (eoEvents.Count != 0)
207             {
208                 GCHandle gcHandle = GCHandle.Alloc(eoEvents);
209                 gcHandlePtr = GCHandle.ToIntPtr(gcHandle);
210             }
211
212             if (disposing)
213             {
214                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
215             }
216             else
217             {
218                 Monitor.Enter(Efl.All.InitLock);
219                 if (Efl.All.MainLoopInitialized)
220                 {
221                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
222                 }
223
224                 Monitor.Exit(Efl.All.InitLock);
225             }
226         }
227
228     }
229
230     ///<summary>Releases the underlying native instance.</summary>
231     public void Dispose()
232     {
233         Dispose(true);
234         GC.SuppressFinalize(this);
235     }
236
237     /// <summary>Verifies if the given object is equal to this one.</summary>
238     /// <param name="instance">The object to compare to.</param>
239     /// <returns>True if both objects point to the same native object.</returns>
240     public override bool Equals(object instance)
241     {
242         var other = instance as Efl.Object;
243         if (other == null)
244         {
245             return false;
246         }
247         return this.NativeHandle == other.NativeHandle;
248     }
249
250     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
251     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
252     public override int GetHashCode()
253     {
254         return this.NativeHandle.ToInt32();
255     }
256
257     /// <summary>Turns the native pointer into a string representation.</summary>
258     /// <returns>A string with the type and the native pointer for this object.</returns>
259     public override String ToString()
260     {
261         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
262     }
263
264     ///<summary>Adds a new event handler, registering it to the native event. For internal use only.</summary>
265     ///<param name="lib">The name of the native library definining the event.</param>
266     ///<param name="key">The name of the native event.</param>
267     ///<param name="evtCaller">Delegate to be called by native code on event raising.</param>
268     ///<param name="evtDelegate">Managed delegate that will be called by evtCaller on event raising.</param>
269     private void AddNativeEventHandler(string lib, string key, Efl.EventCb evtCaller, object evtDelegate)
270     {
271         IntPtr desc = Efl.EventDescription.GetNative(lib, key);
272         if (desc == IntPtr.Zero)
273         {
274             Eina.Log.Error($"Failed to get native event {key}");
275         }
276
277         if (eoEvents.ContainsKey((desc, evtDelegate)))
278         {
279             Eina.Log.Warning($"Event proxy for event {key} already registered!");
280             return;
281         }
282
283         IntPtr evtCallerPtr = Marshal.GetFunctionPointerForDelegate(evtCaller);
284         if (!Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evtCallerPtr, IntPtr.Zero))
285         {
286             Eina.Log.Error($"Failed to add event proxy for event {key}");
287             return;
288         }
289
290         eoEvents[(desc, evtDelegate)] = (evtCallerPtr, evtCaller);
291         Eina.Error.RaiseIfUnhandledException();
292     }
293
294     ///<summary>Removes the given event handler for the given event. For internal use only.</summary>
295     ///<param name="lib">The name of the native library definining the event.</param>
296     ///<param name="key">The name of the native event.</param>
297     ///<param name="evtDelegate">The delegate to be removed.</param>
298     private void RemoveNativeEventHandler(string lib, string key, object evtDelegate)
299     {
300         IntPtr desc = Efl.EventDescription.GetNative(lib, key);
301         if (desc == IntPtr.Zero)
302         {
303             Eina.Log.Error($"Failed to get native event {key}");
304             return;
305         }
306
307         var evtPair = (desc, evtDelegate);
308         if (eoEvents.TryGetValue(evtPair, out var caller))
309         {
310             if (!Efl.Eo.Globals.efl_event_callback_del(handle, desc, caller.evtCallerPtr, IntPtr.Zero))
311             {
312                 Eina.Log.Error($"Failed to remove event proxy for event {key}");
313                 return;
314             }
315
316             eoEvents.Remove(evtPair);
317             Eina.Error.RaiseIfUnhandledException();
318         }
319         else
320         {
321             Eina.Log.Error($"Trying to remove proxy for event {key} when it is nothing registered.");
322         }
323     }
324
325     /// <summary>Main pointer move (current and previous positions are known).</summary>
326     public event EventHandler<Efl.Input.IInterfacePointerMoveEvt_Args> PointerMoveEvt
327     {
328         add
329         {
330             lock (eventLock)
331             {
332                 var wRef = new WeakReference(this);
333                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
334                 {
335                     var obj = wRef.Target as Efl.Eo.IWrapper;
336                     if (obj != null)
337                     {
338                                                 Efl.Input.IInterfacePointerMoveEvt_Args args = new Efl.Input.IInterfacePointerMoveEvt_Args();
339                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
340                         try
341                         {
342                             value?.Invoke(obj, args);
343                         }
344                         catch (Exception e)
345                         {
346                             Eina.Log.Error(e.ToString());
347                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
348                         }
349                     }
350                 };
351
352                 string key = "_EFL_EVENT_POINTER_MOVE";
353                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
354             }
355         }
356
357         remove
358         {
359             lock (eventLock)
360             {
361                 string key = "_EFL_EVENT_POINTER_MOVE";
362                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
363             }
364         }
365     }
366     ///<summary>Method to raise event PointerMoveEvt.</summary>
367     public void OnPointerMoveEvt(Efl.Input.IInterfacePointerMoveEvt_Args e)
368     {
369         var key = "_EFL_EVENT_POINTER_MOVE";
370         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
371         if (desc == IntPtr.Zero)
372         {
373             Eina.Log.Error($"Failed to get native event {key}");
374             return;
375         }
376
377         IntPtr info = e.arg.NativeHandle;
378         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
379     }
380     /// <summary>Main pointer button pressed (button id is known).</summary>
381     public event EventHandler<Efl.Input.IInterfacePointerDownEvt_Args> PointerDownEvt
382     {
383         add
384         {
385             lock (eventLock)
386             {
387                 var wRef = new WeakReference(this);
388                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
389                 {
390                     var obj = wRef.Target as Efl.Eo.IWrapper;
391                     if (obj != null)
392                     {
393                                                 Efl.Input.IInterfacePointerDownEvt_Args args = new Efl.Input.IInterfacePointerDownEvt_Args();
394                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
395                         try
396                         {
397                             value?.Invoke(obj, args);
398                         }
399                         catch (Exception e)
400                         {
401                             Eina.Log.Error(e.ToString());
402                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
403                         }
404                     }
405                 };
406
407                 string key = "_EFL_EVENT_POINTER_DOWN";
408                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
409             }
410         }
411
412         remove
413         {
414             lock (eventLock)
415             {
416                 string key = "_EFL_EVENT_POINTER_DOWN";
417                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
418             }
419         }
420     }
421     ///<summary>Method to raise event PointerDownEvt.</summary>
422     public void OnPointerDownEvt(Efl.Input.IInterfacePointerDownEvt_Args e)
423     {
424         var key = "_EFL_EVENT_POINTER_DOWN";
425         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
426         if (desc == IntPtr.Zero)
427         {
428             Eina.Log.Error($"Failed to get native event {key}");
429             return;
430         }
431
432         IntPtr info = e.arg.NativeHandle;
433         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
434     }
435     /// <summary>Main pointer button released (button id is known).</summary>
436     public event EventHandler<Efl.Input.IInterfacePointerUpEvt_Args> PointerUpEvt
437     {
438         add
439         {
440             lock (eventLock)
441             {
442                 var wRef = new WeakReference(this);
443                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
444                 {
445                     var obj = wRef.Target as Efl.Eo.IWrapper;
446                     if (obj != null)
447                     {
448                                                 Efl.Input.IInterfacePointerUpEvt_Args args = new Efl.Input.IInterfacePointerUpEvt_Args();
449                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
450                         try
451                         {
452                             value?.Invoke(obj, args);
453                         }
454                         catch (Exception e)
455                         {
456                             Eina.Log.Error(e.ToString());
457                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
458                         }
459                     }
460                 };
461
462                 string key = "_EFL_EVENT_POINTER_UP";
463                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
464             }
465         }
466
467         remove
468         {
469             lock (eventLock)
470             {
471                 string key = "_EFL_EVENT_POINTER_UP";
472                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
473             }
474         }
475     }
476     ///<summary>Method to raise event PointerUpEvt.</summary>
477     public void OnPointerUpEvt(Efl.Input.IInterfacePointerUpEvt_Args e)
478     {
479         var key = "_EFL_EVENT_POINTER_UP";
480         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
481         if (desc == IntPtr.Zero)
482         {
483             Eina.Log.Error($"Failed to get native event {key}");
484             return;
485         }
486
487         IntPtr info = e.arg.NativeHandle;
488         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
489     }
490     /// <summary>Main pointer button press was cancelled (button id is known). This can happen in rare cases when the window manager passes the focus to a more urgent window, for instance. You probably don&apos;t need to listen to this event, as it will be accompanied by an up event.</summary>
491     public event EventHandler<Efl.Input.IInterfacePointerCancelEvt_Args> PointerCancelEvt
492     {
493         add
494         {
495             lock (eventLock)
496             {
497                 var wRef = new WeakReference(this);
498                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
499                 {
500                     var obj = wRef.Target as Efl.Eo.IWrapper;
501                     if (obj != null)
502                     {
503                                                 Efl.Input.IInterfacePointerCancelEvt_Args args = new Efl.Input.IInterfacePointerCancelEvt_Args();
504                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
505                         try
506                         {
507                             value?.Invoke(obj, args);
508                         }
509                         catch (Exception e)
510                         {
511                             Eina.Log.Error(e.ToString());
512                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
513                         }
514                     }
515                 };
516
517                 string key = "_EFL_EVENT_POINTER_CANCEL";
518                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
519             }
520         }
521
522         remove
523         {
524             lock (eventLock)
525             {
526                 string key = "_EFL_EVENT_POINTER_CANCEL";
527                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
528             }
529         }
530     }
531     ///<summary>Method to raise event PointerCancelEvt.</summary>
532     public void OnPointerCancelEvt(Efl.Input.IInterfacePointerCancelEvt_Args e)
533     {
534         var key = "_EFL_EVENT_POINTER_CANCEL";
535         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
536         if (desc == IntPtr.Zero)
537         {
538             Eina.Log.Error($"Failed to get native event {key}");
539             return;
540         }
541
542         IntPtr info = e.arg.NativeHandle;
543         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
544     }
545     /// <summary>Pointer entered a window or a widget.</summary>
546     public event EventHandler<Efl.Input.IInterfacePointerInEvt_Args> PointerInEvt
547     {
548         add
549         {
550             lock (eventLock)
551             {
552                 var wRef = new WeakReference(this);
553                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
554                 {
555                     var obj = wRef.Target as Efl.Eo.IWrapper;
556                     if (obj != null)
557                     {
558                                                 Efl.Input.IInterfacePointerInEvt_Args args = new Efl.Input.IInterfacePointerInEvt_Args();
559                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
560                         try
561                         {
562                             value?.Invoke(obj, args);
563                         }
564                         catch (Exception e)
565                         {
566                             Eina.Log.Error(e.ToString());
567                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
568                         }
569                     }
570                 };
571
572                 string key = "_EFL_EVENT_POINTER_IN";
573                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
574             }
575         }
576
577         remove
578         {
579             lock (eventLock)
580             {
581                 string key = "_EFL_EVENT_POINTER_IN";
582                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
583             }
584         }
585     }
586     ///<summary>Method to raise event PointerInEvt.</summary>
587     public void OnPointerInEvt(Efl.Input.IInterfacePointerInEvt_Args e)
588     {
589         var key = "_EFL_EVENT_POINTER_IN";
590         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
591         if (desc == IntPtr.Zero)
592         {
593             Eina.Log.Error($"Failed to get native event {key}");
594             return;
595         }
596
597         IntPtr info = e.arg.NativeHandle;
598         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
599     }
600     /// <summary>Pointer left a window or a widget.</summary>
601     public event EventHandler<Efl.Input.IInterfacePointerOutEvt_Args> PointerOutEvt
602     {
603         add
604         {
605             lock (eventLock)
606             {
607                 var wRef = new WeakReference(this);
608                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
609                 {
610                     var obj = wRef.Target as Efl.Eo.IWrapper;
611                     if (obj != null)
612                     {
613                                                 Efl.Input.IInterfacePointerOutEvt_Args args = new Efl.Input.IInterfacePointerOutEvt_Args();
614                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
615                         try
616                         {
617                             value?.Invoke(obj, args);
618                         }
619                         catch (Exception e)
620                         {
621                             Eina.Log.Error(e.ToString());
622                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
623                         }
624                     }
625                 };
626
627                 string key = "_EFL_EVENT_POINTER_OUT";
628                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
629             }
630         }
631
632         remove
633         {
634             lock (eventLock)
635             {
636                 string key = "_EFL_EVENT_POINTER_OUT";
637                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
638             }
639         }
640     }
641     ///<summary>Method to raise event PointerOutEvt.</summary>
642     public void OnPointerOutEvt(Efl.Input.IInterfacePointerOutEvt_Args e)
643     {
644         var key = "_EFL_EVENT_POINTER_OUT";
645         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
646         if (desc == IntPtr.Zero)
647         {
648             Eina.Log.Error($"Failed to get native event {key}");
649             return;
650         }
651
652         IntPtr info = e.arg.NativeHandle;
653         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
654     }
655     /// <summary>Mouse wheel event.</summary>
656     public event EventHandler<Efl.Input.IInterfacePointerWheelEvt_Args> PointerWheelEvt
657     {
658         add
659         {
660             lock (eventLock)
661             {
662                 var wRef = new WeakReference(this);
663                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
664                 {
665                     var obj = wRef.Target as Efl.Eo.IWrapper;
666                     if (obj != null)
667                     {
668                                                 Efl.Input.IInterfacePointerWheelEvt_Args args = new Efl.Input.IInterfacePointerWheelEvt_Args();
669                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
670                         try
671                         {
672                             value?.Invoke(obj, args);
673                         }
674                         catch (Exception e)
675                         {
676                             Eina.Log.Error(e.ToString());
677                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
678                         }
679                     }
680                 };
681
682                 string key = "_EFL_EVENT_POINTER_WHEEL";
683                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
684             }
685         }
686
687         remove
688         {
689             lock (eventLock)
690             {
691                 string key = "_EFL_EVENT_POINTER_WHEEL";
692                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
693             }
694         }
695     }
696     ///<summary>Method to raise event PointerWheelEvt.</summary>
697     public void OnPointerWheelEvt(Efl.Input.IInterfacePointerWheelEvt_Args e)
698     {
699         var key = "_EFL_EVENT_POINTER_WHEEL";
700         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
701         if (desc == IntPtr.Zero)
702         {
703             Eina.Log.Error($"Failed to get native event {key}");
704             return;
705         }
706
707         IntPtr info = e.arg.NativeHandle;
708         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
709     }
710     /// <summary>Pen or other axis event update.</summary>
711     public event EventHandler<Efl.Input.IInterfacePointerAxisEvt_Args> PointerAxisEvt
712     {
713         add
714         {
715             lock (eventLock)
716             {
717                 var wRef = new WeakReference(this);
718                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
719                 {
720                     var obj = wRef.Target as Efl.Eo.IWrapper;
721                     if (obj != null)
722                     {
723                                                 Efl.Input.IInterfacePointerAxisEvt_Args args = new Efl.Input.IInterfacePointerAxisEvt_Args();
724                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
725                         try
726                         {
727                             value?.Invoke(obj, args);
728                         }
729                         catch (Exception e)
730                         {
731                             Eina.Log.Error(e.ToString());
732                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
733                         }
734                     }
735                 };
736
737                 string key = "_EFL_EVENT_POINTER_AXIS";
738                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
739             }
740         }
741
742         remove
743         {
744             lock (eventLock)
745             {
746                 string key = "_EFL_EVENT_POINTER_AXIS";
747                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
748             }
749         }
750     }
751     ///<summary>Method to raise event PointerAxisEvt.</summary>
752     public void OnPointerAxisEvt(Efl.Input.IInterfacePointerAxisEvt_Args e)
753     {
754         var key = "_EFL_EVENT_POINTER_AXIS";
755         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
756         if (desc == IntPtr.Zero)
757         {
758             Eina.Log.Error($"Failed to get native event {key}");
759             return;
760         }
761
762         IntPtr info = e.arg.NativeHandle;
763         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
764     }
765     /// <summary>Finger moved (current and previous positions are known).</summary>
766     public event EventHandler<Efl.Input.IInterfaceFingerMoveEvt_Args> FingerMoveEvt
767     {
768         add
769         {
770             lock (eventLock)
771             {
772                 var wRef = new WeakReference(this);
773                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
774                 {
775                     var obj = wRef.Target as Efl.Eo.IWrapper;
776                     if (obj != null)
777                     {
778                                                 Efl.Input.IInterfaceFingerMoveEvt_Args args = new Efl.Input.IInterfaceFingerMoveEvt_Args();
779                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
780                         try
781                         {
782                             value?.Invoke(obj, args);
783                         }
784                         catch (Exception e)
785                         {
786                             Eina.Log.Error(e.ToString());
787                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
788                         }
789                     }
790                 };
791
792                 string key = "_EFL_EVENT_FINGER_MOVE";
793                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
794             }
795         }
796
797         remove
798         {
799             lock (eventLock)
800             {
801                 string key = "_EFL_EVENT_FINGER_MOVE";
802                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
803             }
804         }
805     }
806     ///<summary>Method to raise event FingerMoveEvt.</summary>
807     public void OnFingerMoveEvt(Efl.Input.IInterfaceFingerMoveEvt_Args e)
808     {
809         var key = "_EFL_EVENT_FINGER_MOVE";
810         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
811         if (desc == IntPtr.Zero)
812         {
813             Eina.Log.Error($"Failed to get native event {key}");
814             return;
815         }
816
817         IntPtr info = e.arg.NativeHandle;
818         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
819     }
820     /// <summary>Finger pressed (finger id is known).</summary>
821     public event EventHandler<Efl.Input.IInterfaceFingerDownEvt_Args> FingerDownEvt
822     {
823         add
824         {
825             lock (eventLock)
826             {
827                 var wRef = new WeakReference(this);
828                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
829                 {
830                     var obj = wRef.Target as Efl.Eo.IWrapper;
831                     if (obj != null)
832                     {
833                                                 Efl.Input.IInterfaceFingerDownEvt_Args args = new Efl.Input.IInterfaceFingerDownEvt_Args();
834                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
835                         try
836                         {
837                             value?.Invoke(obj, args);
838                         }
839                         catch (Exception e)
840                         {
841                             Eina.Log.Error(e.ToString());
842                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
843                         }
844                     }
845                 };
846
847                 string key = "_EFL_EVENT_FINGER_DOWN";
848                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
849             }
850         }
851
852         remove
853         {
854             lock (eventLock)
855             {
856                 string key = "_EFL_EVENT_FINGER_DOWN";
857                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
858             }
859         }
860     }
861     ///<summary>Method to raise event FingerDownEvt.</summary>
862     public void OnFingerDownEvt(Efl.Input.IInterfaceFingerDownEvt_Args e)
863     {
864         var key = "_EFL_EVENT_FINGER_DOWN";
865         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
866         if (desc == IntPtr.Zero)
867         {
868             Eina.Log.Error($"Failed to get native event {key}");
869             return;
870         }
871
872         IntPtr info = e.arg.NativeHandle;
873         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
874     }
875     /// <summary>Finger released (finger id is known).</summary>
876     public event EventHandler<Efl.Input.IInterfaceFingerUpEvt_Args> FingerUpEvt
877     {
878         add
879         {
880             lock (eventLock)
881             {
882                 var wRef = new WeakReference(this);
883                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
884                 {
885                     var obj = wRef.Target as Efl.Eo.IWrapper;
886                     if (obj != null)
887                     {
888                                                 Efl.Input.IInterfaceFingerUpEvt_Args args = new Efl.Input.IInterfaceFingerUpEvt_Args();
889                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Pointer);
890                         try
891                         {
892                             value?.Invoke(obj, args);
893                         }
894                         catch (Exception e)
895                         {
896                             Eina.Log.Error(e.ToString());
897                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
898                         }
899                     }
900                 };
901
902                 string key = "_EFL_EVENT_FINGER_UP";
903                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
904             }
905         }
906
907         remove
908         {
909             lock (eventLock)
910             {
911                 string key = "_EFL_EVENT_FINGER_UP";
912                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
913             }
914         }
915     }
916     ///<summary>Method to raise event FingerUpEvt.</summary>
917     public void OnFingerUpEvt(Efl.Input.IInterfaceFingerUpEvt_Args e)
918     {
919         var key = "_EFL_EVENT_FINGER_UP";
920         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
921         if (desc == IntPtr.Zero)
922         {
923             Eina.Log.Error($"Failed to get native event {key}");
924             return;
925         }
926
927         IntPtr info = e.arg.NativeHandle;
928         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
929     }
930     /// <summary>Keyboard key press.</summary>
931     public event EventHandler<Efl.Input.IInterfaceKeyDownEvt_Args> KeyDownEvt
932     {
933         add
934         {
935             lock (eventLock)
936             {
937                 var wRef = new WeakReference(this);
938                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
939                 {
940                     var obj = wRef.Target as Efl.Eo.IWrapper;
941                     if (obj != null)
942                     {
943                                                 Efl.Input.IInterfaceKeyDownEvt_Args args = new Efl.Input.IInterfaceKeyDownEvt_Args();
944                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Key);
945                         try
946                         {
947                             value?.Invoke(obj, args);
948                         }
949                         catch (Exception e)
950                         {
951                             Eina.Log.Error(e.ToString());
952                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
953                         }
954                     }
955                 };
956
957                 string key = "_EFL_EVENT_KEY_DOWN";
958                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
959             }
960         }
961
962         remove
963         {
964             lock (eventLock)
965             {
966                 string key = "_EFL_EVENT_KEY_DOWN";
967                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
968             }
969         }
970     }
971     ///<summary>Method to raise event KeyDownEvt.</summary>
972     public void OnKeyDownEvt(Efl.Input.IInterfaceKeyDownEvt_Args e)
973     {
974         var key = "_EFL_EVENT_KEY_DOWN";
975         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
976         if (desc == IntPtr.Zero)
977         {
978             Eina.Log.Error($"Failed to get native event {key}");
979             return;
980         }
981
982         IntPtr info = e.arg.NativeHandle;
983         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
984     }
985     /// <summary>Keyboard key release.</summary>
986     public event EventHandler<Efl.Input.IInterfaceKeyUpEvt_Args> KeyUpEvt
987     {
988         add
989         {
990             lock (eventLock)
991             {
992                 var wRef = new WeakReference(this);
993                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
994                 {
995                     var obj = wRef.Target as Efl.Eo.IWrapper;
996                     if (obj != null)
997                     {
998                                                 Efl.Input.IInterfaceKeyUpEvt_Args args = new Efl.Input.IInterfaceKeyUpEvt_Args();
999                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Key);
1000                         try
1001                         {
1002                             value?.Invoke(obj, args);
1003                         }
1004                         catch (Exception e)
1005                         {
1006                             Eina.Log.Error(e.ToString());
1007                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1008                         }
1009                     }
1010                 };
1011
1012                 string key = "_EFL_EVENT_KEY_UP";
1013                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
1014             }
1015         }
1016
1017         remove
1018         {
1019             lock (eventLock)
1020             {
1021                 string key = "_EFL_EVENT_KEY_UP";
1022                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
1023             }
1024         }
1025     }
1026     ///<summary>Method to raise event KeyUpEvt.</summary>
1027     public void OnKeyUpEvt(Efl.Input.IInterfaceKeyUpEvt_Args e)
1028     {
1029         var key = "_EFL_EVENT_KEY_UP";
1030         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
1031         if (desc == IntPtr.Zero)
1032         {
1033             Eina.Log.Error($"Failed to get native event {key}");
1034             return;
1035         }
1036
1037         IntPtr info = e.arg.NativeHandle;
1038         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
1039     }
1040     /// <summary>All input events are on hold or resumed.</summary>
1041     public event EventHandler<Efl.Input.IInterfaceHoldEvt_Args> HoldEvt
1042     {
1043         add
1044         {
1045             lock (eventLock)
1046             {
1047                 var wRef = new WeakReference(this);
1048                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
1049                 {
1050                     var obj = wRef.Target as Efl.Eo.IWrapper;
1051                     if (obj != null)
1052                     {
1053                                                 Efl.Input.IInterfaceHoldEvt_Args args = new Efl.Input.IInterfaceHoldEvt_Args();
1054                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Hold);
1055                         try
1056                         {
1057                             value?.Invoke(obj, args);
1058                         }
1059                         catch (Exception e)
1060                         {
1061                             Eina.Log.Error(e.ToString());
1062                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1063                         }
1064                     }
1065                 };
1066
1067                 string key = "_EFL_EVENT_HOLD";
1068                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
1069             }
1070         }
1071
1072         remove
1073         {
1074             lock (eventLock)
1075             {
1076                 string key = "_EFL_EVENT_HOLD";
1077                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
1078             }
1079         }
1080     }
1081     ///<summary>Method to raise event HoldEvt.</summary>
1082     public void OnHoldEvt(Efl.Input.IInterfaceHoldEvt_Args e)
1083     {
1084         var key = "_EFL_EVENT_HOLD";
1085         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
1086         if (desc == IntPtr.Zero)
1087         {
1088             Eina.Log.Error($"Failed to get native event {key}");
1089             return;
1090         }
1091
1092         IntPtr info = e.arg.NativeHandle;
1093         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
1094     }
1095     /// <summary>A focus in event.</summary>
1096     public event EventHandler<Efl.Input.IInterfaceFocusInEvt_Args> FocusInEvt
1097     {
1098         add
1099         {
1100             lock (eventLock)
1101             {
1102                 var wRef = new WeakReference(this);
1103                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
1104                 {
1105                     var obj = wRef.Target as Efl.Eo.IWrapper;
1106                     if (obj != null)
1107                     {
1108                                                 Efl.Input.IInterfaceFocusInEvt_Args args = new Efl.Input.IInterfaceFocusInEvt_Args();
1109                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Focus);
1110                         try
1111                         {
1112                             value?.Invoke(obj, args);
1113                         }
1114                         catch (Exception e)
1115                         {
1116                             Eina.Log.Error(e.ToString());
1117                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1118                         }
1119                     }
1120                 };
1121
1122                 string key = "_EFL_EVENT_FOCUS_IN";
1123                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
1124             }
1125         }
1126
1127         remove
1128         {
1129             lock (eventLock)
1130             {
1131                 string key = "_EFL_EVENT_FOCUS_IN";
1132                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
1133             }
1134         }
1135     }
1136     ///<summary>Method to raise event FocusInEvt.</summary>
1137     public void OnFocusInEvt(Efl.Input.IInterfaceFocusInEvt_Args e)
1138     {
1139         var key = "_EFL_EVENT_FOCUS_IN";
1140         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
1141         if (desc == IntPtr.Zero)
1142         {
1143             Eina.Log.Error($"Failed to get native event {key}");
1144             return;
1145         }
1146
1147         IntPtr info = e.arg.NativeHandle;
1148         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
1149     }
1150     /// <summary>A focus out event.</summary>
1151     public event EventHandler<Efl.Input.IInterfaceFocusOutEvt_Args> FocusOutEvt
1152     {
1153         add
1154         {
1155             lock (eventLock)
1156             {
1157                 var wRef = new WeakReference(this);
1158                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
1159                 {
1160                     var obj = wRef.Target as Efl.Eo.IWrapper;
1161                     if (obj != null)
1162                     {
1163                                                 Efl.Input.IInterfaceFocusOutEvt_Args args = new Efl.Input.IInterfaceFocusOutEvt_Args();
1164                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Input.Focus);
1165                         try
1166                         {
1167                             value?.Invoke(obj, args);
1168                         }
1169                         catch (Exception e)
1170                         {
1171                             Eina.Log.Error(e.ToString());
1172                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1173                         }
1174                     }
1175                 };
1176
1177                 string key = "_EFL_EVENT_FOCUS_OUT";
1178                 AddNativeEventHandler(efl.Libs.Evas, key, callerCb, value);
1179             }
1180         }
1181
1182         remove
1183         {
1184             lock (eventLock)
1185             {
1186                 string key = "_EFL_EVENT_FOCUS_OUT";
1187                 RemoveNativeEventHandler(efl.Libs.Evas, key, value);
1188             }
1189         }
1190     }
1191     ///<summary>Method to raise event FocusOutEvt.</summary>
1192     public void OnFocusOutEvt(Efl.Input.IInterfaceFocusOutEvt_Args e)
1193     {
1194         var key = "_EFL_EVENT_FOCUS_OUT";
1195         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Evas, key);
1196         if (desc == IntPtr.Zero)
1197         {
1198             Eina.Log.Error($"Failed to get native event {key}");
1199             return;
1200         }
1201
1202         IntPtr info = e.arg.NativeHandle;
1203         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
1204     }
1205     /// <summary>Check if input events from a given seat is enabled.</summary>
1206     /// <param name="seat">The seat to act on.</param>
1207     /// <returns><c>true</c> to enable events for a seat or <c>false</c> otherwise.</returns>
1208     public bool GetSeatEventFilter(Efl.Input.Device seat) {
1209                                  var _ret_var = Efl.Input.IInterfaceConcrete.NativeMethods.efl_input_seat_event_filter_get_ptr.Value.Delegate(this.NativeHandle,seat);
1210         Eina.Error.RaiseIfUnhandledException();
1211                         return _ret_var;
1212  }
1213     /// <summary>Add or remove a given seat to the filter list. If the filter list is empty this object will report mouse, keyboard and focus events from any seat, otherwise those events will only be reported if the event comes from a seat that is in the list.</summary>
1214     /// <param name="seat">The seat to act on.</param>
1215     /// <param name="enable"><c>true</c> to enable events for a seat or <c>false</c> otherwise.</param>
1216     public void SetSeatEventFilter(Efl.Input.Device seat, bool enable) {
1217                                                          Efl.Input.IInterfaceConcrete.NativeMethods.efl_input_seat_event_filter_set_ptr.Value.Delegate(this.NativeHandle,seat, enable);
1218         Eina.Error.RaiseIfUnhandledException();
1219                                          }
1220     private static IntPtr GetEflClassStatic()
1221     {
1222         return Efl.Input.IInterfaceConcrete.efl_input_interface_interface_get();
1223     }
1224     /// <summary>Wrapper for native methods and virtual method delegates.
1225     /// For internal use by generated code only.</summary>
1226     public class NativeMethods  : Efl.Eo.NativeClass
1227     {
1228         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
1229         /// <summary>Gets the list of Eo operations to override.</summary>
1230         /// <returns>The list of Eo operations to be overload.</returns>
1231         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
1232         {
1233             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
1234             var methods = Efl.Eo.Globals.GetUserMethods(type);
1235
1236             if (efl_input_seat_event_filter_get_static_delegate == null)
1237             {
1238                 efl_input_seat_event_filter_get_static_delegate = new efl_input_seat_event_filter_get_delegate(seat_event_filter_get);
1239             }
1240
1241             if (methods.FirstOrDefault(m => m.Name == "GetSeatEventFilter") != null)
1242             {
1243                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_seat_event_filter_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_seat_event_filter_get_static_delegate) });
1244             }
1245
1246             if (efl_input_seat_event_filter_set_static_delegate == null)
1247             {
1248                 efl_input_seat_event_filter_set_static_delegate = new efl_input_seat_event_filter_set_delegate(seat_event_filter_set);
1249             }
1250
1251             if (methods.FirstOrDefault(m => m.Name == "SetSeatEventFilter") != null)
1252             {
1253                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_seat_event_filter_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_seat_event_filter_set_static_delegate) });
1254             }
1255
1256             return descs;
1257         }
1258         /// <summary>Returns the Eo class for the native methods of this class.</summary>
1259         /// <returns>The native class pointer.</returns>
1260         public override IntPtr GetEflClass()
1261         {
1262             return Efl.Input.IInterfaceConcrete.efl_input_interface_interface_get();
1263         }
1264
1265         #pragma warning disable CA1707, SA1300, SA1600
1266
1267         [return: MarshalAs(UnmanagedType.U1)]
1268         private delegate bool efl_input_seat_event_filter_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
1269
1270         [return: MarshalAs(UnmanagedType.U1)]
1271         public delegate bool efl_input_seat_event_filter_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat);
1272
1273         public static Efl.Eo.FunctionWrapper<efl_input_seat_event_filter_get_api_delegate> efl_input_seat_event_filter_get_ptr = new Efl.Eo.FunctionWrapper<efl_input_seat_event_filter_get_api_delegate>(Module, "efl_input_seat_event_filter_get");
1274
1275         private static bool seat_event_filter_get(System.IntPtr obj, System.IntPtr pd, Efl.Input.Device seat)
1276         {
1277             Eina.Log.Debug("function efl_input_seat_event_filter_get was called");
1278             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1279             if (wrapper != null)
1280             {
1281                                     bool _ret_var = default(bool);
1282                 try
1283                 {
1284                     _ret_var = ((IInterface)wrapper).GetSeatEventFilter(seat);
1285                 }
1286                 catch (Exception e)
1287                 {
1288                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1289                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1290                 }
1291
1292                         return _ret_var;
1293
1294             }
1295             else
1296             {
1297                 return efl_input_seat_event_filter_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), seat);
1298             }
1299         }
1300
1301         private static efl_input_seat_event_filter_get_delegate efl_input_seat_event_filter_get_static_delegate;
1302
1303         
1304         private delegate void efl_input_seat_event_filter_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat, [MarshalAs(UnmanagedType.U1)] bool enable);
1305
1306         
1307         public delegate void efl_input_seat_event_filter_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Input.Device seat, [MarshalAs(UnmanagedType.U1)] bool enable);
1308
1309         public static Efl.Eo.FunctionWrapper<efl_input_seat_event_filter_set_api_delegate> efl_input_seat_event_filter_set_ptr = new Efl.Eo.FunctionWrapper<efl_input_seat_event_filter_set_api_delegate>(Module, "efl_input_seat_event_filter_set");
1310
1311         private static void seat_event_filter_set(System.IntPtr obj, System.IntPtr pd, Efl.Input.Device seat, bool enable)
1312         {
1313             Eina.Log.Debug("function efl_input_seat_event_filter_set was called");
1314             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1315             if (wrapper != null)
1316             {
1317                                                             
1318                 try
1319                 {
1320                     ((IInterface)wrapper).SetSeatEventFilter(seat, enable);
1321                 }
1322                 catch (Exception e)
1323                 {
1324                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1325                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1326                 }
1327
1328                                         
1329             }
1330             else
1331             {
1332                 efl_input_seat_event_filter_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), seat, enable);
1333             }
1334         }
1335
1336         private static efl_input_seat_event_filter_set_delegate efl_input_seat_event_filter_set_static_delegate;
1337
1338         #pragma warning restore CA1707, SA1300, SA1600
1339
1340 }
1341 }
1342 }
1343
1344 }
1345