1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
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; }
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'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
21 ///<summary>Pointer to the native class description.</summary>
22 public override System.IntPtr NativeClass
26 if (((object)this).GetType() == typeof(Loop))
28 return GetEflClassStatic();
32 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
37 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
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)
44 FinishInstantiation();
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)
54 [Efl.Eo.PrivateNativeClass]
55 private class LoopRealized : Loop
57 private LoopRealized(IntPtr ptr) : base(ptr)
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)
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)
75 var other = instance as Efl.Object;
80 return this.NativeHandle == other.NativeHandle;
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()
87 return this.NativeHandle.ToInt32();
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()
94 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
97 /// <summary>Event occurs once the main loop enters the idle state.
98 /// (Since EFL 1.22)</summary>
99 public event EventHandler IdleEnterEvt
105 var wRef = new WeakReference(this);
106 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
108 var obj = wRef.Target as Efl.Eo.IWrapper;
111 EventArgs args = EventArgs.Empty;
114 value?.Invoke(obj, args);
118 Eina.Log.Error(e.ToString());
119 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
124 string key = "_EFL_LOOP_EVENT_IDLE_ENTER";
125 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
133 string key = "_EFL_LOOP_EVENT_IDLE_ENTER";
134 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
138 ///<summary>Method to raise event IdleEnterEvt.</summary>
139 public void OnIdleEnterEvt(EventArgs e)
141 var key = "_EFL_LOOP_EVENT_IDLE_ENTER";
142 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
143 if (desc == IntPtr.Zero)
145 Eina.Log.Error($"Failed to get native event {key}");
149 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
151 /// <summary>Event occurs once the main loop exits the idle state.
152 /// (Since EFL 1.22)</summary>
153 public event EventHandler IdleExitEvt
159 var wRef = new WeakReference(this);
160 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
162 var obj = wRef.Target as Efl.Eo.IWrapper;
165 EventArgs args = EventArgs.Empty;
168 value?.Invoke(obj, args);
172 Eina.Log.Error(e.ToString());
173 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
178 string key = "_EFL_LOOP_EVENT_IDLE_EXIT";
179 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
187 string key = "_EFL_LOOP_EVENT_IDLE_EXIT";
188 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
192 ///<summary>Method to raise event IdleExitEvt.</summary>
193 public void OnIdleExitEvt(EventArgs e)
195 var key = "_EFL_LOOP_EVENT_IDLE_EXIT";
196 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
197 if (desc == IntPtr.Zero)
199 Eina.Log.Error($"Failed to get native event {key}");
203 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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
213 var wRef = new WeakReference(this);
214 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
216 var obj = wRef.Target as Efl.Eo.IWrapper;
219 EventArgs args = EventArgs.Empty;
222 value?.Invoke(obj, args);
226 Eina.Log.Error(e.ToString());
227 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
232 string key = "_EFL_LOOP_EVENT_IDLE";
233 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
241 string key = "_EFL_LOOP_EVENT_IDLE";
242 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
246 ///<summary>Method to raise event IdleEvt.</summary>
247 public void OnIdleEvt(EventArgs e)
249 var key = "_EFL_LOOP_EVENT_IDLE";
250 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
251 if (desc == IntPtr.Zero)
253 Eina.Log.Error($"Failed to get native event {key}");
257 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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
267 var wRef = new WeakReference(this);
268 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
270 var obj = wRef.Target as Efl.Eo.IWrapper;
273 Efl.LoopArgumentsEvt_Args args = new Efl.LoopArgumentsEvt_Args();
277 value?.Invoke(obj, args);
281 Eina.Log.Error(e.ToString());
282 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
287 string key = "_EFL_LOOP_EVENT_ARGUMENTS";
288 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
296 string key = "_EFL_LOOP_EVENT_ARGUMENTS";
297 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
301 ///<summary>Method to raise event ArgumentsEvt.</summary>
302 public void OnArgumentsEvt(Efl.LoopArgumentsEvt_Args e)
304 var key = "_EFL_LOOP_EVENT_ARGUMENTS";
305 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
306 if (desc == IntPtr.Zero)
308 Eina.Log.Error($"Failed to get native event {key}");
312 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
315 Marshal.StructureToPtr(e.arg, info, false);
316 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
320 Marshal.FreeHGlobal(info);
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
331 var wRef = new WeakReference(this);
332 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
334 var obj = wRef.Target as Efl.Eo.IWrapper;
337 EventArgs args = EventArgs.Empty;
340 value?.Invoke(obj, args);
344 Eina.Log.Error(e.ToString());
345 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
350 string key = "_EFL_LOOP_EVENT_POLL_HIGH";
351 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
359 string key = "_EFL_LOOP_EVENT_POLL_HIGH";
360 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
364 ///<summary>Method to raise event PollHighEvt.</summary>
365 public void OnPollHighEvt(EventArgs e)
367 var key = "_EFL_LOOP_EVENT_POLL_HIGH";
368 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
369 if (desc == IntPtr.Zero)
371 Eina.Log.Error($"Failed to get native event {key}");
375 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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
385 var wRef = new WeakReference(this);
386 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
388 var obj = wRef.Target as Efl.Eo.IWrapper;
391 EventArgs args = EventArgs.Empty;
394 value?.Invoke(obj, args);
398 Eina.Log.Error(e.ToString());
399 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
404 string key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
405 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
413 string key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
414 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
418 ///<summary>Method to raise event PollMediumEvt.</summary>
419 public void OnPollMediumEvt(EventArgs e)
421 var key = "_EFL_LOOP_EVENT_POLL_MEDIUM";
422 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
423 if (desc == IntPtr.Zero)
425 Eina.Log.Error($"Failed to get native event {key}");
429 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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
439 var wRef = new WeakReference(this);
440 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
442 var obj = wRef.Target as Efl.Eo.IWrapper;
445 EventArgs args = EventArgs.Empty;
448 value?.Invoke(obj, args);
452 Eina.Log.Error(e.ToString());
453 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
458 string key = "_EFL_LOOP_EVENT_POLL_LOW";
459 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
467 string key = "_EFL_LOOP_EVENT_POLL_LOW";
468 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
472 ///<summary>Method to raise event PollLowEvt.</summary>
473 public void OnPollLowEvt(EventArgs e)
475 var key = "_EFL_LOOP_EVENT_POLL_LOW";
476 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
477 if (desc == IntPtr.Zero)
479 Eina.Log.Error($"Failed to get native event {key}");
483 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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
493 var wRef = new WeakReference(this);
494 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
496 var obj = wRef.Target as Efl.Eo.IWrapper;
499 EventArgs args = EventArgs.Empty;
502 value?.Invoke(obj, args);
506 Eina.Log.Error(e.ToString());
507 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
512 string key = "_EFL_LOOP_EVENT_QUIT";
513 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
521 string key = "_EFL_LOOP_EVENT_QUIT";
522 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
526 ///<summary>Method to raise event QuitEvt.</summary>
527 public void OnQuitEvt(EventArgs e)
529 var key = "_EFL_LOOP_EVENT_QUIT";
530 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
531 if (desc == IntPtr.Zero)
533 Eina.Log.Error($"Failed to get native event {key}");
537 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
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 "loop iteration"</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();
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 "loop iteration"</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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
648 public System.Threading.Tasks.Task<Eina.Value> JobAsync( System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
650 Eina.Future future = Job();
651 return Efl.Eo.Globals.WrapAsync(future, token);
653 public System.Threading.Tasks.Task<Eina.Value> IdleAsync( System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
655 Eina.Future future = Idle();
656 return Efl.Eo.Globals.WrapAsync(future, token);
658 public System.Threading.Tasks.Task<Eina.Value> TimeoutAsync(double time, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
660 Eina.Future future = Timeout( time);
661 return Efl.Eo.Globals.WrapAsync(future, token);
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 "loop iteration"</value>
666 public double Throttle {
667 get { return GetThrottle(); }
668 set { SetThrottle(value); }
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>
674 get { return GetTime(); }
675 set { SetTime(value); }
677 private static IntPtr GetEflClassStatic()
679 return Efl.Loop.efl_loop_class_get();
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
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)
690 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
691 var methods = Efl.Eo.Globals.GetUserMethods(type);
693 if (efl_loop_throttle_get_static_delegate == null)
695 efl_loop_throttle_get_static_delegate = new efl_loop_throttle_get_delegate(throttle_get);
698 if (methods.FirstOrDefault(m => m.Name == "GetThrottle") != null)
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) });
703 if (efl_loop_throttle_set_static_delegate == null)
705 efl_loop_throttle_set_static_delegate = new efl_loop_throttle_set_delegate(throttle_set);
708 if (methods.FirstOrDefault(m => m.Name == "SetThrottle") != null)
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) });
713 if (efl_loop_time_get_static_delegate == null)
715 efl_loop_time_get_static_delegate = new efl_loop_time_get_delegate(time_get);
718 if (methods.FirstOrDefault(m => m.Name == "GetTime") != null)
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) });
723 if (efl_loop_time_set_static_delegate == null)
725 efl_loop_time_set_static_delegate = new efl_loop_time_set_delegate(time_set);
728 if (methods.FirstOrDefault(m => m.Name == "SetTime") != null)
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) });
733 if (efl_loop_iterate_static_delegate == null)
735 efl_loop_iterate_static_delegate = new efl_loop_iterate_delegate(iterate);
738 if (methods.FirstOrDefault(m => m.Name == "Iterate") != null)
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) });
743 if (efl_loop_iterate_may_block_static_delegate == null)
745 efl_loop_iterate_may_block_static_delegate = new efl_loop_iterate_may_block_delegate(iterate_may_block);
748 if (methods.FirstOrDefault(m => m.Name == "IterateMayBlock") != null)
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) });
753 if (efl_loop_begin_static_delegate == null)
755 efl_loop_begin_static_delegate = new efl_loop_begin_delegate(begin);
758 if (methods.FirstOrDefault(m => m.Name == "Begin") != null)
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) });
763 if (efl_loop_quit_static_delegate == null)
765 efl_loop_quit_static_delegate = new efl_loop_quit_delegate(quit);
768 if (methods.FirstOrDefault(m => m.Name == "Quit") != null)
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) });
773 if (efl_loop_job_static_delegate == null)
775 efl_loop_job_static_delegate = new efl_loop_job_delegate(job);
778 if (methods.FirstOrDefault(m => m.Name == "Job") != null)
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) });
783 if (efl_loop_idle_static_delegate == null)
785 efl_loop_idle_static_delegate = new efl_loop_idle_delegate(idle);
788 if (methods.FirstOrDefault(m => m.Name == "Idle") != null)
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) });
793 if (efl_loop_timeout_static_delegate == null)
795 efl_loop_timeout_static_delegate = new efl_loop_timeout_delegate(timeout);
798 if (methods.FirstOrDefault(m => m.Name == "Timeout") != null)
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) });
803 if (efl_loop_register_static_delegate == null)
805 efl_loop_register_static_delegate = new efl_loop_register_delegate(register);
808 if (methods.FirstOrDefault(m => m.Name == "Register") != null)
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) });
813 if (efl_loop_unregister_static_delegate == null)
815 efl_loop_unregister_static_delegate = new efl_loop_unregister_delegate(unregister);
818 if (methods.FirstOrDefault(m => m.Name == "Unregister") != null)
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) });
823 descs.AddRange(base.GetEoOps(type));
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()
830 return Efl.Loop.efl_loop_class_get();
833 #pragma warning disable CA1707, SA1300, SA1600
836 private delegate double efl_loop_throttle_get_delegate(System.IntPtr obj, System.IntPtr pd);
839 public delegate double efl_loop_throttle_get_api_delegate(System.IntPtr obj);
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");
843 private static double throttle_get(System.IntPtr obj, System.IntPtr pd)
845 Eina.Log.Debug("function efl_loop_throttle_get was called");
846 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
849 double _ret_var = default(double);
852 _ret_var = ((Loop)wrapper).GetThrottle();
856 Eina.Log.Warning($"Callback error: {e.ToString()}");
857 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
865 return efl_loop_throttle_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
869 private static efl_loop_throttle_get_delegate efl_loop_throttle_get_static_delegate;
872 private delegate void efl_loop_throttle_set_delegate(System.IntPtr obj, System.IntPtr pd, double amount);
875 public delegate void efl_loop_throttle_set_api_delegate(System.IntPtr obj, double amount);
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");
879 private static void throttle_set(System.IntPtr obj, System.IntPtr pd, double amount)
881 Eina.Log.Debug("function efl_loop_throttle_set was called");
882 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
888 ((Loop)wrapper).SetThrottle(amount);
892 Eina.Log.Warning($"Callback error: {e.ToString()}");
893 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
900 efl_loop_throttle_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), amount);
904 private static efl_loop_throttle_set_delegate efl_loop_throttle_set_static_delegate;
907 private delegate double efl_loop_time_get_delegate(System.IntPtr obj, System.IntPtr pd);
910 public delegate double efl_loop_time_get_api_delegate(System.IntPtr obj);
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");
914 private static double time_get(System.IntPtr obj, System.IntPtr pd)
916 Eina.Log.Debug("function efl_loop_time_get was called");
917 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
920 double _ret_var = default(double);
923 _ret_var = ((Loop)wrapper).GetTime();
927 Eina.Log.Warning($"Callback error: {e.ToString()}");
928 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
936 return efl_loop_time_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
940 private static efl_loop_time_get_delegate efl_loop_time_get_static_delegate;
943 private delegate void efl_loop_time_set_delegate(System.IntPtr obj, System.IntPtr pd, double timepoint);
946 public delegate void efl_loop_time_set_api_delegate(System.IntPtr obj, double timepoint);
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");
950 private static void time_set(System.IntPtr obj, System.IntPtr pd, double timepoint)
952 Eina.Log.Debug("function efl_loop_time_set was called");
953 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
959 ((Loop)wrapper).SetTime(timepoint);
963 Eina.Log.Warning($"Callback error: {e.ToString()}");
964 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
971 efl_loop_time_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), timepoint);
975 private static efl_loop_time_set_delegate efl_loop_time_set_static_delegate;
978 private delegate void efl_loop_iterate_delegate(System.IntPtr obj, System.IntPtr pd);
981 public delegate void efl_loop_iterate_api_delegate(System.IntPtr obj);
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");
985 private static void iterate(System.IntPtr obj, System.IntPtr pd)
987 Eina.Log.Debug("function efl_loop_iterate was called");
988 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
994 ((Loop)wrapper).Iterate();
998 Eina.Log.Warning($"Callback error: {e.ToString()}");
999 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1006 efl_loop_iterate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1010 private static efl_loop_iterate_delegate efl_loop_iterate_static_delegate;
1013 private delegate int efl_loop_iterate_may_block_delegate(System.IntPtr obj, System.IntPtr pd, int may_block);
1016 public delegate int efl_loop_iterate_may_block_api_delegate(System.IntPtr obj, int may_block);
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");
1020 private static int iterate_may_block(System.IntPtr obj, System.IntPtr pd, int may_block)
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)
1026 int _ret_var = default(int);
1029 _ret_var = ((Loop)wrapper).IterateMayBlock(may_block);
1033 Eina.Log.Warning($"Callback error: {e.ToString()}");
1034 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
1046 private static efl_loop_iterate_may_block_delegate efl_loop_iterate_may_block_static_delegate;
1048 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
1049 private delegate Eina.Value efl_loop_begin_delegate(System.IntPtr obj, System.IntPtr pd);
1051 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
1052 public delegate Eina.Value efl_loop_begin_api_delegate(System.IntPtr obj);
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");
1056 private static Eina.Value begin(System.IntPtr obj, System.IntPtr pd)
1058 Eina.Log.Debug("function efl_loop_begin was called");
1059 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1060 if (wrapper != null)
1062 Eina.Value _ret_var = default(Eina.Value);
1065 _ret_var = ((Loop)wrapper).Begin();
1069 Eina.Log.Warning($"Callback error: {e.ToString()}");
1070 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1078 return efl_loop_begin_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1082 private static efl_loop_begin_delegate efl_loop_begin_static_delegate;
1085 private delegate void efl_loop_quit_delegate(System.IntPtr obj, System.IntPtr pd, Eina.ValueNative exit_code);
1088 public delegate void efl_loop_quit_api_delegate(System.IntPtr obj, Eina.ValueNative exit_code);
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");
1092 private static void quit(System.IntPtr obj, System.IntPtr pd, Eina.ValueNative exit_code)
1094 Eina.Log.Debug("function efl_loop_quit was called");
1095 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1096 if (wrapper != null)
1098 var _in_exit_code = new Eina.Value(exit_code);
1102 ((Loop)wrapper).Quit(_in_exit_code);
1106 Eina.Log.Warning($"Callback error: {e.ToString()}");
1107 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1114 efl_loop_quit_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), exit_code);
1118 private static efl_loop_quit_delegate efl_loop_quit_static_delegate;
1120 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1121 private delegate Eina.Future efl_loop_job_delegate(System.IntPtr obj, System.IntPtr pd);
1123 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1124 public delegate Eina.Future efl_loop_job_api_delegate(System.IntPtr obj);
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");
1128 private static Eina.Future job(System.IntPtr obj, System.IntPtr pd)
1130 Eina.Log.Debug("function efl_loop_job was called");
1131 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1132 if (wrapper != null)
1134 Eina.Future _ret_var = default( Eina.Future);
1137 _ret_var = ((Loop)wrapper).Job();
1141 Eina.Log.Warning($"Callback error: {e.ToString()}");
1142 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1150 return efl_loop_job_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1154 private static efl_loop_job_delegate efl_loop_job_static_delegate;
1156 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1157 private delegate Eina.Future efl_loop_idle_delegate(System.IntPtr obj, System.IntPtr pd);
1159 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1160 public delegate Eina.Future efl_loop_idle_api_delegate(System.IntPtr obj);
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");
1164 private static Eina.Future idle(System.IntPtr obj, System.IntPtr pd)
1166 Eina.Log.Debug("function efl_loop_idle was called");
1167 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1168 if (wrapper != null)
1170 Eina.Future _ret_var = default( Eina.Future);
1173 _ret_var = ((Loop)wrapper).Idle();
1177 Eina.Log.Warning($"Callback error: {e.ToString()}");
1178 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1186 return efl_loop_idle_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
1190 private static efl_loop_idle_delegate efl_loop_idle_static_delegate;
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);
1195 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
1196 public delegate Eina.Future efl_loop_timeout_api_delegate(System.IntPtr obj, double time);
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");
1200 private static Eina.Future timeout(System.IntPtr obj, System.IntPtr pd, double time)
1202 Eina.Log.Debug("function efl_loop_timeout was called");
1203 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1204 if (wrapper != null)
1206 Eina.Future _ret_var = default( Eina.Future);
1209 _ret_var = ((Loop)wrapper).Timeout(time);
1213 Eina.Log.Warning($"Callback error: {e.ToString()}");
1214 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1222 return efl_loop_timeout_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), time);
1226 private static efl_loop_timeout_delegate efl_loop_timeout_static_delegate;
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);
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);
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");
1236 private static bool register(System.IntPtr obj, System.IntPtr pd, Type klass, Efl.Object provider)
1238 Eina.Log.Debug("function efl_loop_register was called");
1239 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1240 if (wrapper != null)
1242 bool _ret_var = default(bool);
1245 _ret_var = ((Loop)wrapper).Register(klass, provider);
1249 Eina.Log.Warning($"Callback error: {e.ToString()}");
1250 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1258 return efl_loop_register_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass, provider);
1262 private static efl_loop_register_delegate efl_loop_register_static_delegate;
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);
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);
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");
1272 private static bool unregister(System.IntPtr obj, System.IntPtr pd, Type klass, Efl.Object provider)
1274 Eina.Log.Debug("function efl_loop_unregister was called");
1275 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
1276 if (wrapper != null)
1278 bool _ret_var = default(bool);
1281 _ret_var = ((Loop)wrapper).Unregister(klass, provider);
1285 Eina.Log.Warning($"Callback error: {e.ToString()}");
1286 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
1294 return efl_loop_unregister_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass, provider);
1298 private static efl_loop_unregister_delegate efl_loop_unregister_static_delegate;
1300 #pragma warning restore CA1707, SA1300, SA1600
1308 /// <summary>EFL loop arguments data structure
1309 /// (Since EFL 1.22)</summary>
1310 [StructLayout(LayoutKind.Sequential)]
1311 public struct LoopArguments
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) )
1323 this.Initialization = Initialization;
1326 public static implicit operator LoopArguments(IntPtr ptr)
1328 var tmp = (LoopArguments.NativeStruct)Marshal.PtrToStructure(ptr, typeof(LoopArguments.NativeStruct));
1332 ///<summary>Internal wrapper for struct LoopArguments.</summary>
1333 [StructLayout(LayoutKind.Sequential)]
1334 public struct NativeStruct
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)
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;
1349 ///<summary>Implicit conversion to the managed representation.</summary>
1350 public static implicit operator LoopArguments(LoopArguments.NativeStruct _internal_struct)
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;