c1cd505f84cdf5f7a127dac65393c113ccd5a6a3
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_loop.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 ///<summary>Event argument wrapper for event <see cref="Efl.Loop.ArgumentsEvt"/>.</summary>
11 public class LoopArgumentsEvt_Args : EventArgs {
12     ///<summary>Actual event payload.</summary>
13     public Efl.LoopArguments arg { get; set; }
14 }
15 /// <summary>The Efl Main Loop
16 /// The Efl main loop provides a clean and tiny event loop library with many modules to do lots of convenient things for a programmer, saving time and effort. It&apos;s lean and designed to work on anything from embedded systems all the way up to large and powerful multi-cpu workstations. The main loop has a number of primitives you can use. It serializes these and allows for greater responsiveness without the need for threads (or any other concurrency). However you can provide these if you need to.
17 /// (Since EFL 1.22)</summary>
18 [Efl.Loop.NativeMethods]
19 public abstract class Loop : Efl.Task, Efl.Eo.IWrapper
20 {
21     ///<summary>Pointer to the native class description.</summary>
22     public override System.IntPtr NativeClass
23     {
24         get
25         {
26             if (((object)this).GetType() == typeof(Loop))
27             {
28                 return GetEflClassStatic();
29             }
30             else
31             {
32                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33             }
34         }
35     }
36
37     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
38         efl_loop_class_get();
39     /// <summary>Initializes a new instance of the <see cref="Loop"/> class.</summary>
40     /// <param name="parent">Parent instance.</param>
41     public Loop(Efl.Object parent= null
42             ) : base(efl_loop_class_get(), typeof(Loop), parent)
43     {
44         FinishInstantiation();
45     }
46
47     /// <summary>Initializes a new instance of the <see cref="Loop"/> class.
48     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
49     /// <param name="raw">The native pointer to be wrapped.</param>
50     protected Loop(System.IntPtr raw) : base(raw)
51     {
52             }
53
54     [Efl.Eo.PrivateNativeClass]
55     private class LoopRealized : Loop
56     {
57         private LoopRealized(IntPtr ptr) : base(ptr)
58         {
59         }
60     }
61     /// <summary>Initializes a new instance of the <see cref="Loop"/> class.
62     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
63     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
64     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
65     /// <param name="parent">The Efl.Object parent of this instance.</param>
66     protected Loop(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
67     {
68     }
69
70     /// <summary>Verifies if the given object is equal to this one.</summary>
71     /// <param name="instance">The object to compare to.</param>
72     /// <returns>True if both objects point to the same native object.</returns>
73     public override bool Equals(object instance)
74     {
75         var other = instance as Efl.Object;
76         if (other == null)
77         {
78             return false;
79         }
80         return this.NativeHandle == other.NativeHandle;
81     }
82
83     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
84     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
85     public override int GetHashCode()
86     {
87         return this.NativeHandle.ToInt32();
88     }
89
90     /// <summary>Turns the native pointer into a string representation.</summary>
91     /// <returns>A string with the type and the native pointer for this object.</returns>
92     public override String ToString()
93     {
94         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
95     }
96
97     /// <summary>Event occurs once the main loop enters the idle state.
98     /// (Since EFL 1.22)</summary>
99     public event EventHandler IdleEnterEvt
100     {
101         add
102         {
103             lock (eventLock)
104             {
105                 var wRef = new WeakReference(this);
106                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
107                 {
108                     var obj = wRef.Target as Efl.Eo.IWrapper;
109                     if (obj != null)
110                     {
111                         EventArgs args = EventArgs.Empty;
112                         try
113                         {
114                             value?.Invoke(obj, args);
115                         }
116                         catch (Exception e)
117                         {
118                             Eina.Log.Error(e.ToString());
119                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
120                         }
121                     }
122                 };
123
124                 string key = "_EFL_LOOP_EVENT_IDLE_ENTER";
125                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
126             }
127         }
128
129         remove
130         {
131             lock (eventLock)
132             {
133                 string key = "_EFL_LOOP_EVENT_IDLE_ENTER";
134                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
135             }
136         }
137     }
138     ///<summary>Method to raise event IdleEnterEvt.</summary>
139     public void OnIdleEnterEvt(EventArgs e)
140     {
141         var key = "_EFL_LOOP_EVENT_IDLE_ENTER";
142         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
143         if (desc == IntPtr.Zero)
144         {
145             Eina.Log.Error($"Failed to get native event {key}");
146             return;
147         }
148
149         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
150     }
151     /// <summary>Event occurs once the main loop exits the idle state.
152     /// (Since EFL 1.22)</summary>
153     public event EventHandler IdleExitEvt
154     {
155         add
156         {
157             lock (eventLock)
158             {
159                 var wRef = new WeakReference(this);
160                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
161                 {
162                     var obj = wRef.Target as Efl.Eo.IWrapper;
163                     if (obj != null)
164                     {
165                         EventArgs args = EventArgs.Empty;
166                         try
167                         {
168                             value?.Invoke(obj, args);
169                         }
170                         catch (Exception e)
171                         {
172                             Eina.Log.Error(e.ToString());
173                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
174                         }
175                     }
176                 };
177
178                 string key = "_EFL_LOOP_EVENT_IDLE_EXIT";
179                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
180             }
181         }
182
183         remove
184         {
185             lock (eventLock)
186             {
187                 string key = "_EFL_LOOP_EVENT_IDLE_EXIT";
188                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
189             }
190         }
191     }
192     ///<summary>Method to raise event IdleExitEvt.</summary>
193     public void OnIdleExitEvt(EventArgs e)
194     {
195         var key = "_EFL_LOOP_EVENT_IDLE_EXIT";
196         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
197         if (desc == IntPtr.Zero)
198         {
199             Eina.Log.Error($"Failed to get native event {key}");
200             return;
201         }
202
203         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
204     }
205     /// <summary>Event occurs once the main loop is idle. If you keep listening on this event it may increase the burden on your CPU.
206     /// (Since EFL 1.22)</summary>
207     public event EventHandler IdleEvt
208     {
209         add
210         {
211             lock (eventLock)
212             {
213                 var wRef = new WeakReference(this);
214                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
215                 {
216                     var obj = wRef.Target as Efl.Eo.IWrapper;
217                     if (obj != null)
218                     {
219                         EventArgs args = EventArgs.Empty;
220                         try
221                         {
222                             value?.Invoke(obj, args);
223                         }
224                         catch (Exception e)
225                         {
226                             Eina.Log.Error(e.ToString());
227                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
228                         }
229                     }
230                 };
231
232                 string key = "_EFL_LOOP_EVENT_IDLE";
233                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
234             }
235         }
236
237         remove
238         {
239             lock (eventLock)
240             {
241                 string key = "_EFL_LOOP_EVENT_IDLE";
242                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
243             }
244         }
245     }
246     ///<summary>Method to raise event IdleEvt.</summary>
247     public void OnIdleEvt(EventArgs e)
248     {
249         var key = "_EFL_LOOP_EVENT_IDLE";
250         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
251         if (desc == IntPtr.Zero)
252         {
253             Eina.Log.Error($"Failed to get native event {key}");
254             return;
255         }
256
257         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
258     }
259     /// <summary>Event happens when args are provided to the loop by args_add().
260     /// (Since EFL 1.22)</summary>
261     public event EventHandler<Efl.LoopArgumentsEvt_Args> ArgumentsEvt
262     {
263         add
264         {
265             lock (eventLock)
266             {
267                 var wRef = new WeakReference(this);
268                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
269                 {
270                     var obj = wRef.Target as Efl.Eo.IWrapper;
271                     if (obj != null)
272                     {
273                                                 Efl.LoopArgumentsEvt_Args args = new Efl.LoopArgumentsEvt_Args();
274                         args.arg =  evt.Info;
275                         try
276                         {
277                             value?.Invoke(obj, args);
278                         }
279                         catch (Exception e)
280                         {
281                             Eina.Log.Error(e.ToString());
282                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
283                         }
284                     }
285                 };
286
287                 string key = "_EFL_LOOP_EVENT_ARGUMENTS";
288                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
289             }
290         }
291
292         remove
293         {
294             lock (eventLock)
295             {
296                 string key = "_EFL_LOOP_EVENT_ARGUMENTS";
297                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
298             }
299         }
300     }
301     ///<summary>Method to raise event ArgumentsEvt.</summary>
302     public void OnArgumentsEvt(Efl.LoopArgumentsEvt_Args e)
303     {
304         var key = "_EFL_LOOP_EVENT_ARGUMENTS";
305         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
306         if (desc == IntPtr.Zero)
307         {
308             Eina.Log.Error($"Failed to get native event {key}");
309             return;
310         }
311
312         IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
313         try
314         {
315             Marshal.StructureToPtr(e.arg, info, false);
316             Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
317         }
318         finally
319         {
320             Marshal.FreeHGlobal(info);
321         }
322     }
323     /// <summary>Event occurs multiple times per second. The exact tick is undefined and can be adjusted system wide.
324     /// (Since EFL 1.22)</summary>
325     public event EventHandler PollHighEvt
326     {
327         add
328         {
329             lock (eventLock)
330             {
331                 var wRef = new WeakReference(this);
332                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
333                 {
334                     var obj = wRef.Target as Efl.Eo.IWrapper;
335                     if (obj != null)
336                     {
337                         EventArgs args = EventArgs.Empty;
338                         try
339                         {
340                             value?.Invoke(obj, args);
341                         }
342                         catch (Exception e)
343                         {
344                             Eina.Log.Error(e.ToString());
345                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
346                         }
347                     }
348                 };
349
350                 string key = "_EFL_LOOP_EVENT_POLL_HIGH";
351                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
352             }
353         }
354
355         remove
356         {
357             lock (eventLock)
358             {
359                 string key = "_EFL_LOOP_EVENT_POLL_HIGH";
360                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
361             }
362         }
363     }
364     ///<summary>Method to raise event PollHighEvt.</summary>
365     public void OnPollHighEvt(EventArgs e)
366     {
367         var key = "_EFL_LOOP_EVENT_POLL_HIGH";
368         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
369         if (desc == IntPtr.Zero)
370         {
371             Eina.Log.Error($"Failed to get native event {key}");
372             return;
373         }
374
375         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
376     }
377     /// <summary>Event occurs multiple times per minute. The exact tick is undefined and can be adjusted system wide.
378     /// (Since EFL 1.22)</summary>
379     public event EventHandler PollMediumEvt
380     {
381         add
382         {
383             lock (eventLock)
384             {
385                 var wRef = new WeakReference(this);
386                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
387                 {
388                     var obj = wRef.Target as Efl.Eo.IWrapper;
389                     if (obj != null)
390                     {
391                         EventArgs args = EventArgs.Empty;
392                         try
393                         {
394                             value?.Invoke(obj, args);
395                         }
396                         catch (Exception e)
397                         {
398                             Eina.Log.Error(e.ToString());
399                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
400                         }
401                     }
402                 };
403
404                 string key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
405                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
406             }
407         }
408
409         remove
410         {
411             lock (eventLock)
412             {
413                 string key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
414                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
415             }
416         }
417     }
418     ///<summary>Method to raise event PollMediumEvt.</summary>
419     public void OnPollMediumEvt(EventArgs e)
420     {
421         var key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
422         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
423         if (desc == IntPtr.Zero)
424         {
425             Eina.Log.Error($"Failed to get native event {key}");
426             return;
427         }
428
429         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
430     }
431     /// <summary>Event occurs multiple times every 15 minutes. The exact tick is undefined and can be adjusted system wide.
432     /// (Since EFL 1.22)</summary>
433     public event EventHandler PollLowEvt
434     {
435         add
436         {
437             lock (eventLock)
438             {
439                 var wRef = new WeakReference(this);
440                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
441                 {
442                     var obj = wRef.Target as Efl.Eo.IWrapper;
443                     if (obj != null)
444                     {
445                         EventArgs args = EventArgs.Empty;
446                         try
447                         {
448                             value?.Invoke(obj, args);
449                         }
450                         catch (Exception e)
451                         {
452                             Eina.Log.Error(e.ToString());
453                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
454                         }
455                     }
456                 };
457
458                 string key = "_EFL_LOOP_EVENT_POLL_LOW";
459                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
460             }
461         }
462
463         remove
464         {
465             lock (eventLock)
466             {
467                 string key = "_EFL_LOOP_EVENT_POLL_LOW";
468                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
469             }
470         }
471     }
472     ///<summary>Method to raise event PollLowEvt.</summary>
473     public void OnPollLowEvt(EventArgs e)
474     {
475         var key = "_EFL_LOOP_EVENT_POLL_LOW";
476         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
477         if (desc == IntPtr.Zero)
478         {
479             Eina.Log.Error($"Failed to get native event {key}");
480             return;
481         }
482
483         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
484     }
485     /// <summary>Event occurs when the loop was requested to quit externally e.g. by a ctrl+c signal or a request from a parent loop/thread to have the child exit.
486     /// (Since EFL 1.22)</summary>
487     public event EventHandler QuitEvt
488     {
489         add
490         {
491             lock (eventLock)
492             {
493                 var wRef = new WeakReference(this);
494                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
495                 {
496                     var obj = wRef.Target as Efl.Eo.IWrapper;
497                     if (obj != null)
498                     {
499                         EventArgs args = EventArgs.Empty;
500                         try
501                         {
502                             value?.Invoke(obj, args);
503                         }
504                         catch (Exception e)
505                         {
506                             Eina.Log.Error(e.ToString());
507                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
508                         }
509                     }
510                 };
511
512                 string key = "_EFL_LOOP_EVENT_QUIT";
513                 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
514             }
515         }
516
517         remove
518         {
519             lock (eventLock)
520             {
521                 string key = "_EFL_LOOP_EVENT_QUIT";
522                 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
523             }
524         }
525     }
526     ///<summary>Method to raise event QuitEvt.</summary>
527     public void OnQuitEvt(EventArgs e)
528     {
529         var key = "_EFL_LOOP_EVENT_QUIT";
530         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
531         if (desc == IntPtr.Zero)
532         {
533             Eina.Log.Error($"Failed to get native event {key}");
534             return;
535         }
536
537         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
538     }
539     /// <summary>Slow down the loop execution by forcing sleep for a small period of time every time the loop iterates/loops.
540     /// (Since EFL 1.22)</summary>
541     /// <returns>Time to sleep for each &quot;loop iteration&quot;</returns>
542     virtual public double GetThrottle() {
543          var _ret_var = Efl.Loop.NativeMethods.efl_loop_throttle_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
544         Eina.Error.RaiseIfUnhandledException();
545         return _ret_var;
546  }
547     /// <summary>Slow down the loop execution by forcing sleep for a small period of time every time the loop iterates/loops.
548     /// (Since EFL 1.22)</summary>
549     /// <param name="amount">Time to sleep for each &quot;loop iteration&quot;</param>
550     virtual public void SetThrottle(double amount) {
551                                  Efl.Loop.NativeMethods.efl_loop_throttle_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),amount);
552         Eina.Error.RaiseIfUnhandledException();
553                          }
554     /// <summary>This gets the time that the main loop ceased waiting for timouts and/or events to come in or for signals or any other interrupt source. This should be considered a reference point for all time based activity that should calculate its timepoint from the return of ecore_loop_time_get(). Note that this time is meant to be used as relative to other times obtained on this run. If you need absolute time references, use a unix timestamp instead.
555     /// (Since EFL 1.22)</summary>
556     /// <returns>Time in seconds</returns>
557     virtual public double GetTime() {
558          var _ret_var = Efl.Loop.NativeMethods.efl_loop_time_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
559         Eina.Error.RaiseIfUnhandledException();
560         return _ret_var;
561  }
562     /// <summary>You should never need/call this, unless you are implementing a custom tick source for an animator.
563     /// Note: The time point must match whatever zero time you get from ecore_time_get() and <see cref="Efl.Loop.GetTime"/> (same 0 point). What this point is is undefined, so unless your source uses the same 0 time, then you may have to adjust and do some guessing.
564     /// (Since EFL 1.22)</summary>
565     /// <param name="timepoint">Time in seconds</param>
566     virtual public void SetTime(double timepoint) {
567                                  Efl.Loop.NativeMethods.efl_loop_time_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),timepoint);
568         Eina.Error.RaiseIfUnhandledException();
569                          }
570     /// <summary>Runs a single iteration of the main loop to process everything on the queue.
571     /// (Since EFL 1.22)</summary>
572     virtual public void Iterate() {
573          Efl.Loop.NativeMethods.efl_loop_iterate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
574         Eina.Error.RaiseIfUnhandledException();
575          }
576     /// <summary>Runs a single iteration of the main loop to process everything on the queue with block/non-blocking status.
577     /// (Since EFL 1.22)</summary>
578     /// <param name="may_block">A flag if the main loop has a possibility of blocking.</param>
579     /// <returns>Return from single iteration run</returns>
580     virtual public int IterateMayBlock(int may_block) {
581                                  var _ret_var = Efl.Loop.NativeMethods.efl_loop_iterate_may_block_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),may_block);
582         Eina.Error.RaiseIfUnhandledException();
583                         return _ret_var;
584  }
585     /// <summary>Runs the application main loop.
586     /// (Since EFL 1.22)</summary>
587     /// <returns>Value set by quit()</returns>
588     virtual public Eina.Value Begin() {
589          var _ret_var = Efl.Loop.NativeMethods.efl_loop_begin_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
590         Eina.Error.RaiseIfUnhandledException();
591         return _ret_var;
592  }
593     /// <summary>Quits the main loop once all the events currently on the queue have been processed.
594     /// (Since EFL 1.22)</summary>
595     /// <param name="exit_code">Returned value by begin()</param>
596     virtual public void Quit(Eina.Value exit_code) {
597          var _in_exit_code = exit_code.GetNative();
598                         Efl.Loop.NativeMethods.efl_loop_quit_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),_in_exit_code);
599         Eina.Error.RaiseIfUnhandledException();
600                          }
601     /// <summary>A future promise that will be resolved from a clean main loop context as soon as possible.
602     /// This has higher priority, for low priority use <see cref="Efl.Loop.Idle"/>
603     /// (Since EFL 1.22)</summary>
604     /// <returns>The future handle.</returns>
605     virtual public  Eina.Future Job() {
606          var _ret_var = Efl.Loop.NativeMethods.efl_loop_job_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
607         Eina.Error.RaiseIfUnhandledException();
608         return _ret_var;
609  }
610     /// <summary>A future promise that will be resolved from a clean main loop context as soon as the main loop is idle.
611     /// This is a low priority version of <see cref="Efl.Loop.Job"/>
612     /// (Since EFL 1.22)</summary>
613     /// <returns>The future handle.</returns>
614     virtual public  Eina.Future Idle() {
615          var _ret_var = Efl.Loop.NativeMethods.efl_loop_idle_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
616         Eina.Error.RaiseIfUnhandledException();
617         return _ret_var;
618  }
619     /// <summary>A future promise that will be resolved from a clean main loop context after <c>time</c> seconds.
620     /// (Since EFL 1.22)</summary>
621     /// <param name="time">The time from now in second that the main loop will wait before triggering it.</param>
622     /// <returns>The future handle.</returns>
623     virtual public  Eina.Future Timeout(double time) {
624                                  var _ret_var = Efl.Loop.NativeMethods.efl_loop_timeout_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),time);
625         Eina.Error.RaiseIfUnhandledException();
626                         return _ret_var;
627  }
628     /// <summary>Will register a manager of a specific class to be answered by eo.provider_find.
629     /// (Since EFL 1.22)</summary>
630     /// <param name="klass">The class provided by the registered provider.</param>
631     /// <param name="provider">The provider for the newly registered class that has to provide that said Efl.Class.</param>
632     /// <returns><c>true</c> if successfully register, <c>false</c> otherwise.</returns>
633     virtual public bool Register(Type klass, Efl.Object provider) {
634                                                          var _ret_var = Efl.Loop.NativeMethods.efl_loop_register_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),klass, provider);
635         Eina.Error.RaiseIfUnhandledException();
636                                         return _ret_var;
637  }
638     /// <summary>Will unregister a manager of a specific class that was previously registered and answered by eo.provider_find.
639     /// (Since EFL 1.22)</summary>
640     /// <param name="klass">The class provided by the provider to unregister for.</param>
641     /// <param name="provider">The provider for the registered class to unregister.</param>
642     /// <returns><c>true</c> if successfully unregistered, <c>false</c> otherwise.</returns>
643     virtual public bool Unregister(Type klass, Efl.Object provider) {
644                                                          var _ret_var = Efl.Loop.NativeMethods.efl_loop_unregister_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),klass, provider);
645         Eina.Error.RaiseIfUnhandledException();
646                                         return _ret_var;
647  }
648     public System.Threading.Tasks.Task<Eina.Value> JobAsync( System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
649     {
650         Eina.Future future = Job();
651         return Efl.Eo.Globals.WrapAsync(future, token);
652     }
653     public System.Threading.Tasks.Task<Eina.Value> IdleAsync( System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
654     {
655         Eina.Future future = Idle();
656         return Efl.Eo.Globals.WrapAsync(future, token);
657     }
658     public System.Threading.Tasks.Task<Eina.Value> TimeoutAsync(double time, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
659     {
660         Eina.Future future = Timeout( time);
661         return Efl.Eo.Globals.WrapAsync(future, token);
662     }
663     /// <summary>Slow down the loop execution by forcing sleep for a small period of time every time the loop iterates/loops.
664 /// (Since EFL 1.22)</summary>
665 /// <value>Time to sleep for each &quot;loop iteration&quot;</value>
666     public double Throttle {
667         get { return GetThrottle(); }
668         set { SetThrottle(value); }
669     }
670     /// <summary>Retrieves the time at which the last loop stopped waiting for timeouts or events.
671 /// (Since EFL 1.22)</summary>
672 /// <value>Time in seconds</value>
673     public double Time {
674         get { return GetTime(); }
675         set { SetTime(value); }
676     }
677     private static IntPtr GetEflClassStatic()
678     {
679         return Efl.Loop.efl_loop_class_get();
680     }
681     /// <summary>Wrapper for native methods and virtual method delegates.
682     /// For internal use by generated code only.</summary>
683     public new class NativeMethods : Efl.Task.NativeMethods
684     {
685         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Ecore);
686         /// <summary>Gets the list of Eo operations to override.</summary>
687         /// <returns>The list of Eo operations to be overload.</returns>
688         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
689         {
690             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
691             var methods = Efl.Eo.Globals.GetUserMethods(type);
692
693             if (efl_loop_throttle_get_static_delegate == null)
694             {
695                 efl_loop_throttle_get_static_delegate = new efl_loop_throttle_get_delegate(throttle_get);
696             }
697
698             if (methods.FirstOrDefault(m => m.Name == "GetThrottle") != null)
699             {
700                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_throttle_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_throttle_get_static_delegate) });
701             }
702
703             if (efl_loop_throttle_set_static_delegate == null)
704             {
705                 efl_loop_throttle_set_static_delegate = new efl_loop_throttle_set_delegate(throttle_set);
706             }
707
708             if (methods.FirstOrDefault(m => m.Name == "SetThrottle") != null)
709             {
710                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_throttle_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_throttle_set_static_delegate) });
711             }
712
713             if (efl_loop_time_get_static_delegate == null)
714             {
715                 efl_loop_time_get_static_delegate = new efl_loop_time_get_delegate(time_get);
716             }
717
718             if (methods.FirstOrDefault(m => m.Name == "GetTime") != null)
719             {
720                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_time_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_time_get_static_delegate) });
721             }
722
723             if (efl_loop_time_set_static_delegate == null)
724             {
725                 efl_loop_time_set_static_delegate = new efl_loop_time_set_delegate(time_set);
726             }
727
728             if (methods.FirstOrDefault(m => m.Name == "SetTime") != null)
729             {
730                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_time_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_time_set_static_delegate) });
731             }
732
733             if (efl_loop_iterate_static_delegate == null)
734             {
735                 efl_loop_iterate_static_delegate = new efl_loop_iterate_delegate(iterate);
736             }
737
738             if (methods.FirstOrDefault(m => m.Name == "Iterate") != null)
739             {
740                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_iterate_static_delegate) });
741             }
742
743             if (efl_loop_iterate_may_block_static_delegate == null)
744             {
745                 efl_loop_iterate_may_block_static_delegate = new efl_loop_iterate_may_block_delegate(iterate_may_block);
746             }
747
748             if (methods.FirstOrDefault(m => m.Name == "IterateMayBlock") != null)
749             {
750                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_iterate_may_block"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_iterate_may_block_static_delegate) });
751             }
752
753             if (efl_loop_begin_static_delegate == null)
754             {
755                 efl_loop_begin_static_delegate = new efl_loop_begin_delegate(begin);
756             }
757
758             if (methods.FirstOrDefault(m => m.Name == "Begin") != null)
759             {
760                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_begin"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_begin_static_delegate) });
761             }
762
763             if (efl_loop_quit_static_delegate == null)
764             {
765                 efl_loop_quit_static_delegate = new efl_loop_quit_delegate(quit);
766             }
767
768             if (methods.FirstOrDefault(m => m.Name == "Quit") != null)
769             {
770                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_quit"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_quit_static_delegate) });
771             }
772
773             if (efl_loop_job_static_delegate == null)
774             {
775                 efl_loop_job_static_delegate = new efl_loop_job_delegate(job);
776             }
777
778             if (methods.FirstOrDefault(m => m.Name == "Job") != null)
779             {
780                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_job"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_job_static_delegate) });
781             }
782
783             if (efl_loop_idle_static_delegate == null)
784             {
785                 efl_loop_idle_static_delegate = new efl_loop_idle_delegate(idle);
786             }
787
788             if (methods.FirstOrDefault(m => m.Name == "Idle") != null)
789             {
790                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_idle"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_idle_static_delegate) });
791             }
792
793             if (efl_loop_timeout_static_delegate == null)
794             {
795                 efl_loop_timeout_static_delegate = new efl_loop_timeout_delegate(timeout);
796             }
797
798             if (methods.FirstOrDefault(m => m.Name == "Timeout") != null)
799             {
800                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_timeout"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timeout_static_delegate) });
801             }
802
803             if (efl_loop_register_static_delegate == null)
804             {
805                 efl_loop_register_static_delegate = new efl_loop_register_delegate(register);
806             }
807
808             if (methods.FirstOrDefault(m => m.Name == "Register") != null)
809             {
810                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_register"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_register_static_delegate) });
811             }
812
813             if (efl_loop_unregister_static_delegate == null)
814             {
815                 efl_loop_unregister_static_delegate = new efl_loop_unregister_delegate(unregister);
816             }
817
818             if (methods.FirstOrDefault(m => m.Name == "Unregister") != null)
819             {
820                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_unregister"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_unregister_static_delegate) });
821             }
822
823             descs.AddRange(base.GetEoOps(type));
824             return descs;
825         }
826         /// <summary>Returns the Eo class for the native methods of this class.</summary>
827         /// <returns>The native class pointer.</returns>
828         public override IntPtr GetEflClass()
829         {
830             return Efl.Loop.efl_loop_class_get();
831         }
832
833         #pragma warning disable CA1707, SA1300, SA1600
834
835         
836         private delegate double efl_loop_throttle_get_delegate(System.IntPtr obj, System.IntPtr pd);
837
838         
839         public delegate double efl_loop_throttle_get_api_delegate(System.IntPtr obj);
840
841         public static Efl.Eo.FunctionWrapper<efl_loop_throttle_get_api_delegate> efl_loop_throttle_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_throttle_get_api_delegate>(Module, "efl_loop_throttle_get");
842
843         private static double throttle_get(System.IntPtr obj, System.IntPtr pd)
844         {
845             Eina.Log.Debug("function efl_loop_throttle_get was called");
846             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
847             if (wrapper != null)
848             {
849             double _ret_var = default(double);
850                 try
851                 {
852                     _ret_var = ((Loop)wrapper).GetThrottle();
853                 }
854                 catch (Exception e)
855                 {
856                     Eina.Log.Warning($"Callback error: {e.ToString()}");
857                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
858                 }
859
860         return _ret_var;
861
862             }
863             else
864             {
865                 return efl_loop_throttle_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
866             }
867         }
868
869         private static efl_loop_throttle_get_delegate efl_loop_throttle_get_static_delegate;
870
871         
872         private delegate void efl_loop_throttle_set_delegate(System.IntPtr obj, System.IntPtr pd,  double amount);
873
874         
875         public delegate void efl_loop_throttle_set_api_delegate(System.IntPtr obj,  double amount);
876
877         public static Efl.Eo.FunctionWrapper<efl_loop_throttle_set_api_delegate> efl_loop_throttle_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_throttle_set_api_delegate>(Module, "efl_loop_throttle_set");
878
879         private static void throttle_set(System.IntPtr obj, System.IntPtr pd, double amount)
880         {
881             Eina.Log.Debug("function efl_loop_throttle_set was called");
882             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
883             if (wrapper != null)
884             {
885                                     
886                 try
887                 {
888                     ((Loop)wrapper).SetThrottle(amount);
889                 }
890                 catch (Exception e)
891                 {
892                     Eina.Log.Warning($"Callback error: {e.ToString()}");
893                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
894                 }
895
896                         
897             }
898             else
899             {
900                 efl_loop_throttle_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), amount);
901             }
902         }
903
904         private static efl_loop_throttle_set_delegate efl_loop_throttle_set_static_delegate;
905
906         
907         private delegate double efl_loop_time_get_delegate(System.IntPtr obj, System.IntPtr pd);
908
909         
910         public delegate double efl_loop_time_get_api_delegate(System.IntPtr obj);
911
912         public static Efl.Eo.FunctionWrapper<efl_loop_time_get_api_delegate> efl_loop_time_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_time_get_api_delegate>(Module, "efl_loop_time_get");
913
914         private static double time_get(System.IntPtr obj, System.IntPtr pd)
915         {
916             Eina.Log.Debug("function efl_loop_time_get was called");
917             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
918             if (wrapper != null)
919             {
920             double _ret_var = default(double);
921                 try
922                 {
923                     _ret_var = ((Loop)wrapper).GetTime();
924                 }
925                 catch (Exception e)
926                 {
927                     Eina.Log.Warning($"Callback error: {e.ToString()}");
928                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
929                 }
930
931         return _ret_var;
932
933             }
934             else
935             {
936                 return efl_loop_time_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
937             }
938         }
939
940         private static efl_loop_time_get_delegate efl_loop_time_get_static_delegate;
941
942         
943         private delegate void efl_loop_time_set_delegate(System.IntPtr obj, System.IntPtr pd,  double timepoint);
944
945         
946         public delegate void efl_loop_time_set_api_delegate(System.IntPtr obj,  double timepoint);
947
948         public static Efl.Eo.FunctionWrapper<efl_loop_time_set_api_delegate> efl_loop_time_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_time_set_api_delegate>(Module, "efl_loop_time_set");
949
950         private static void time_set(System.IntPtr obj, System.IntPtr pd, double timepoint)
951         {
952             Eina.Log.Debug("function efl_loop_time_set was called");
953             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
954             if (wrapper != null)
955             {
956                                     
957                 try
958                 {
959                     ((Loop)wrapper).SetTime(timepoint);
960                 }
961                 catch (Exception e)
962                 {
963                     Eina.Log.Warning($"Callback error: {e.ToString()}");
964                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
965                 }
966
967                         
968             }
969             else
970             {
971                 efl_loop_time_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), timepoint);
972             }
973         }
974
975         private static efl_loop_time_set_delegate efl_loop_time_set_static_delegate;
976
977         
978         private delegate void efl_loop_iterate_delegate(System.IntPtr obj, System.IntPtr pd);
979
980         
981         public delegate void efl_loop_iterate_api_delegate(System.IntPtr obj);
982
983         public static Efl.Eo.FunctionWrapper<efl_loop_iterate_api_delegate> efl_loop_iterate_ptr = new Efl.Eo.FunctionWrapper<efl_loop_iterate_api_delegate>(Module, "efl_loop_iterate");
984
985         private static void iterate(System.IntPtr obj, System.IntPtr pd)
986         {
987             Eina.Log.Debug("function efl_loop_iterate was called");
988             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
989             if (wrapper != null)
990             {
991             
992                 try
993                 {
994                     ((Loop)wrapper).Iterate();
995                 }
996                 catch (Exception e)
997                 {
998                     Eina.Log.Warning($"Callback error: {e.ToString()}");
999                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1000                 }
1001
1002         
1003             }
1004             else
1005             {
1006                 efl_loop_iterate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1007             }
1008         }
1009
1010         private static efl_loop_iterate_delegate efl_loop_iterate_static_delegate;
1011
1012         
1013         private delegate int efl_loop_iterate_may_block_delegate(System.IntPtr obj, System.IntPtr pd,  int may_block);
1014
1015         
1016         public delegate int efl_loop_iterate_may_block_api_delegate(System.IntPtr obj,  int may_block);
1017
1018         public static Efl.Eo.FunctionWrapper<efl_loop_iterate_may_block_api_delegate> efl_loop_iterate_may_block_ptr = new Efl.Eo.FunctionWrapper<efl_loop_iterate_may_block_api_delegate>(Module, "efl_loop_iterate_may_block");
1019
1020         private static int iterate_may_block(System.IntPtr obj, System.IntPtr pd, int may_block)
1021         {
1022             Eina.Log.Debug("function efl_loop_iterate_may_block was called");
1023             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1024             if (wrapper != null)
1025             {
1026                                     int _ret_var = default(int);
1027                 try
1028                 {
1029                     _ret_var = ((Loop)wrapper).IterateMayBlock(may_block);
1030                 }
1031                 catch (Exception e)
1032                 {
1033                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1034                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1035                 }
1036
1037                         return _ret_var;
1038
1039             }
1040             else
1041             {
1042                 return efl_loop_iterate_may_block_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), may_block);
1043             }
1044         }
1045
1046         private static efl_loop_iterate_may_block_delegate efl_loop_iterate_may_block_static_delegate;
1047
1048         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
1049         private delegate Eina.Value efl_loop_begin_delegate(System.IntPtr obj, System.IntPtr pd);
1050
1051         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
1052         public delegate Eina.Value efl_loop_begin_api_delegate(System.IntPtr obj);
1053
1054         public static Efl.Eo.FunctionWrapper<efl_loop_begin_api_delegate> efl_loop_begin_ptr = new Efl.Eo.FunctionWrapper<efl_loop_begin_api_delegate>(Module, "efl_loop_begin");
1055
1056         private static Eina.Value begin(System.IntPtr obj, System.IntPtr pd)
1057         {
1058             Eina.Log.Debug("function efl_loop_begin was called");
1059             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1060             if (wrapper != null)
1061             {
1062             Eina.Value _ret_var = default(Eina.Value);
1063                 try
1064                 {
1065                     _ret_var = ((Loop)wrapper).Begin();
1066                 }
1067                 catch (Exception e)
1068                 {
1069                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1070                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1071                 }
1072
1073         return _ret_var;
1074
1075             }
1076             else
1077             {
1078                 return efl_loop_begin_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1079             }
1080         }
1081
1082         private static efl_loop_begin_delegate efl_loop_begin_static_delegate;
1083
1084         
1085         private delegate void efl_loop_quit_delegate(System.IntPtr obj, System.IntPtr pd,  Eina.ValueNative exit_code);
1086
1087         
1088         public delegate void efl_loop_quit_api_delegate(System.IntPtr obj,  Eina.ValueNative exit_code);
1089
1090         public static Efl.Eo.FunctionWrapper<efl_loop_quit_api_delegate> efl_loop_quit_ptr = new Efl.Eo.FunctionWrapper<efl_loop_quit_api_delegate>(Module, "efl_loop_quit");
1091
1092         private static void quit(System.IntPtr obj, System.IntPtr pd, Eina.ValueNative exit_code)
1093         {
1094             Eina.Log.Debug("function efl_loop_quit was called");
1095             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1096             if (wrapper != null)
1097             {
1098         var _in_exit_code = new Eina.Value(exit_code);
1099                             
1100                 try
1101                 {
1102                     ((Loop)wrapper).Quit(_in_exit_code);
1103                 }
1104                 catch (Exception e)
1105                 {
1106                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1107                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1108                 }
1109
1110                         
1111             }
1112             else
1113             {
1114                 efl_loop_quit_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), exit_code);
1115             }
1116         }
1117
1118         private static efl_loop_quit_delegate efl_loop_quit_static_delegate;
1119
1120         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1121         private delegate  Eina.Future efl_loop_job_delegate(System.IntPtr obj, System.IntPtr pd);
1122
1123         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1124         public delegate  Eina.Future efl_loop_job_api_delegate(System.IntPtr obj);
1125
1126         public static Efl.Eo.FunctionWrapper<efl_loop_job_api_delegate> efl_loop_job_ptr = new Efl.Eo.FunctionWrapper<efl_loop_job_api_delegate>(Module, "efl_loop_job");
1127
1128         private static  Eina.Future job(System.IntPtr obj, System.IntPtr pd)
1129         {
1130             Eina.Log.Debug("function efl_loop_job was called");
1131             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1132             if (wrapper != null)
1133             {
1134              Eina.Future _ret_var = default( Eina.Future);
1135                 try
1136                 {
1137                     _ret_var = ((Loop)wrapper).Job();
1138                 }
1139                 catch (Exception e)
1140                 {
1141                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1142                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1143                 }
1144
1145         return _ret_var;
1146
1147             }
1148             else
1149             {
1150                 return efl_loop_job_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1151             }
1152         }
1153
1154         private static efl_loop_job_delegate efl_loop_job_static_delegate;
1155
1156         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1157         private delegate  Eina.Future efl_loop_idle_delegate(System.IntPtr obj, System.IntPtr pd);
1158
1159         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1160         public delegate  Eina.Future efl_loop_idle_api_delegate(System.IntPtr obj);
1161
1162         public static Efl.Eo.FunctionWrapper<efl_loop_idle_api_delegate> efl_loop_idle_ptr = new Efl.Eo.FunctionWrapper<efl_loop_idle_api_delegate>(Module, "efl_loop_idle");
1163
1164         private static  Eina.Future idle(System.IntPtr obj, System.IntPtr pd)
1165         {
1166             Eina.Log.Debug("function efl_loop_idle was called");
1167             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1168             if (wrapper != null)
1169             {
1170              Eina.Future _ret_var = default( Eina.Future);
1171                 try
1172                 {
1173                     _ret_var = ((Loop)wrapper).Idle();
1174                 }
1175                 catch (Exception e)
1176                 {
1177                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1178                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1179                 }
1180
1181         return _ret_var;
1182
1183             }
1184             else
1185             {
1186                 return efl_loop_idle_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1187             }
1188         }
1189
1190         private static efl_loop_idle_delegate efl_loop_idle_static_delegate;
1191
1192         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1193         private delegate  Eina.Future efl_loop_timeout_delegate(System.IntPtr obj, System.IntPtr pd,  double time);
1194
1195         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1196         public delegate  Eina.Future efl_loop_timeout_api_delegate(System.IntPtr obj,  double time);
1197
1198         public static Efl.Eo.FunctionWrapper<efl_loop_timeout_api_delegate> efl_loop_timeout_ptr = new Efl.Eo.FunctionWrapper<efl_loop_timeout_api_delegate>(Module, "efl_loop_timeout");
1199
1200         private static  Eina.Future timeout(System.IntPtr obj, System.IntPtr pd, double time)
1201         {
1202             Eina.Log.Debug("function efl_loop_timeout was called");
1203             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1204             if (wrapper != null)
1205             {
1206                                      Eina.Future _ret_var = default( Eina.Future);
1207                 try
1208                 {
1209                     _ret_var = ((Loop)wrapper).Timeout(time);
1210                 }
1211                 catch (Exception e)
1212                 {
1213                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1214                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1215                 }
1216
1217                         return _ret_var;
1218
1219             }
1220             else
1221             {
1222                 return efl_loop_timeout_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), time);
1223             }
1224         }
1225
1226         private static efl_loop_timeout_delegate efl_loop_timeout_static_delegate;
1227
1228         [return: MarshalAs(UnmanagedType.U1)]
1229         private delegate bool efl_loop_register_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object provider);
1230
1231         [return: MarshalAs(UnmanagedType.U1)]
1232         public delegate bool efl_loop_register_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object provider);
1233
1234         public static Efl.Eo.FunctionWrapper<efl_loop_register_api_delegate> efl_loop_register_ptr = new Efl.Eo.FunctionWrapper<efl_loop_register_api_delegate>(Module, "efl_loop_register");
1235
1236         private static bool register(System.IntPtr obj, System.IntPtr pd, Type klass, Efl.Object provider)
1237         {
1238             Eina.Log.Debug("function efl_loop_register was called");
1239             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1240             if (wrapper != null)
1241             {
1242                                                             bool _ret_var = default(bool);
1243                 try
1244                 {
1245                     _ret_var = ((Loop)wrapper).Register(klass, provider);
1246                 }
1247                 catch (Exception e)
1248                 {
1249                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1250                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1251                 }
1252
1253                                         return _ret_var;
1254
1255             }
1256             else
1257             {
1258                 return efl_loop_register_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass, provider);
1259             }
1260         }
1261
1262         private static efl_loop_register_delegate efl_loop_register_static_delegate;
1263
1264         [return: MarshalAs(UnmanagedType.U1)]
1265         private delegate bool efl_loop_unregister_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object provider);
1266
1267         [return: MarshalAs(UnmanagedType.U1)]
1268         public delegate bool efl_loop_unregister_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object provider);
1269
1270         public static Efl.Eo.FunctionWrapper<efl_loop_unregister_api_delegate> efl_loop_unregister_ptr = new Efl.Eo.FunctionWrapper<efl_loop_unregister_api_delegate>(Module, "efl_loop_unregister");
1271
1272         private static bool unregister(System.IntPtr obj, System.IntPtr pd, Type klass, Efl.Object provider)
1273         {
1274             Eina.Log.Debug("function efl_loop_unregister was called");
1275             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1276             if (wrapper != null)
1277             {
1278                                                             bool _ret_var = default(bool);
1279                 try
1280                 {
1281                     _ret_var = ((Loop)wrapper).Unregister(klass, provider);
1282                 }
1283                 catch (Exception e)
1284                 {
1285                     Eina.Log.Warning($"Callback error: {e.ToString()}");
1286                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1287                 }
1288
1289                                         return _ret_var;
1290
1291             }
1292             else
1293             {
1294                 return efl_loop_unregister_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass, provider);
1295             }
1296         }
1297
1298         private static efl_loop_unregister_delegate efl_loop_unregister_static_delegate;
1299
1300         #pragma warning restore CA1707, SA1300, SA1600
1301
1302 }
1303 }
1304 }
1305
1306 namespace Efl {
1307
1308 /// <summary>EFL loop arguments data structure
1309 /// (Since EFL 1.22)</summary>
1310 [StructLayout(LayoutKind.Sequential)]
1311 public struct LoopArguments
1312 {
1313     /// <summary>Array with loop arguments</summary>
1314     public Eina.Array<System.String> Argv;
1315     /// <summary>Set to <c>true</c> when the program should initialize its internal state. This happen once per process instance.</summary>
1316     public bool Initialization;
1317     ///<summary>Constructor for LoopArguments.</summary>
1318     public LoopArguments(
1319         Eina.Array<System.String> Argv = default(Eina.Array<System.String>),
1320         bool Initialization = default(bool)    )
1321     {
1322         this.Argv = Argv;
1323         this.Initialization = Initialization;
1324     }
1325
1326     public static implicit operator LoopArguments(IntPtr ptr)
1327     {
1328         var tmp = (LoopArguments.NativeStruct)Marshal.PtrToStructure(ptr, typeof(LoopArguments.NativeStruct));
1329         return tmp;
1330     }
1331
1332     ///<summary>Internal wrapper for struct LoopArguments.</summary>
1333     [StructLayout(LayoutKind.Sequential)]
1334     public struct NativeStruct
1335     {
1336         
1337         public System.IntPtr Argv;
1338         ///<summary>Internal wrapper for field Initialization</summary>
1339         public System.Byte Initialization;
1340         ///<summary>Implicit conversion to the internal/marshalling representation.</summary>
1341         public static implicit operator LoopArguments.NativeStruct(LoopArguments _external_struct)
1342         {
1343             var _internal_struct = new LoopArguments.NativeStruct();
1344             _internal_struct.Argv = _external_struct.Argv.Handle;
1345             _internal_struct.Initialization = _external_struct.Initialization ? (byte)1 : (byte)0;
1346             return _internal_struct;
1347         }
1348
1349         ///<summary>Implicit conversion to the managed representation.</summary>
1350         public static implicit operator LoopArguments(LoopArguments.NativeStruct _internal_struct)
1351         {
1352             var _external_struct = new LoopArguments();
1353             _external_struct.Argv = new Eina.Array<System.String>(_internal_struct.Argv, false, false);
1354             _external_struct.Initialization = _internal_struct.Initialization != 0;
1355             return _external_struct;
1356         }
1357
1358     }
1359
1360 }
1361
1362 }
1363