2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
11 /// <summary>Efl model interface</summary>
12 /// <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>
13 [Efl.IModelConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IModel :
16 Efl.Eo.IWrapper, IDisposable
18 /// <summary>Get properties from model.
19 /// 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.
21 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
22 /// <returns>Array of current properties</returns>
23 Eina.Iterator<System.String> GetProperties();
24 /// <summary>Retrieve the value of a given property name.
25 /// 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.
27 /// See <see cref="Efl.IModel.GetProperties"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
28 /// <param name="property">Property name</param>
29 /// <returns>Property value</returns>
30 Eina.Value GetProperty(System.String property);
31 /// <summary>Set a property value of a given property name.
32 /// 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.
34 /// If the model doesn't have the property then there are two possibilities, either raise an error or create the new property in model
36 /// See <see cref="Efl.IModel.GetProperty"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
37 /// <param name="property">Property name</param>
38 /// <param name="value">Property value</param>
39 /// <returns>Return an error in case the property could not be set, the value that was set otherwise.</returns>
40 Eina.Future SetProperty(System.String property, Eina.Value value);
41 /// <summary>Get children count.
42 /// 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.
44 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
45 /// <returns>Current known children count</returns>
46 uint GetChildrenCount();
47 /// <summary>Get a future value when it changes to something that is not error:EAGAIN
48 /// <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.
50 /// The future can also be canceled if the model itself gets destroyed.</summary>
51 /// <param name="property">Property name.</param>
52 /// <returns>Future to be resolved when the property changes to anything other than error:EAGAIN</returns>
53 Eina.Future GetPropertyReady(System.String property);
54 /// <summary>Get children slice OR full range.
55 /// <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.
57 /// 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:
59 /// child 0 [no] child 1 [no] child 2 [no] child 3 [yes] child 4 [yes] child 5 [yes] child 6 [yes] child 7 [no]
61 /// 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.
63 /// See <see cref="Efl.IModel.GetChildrenCount"/>
65 /// 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>
66 /// <param name="start">Range begin - start from here.</param>
67 /// <param name="count">Range size. If count is 0, start is ignored.</param>
68 /// <returns>Array of children</returns>
69 Eina.Future GetChildrenSlice(uint start, uint count);
70 /// <summary>Add a new child.
71 /// 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>
72 /// <returns>Child object</returns>
73 Efl.Object AddChild();
74 /// <summary>Remove a child.
75 /// 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>
76 /// <param name="child">Child to be removed</param>
77 void DelChild(Efl.Object child);
78 /// <summary>Async wrapper for <see cref="SetProperty" />.</summary>
79 /// <param name="property">Property name</param>
80 /// <param name="value">Property value</param>
81 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
82 /// <returns>An async task wrapping the result of the operation.</returns>
83 System.Threading.Tasks.Task<Eina.Value> SetPropertyAsync(System.String property,Eina.Value value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken));
85 /// <summary>Async wrapper for <see cref="GetPropertyReady" />.</summary>
86 /// <param name="property">Property name.</param>
87 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
88 /// <returns>An async task wrapping the result of the operation.</returns>
89 System.Threading.Tasks.Task<Eina.Value> GetPropertyReadyAsync(System.String property, System.Threading.CancellationToken token = default(System.Threading.CancellationToken));
91 /// <summary>Async wrapper for <see cref="GetChildrenSlice" />.</summary>
92 /// <param name="start">Range begin - start from here.</param>
93 /// <param name="count">Range size. If count is 0, start is ignored.</param>
94 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
95 /// <returns>An async task wrapping the result of the operation.</returns>
96 System.Threading.Tasks.Task<Eina.Value> GetChildrenSliceAsync(uint start,uint count, System.Threading.CancellationToken token = default(System.Threading.CancellationToken));
98 /// <summary>Event dispatched when properties list is available.</summary>
99 /// <value><see cref="Efl.IModelPropertiesChangedEvt_Args"/></value>
100 event EventHandler<Efl.IModelPropertiesChangedEvt_Args> PropertiesChangedEvt;
101 /// <summary>Event dispatched when new child is added.</summary>
102 /// <value><see cref="Efl.IModelChildAddedEvt_Args"/></value>
103 event EventHandler<Efl.IModelChildAddedEvt_Args> ChildAddedEvt;
104 /// <summary>Event dispatched when child is removed.</summary>
105 /// <value><see cref="Efl.IModelChildRemovedEvt_Args"/></value>
106 event EventHandler<Efl.IModelChildRemovedEvt_Args> ChildRemovedEvt;
107 /// <summary>Event dispatched when children count is finished.</summary>
108 event EventHandler ChildrenCountChangedEvt;
109 /// <summary>Get properties from model.
110 /// 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.
112 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
113 /// <value>Array of current properties</value>
114 Eina.Iterator<System.String> Properties {
117 /// <summary>Get children count.
118 /// 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.
120 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
121 /// <value>Current known children count</value>
126 /// <summary>Event argument wrapper for event <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
127 [Efl.Eo.BindingEntity]
128 public class IModelPropertiesChangedEvt_Args : EventArgs {
129 /// <summary>Actual event payload.</summary>
130 /// <value>Event dispatched when properties list is available.</value>
131 public Efl.ModelPropertyEvent arg { get; set; }
133 /// <summary>Event argument wrapper for event <see cref="Efl.IModel.ChildAddedEvt"/>.</summary>
134 [Efl.Eo.BindingEntity]
135 public class IModelChildAddedEvt_Args : EventArgs {
136 /// <summary>Actual event payload.</summary>
137 /// <value>Event dispatched when new child is added.</value>
138 public Efl.ModelChildrenEvent arg { get; set; }
140 /// <summary>Event argument wrapper for event <see cref="Efl.IModel.ChildRemovedEvt"/>.</summary>
141 [Efl.Eo.BindingEntity]
142 public class IModelChildRemovedEvt_Args : EventArgs {
143 /// <summary>Actual event payload.</summary>
144 /// <value>Event dispatched when child is removed.</value>
145 public Efl.ModelChildrenEvent arg { get; set; }
147 /// <summary>Efl model interface</summary>
148 /// <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>
149 sealed public class IModelConcrete :
154 /// <summary>Pointer to the native class description.</summary>
155 public override System.IntPtr NativeClass
159 if (((object)this).GetType() == typeof(IModelConcrete))
161 return GetEflClassStatic();
165 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
170 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
171 /// Do not call this constructor directly.</summary>
172 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
173 private IModelConcrete(ConstructingHandle ch) : base(ch)
177 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
178 efl_model_interface_get();
179 /// <summary>Initializes a new instance of the <see cref="IModel"/> class.
180 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
181 /// <param name="wh">The native pointer to be wrapped.</param>
182 private IModelConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
186 /// <summary>Event dispatched when properties list is available.</summary>
187 /// <value><see cref="Efl.IModelPropertiesChangedEvt_Args"/></value>
188 public event EventHandler<Efl.IModelPropertiesChangedEvt_Args> PropertiesChangedEvt
192 lock (eflBindingEventLock)
194 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
196 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
199 Efl.IModelPropertiesChangedEvt_Args args = new Efl.IModelPropertiesChangedEvt_Args();
203 value?.Invoke(obj, args);
207 Eina.Log.Error(e.ToString());
208 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
213 string key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
214 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
220 lock (eflBindingEventLock)
222 string key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
223 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
227 /// <summary>Method to raise event PropertiesChangedEvt.</summary>
228 public void OnPropertiesChangedEvt(Efl.IModelPropertiesChangedEvt_Args e)
230 var key = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
231 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
232 if (desc == IntPtr.Zero)
234 Eina.Log.Error($"Failed to get native event {key}");
238 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
241 Marshal.StructureToPtr(e.arg, info, false);
242 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
246 Marshal.FreeHGlobal(info);
249 /// <summary>Event dispatched when new child is added.</summary>
250 /// <value><see cref="Efl.IModelChildAddedEvt_Args"/></value>
251 public event EventHandler<Efl.IModelChildAddedEvt_Args> ChildAddedEvt
255 lock (eflBindingEventLock)
257 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
259 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
262 Efl.IModelChildAddedEvt_Args args = new Efl.IModelChildAddedEvt_Args();
266 value?.Invoke(obj, args);
270 Eina.Log.Error(e.ToString());
271 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
276 string key = "_EFL_MODEL_EVENT_CHILD_ADDED";
277 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
283 lock (eflBindingEventLock)
285 string key = "_EFL_MODEL_EVENT_CHILD_ADDED";
286 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
290 /// <summary>Method to raise event ChildAddedEvt.</summary>
291 public void OnChildAddedEvt(Efl.IModelChildAddedEvt_Args e)
293 var key = "_EFL_MODEL_EVENT_CHILD_ADDED";
294 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
295 if (desc == IntPtr.Zero)
297 Eina.Log.Error($"Failed to get native event {key}");
301 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
304 Marshal.StructureToPtr(e.arg, info, false);
305 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
309 Marshal.FreeHGlobal(info);
312 /// <summary>Event dispatched when child is removed.</summary>
313 /// <value><see cref="Efl.IModelChildRemovedEvt_Args"/></value>
314 public event EventHandler<Efl.IModelChildRemovedEvt_Args> ChildRemovedEvt
318 lock (eflBindingEventLock)
320 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
322 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
325 Efl.IModelChildRemovedEvt_Args args = new Efl.IModelChildRemovedEvt_Args();
329 value?.Invoke(obj, args);
333 Eina.Log.Error(e.ToString());
334 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
339 string key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
340 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
346 lock (eflBindingEventLock)
348 string key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
349 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
353 /// <summary>Method to raise event ChildRemovedEvt.</summary>
354 public void OnChildRemovedEvt(Efl.IModelChildRemovedEvt_Args e)
356 var key = "_EFL_MODEL_EVENT_CHILD_REMOVED";
357 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
358 if (desc == IntPtr.Zero)
360 Eina.Log.Error($"Failed to get native event {key}");
364 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
367 Marshal.StructureToPtr(e.arg, info, false);
368 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
372 Marshal.FreeHGlobal(info);
375 /// <summary>Event dispatched when children count is finished.</summary>
376 public event EventHandler ChildrenCountChangedEvt
380 lock (eflBindingEventLock)
382 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
384 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
387 EventArgs args = EventArgs.Empty;
390 value?.Invoke(obj, args);
394 Eina.Log.Error(e.ToString());
395 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
400 string key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
401 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
407 lock (eflBindingEventLock)
409 string key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
410 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
414 /// <summary>Method to raise event ChildrenCountChangedEvt.</summary>
415 public void OnChildrenCountChangedEvt(EventArgs e)
417 var key = "_EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED";
418 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
419 if (desc == IntPtr.Zero)
421 Eina.Log.Error($"Failed to get native event {key}");
425 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
427 /// <summary>Get properties from model.
428 /// 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.
430 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
431 /// <returns>Array of current properties</returns>
432 public Eina.Iterator<System.String> GetProperties() {
433 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_properties_get_ptr.Value.Delegate(this.NativeHandle);
434 Eina.Error.RaiseIfUnhandledException();
435 return new Eina.Iterator<System.String>(_ret_var, true);
437 /// <summary>Retrieve the value of a given property name.
438 /// 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.
440 /// See <see cref="Efl.IModel.GetProperties"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
441 /// <param name="property">Property name</param>
442 /// <returns>Property value</returns>
443 public Eina.Value GetProperty(System.String property) {
444 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_get_ptr.Value.Delegate(this.NativeHandle,property);
445 Eina.Error.RaiseIfUnhandledException();
448 /// <summary>Set a property value of a given property name.
449 /// 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.
451 /// If the model doesn't have the property then there are two possibilities, either raise an error or create the new property in model
453 /// See <see cref="Efl.IModel.GetProperty"/>, <see cref="Efl.IModel.PropertiesChangedEvt"/></summary>
454 /// <param name="property">Property name</param>
455 /// <param name="value">Property value</param>
456 /// <returns>Return an error in case the property could not be set, the value that was set otherwise.</returns>
457 public Eina.Future SetProperty(System.String property, Eina.Value value) {
458 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_set_ptr.Value.Delegate(this.NativeHandle,property, value);
459 Eina.Error.RaiseIfUnhandledException();
462 /// <summary>Get children count.
463 /// 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.
465 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
466 /// <returns>Current known children count</returns>
467 public uint GetChildrenCount() {
468 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_children_count_get_ptr.Value.Delegate(this.NativeHandle);
469 Eina.Error.RaiseIfUnhandledException();
472 /// <summary>Get a future value when it changes to something that is not error:EAGAIN
473 /// <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.
475 /// The future can also be canceled if the model itself gets destroyed.</summary>
476 /// <param name="property">Property name.</param>
477 /// <returns>Future to be resolved when the property changes to anything other than error:EAGAIN</returns>
478 public Eina.Future GetPropertyReady(System.String property) {
479 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_property_ready_get_ptr.Value.Delegate(this.NativeHandle,property);
480 Eina.Error.RaiseIfUnhandledException();
483 /// <summary>Get children slice OR full range.
484 /// <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.
486 /// 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:
488 /// child 0 [no] child 1 [no] child 2 [no] child 3 [yes] child 4 [yes] child 5 [yes] child 6 [yes] child 7 [no]
490 /// 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.
492 /// See <see cref="Efl.IModel.GetChildrenCount"/>
494 /// 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>
495 /// <param name="start">Range begin - start from here.</param>
496 /// <param name="count">Range size. If count is 0, start is ignored.</param>
497 /// <returns>Array of children</returns>
498 public Eina.Future GetChildrenSlice(uint start, uint count) {
499 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_children_slice_get_ptr.Value.Delegate(this.NativeHandle,start, count);
500 Eina.Error.RaiseIfUnhandledException();
503 /// <summary>Add a new child.
504 /// 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>
505 /// <returns>Child object</returns>
506 public Efl.Object AddChild() {
507 var _ret_var = Efl.IModelConcrete.NativeMethods.efl_model_child_add_ptr.Value.Delegate(this.NativeHandle);
508 Eina.Error.RaiseIfUnhandledException();
511 /// <summary>Remove a child.
512 /// 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>
513 /// <param name="child">Child to be removed</param>
514 public void DelChild(Efl.Object child) {
515 Efl.IModelConcrete.NativeMethods.efl_model_child_del_ptr.Value.Delegate(this.NativeHandle,child);
516 Eina.Error.RaiseIfUnhandledException();
518 /// <summary>Async wrapper for <see cref="SetProperty" />.</summary>
519 /// <param name="property">Property name</param>
520 /// <param name="value">Property value</param>
521 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
522 /// <returns>An async task wrapping the result of the operation.</returns>
523 public System.Threading.Tasks.Task<Eina.Value> SetPropertyAsync(System.String property,Eina.Value value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
525 Eina.Future future = SetProperty( property, value);
526 return Efl.Eo.Globals.WrapAsync(future, token);
529 /// <summary>Async wrapper for <see cref="GetPropertyReady" />.</summary>
530 /// <param name="property">Property name.</param>
531 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
532 /// <returns>An async task wrapping the result of the operation.</returns>
533 public System.Threading.Tasks.Task<Eina.Value> GetPropertyReadyAsync(System.String property, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
535 Eina.Future future = GetPropertyReady( property);
536 return Efl.Eo.Globals.WrapAsync(future, token);
539 /// <summary>Async wrapper for <see cref="GetChildrenSlice" />.</summary>
540 /// <param name="start">Range begin - start from here.</param>
541 /// <param name="count">Range size. If count is 0, start is ignored.</param>
542 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
543 /// <returns>An async task wrapping the result of the operation.</returns>
544 public System.Threading.Tasks.Task<Eina.Value> GetChildrenSliceAsync(uint start,uint count, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
546 Eina.Future future = GetChildrenSlice( start, count);
547 return Efl.Eo.Globals.WrapAsync(future, token);
550 /// <summary>Get properties from model.
551 /// 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.
553 /// See also <see cref="Efl.IModel.PropertiesChangedEvt"/>.</summary>
554 /// <value>Array of current properties</value>
555 public Eina.Iterator<System.String> Properties {
556 get { return GetProperties(); }
558 /// <summary>Get children count.
559 /// 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.
561 /// See also <see cref="Efl.IModel.GetChildrenSlice"/>.</summary>
562 /// <value>Current known children count</value>
563 public uint ChildrenCount {
564 get { return GetChildrenCount(); }
566 private static IntPtr GetEflClassStatic()
568 return Efl.IModelConcrete.efl_model_interface_get();
570 /// <summary>Wrapper for native methods and virtual method delegates.
571 /// For internal use by generated code only.</summary>
572 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
574 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
575 /// <summary>Gets the list of Eo operations to override.</summary>
576 /// <returns>The list of Eo operations to be overload.</returns>
577 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
579 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
580 var methods = Efl.Eo.Globals.GetUserMethods(type);
582 if (efl_model_properties_get_static_delegate == null)
584 efl_model_properties_get_static_delegate = new efl_model_properties_get_delegate(properties_get);
587 if (methods.FirstOrDefault(m => m.Name == "GetProperties") != null)
589 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) });
592 if (efl_model_property_get_static_delegate == null)
594 efl_model_property_get_static_delegate = new efl_model_property_get_delegate(property_get);
597 if (methods.FirstOrDefault(m => m.Name == "GetProperty") != null)
599 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) });
602 if (efl_model_property_set_static_delegate == null)
604 efl_model_property_set_static_delegate = new efl_model_property_set_delegate(property_set);
607 if (methods.FirstOrDefault(m => m.Name == "SetProperty") != null)
609 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) });
612 if (efl_model_children_count_get_static_delegate == null)
614 efl_model_children_count_get_static_delegate = new efl_model_children_count_get_delegate(children_count_get);
617 if (methods.FirstOrDefault(m => m.Name == "GetChildrenCount") != null)
619 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) });
622 if (efl_model_property_ready_get_static_delegate == null)
624 efl_model_property_ready_get_static_delegate = new efl_model_property_ready_get_delegate(property_ready_get);
627 if (methods.FirstOrDefault(m => m.Name == "GetPropertyReady") != null)
629 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) });
632 if (efl_model_children_slice_get_static_delegate == null)
634 efl_model_children_slice_get_static_delegate = new efl_model_children_slice_get_delegate(children_slice_get);
637 if (methods.FirstOrDefault(m => m.Name == "GetChildrenSlice") != null)
639 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) });
642 if (efl_model_child_add_static_delegate == null)
644 efl_model_child_add_static_delegate = new efl_model_child_add_delegate(child_add);
647 if (methods.FirstOrDefault(m => m.Name == "AddChild") != null)
649 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) });
652 if (efl_model_child_del_static_delegate == null)
654 efl_model_child_del_static_delegate = new efl_model_child_del_delegate(child_del);
657 if (methods.FirstOrDefault(m => m.Name == "DelChild") != null)
659 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) });
664 /// <summary>Returns the Eo class for the native methods of this class.</summary>
665 /// <returns>The native class pointer.</returns>
666 public override IntPtr GetEflClass()
668 return Efl.IModelConcrete.efl_model_interface_get();
671 #pragma warning disable CA1707, CS1591, SA1300, SA1600
674 private delegate System.IntPtr efl_model_properties_get_delegate(System.IntPtr obj, System.IntPtr pd);
677 public delegate System.IntPtr efl_model_properties_get_api_delegate(System.IntPtr obj);
679 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");
681 private static System.IntPtr properties_get(System.IntPtr obj, System.IntPtr pd)
683 Eina.Log.Debug("function efl_model_properties_get was called");
684 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
687 Eina.Iterator<System.String> _ret_var = default(Eina.Iterator<System.String>);
690 _ret_var = ((IModel)ws.Target).GetProperties();
694 Eina.Log.Warning($"Callback error: {e.ToString()}");
695 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
698 _ret_var.Own = false; return _ret_var.Handle;
703 return efl_model_properties_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
707 private static efl_model_properties_get_delegate efl_model_properties_get_static_delegate;
709 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
710 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);
712 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]
713 public delegate Eina.Value efl_model_property_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
715 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");
717 private static Eina.Value property_get(System.IntPtr obj, System.IntPtr pd, System.String property)
719 Eina.Log.Debug("function efl_model_property_get was called");
720 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
723 Eina.Value _ret_var = default(Eina.Value);
726 _ret_var = ((IModel)ws.Target).GetProperty(property);
730 Eina.Log.Warning($"Callback error: {e.ToString()}");
731 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
739 return efl_model_property_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property);
743 private static efl_model_property_get_delegate efl_model_property_get_static_delegate;
745 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
746 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);
748 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
749 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);
751 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");
753 private static Eina.Future property_set(System.IntPtr obj, System.IntPtr pd, System.String property, Eina.Value value)
755 Eina.Log.Debug("function efl_model_property_set was called");
756 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
759 Eina.Future _ret_var = default( Eina.Future);
762 _ret_var = ((IModel)ws.Target).SetProperty(property, value);
766 Eina.Log.Warning($"Callback error: {e.ToString()}");
767 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
775 return efl_model_property_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property, value);
779 private static efl_model_property_set_delegate efl_model_property_set_static_delegate;
782 private delegate uint efl_model_children_count_get_delegate(System.IntPtr obj, System.IntPtr pd);
785 public delegate uint efl_model_children_count_get_api_delegate(System.IntPtr obj);
787 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");
789 private static uint children_count_get(System.IntPtr obj, System.IntPtr pd)
791 Eina.Log.Debug("function efl_model_children_count_get was called");
792 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
795 uint _ret_var = default(uint);
798 _ret_var = ((IModel)ws.Target).GetChildrenCount();
802 Eina.Log.Warning($"Callback error: {e.ToString()}");
803 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
811 return efl_model_children_count_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
815 private static efl_model_children_count_get_delegate efl_model_children_count_get_static_delegate;
817 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
818 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);
820 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
821 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);
823 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");
825 private static Eina.Future property_ready_get(System.IntPtr obj, System.IntPtr pd, System.String property)
827 Eina.Log.Debug("function efl_model_property_ready_get was called");
828 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
831 Eina.Future _ret_var = default( Eina.Future);
834 _ret_var = ((IModel)ws.Target).GetPropertyReady(property);
838 Eina.Log.Warning($"Callback error: {e.ToString()}");
839 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
847 return efl_model_property_ready_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property);
851 private static efl_model_property_ready_get_delegate efl_model_property_ready_get_static_delegate;
853 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
854 private delegate Eina.Future efl_model_children_slice_get_delegate(System.IntPtr obj, System.IntPtr pd, uint start, uint count);
856 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
857 public delegate Eina.Future efl_model_children_slice_get_api_delegate(System.IntPtr obj, uint start, uint count);
859 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");
861 private static Eina.Future children_slice_get(System.IntPtr obj, System.IntPtr pd, uint start, uint count)
863 Eina.Log.Debug("function efl_model_children_slice_get was called");
864 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
867 Eina.Future _ret_var = default( Eina.Future);
870 _ret_var = ((IModel)ws.Target).GetChildrenSlice(start, count);
874 Eina.Log.Warning($"Callback error: {e.ToString()}");
875 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
883 return efl_model_children_slice_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, count);
887 private static efl_model_children_slice_get_delegate efl_model_children_slice_get_static_delegate;
889 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
890 private delegate Efl.Object efl_model_child_add_delegate(System.IntPtr obj, System.IntPtr pd);
892 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
893 public delegate Efl.Object efl_model_child_add_api_delegate(System.IntPtr obj);
895 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");
897 private static Efl.Object child_add(System.IntPtr obj, System.IntPtr pd)
899 Eina.Log.Debug("function efl_model_child_add was called");
900 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
903 Efl.Object _ret_var = default(Efl.Object);
906 _ret_var = ((IModel)ws.Target).AddChild();
910 Eina.Log.Warning($"Callback error: {e.ToString()}");
911 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
919 return efl_model_child_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
923 private static efl_model_child_add_delegate efl_model_child_add_static_delegate;
926 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);
929 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);
931 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");
933 private static void child_del(System.IntPtr obj, System.IntPtr pd, Efl.Object child)
935 Eina.Log.Debug("function efl_model_child_del was called");
936 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
942 ((IModel)ws.Target).DelChild(child);
946 Eina.Log.Warning($"Callback error: {e.ToString()}");
947 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
954 efl_model_child_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), child);
958 private static efl_model_child_del_delegate efl_model_child_del_static_delegate;
960 #pragma warning restore CA1707, CS1591, SA1300, SA1600
967 #pragma warning disable CS1591
968 public static class EflIModelConcrete_ExtensionMethods {
973 #pragma warning restore CS1591
977 /// <summary>EFL model property event data structure</summary>
978 [StructLayout(LayoutKind.Sequential)]
979 [Efl.Eo.BindingEntity]
980 public struct ModelPropertyEvent
982 /// <summary>List of changed properties</summary>
983 public Eina.Array<Eina.Stringshare> Changed_properties;
984 /// <summary>Removed properties identified by name</summary>
985 public Eina.Array<Eina.Stringshare> Invalidated_properties;
986 /// <summary>Constructor for ModelPropertyEvent.</summary>
987 /// <param name="Changed_properties">List of changed properties</param>;
988 /// <param name="Invalidated_properties">Removed properties identified by name</param>;
989 public ModelPropertyEvent(
990 Eina.Array<Eina.Stringshare> Changed_properties = default(Eina.Array<Eina.Stringshare>),
991 Eina.Array<Eina.Stringshare> Invalidated_properties = default(Eina.Array<Eina.Stringshare>) )
993 this.Changed_properties = Changed_properties;
994 this.Invalidated_properties = Invalidated_properties;
997 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
998 /// <param name="ptr">Native pointer to be converted.</param>
999 public static implicit operator ModelPropertyEvent(IntPtr ptr)
1001 var tmp = (ModelPropertyEvent.NativeStruct)Marshal.PtrToStructure(ptr, typeof(ModelPropertyEvent.NativeStruct));
1005 #pragma warning disable CS1591
1007 /// <summary>Internal wrapper for struct ModelPropertyEvent.</summary>
1008 [StructLayout(LayoutKind.Sequential)]
1009 public struct NativeStruct
1012 public System.IntPtr Changed_properties;
1014 public System.IntPtr Invalidated_properties;
1015 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
1016 public static implicit operator ModelPropertyEvent.NativeStruct(ModelPropertyEvent _external_struct)
1018 var _internal_struct = new ModelPropertyEvent.NativeStruct();
1019 _internal_struct.Changed_properties = _external_struct.Changed_properties.Handle;
1020 _internal_struct.Invalidated_properties = _external_struct.Invalidated_properties.Handle;
1021 return _internal_struct;
1024 /// <summary>Implicit conversion to the managed representation.</summary>
1025 public static implicit operator ModelPropertyEvent(ModelPropertyEvent.NativeStruct _internal_struct)
1027 var _external_struct = new ModelPropertyEvent();
1028 _external_struct.Changed_properties = new Eina.Array<Eina.Stringshare>(_internal_struct.Changed_properties, false, false);
1029 _external_struct.Invalidated_properties = new Eina.Array<Eina.Stringshare>(_internal_struct.Invalidated_properties, false, false);
1030 return _external_struct;
1035 #pragma warning restore CS1591
1043 /// <summary>Every time a child is added the event <see cref="Efl.IModel.ChildAddedEvt"/> is dispatched passing along this structure.</summary>
1044 [StructLayout(LayoutKind.Sequential)]
1045 [Efl.Eo.BindingEntity]
1046 public struct ModelChildrenEvent
1048 /// <summary>index is a hint and is intended to provide a way for applications to control/know children relative positions through listings.</summary>
1050 /// <summary>If an object has been built for this index and it is currently tracked by the parent, it will be available here.</summary>
1051 public Efl.Object Child;
1052 /// <summary>Constructor for ModelChildrenEvent.</summary>
1053 /// <param name="Index">index is a hint and is intended to provide a way for applications to control/know children relative positions through listings.</param>;
1054 /// <param name="Child">If an object has been built for this index and it is currently tracked by the parent, it will be available here.</param>;
1055 public ModelChildrenEvent(
1056 uint Index = default(uint),
1057 Efl.Object Child = default(Efl.Object) )
1063 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
1064 /// <param name="ptr">Native pointer to be converted.</param>
1065 public static implicit operator ModelChildrenEvent(IntPtr ptr)
1067 var tmp = (ModelChildrenEvent.NativeStruct)Marshal.PtrToStructure(ptr, typeof(ModelChildrenEvent.NativeStruct));
1071 #pragma warning disable CS1591
1073 /// <summary>Internal wrapper for struct ModelChildrenEvent.</summary>
1074 [StructLayout(LayoutKind.Sequential)]
1075 public struct NativeStruct
1079 /// <summary>Internal wrapper for field Child</summary>
1080 public System.IntPtr Child;
1081 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
1082 public static implicit operator ModelChildrenEvent.NativeStruct(ModelChildrenEvent _external_struct)
1084 var _internal_struct = new ModelChildrenEvent.NativeStruct();
1085 _internal_struct.Index = _external_struct.Index;
1086 _internal_struct.Child = _external_struct.Child?.NativeHandle ?? System.IntPtr.Zero;
1087 return _internal_struct;
1090 /// <summary>Implicit conversion to the managed representation.</summary>
1091 public static implicit operator ModelChildrenEvent(ModelChildrenEvent.NativeStruct _internal_struct)
1093 var _external_struct = new ModelChildrenEvent();
1094 _external_struct.Index = _internal_struct.Index;
1096 _external_struct.Child = (Efl.Object) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Child);
1097 return _external_struct;
1102 #pragma warning restore CS1591