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