2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
11 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
12 [Efl.LoopModel.NativeMethods]
13 [Efl.Eo.BindingEntity]
14 public abstract class LoopModel : Efl.LoopConsumer, Efl.IModel
16 /// <summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(LoopModel))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
33 efl_loop_model_class_get();
34 /// <summary>Initializes a new instance of the <see cref="LoopModel"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public LoopModel(Efl.Object parent= null
37 ) : base(efl_loop_model_class_get(), parent)
39 FinishInstantiation();
42 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
43 /// Do not call this constructor directly.</summary>
44 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
45 protected LoopModel(ConstructingHandle ch) : base(ch)
49 /// <summary>Initializes a new instance of the <see cref="LoopModel"/> class.
50 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
51 /// <param name="wh">The native pointer to be wrapped.</param>
52 protected LoopModel(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
56 [Efl.Eo.PrivateNativeClass]
57 private class LoopModelRealized : LoopModel
59 private LoopModelRealized(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
63 /// <summary>Initializes a new instance of the <see cref="LoopModel"/> class.
64 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
65 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
66 /// <param name="parent">The Efl.Object parent of this instance.</param>
67 protected LoopModel(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
71 /// <summary>Event dispatched when properties list is available.</summary>
72 /// <value><see cref="Efl.IModelPropertiesChangedEvt_Args"/></value>
73 public event EventHandler<Efl.IModelPropertiesChangedEvt_Args> PropertiesChangedEvt
77 lock (eflBindingEventLock)
79 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
81 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
84 Efl.IModelPropertiesChangedEvt_Args args = new Efl.IModelPropertiesChangedEvt_Args();
88 value?.Invoke(obj, args);
92 Eina.Log.Error(e.ToString());
93 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
98 string key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
99 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
105 lock (eflBindingEventLock)
107 string key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
108 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
112 /// <summary>Method to raise event PropertiesChangedEvt.</summary>
113 public void OnPropertiesChangedEvt(Efl.IModelPropertiesChangedEvt_Args e)
115 var key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
116 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
117 if (desc == IntPtr.Zero)
119 Eina.Log.Error($"Failed to get native event {key}");
123 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
126 Marshal.StructureToPtr(e.arg, info, false);
127 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
131 Marshal.FreeHGlobal(info);
134 /// <summary>Event dispatched when new child is added.</summary>
135 /// <value><see cref="Efl.IModelChildAddedEvt_Args"/></value>
136 public event EventHandler<Efl.IModelChildAddedEvt_Args> ChildAddedEvt
140 lock (eflBindingEventLock)
142 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
144 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
147 Efl.IModelChildAddedEvt_Args args = new Efl.IModelChildAddedEvt_Args();
151 value?.Invoke(obj, args);
155 Eina.Log.Error(e.ToString());
156 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
161 string key = "_EFL_MODEL_EVENT_CHILD_ADDED";
162 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
168 lock (eflBindingEventLock)
170 string key = "_EFL_MODEL_EVENT_CHILD_ADDED";
171 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
175 /// <summary>Method to raise event ChildAddedEvt.</summary>
176 public void OnChildAddedEvt(Efl.IModelChildAddedEvt_Args e)
178 var key = "_EFL_MODEL_EVENT_CHILD_ADDED";
179 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
180 if (desc == IntPtr.Zero)
182 Eina.Log.Error($"Failed to get native event {key}");
186 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
189 Marshal.StructureToPtr(e.arg, info, false);
190 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
194 Marshal.FreeHGlobal(info);
197 /// <summary>Event dispatched when child is removed.</summary>
198 /// <value><see cref="Efl.IModelChildRemovedEvt_Args"/></value>
199 public event EventHandler<Efl.IModelChildRemovedEvt_Args> ChildRemovedEvt
203 lock (eflBindingEventLock)
205 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
207 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
210 Efl.IModelChildRemovedEvt_Args args = new Efl.IModelChildRemovedEvt_Args();
214 value?.Invoke(obj, args);
218 Eina.Log.Error(e.ToString());
219 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
224 string key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
225 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
231 lock (eflBindingEventLock)
233 string key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
234 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
238 /// <summary>Method to raise event ChildRemovedEvt.</summary>
239 public void OnChildRemovedEvt(Efl.IModelChildRemovedEvt_Args e)
241 var key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
242 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
243 if (desc == IntPtr.Zero)
245 Eina.Log.Error($"Failed to get native event {key}");
249 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
252 Marshal.StructureToPtr(e.arg, info, false);
253 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
257 Marshal.FreeHGlobal(info);
260 /// <summary>Event dispatched when children count is finished.</summary>
261 public event EventHandler ChildrenCountChangedEvt
265 lock (eflBindingEventLock)
267 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
269 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
272 EventArgs args = EventArgs.Empty;
275 value?.Invoke(obj, args);
279 Eina.Log.Error(e.ToString());
280 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
285 string key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
286 AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
292 lock (eflBindingEventLock)
294 string key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
295 RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
299 /// <summary>Method to raise event ChildrenCountChangedEvt.</summary>
300 public void OnChildrenCountChangedEvt(EventArgs e)
302 var key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
303 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
304 if (desc == IntPtr.Zero)
306 Eina.Log.Error($"Failed to get native event {key}");
310 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
312 /// <summary>To be called when a Child model is created by <see cref="Efl.IModel.GetChildrenSlice"/> by the one creating the child object.
313 /// This function is used to properly define the lifecycle of the new Child Model object and make sure that once it has 0 ref except its parent Model, it will be destroyed. This function should only be called once per child. It is useful for <see cref="Efl.IModel"/> who have a lot of children and shouldn't keep more than what is used in memory.</summary>
314 virtual public void VolatileMake() {
315 Efl.LoopModel.NativeMethods.efl_loop_model_volatile_make_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
316 Eina.Error.RaiseIfUnhandledException();
318 /// <summary>Get properties from model.
319 /// properties_get is due to provide callers a way the fetch the current properties implemented/used by the model. The event <see cref="Efl.IModel.PropertiesChangedEvt"/> will be raised to notify listeners of any modifications in the properties.
321 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
322 /// <returns>Array of current properties</returns>
323 virtual public Eina.Iterator<System.String> GetProperties() {
324 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_properties_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
325 Eina.Error.RaiseIfUnhandledException();
326 return new Eina.Iterator<System.String>(_ret_var, true);
328 /// <summary>Retrieve the value of a given property name.
329 /// At this point the caller is free to get values from properties. The event <see cref="Efl.IModel.PropertiesChangedEvt"/> may be raised to notify listeners of the property/value.
331 /// See <see cref="Efl.IModel.GetProperties"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
332 /// <param name="property">Property name</param>
333 /// <returns>Property value</returns>
334 virtual public Eina.Value GetProperty(System.String property) {
335 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),property);
336 Eina.Error.RaiseIfUnhandledException();
339 /// <summary>Set a property value of a given property name.
340 /// The caller must ensure to call at least efl_model_prop_list before being able to see/set properties. This function sets a new property value into given property name. Once the operation is completed the concrete implementation should raise <see cref="Efl.IModel.PropertiesChangedEvt"/> event in order to notify listeners of the new value of the property.
342 /// If the model doesn't have the property then there are two possibilities, either raise an error or create the new property in model
344 /// See <see cref="Efl.IModel.GetProperty"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
345 /// <param name="property">Property name</param>
346 /// <param name="value">Property value</param>
347 /// <returns>Return an error in case the property could not be set, the value that was set otherwise.</returns>
348 virtual public Eina.Future SetProperty(System.String property, Eina.Value value) {
349 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),property, value);
350 Eina.Error.RaiseIfUnhandledException();
353 /// <summary>Get children count.
354 /// When efl_model_load is completed <see cref="Efl.IModel.GetChildrenCount"/> can be used to get the number of children. <see cref="Efl.IModel.GetChildrenCount"/> can also be used before calling <see cref="Efl.IModel.GetChildrenSlice"/> so a valid range is known. Event <see cref="Efl.IModel.ChildrenCountChangedEvt"/> is emitted when count is finished.
356 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
357 /// <returns>Current known children count</returns>
358 virtual public uint GetChildrenCount() {
359 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_children_count_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
360 Eina.Error.RaiseIfUnhandledException();
363 /// <summary>Get a future value when it changes to something that is not error:EAGAIN
364 /// <see cref="Efl.IModel.GetProperty"/> can return an error with code EAGAIN when it doesn't have any meaningful value. To make life easier, this future will resolve when the error:EAGAIN disapears. Either into a failed future in case the error code changed to something else or a success with the value of the property whenever the property finally changes.
366 /// The future can also be canceled if the model itself gets destroyed.</summary>
367 /// <param name="property">Property name.</param>
368 /// <returns>Future to be resolved when the property changes to anything other than error:EAGAIN</returns>
369 virtual public Eina.Future GetPropertyReady(System.String property) {
370 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_ready_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),property);
371 Eina.Error.RaiseIfUnhandledException();
374 /// <summary>Get children slice OR full range.
375 /// <see cref="Efl.IModel.GetChildrenSlice"/> behaves in two different ways, it may provide the slice if <c>count</c> is non-zero OR full range otherwise.
377 /// Since 'slice' is a range, for example if we have 20 children a slice could be the range from 3(start) with 4(count), see:
379 /// child 0 [no] child 1 [no] child 2 [no] child 3 [yes] child 4 [yes] child 5 [yes] child 6 [yes] child 7 [no]
381 /// Optionally the user can call <see cref="Efl.IModel.GetChildrenCount"/> to know the number of children so a valid range can be known in advance.
383 /// See <see cref="Efl.IModel.GetChildrenCount"/>
385 /// Note: The returned children will live only as long as the future itself. Once the future is done, if you want to keep the object alive, you need to take a reference for yourself.</summary>
386 /// <param name="start">Range begin - start from here.</param>
387 /// <param name="count">Range size. If count is 0, start is ignored.</param>
388 /// <returns>Array of children</returns>
389 virtual public Eina.Future GetChildrenSlice(uint start, uint count) {
390 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_children_slice_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),start, count);
391 Eina.Error.RaiseIfUnhandledException();
394 /// <summary>Add a new child.
395 /// Add a new child, possibly dummy, depending on the implementation, of a internal keeping. When the child is effectively added the event <see cref="Efl.IModel.ChildAddedEvt"/> is then raised and the new child is kept along with other children.</summary>
396 /// <returns>Child object</returns>
397 virtual public Efl.Object AddChild() {
398 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_child_add_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
399 Eina.Error.RaiseIfUnhandledException();
402 /// <summary>Remove a child.
403 /// Remove a child of a internal keeping. When the child is effectively removed the event <see cref="Efl.IModel.ChildRemovedEvt"/> is then raised to give a chance for listeners to perform any cleanup and/or update references.</summary>
404 /// <param name="child">Child to be removed</param>
405 virtual public void DelChild(Efl.Object child) {
406 Efl.IModelConcrete.NativeMethods.efl_model_child_del_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),child);
407 Eina.Error.RaiseIfUnhandledException();
409 /// <summary>Async wrapper for <see cref="SetProperty" />.</summary>
410 /// <param name="property">Property name</param>
411 /// <param name="value">Property value</param>
412 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
413 /// <returns>An async task wrapping the result of the operation.</returns>
414 public System.Threading.Tasks.Task<Eina.Value> SetPropertyAsync(System.String property,Eina.Value value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
416 Eina.Future future = SetProperty( property, value);
417 return Efl.Eo.Globals.WrapAsync(future, token);
420 /// <summary>Async wrapper for <see cref="GetPropertyReady" />.</summary>
421 /// <param name="property">Property name.</param>
422 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
423 /// <returns>An async task wrapping the result of the operation.</returns>
424 public System.Threading.Tasks.Task<Eina.Value> GetPropertyReadyAsync(System.String property, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
426 Eina.Future future = GetPropertyReady( property);
427 return Efl.Eo.Globals.WrapAsync(future, token);
430 /// <summary>Async wrapper for <see cref="GetChildrenSlice" />.</summary>
431 /// <param name="start">Range begin - start from here.</param>
432 /// <param name="count">Range size. If count is 0, start is ignored.</param>
433 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
434 /// <returns>An async task wrapping the result of the operation.</returns>
435 public System.Threading.Tasks.Task<Eina.Value> GetChildrenSliceAsync(uint start,uint count, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
437 Eina.Future future = GetChildrenSlice( start, count);
438 return Efl.Eo.Globals.WrapAsync(future, token);
441 /// <summary>Get properties from model.
442 /// properties_get is due to provide callers a way the fetch the current properties implemented/used by the model. The event <see cref="Efl.IModel.PropertiesChangedEvt"/> will be raised to notify listeners of any modifications in the properties.
444 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
445 /// <value>Array of current properties</value>
446 public Eina.Iterator<System.String> Properties {
447 get { return GetProperties(); }
449 /// <summary>Get children count.
450 /// When efl_model_load is completed <see cref="Efl.IModel.GetChildrenCount"/> can be used to get the number of children. <see cref="Efl.IModel.GetChildrenCount"/> can also be used before calling <see cref="Efl.IModel.GetChildrenSlice"/> so a valid range is known. Event <see cref="Efl.IModel.ChildrenCountChangedEvt"/> is emitted when count is finished.
452 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
453 /// <value>Current known children count</value>
454 public uint ChildrenCount {
455 get { return GetChildrenCount(); }
457 private static IntPtr GetEflClassStatic()
459 return Efl.LoopModel.efl_loop_model_class_get();
461 /// <summary>Wrapper for native methods and virtual method delegates.
462 /// For internal use by generated code only.</summary>
463 public new class NativeMethods : Efl.LoopConsumer.NativeMethods
465 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
466 /// <summary>Gets the list of Eo operations to override.</summary>
467 /// <returns>The list of Eo operations to be overload.</returns>
468 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
470 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
471 var methods = Efl.Eo.Globals.GetUserMethods(type);
473 if (efl_loop_model_volatile_make_static_delegate == null)
475 efl_loop_model_volatile_make_static_delegate = new efl_loop_model_volatile_make_delegate(volatile_make);
478 if (methods.FirstOrDefault(m => m.Name == "VolatileMake") != null)
480 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_model_volatile_make"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_model_volatile_make_static_delegate) });
483 if (efl_model_properties_get_static_delegate == null)
485 efl_model_properties_get_static_delegate = new efl_model_properties_get_delegate(properties_get);
488 if (methods.FirstOrDefault(m => m.Name == "GetProperties") != null)
490 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_properties_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_properties_get_static_delegate) });
493 if (efl_model_property_get_static_delegate == null)
495 efl_model_property_get_static_delegate = new efl_model_property_get_delegate(property_get);
498 if (methods.FirstOrDefault(m => m.Name == "GetProperty") != null)
500 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_get_static_delegate) });
503 if (efl_model_property_set_static_delegate == null)
505 efl_model_property_set_static_delegate = new efl_model_property_set_delegate(property_set);
508 if (methods.FirstOrDefault(m => m.Name == "SetProperty") != null)
510 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_set"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_set_static_delegate) });
513 if (efl_model_children_count_get_static_delegate == null)
515 efl_model_children_count_get_static_delegate = new efl_model_children_count_get_delegate(children_count_get);
518 if (methods.FirstOrDefault(m => m.Name == "GetChildrenCount") != null)
520 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_children_count_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_count_get_static_delegate) });
523 if (efl_model_property_ready_get_static_delegate == null)
525 efl_model_property_ready_get_static_delegate = new efl_model_property_ready_get_delegate(property_ready_get);
528 if (methods.FirstOrDefault(m => m.Name == "GetPropertyReady") != null)
530 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_ready_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_ready_get_static_delegate) });
533 if (efl_model_children_slice_get_static_delegate == null)
535 efl_model_children_slice_get_static_delegate = new efl_model_children_slice_get_delegate(children_slice_get);
538 if (methods.FirstOrDefault(m => m.Name == "GetChildrenSlice") != null)
540 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_children_slice_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_slice_get_static_delegate) });
543 if (efl_model_child_add_static_delegate == null)
545 efl_model_child_add_static_delegate = new efl_model_child_add_delegate(child_add);
548 if (methods.FirstOrDefault(m => m.Name == "AddChild") != null)
550 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_child_add"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_add_static_delegate) });
553 if (efl_model_child_del_static_delegate == null)
555 efl_model_child_del_static_delegate = new efl_model_child_del_delegate(child_del);
558 if (methods.FirstOrDefault(m => m.Name == "DelChild") != null)
560 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_child_del"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_del_static_delegate) });
563 descs.AddRange(base.GetEoOps(type));
566 /// <summary>Returns the Eo class for the native methods of this class.</summary>
567 /// <returns>The native class pointer.</returns>
568 public override IntPtr GetEflClass()
570 return Efl.LoopModel.efl_loop_model_class_get();
573 #pragma warning disable CA1707, CS1591, SA1300, SA1600
576 private delegate void efl_loop_model_volatile_make_delegate(System.IntPtr obj, System.IntPtr pd);
579 public delegate void efl_loop_model_volatile_make_api_delegate(System.IntPtr obj);
581 public static Efl.Eo.FunctionWrapper<efl_loop_model_volatile_make_api_delegate> efl_loop_model_volatile_make_ptr = new Efl.Eo.FunctionWrapper<efl_loop_model_volatile_make_api_delegate>(Module, "efl_loop_model_volatile_make");
583 private static void volatile_make(System.IntPtr obj, System.IntPtr pd)
585 Eina.Log.Debug("function efl_loop_model_volatile_make was called");
586 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
592 ((LoopModel)ws.Target).VolatileMake();
596 Eina.Log.Warning($"Callback error: {e.ToString()}");
597 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
604 efl_loop_model_volatile_make_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
608 private static efl_loop_model_volatile_make_delegate efl_loop_model_volatile_make_static_delegate;
611 private delegate System.IntPtr efl_model_properties_get_delegate(System.IntPtr obj, System.IntPtr pd);
614 public delegate System.IntPtr efl_model_properties_get_api_delegate(System.IntPtr obj);
616 public static Efl.Eo.FunctionWrapper<efl_model_properties_get_api_delegate> efl_model_properties_get_ptr = new Efl.Eo.FunctionWrapper<efl_model_properties_get_api_delegate>(Module, "efl_model_properties_get");
618 private static System.IntPtr properties_get(System.IntPtr obj, System.IntPtr pd)
620 Eina.Log.Debug("function efl_model_properties_get was called");
621 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
624 Eina.Iterator<System.String> _ret_var = default(Eina.Iterator<System.String>);
627 _ret_var = ((LoopModel)ws.Target).GetProperties();
631 Eina.Log.Warning($"Callback error: {e.ToString()}");
632 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
635 _ret_var.Own = false; return _ret_var.Handle;
640 return efl_model_properties_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
644 private static efl_model_properties_get_delegate efl_model_properties_get_static_delegate;
646 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
647 private delegate Eina.Value efl_model_property_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
649 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
650 public delegate Eina.Value efl_model_property_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
652 public static Efl.Eo.FunctionWrapper<efl_model_property_get_api_delegate> efl_model_property_get_ptr = new Efl.Eo.FunctionWrapper<efl_model_property_get_api_delegate>(Module, "efl_model_property_get");
654 private static Eina.Value property_get(System.IntPtr obj, System.IntPtr pd, System.String property)
656 Eina.Log.Debug("function efl_model_property_get was called");
657 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
660 Eina.Value _ret_var = default(Eina.Value);
663 _ret_var = ((LoopModel)ws.Target).GetProperty(property);
667 Eina.Log.Warning($"Callback error: {e.ToString()}");
668 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
676 return efl_model_property_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property);
680 private static efl_model_property_get_delegate efl_model_property_get_static_delegate;
682 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
683 private delegate Eina.Future efl_model_property_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))] Eina.Value value);
685 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
686 public delegate Eina.Future efl_model_property_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))] Eina.Value value);
688 public static Efl.Eo.FunctionWrapper<efl_model_property_set_api_delegate> efl_model_property_set_ptr = new Efl.Eo.FunctionWrapper<efl_model_property_set_api_delegate>(Module, "efl_model_property_set");
690 private static Eina.Future property_set(System.IntPtr obj, System.IntPtr pd, System.String property, Eina.Value value)
692 Eina.Log.Debug("function efl_model_property_set was called");
693 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
696 Eina.Future _ret_var = default( Eina.Future);
699 _ret_var = ((LoopModel)ws.Target).SetProperty(property, value);
703 Eina.Log.Warning($"Callback error: {e.ToString()}");
704 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
712 return efl_model_property_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property, value);
716 private static efl_model_property_set_delegate efl_model_property_set_static_delegate;
719 private delegate uint efl_model_children_count_get_delegate(System.IntPtr obj, System.IntPtr pd);
722 public delegate uint efl_model_children_count_get_api_delegate(System.IntPtr obj);
724 public static Efl.Eo.FunctionWrapper<efl_model_children_count_get_api_delegate> efl_model_children_count_get_ptr = new Efl.Eo.FunctionWrapper<efl_model_children_count_get_api_delegate>(Module, "efl_model_children_count_get");
726 private static uint children_count_get(System.IntPtr obj, System.IntPtr pd)
728 Eina.Log.Debug("function efl_model_children_count_get was called");
729 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
732 uint _ret_var = default(uint);
735 _ret_var = ((LoopModel)ws.Target).GetChildrenCount();
739 Eina.Log.Warning($"Callback error: {e.ToString()}");
740 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
748 return efl_model_children_count_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
752 private static efl_model_children_count_get_delegate efl_model_children_count_get_static_delegate;
754 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
755 private delegate Eina.Future efl_model_property_ready_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
757 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
758 public delegate Eina.Future efl_model_property_ready_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
760 public static Efl.Eo.FunctionWrapper<efl_model_property_ready_get_api_delegate> efl_model_property_ready_get_ptr = new Efl.Eo.FunctionWrapper<efl_model_property_ready_get_api_delegate>(Module, "efl_model_property_ready_get");
762 private static Eina.Future property_ready_get(System.IntPtr obj, System.IntPtr pd, System.String property)
764 Eina.Log.Debug("function efl_model_property_ready_get was called");
765 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
768 Eina.Future _ret_var = default( Eina.Future);
771 _ret_var = ((LoopModel)ws.Target).GetPropertyReady(property);
775 Eina.Log.Warning($"Callback error: {e.ToString()}");
776 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
784 return efl_model_property_ready_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property);
788 private static efl_model_property_ready_get_delegate efl_model_property_ready_get_static_delegate;
790 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
791 private delegate Eina.Future efl_model_children_slice_get_delegate(System.IntPtr obj, System.IntPtr pd, uint start, uint count);
793 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
794 public delegate Eina.Future efl_model_children_slice_get_api_delegate(System.IntPtr obj, uint start, uint count);
796 public static Efl.Eo.FunctionWrapper<efl_model_children_slice_get_api_delegate> efl_model_children_slice_get_ptr = new Efl.Eo.FunctionWrapper<efl_model_children_slice_get_api_delegate>(Module, "efl_model_children_slice_get");
798 private static Eina.Future children_slice_get(System.IntPtr obj, System.IntPtr pd, uint start, uint count)
800 Eina.Log.Debug("function efl_model_children_slice_get was called");
801 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
804 Eina.Future _ret_var = default( Eina.Future);
807 _ret_var = ((LoopModel)ws.Target).GetChildrenSlice(start, count);
811 Eina.Log.Warning($"Callback error: {e.ToString()}");
812 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
820 return efl_model_children_slice_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, count);
824 private static efl_model_children_slice_get_delegate efl_model_children_slice_get_static_delegate;
826 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
827 private delegate Efl.Object efl_model_child_add_delegate(System.IntPtr obj, System.IntPtr pd);
829 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
830 public delegate Efl.Object efl_model_child_add_api_delegate(System.IntPtr obj);
832 public static Efl.Eo.FunctionWrapper<efl_model_child_add_api_delegate> efl_model_child_add_ptr = new Efl.Eo.FunctionWrapper<efl_model_child_add_api_delegate>(Module, "efl_model_child_add");
834 private static Efl.Object child_add(System.IntPtr obj, System.IntPtr pd)
836 Eina.Log.Debug("function efl_model_child_add was called");
837 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
840 Efl.Object _ret_var = default(Efl.Object);
843 _ret_var = ((LoopModel)ws.Target).AddChild();
847 Eina.Log.Warning($"Callback error: {e.ToString()}");
848 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
856 return efl_model_child_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
860 private static efl_model_child_add_delegate efl_model_child_add_static_delegate;
863 private delegate void efl_model_child_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object child);
866 public delegate void efl_model_child_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Object child);
868 public static Efl.Eo.FunctionWrapper<efl_model_child_del_api_delegate> efl_model_child_del_ptr = new Efl.Eo.FunctionWrapper<efl_model_child_del_api_delegate>(Module, "efl_model_child_del");
870 private static void child_del(System.IntPtr obj, System.IntPtr pd, Efl.Object child)
872 Eina.Log.Debug("function efl_model_child_del was called");
873 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
879 ((LoopModel)ws.Target).DelChild(child);
883 Eina.Log.Warning($"Callback error: {e.ToString()}");
884 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
891 efl_model_child_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child);
895 private static efl_model_child_del_delegate efl_model_child_del_static_delegate;
897 #pragma warning restore CA1707, CS1591, SA1300, SA1600
904 #pragma warning disable CS1591
905 public static class EflLoopModel_ExtensionMethods {
910 #pragma warning restore CS1591