44d542c992201e60587b9f81a8c37e633307d1a6
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_loop_handler.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { 
8 /// <summary>An object that describes an low-level source of I/O to listen to for available data to be read or written, depending on the OS and data source type. When I/O becomes available various events are produced and the callbacks attached to them will be called.</summary>
9 [LoopHandlerNativeInherit]
10 public class LoopHandler : Efl.Object, Efl.Eo.IWrapper
11 {
12     ///<summary>Pointer to the native class description.</summary>
13     public override System.IntPtr NativeClass {
14         get {
15             if (((object)this).GetType() == typeof (LoopHandler))
16                 return Efl.LoopHandlerNativeInherit.GetEflClassStatic();
17             else
18                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
19         }
20     }
21     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
22         efl_loop_handler_class_get();
23     ///<summary>Creates a new instance.</summary>
24     ///<param name="parent">Parent instance.</param>
25     public LoopHandler(Efl.Object parent= null
26             ) :
27         base(efl_loop_handler_class_get(), typeof(LoopHandler), parent)
28     {
29         FinishInstantiation();
30     }
31     ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
32     protected LoopHandler(System.IntPtr raw) : base(raw)
33     {
34                 RegisterEventProxies();
35     }
36     ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37     protected LoopHandler(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38     ///<summary>Verifies if the given object is equal to this one.</summary>
39     public override bool Equals(object obj)
40     {
41         var other = obj as Efl.Object;
42         if (other == null)
43             return false;
44         return this.NativeHandle == other.NativeHandle;
45     }
46     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47     public override int GetHashCode()
48     {
49         return this.NativeHandle.ToInt32();
50     }
51     ///<summary>Turns the native pointer into a string representation.</summary>
52     public override String ToString()
53     {
54         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
55     }
56 private static object ReadEvtKey = new object();
57     /// <summary>Called when a read occurs on the descriptor.</summary>
58     public event EventHandler ReadEvt
59     {
60         add {
61             lock (eventLock) {
62                 string key = "_EFL_LOOP_HANDLER_EVENT_READ";
63                 if (AddNativeEventHandler(efl.Libs.Ecore, key, this.evt_ReadEvt_delegate)) {
64                     eventHandlers.AddHandler(ReadEvtKey , value);
65                 } else
66                     Eina.Log.Error($"Error adding proxy for event {key}");
67             }
68         }
69         remove {
70             lock (eventLock) {
71                 string key = "_EFL_LOOP_HANDLER_EVENT_READ";
72                 if (RemoveNativeEventHandler(key, this.evt_ReadEvt_delegate)) { 
73                     eventHandlers.RemoveHandler(ReadEvtKey , value);
74                 } else
75                     Eina.Log.Error($"Error removing proxy for event {key}");
76             }
77         }
78     }
79     ///<summary>Method to raise event ReadEvt.</summary>
80     public void On_ReadEvt(EventArgs e)
81     {
82         EventHandler evt;
83         lock (eventLock) {
84         evt = (EventHandler)eventHandlers[ReadEvtKey];
85         }
86         evt?.Invoke(this, e);
87     }
88     Efl.EventCb evt_ReadEvt_delegate;
89     private void on_ReadEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
90     {
91         EventArgs args = EventArgs.Empty;
92         try {
93             On_ReadEvt(args);
94         } catch (Exception e) {
95             Eina.Log.Error(e.ToString());
96             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
97         }
98     }
99
100 private static object WriteEvtKey = new object();
101     /// <summary>Called when a write occurs on the descriptor.</summary>
102     public event EventHandler WriteEvt
103     {
104         add {
105             lock (eventLock) {
106                 string key = "_EFL_LOOP_HANDLER_EVENT_WRITE";
107                 if (AddNativeEventHandler(efl.Libs.Ecore, key, this.evt_WriteEvt_delegate)) {
108                     eventHandlers.AddHandler(WriteEvtKey , value);
109                 } else
110                     Eina.Log.Error($"Error adding proxy for event {key}");
111             }
112         }
113         remove {
114             lock (eventLock) {
115                 string key = "_EFL_LOOP_HANDLER_EVENT_WRITE";
116                 if (RemoveNativeEventHandler(key, this.evt_WriteEvt_delegate)) { 
117                     eventHandlers.RemoveHandler(WriteEvtKey , value);
118                 } else
119                     Eina.Log.Error($"Error removing proxy for event {key}");
120             }
121         }
122     }
123     ///<summary>Method to raise event WriteEvt.</summary>
124     public void On_WriteEvt(EventArgs e)
125     {
126         EventHandler evt;
127         lock (eventLock) {
128         evt = (EventHandler)eventHandlers[WriteEvtKey];
129         }
130         evt?.Invoke(this, e);
131     }
132     Efl.EventCb evt_WriteEvt_delegate;
133     private void on_WriteEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
134     {
135         EventArgs args = EventArgs.Empty;
136         try {
137             On_WriteEvt(args);
138         } catch (Exception e) {
139             Eina.Log.Error(e.ToString());
140             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
141         }
142     }
143
144 private static object ErrorEvtKey = new object();
145     /// <summary>Called when a error occurrs on the descriptor.</summary>
146     public event EventHandler ErrorEvt
147     {
148         add {
149             lock (eventLock) {
150                 string key = "_EFL_LOOP_HANDLER_EVENT_ERROR";
151                 if (AddNativeEventHandler(efl.Libs.Ecore, key, this.evt_ErrorEvt_delegate)) {
152                     eventHandlers.AddHandler(ErrorEvtKey , value);
153                 } else
154                     Eina.Log.Error($"Error adding proxy for event {key}");
155             }
156         }
157         remove {
158             lock (eventLock) {
159                 string key = "_EFL_LOOP_HANDLER_EVENT_ERROR";
160                 if (RemoveNativeEventHandler(key, this.evt_ErrorEvt_delegate)) { 
161                     eventHandlers.RemoveHandler(ErrorEvtKey , value);
162                 } else
163                     Eina.Log.Error($"Error removing proxy for event {key}");
164             }
165         }
166     }
167     ///<summary>Method to raise event ErrorEvt.</summary>
168     public void On_ErrorEvt(EventArgs e)
169     {
170         EventHandler evt;
171         lock (eventLock) {
172         evt = (EventHandler)eventHandlers[ErrorEvtKey];
173         }
174         evt?.Invoke(this, e);
175     }
176     Efl.EventCb evt_ErrorEvt_delegate;
177     private void on_ErrorEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
178     {
179         EventArgs args = EventArgs.Empty;
180         try {
181             On_ErrorEvt(args);
182         } catch (Exception e) {
183             Eina.Log.Error(e.ToString());
184             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
185         }
186     }
187
188 private static object BufferEvtKey = new object();
189     /// <summary>Called when buffered data already read from the descriptor should be processed.</summary>
190     public event EventHandler BufferEvt
191     {
192         add {
193             lock (eventLock) {
194                 string key = "_EFL_LOOP_HANDLER_EVENT_BUFFER";
195                 if (AddNativeEventHandler(efl.Libs.Ecore, key, this.evt_BufferEvt_delegate)) {
196                     eventHandlers.AddHandler(BufferEvtKey , value);
197                 } else
198                     Eina.Log.Error($"Error adding proxy for event {key}");
199             }
200         }
201         remove {
202             lock (eventLock) {
203                 string key = "_EFL_LOOP_HANDLER_EVENT_BUFFER";
204                 if (RemoveNativeEventHandler(key, this.evt_BufferEvt_delegate)) { 
205                     eventHandlers.RemoveHandler(BufferEvtKey , value);
206                 } else
207                     Eina.Log.Error($"Error removing proxy for event {key}");
208             }
209         }
210     }
211     ///<summary>Method to raise event BufferEvt.</summary>
212     public void On_BufferEvt(EventArgs e)
213     {
214         EventHandler evt;
215         lock (eventLock) {
216         evt = (EventHandler)eventHandlers[BufferEvtKey];
217         }
218         evt?.Invoke(this, e);
219     }
220     Efl.EventCb evt_BufferEvt_delegate;
221     private void on_BufferEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
222     {
223         EventArgs args = EventArgs.Empty;
224         try {
225             On_BufferEvt(args);
226         } catch (Exception e) {
227             Eina.Log.Error(e.ToString());
228             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
229         }
230     }
231
232 private static object PrepareEvtKey = new object();
233     /// <summary>Called when preparing a descriptor for listening.</summary>
234     public event EventHandler PrepareEvt
235     {
236         add {
237             lock (eventLock) {
238                 string key = "_EFL_LOOP_HANDLER_EVENT_PREPARE";
239                 if (AddNativeEventHandler(efl.Libs.Ecore, key, this.evt_PrepareEvt_delegate)) {
240                     eventHandlers.AddHandler(PrepareEvtKey , value);
241                 } else
242                     Eina.Log.Error($"Error adding proxy for event {key}");
243             }
244         }
245         remove {
246             lock (eventLock) {
247                 string key = "_EFL_LOOP_HANDLER_EVENT_PREPARE";
248                 if (RemoveNativeEventHandler(key, this.evt_PrepareEvt_delegate)) { 
249                     eventHandlers.RemoveHandler(PrepareEvtKey , value);
250                 } else
251                     Eina.Log.Error($"Error removing proxy for event {key}");
252             }
253         }
254     }
255     ///<summary>Method to raise event PrepareEvt.</summary>
256     public void On_PrepareEvt(EventArgs e)
257     {
258         EventHandler evt;
259         lock (eventLock) {
260         evt = (EventHandler)eventHandlers[PrepareEvtKey];
261         }
262         evt?.Invoke(this, e);
263     }
264     Efl.EventCb evt_PrepareEvt_delegate;
265     private void on_PrepareEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
266     {
267         EventArgs args = EventArgs.Empty;
268         try {
269             On_PrepareEvt(args);
270         } catch (Exception e) {
271             Eina.Log.Error(e.ToString());
272             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
273         }
274     }
275
276     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
277     protected override void RegisterEventProxies()
278     {
279         base.RegisterEventProxies();
280         evt_ReadEvt_delegate = new Efl.EventCb(on_ReadEvt_NativeCallback);
281         evt_WriteEvt_delegate = new Efl.EventCb(on_WriteEvt_NativeCallback);
282         evt_ErrorEvt_delegate = new Efl.EventCb(on_ErrorEvt_NativeCallback);
283         evt_BufferEvt_delegate = new Efl.EventCb(on_BufferEvt_NativeCallback);
284         evt_PrepareEvt_delegate = new Efl.EventCb(on_PrepareEvt_NativeCallback);
285     }
286     /// <summary>This sets what kind of I/O should be listened to only when using a fd or fd_file for the handler</summary>
287     /// <returns>The flags that indicate what kind of I/O should be listened for like read, write or error channels.</returns>
288     virtual public Efl.LoopHandlerFlags GetActive() {
289          var _ret_var = Efl.LoopHandlerNativeInherit.efl_loop_handler_active_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
290         Eina.Error.RaiseIfUnhandledException();
291         return _ret_var;
292  }
293     /// <summary>This sets what kind of I/O should be listened to only when using a fd or fd_file for the handler</summary>
294     /// <param name="flags">The flags that indicate what kind of I/O should be listened for like read, write or error channels.</param>
295     /// <returns></returns>
296     virtual public void SetActive( Efl.LoopHandlerFlags flags) {
297                                  Efl.LoopHandlerNativeInherit.efl_loop_handler_active_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), flags);
298         Eina.Error.RaiseIfUnhandledException();
299                          }
300     /// <summary>Controls a file descriptor to listen to for I/O, which points to a data pipe such as a device, socket or pipe etc.</summary>
301     /// <returns>The file descriptor</returns>
302     virtual public int GetFd() {
303          var _ret_var = Efl.LoopHandlerNativeInherit.efl_loop_handler_fd_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
304         Eina.Error.RaiseIfUnhandledException();
305         return _ret_var;
306  }
307     /// <summary>Controls a file descriptor to listen to for I/O, which points to a data pipe such as a device, socket or pipe etc.</summary>
308     /// <param name="fd">The file descriptor</param>
309     /// <returns></returns>
310     virtual public void SetFd( int fd) {
311                                  Efl.LoopHandlerNativeInherit.efl_loop_handler_fd_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), fd);
312         Eina.Error.RaiseIfUnhandledException();
313                          }
314     /// <summary>Controls a file descriptor to listen to for I/O that specifically points to a file in storage and not a device, socket or pipe etc.</summary>
315     /// <returns>The file descriptor</returns>
316     virtual public int GetFdFile() {
317          var _ret_var = Efl.LoopHandlerNativeInherit.efl_loop_handler_fd_file_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
318         Eina.Error.RaiseIfUnhandledException();
319         return _ret_var;
320  }
321     /// <summary>Controls a file descriptor to listen to for I/O that specifically points to a file in storage and not a device, socket or pipe etc.</summary>
322     /// <param name="fd">The file descriptor</param>
323     /// <returns></returns>
324     virtual public void SetFdFile( int fd) {
325                                  Efl.LoopHandlerNativeInherit.efl_loop_handler_fd_file_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), fd);
326         Eina.Error.RaiseIfUnhandledException();
327                          }
328     /// <summary>Controls a windows win32 object handle to listen to for I/O. When it becomes available for any data the read event will be produced.</summary>
329     /// <returns>A win32 object handle</returns>
330     virtual public System.IntPtr GetWin32() {
331          var _ret_var = Efl.LoopHandlerNativeInherit.efl_loop_handler_win32_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
332         Eina.Error.RaiseIfUnhandledException();
333         return _ret_var;
334  }
335     /// <summary>Controls a windows win32 object handle to listen to for I/O. When it becomes available for any data the read event will be produced.</summary>
336     /// <param name="handle">A win32 object handle</param>
337     /// <returns></returns>
338     virtual public void SetWin32( System.IntPtr handle) {
339                                  Efl.LoopHandlerNativeInherit.efl_loop_handler_win32_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), handle);
340         Eina.Error.RaiseIfUnhandledException();
341                          }
342     /// <summary>This sets what kind of I/O should be listened to only when using a fd or fd_file for the handler</summary>
343 /// <value>The flags that indicate what kind of I/O should be listened for like read, write or error channels.</value>
344     public Efl.LoopHandlerFlags Active {
345         get { return GetActive(); }
346         set { SetActive( value); }
347     }
348     /// <summary>Controls a file descriptor to listen to for I/O, which points to a data pipe such as a device, socket or pipe etc.</summary>
349 /// <value>The file descriptor</value>
350     public int Fd {
351         get { return GetFd(); }
352         set { SetFd( value); }
353     }
354     /// <summary>Controls a file descriptor to listen to for I/O that specifically points to a file in storage and not a device, socket or pipe etc.</summary>
355 /// <value>The file descriptor</value>
356     public int FdFile {
357         get { return GetFdFile(); }
358         set { SetFdFile( value); }
359     }
360     /// <summary>Controls a windows win32 object handle to listen to for I/O. When it becomes available for any data the read event will be produced.</summary>
361 /// <value>A win32 object handle</value>
362     public System.IntPtr Win32 {
363         get { return GetWin32(); }
364         set { SetWin32( value); }
365     }
366     private static IntPtr GetEflClassStatic()
367     {
368         return Efl.LoopHandler.efl_loop_handler_class_get();
369     }
370 }
371 public class LoopHandlerNativeInherit : Efl.ObjectNativeInherit{
372     public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Ecore);
373     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
374     {
375         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
376         var methods = Efl.Eo.Globals.GetUserMethods(type);
377         if (efl_loop_handler_active_get_static_delegate == null)
378             efl_loop_handler_active_get_static_delegate = new efl_loop_handler_active_get_delegate(active_get);
379         if (methods.FirstOrDefault(m => m.Name == "GetActive") != null)
380             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_active_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_active_get_static_delegate)});
381         if (efl_loop_handler_active_set_static_delegate == null)
382             efl_loop_handler_active_set_static_delegate = new efl_loop_handler_active_set_delegate(active_set);
383         if (methods.FirstOrDefault(m => m.Name == "SetActive") != null)
384             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_active_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_active_set_static_delegate)});
385         if (efl_loop_handler_fd_get_static_delegate == null)
386             efl_loop_handler_fd_get_static_delegate = new efl_loop_handler_fd_get_delegate(fd_get);
387         if (methods.FirstOrDefault(m => m.Name == "GetFd") != null)
388             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_fd_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_get_static_delegate)});
389         if (efl_loop_handler_fd_set_static_delegate == null)
390             efl_loop_handler_fd_set_static_delegate = new efl_loop_handler_fd_set_delegate(fd_set);
391         if (methods.FirstOrDefault(m => m.Name == "SetFd") != null)
392             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_fd_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_set_static_delegate)});
393         if (efl_loop_handler_fd_file_get_static_delegate == null)
394             efl_loop_handler_fd_file_get_static_delegate = new efl_loop_handler_fd_file_get_delegate(fd_file_get);
395         if (methods.FirstOrDefault(m => m.Name == "GetFdFile") != null)
396             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_fd_file_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_file_get_static_delegate)});
397         if (efl_loop_handler_fd_file_set_static_delegate == null)
398             efl_loop_handler_fd_file_set_static_delegate = new efl_loop_handler_fd_file_set_delegate(fd_file_set);
399         if (methods.FirstOrDefault(m => m.Name == "SetFdFile") != null)
400             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_fd_file_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_file_set_static_delegate)});
401         if (efl_loop_handler_win32_get_static_delegate == null)
402             efl_loop_handler_win32_get_static_delegate = new efl_loop_handler_win32_get_delegate(win32_get);
403         if (methods.FirstOrDefault(m => m.Name == "GetWin32") != null)
404             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_win32_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_win32_get_static_delegate)});
405         if (efl_loop_handler_win32_set_static_delegate == null)
406             efl_loop_handler_win32_set_static_delegate = new efl_loop_handler_win32_set_delegate(win32_set);
407         if (methods.FirstOrDefault(m => m.Name == "SetWin32") != null)
408             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_handler_win32_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_win32_set_static_delegate)});
409         descs.AddRange(base.GetEoOps(type));
410         return descs;
411     }
412     public override IntPtr GetEflClass()
413     {
414         return Efl.LoopHandler.efl_loop_handler_class_get();
415     }
416     public static new  IntPtr GetEflClassStatic()
417     {
418         return Efl.LoopHandler.efl_loop_handler_class_get();
419     }
420
421
422      private delegate Efl.LoopHandlerFlags efl_loop_handler_active_get_delegate(System.IntPtr obj, System.IntPtr pd);
423
424
425      public delegate Efl.LoopHandlerFlags efl_loop_handler_active_get_api_delegate(System.IntPtr obj);
426      public static Efl.Eo.FunctionWrapper<efl_loop_handler_active_get_api_delegate> efl_loop_handler_active_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_active_get_api_delegate>(_Module, "efl_loop_handler_active_get");
427      private static Efl.LoopHandlerFlags active_get(System.IntPtr obj, System.IntPtr pd)
428     {
429         Eina.Log.Debug("function efl_loop_handler_active_get was called");
430         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
431         if(wrapper != null) {
432                         Efl.LoopHandlerFlags _ret_var = default(Efl.LoopHandlerFlags);
433             try {
434                 _ret_var = ((LoopHandler)wrapper).GetActive();
435             } catch (Exception e) {
436                 Eina.Log.Warning($"Callback error: {e.ToString()}");
437                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
438             }
439         return _ret_var;
440         } else {
441             return efl_loop_handler_active_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
442         }
443     }
444     private static efl_loop_handler_active_get_delegate efl_loop_handler_active_get_static_delegate;
445
446
447      private delegate void efl_loop_handler_active_set_delegate(System.IntPtr obj, System.IntPtr pd,   Efl.LoopHandlerFlags flags);
448
449
450      public delegate void efl_loop_handler_active_set_api_delegate(System.IntPtr obj,   Efl.LoopHandlerFlags flags);
451      public static Efl.Eo.FunctionWrapper<efl_loop_handler_active_set_api_delegate> efl_loop_handler_active_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_active_set_api_delegate>(_Module, "efl_loop_handler_active_set");
452      private static void active_set(System.IntPtr obj, System.IntPtr pd,  Efl.LoopHandlerFlags flags)
453     {
454         Eina.Log.Debug("function efl_loop_handler_active_set was called");
455         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
456         if(wrapper != null) {
457                                                 
458             try {
459                 ((LoopHandler)wrapper).SetActive( flags);
460             } catch (Exception e) {
461                 Eina.Log.Warning($"Callback error: {e.ToString()}");
462                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
463             }
464                                 } else {
465             efl_loop_handler_active_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  flags);
466         }
467     }
468     private static efl_loop_handler_active_set_delegate efl_loop_handler_active_set_static_delegate;
469
470
471      private delegate int efl_loop_handler_fd_get_delegate(System.IntPtr obj, System.IntPtr pd);
472
473
474      public delegate int efl_loop_handler_fd_get_api_delegate(System.IntPtr obj);
475      public static Efl.Eo.FunctionWrapper<efl_loop_handler_fd_get_api_delegate> efl_loop_handler_fd_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_fd_get_api_delegate>(_Module, "efl_loop_handler_fd_get");
476      private static int fd_get(System.IntPtr obj, System.IntPtr pd)
477     {
478         Eina.Log.Debug("function efl_loop_handler_fd_get was called");
479         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
480         if(wrapper != null) {
481                         int _ret_var = default(int);
482             try {
483                 _ret_var = ((LoopHandler)wrapper).GetFd();
484             } catch (Exception e) {
485                 Eina.Log.Warning($"Callback error: {e.ToString()}");
486                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
487             }
488         return _ret_var;
489         } else {
490             return efl_loop_handler_fd_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
491         }
492     }
493     private static efl_loop_handler_fd_get_delegate efl_loop_handler_fd_get_static_delegate;
494
495
496      private delegate void efl_loop_handler_fd_set_delegate(System.IntPtr obj, System.IntPtr pd,   int fd);
497
498
499      public delegate void efl_loop_handler_fd_set_api_delegate(System.IntPtr obj,   int fd);
500      public static Efl.Eo.FunctionWrapper<efl_loop_handler_fd_set_api_delegate> efl_loop_handler_fd_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_fd_set_api_delegate>(_Module, "efl_loop_handler_fd_set");
501      private static void fd_set(System.IntPtr obj, System.IntPtr pd,  int fd)
502     {
503         Eina.Log.Debug("function efl_loop_handler_fd_set was called");
504         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
505         if(wrapper != null) {
506                                                 
507             try {
508                 ((LoopHandler)wrapper).SetFd( fd);
509             } catch (Exception e) {
510                 Eina.Log.Warning($"Callback error: {e.ToString()}");
511                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
512             }
513                                 } else {
514             efl_loop_handler_fd_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  fd);
515         }
516     }
517     private static efl_loop_handler_fd_set_delegate efl_loop_handler_fd_set_static_delegate;
518
519
520      private delegate int efl_loop_handler_fd_file_get_delegate(System.IntPtr obj, System.IntPtr pd);
521
522
523      public delegate int efl_loop_handler_fd_file_get_api_delegate(System.IntPtr obj);
524      public static Efl.Eo.FunctionWrapper<efl_loop_handler_fd_file_get_api_delegate> efl_loop_handler_fd_file_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_fd_file_get_api_delegate>(_Module, "efl_loop_handler_fd_file_get");
525      private static int fd_file_get(System.IntPtr obj, System.IntPtr pd)
526     {
527         Eina.Log.Debug("function efl_loop_handler_fd_file_get was called");
528         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
529         if(wrapper != null) {
530                         int _ret_var = default(int);
531             try {
532                 _ret_var = ((LoopHandler)wrapper).GetFdFile();
533             } catch (Exception e) {
534                 Eina.Log.Warning($"Callback error: {e.ToString()}");
535                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
536             }
537         return _ret_var;
538         } else {
539             return efl_loop_handler_fd_file_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
540         }
541     }
542     private static efl_loop_handler_fd_file_get_delegate efl_loop_handler_fd_file_get_static_delegate;
543
544
545      private delegate void efl_loop_handler_fd_file_set_delegate(System.IntPtr obj, System.IntPtr pd,   int fd);
546
547
548      public delegate void efl_loop_handler_fd_file_set_api_delegate(System.IntPtr obj,   int fd);
549      public static Efl.Eo.FunctionWrapper<efl_loop_handler_fd_file_set_api_delegate> efl_loop_handler_fd_file_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_fd_file_set_api_delegate>(_Module, "efl_loop_handler_fd_file_set");
550      private static void fd_file_set(System.IntPtr obj, System.IntPtr pd,  int fd)
551     {
552         Eina.Log.Debug("function efl_loop_handler_fd_file_set was called");
553         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
554         if(wrapper != null) {
555                                                 
556             try {
557                 ((LoopHandler)wrapper).SetFdFile( fd);
558             } catch (Exception e) {
559                 Eina.Log.Warning($"Callback error: {e.ToString()}");
560                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
561             }
562                                 } else {
563             efl_loop_handler_fd_file_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  fd);
564         }
565     }
566     private static efl_loop_handler_fd_file_set_delegate efl_loop_handler_fd_file_set_static_delegate;
567
568
569      private delegate System.IntPtr efl_loop_handler_win32_get_delegate(System.IntPtr obj, System.IntPtr pd);
570
571
572      public delegate System.IntPtr efl_loop_handler_win32_get_api_delegate(System.IntPtr obj);
573      public static Efl.Eo.FunctionWrapper<efl_loop_handler_win32_get_api_delegate> efl_loop_handler_win32_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_win32_get_api_delegate>(_Module, "efl_loop_handler_win32_get");
574      private static System.IntPtr win32_get(System.IntPtr obj, System.IntPtr pd)
575     {
576         Eina.Log.Debug("function efl_loop_handler_win32_get was called");
577         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
578         if(wrapper != null) {
579                         System.IntPtr _ret_var = default(System.IntPtr);
580             try {
581                 _ret_var = ((LoopHandler)wrapper).GetWin32();
582             } catch (Exception e) {
583                 Eina.Log.Warning($"Callback error: {e.ToString()}");
584                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
585             }
586         return _ret_var;
587         } else {
588             return efl_loop_handler_win32_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
589         }
590     }
591     private static efl_loop_handler_win32_get_delegate efl_loop_handler_win32_get_static_delegate;
592
593
594      private delegate void efl_loop_handler_win32_set_delegate(System.IntPtr obj, System.IntPtr pd,   System.IntPtr handle);
595
596
597      public delegate void efl_loop_handler_win32_set_api_delegate(System.IntPtr obj,   System.IntPtr handle);
598      public static Efl.Eo.FunctionWrapper<efl_loop_handler_win32_set_api_delegate> efl_loop_handler_win32_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_handler_win32_set_api_delegate>(_Module, "efl_loop_handler_win32_set");
599      private static void win32_set(System.IntPtr obj, System.IntPtr pd,  System.IntPtr handle)
600     {
601         Eina.Log.Debug("function efl_loop_handler_win32_set was called");
602         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
603         if(wrapper != null) {
604                                                 
605             try {
606                 ((LoopHandler)wrapper).SetWin32( handle);
607             } catch (Exception e) {
608                 Eina.Log.Warning($"Callback error: {e.ToString()}");
609                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
610             }
611                                 } else {
612             efl_loop_handler_win32_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  handle);
613         }
614     }
615     private static efl_loop_handler_win32_set_delegate efl_loop_handler_win32_set_static_delegate;
616 }
617
618 namespace Efl { 
619 /// <summary>A set of flags that can be OR&apos;d together to indicate which are desired</summary>
620 public enum LoopHandlerFlags
621 {
622 /// <summary>No I/O is desired (generally useless)</summary>
623 None = 0,
624 /// <summary>Reading is desired</summary>
625 Read = 1,
626 /// <summary>Writing is desired</summary>
627 Write = 2,
628 /// <summary>Error channel input is desired</summary>
629 Error = 4,
630 }
631