1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl UI factory interface</summary>
13 [Efl.Ui.IFactoryConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IFactory :
17 Efl.Ui.IPropertyBind ,
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Create a UI object from the necessary properties in the specified model.</summary>
21 /// <param name="model">Efl model</param>
22 /// <param name="parent">Efl canvas</param>
23 /// <returns>Created UI object</returns>
24 Eina.Future Create(Efl.IModel model, Efl.Gfx.IEntity parent);
25 /// <summary>Release a UI object and disconnect from models.</summary>
26 /// <param name="ui_view">Efl canvas</param>
27 void Release(Efl.Gfx.IEntity ui_view);
28 /// <summary>Async wrapper for <see cref="Create" />.</summary>
29 /// <param name="model">Efl model</param>
30 /// <param name="parent">Efl canvas</param>
31 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
32 /// <returns>An async task wrapping the result of the operation.</returns>
33 System.Threading.Tasks.Task<Eina.Value> CreateAsync(Efl.IModel model,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken));
35 /// <summary>Event triggered when an item has been successfully created.</summary>
36 event EventHandler<Efl.Ui.IFactoryCreatedEvt_Args> CreatedEvt;
38 ///<summary>Event argument wrapper for event <see cref="Efl.Ui.IFactory.CreatedEvt"/>.</summary>
39 [Efl.Eo.BindingEntity]
40 public class IFactoryCreatedEvt_Args : EventArgs {
41 ///<summary>Actual event payload.</summary>
42 public Efl.Ui.FactoryItemCreatedEvent arg { get; set; }
44 /// <summary>Efl UI factory interface</summary>
45 sealed public class IFactoryConcrete :
48 , Efl.Ui.IFactoryBind, Efl.Ui.IPropertyBind
50 ///<summary>Pointer to the native class description.</summary>
51 public override System.IntPtr NativeClass
55 if (((object)this).GetType() == typeof(IFactoryConcrete))
57 return GetEflClassStatic();
61 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
66 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
67 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
68 private IFactoryConcrete(ConstructingHandle ch) : base(ch)
72 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
73 efl_ui_factory_interface_get();
74 /// <summary>Initializes a new instance of the <see cref="IFactory"/> class.
75 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
76 /// <param name="wh">The native pointer to be wrapped.</param>
77 private IFactoryConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
81 /// <summary>Event triggered when an item has been successfully created.</summary>
82 public event EventHandler<Efl.Ui.IFactoryCreatedEvt_Args> CreatedEvt
86 lock (eflBindingEventLock)
88 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
90 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
93 Efl.Ui.IFactoryCreatedEvt_Args args = new Efl.Ui.IFactoryCreatedEvt_Args();
97 value?.Invoke(obj, args);
101 Eina.Log.Error(e.ToString());
102 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
107 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
108 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
114 lock (eflBindingEventLock)
116 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
117 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
121 ///<summary>Method to raise event CreatedEvt.</summary>
122 public void OnCreatedEvt(Efl.Ui.IFactoryCreatedEvt_Args e)
124 var key = "_EFL_UI_FACTORY_EVENT_CREATED";
125 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
126 if (desc == IntPtr.Zero)
128 Eina.Log.Error($"Failed to get native event {key}");
132 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
135 Marshal.StructureToPtr(e.arg, info, false);
136 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
140 Marshal.FreeHGlobal(info);
143 /// <summary>Event dispatched when a property on the object has changed due to an user interaction on the object that a model could be interested in.</summary>
144 public event EventHandler<Efl.Ui.IPropertyBindPropertiesChangedEvt_Args> PropertiesChangedEvt
148 lock (eflBindingEventLock)
150 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
152 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
155 Efl.Ui.IPropertyBindPropertiesChangedEvt_Args args = new Efl.Ui.IPropertyBindPropertiesChangedEvt_Args();
159 value?.Invoke(obj, args);
163 Eina.Log.Error(e.ToString());
164 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
169 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
170 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
176 lock (eflBindingEventLock)
178 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
179 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
183 ///<summary>Method to raise event PropertiesChangedEvt.</summary>
184 public void OnPropertiesChangedEvt(Efl.Ui.IPropertyBindPropertiesChangedEvt_Args e)
186 var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
187 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
188 if (desc == IntPtr.Zero)
190 Eina.Log.Error($"Failed to get native event {key}");
194 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
197 Marshal.StructureToPtr(e.arg, info, false);
198 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
202 Marshal.FreeHGlobal(info);
205 /// <summary>Event dispatched when a property on the object is bound to a model. This is useful to not overgenerate event.</summary>
206 public event EventHandler<Efl.Ui.IPropertyBindPropertyBoundEvt_Args> PropertyBoundEvt
210 lock (eflBindingEventLock)
212 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
214 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
217 Efl.Ui.IPropertyBindPropertyBoundEvt_Args args = new Efl.Ui.IPropertyBindPropertyBoundEvt_Args();
218 args.arg = Eina.StringConversion.NativeUtf8ToManagedString(evt.Info);
221 value?.Invoke(obj, args);
225 Eina.Log.Error(e.ToString());
226 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
231 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
232 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
238 lock (eflBindingEventLock)
240 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
241 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
245 ///<summary>Method to raise event PropertyBoundEvt.</summary>
246 public void OnPropertyBoundEvt(Efl.Ui.IPropertyBindPropertyBoundEvt_Args e)
248 var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
249 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
250 if (desc == IntPtr.Zero)
252 Eina.Log.Error($"Failed to get native event {key}");
256 IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(e.arg);
259 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
263 Eina.MemoryNative.Free(info);
266 /// <summary>Create a UI object from the necessary properties in the specified model.</summary>
267 /// <param name="model">Efl model</param>
268 /// <param name="parent">Efl canvas</param>
269 /// <returns>Created UI object</returns>
270 public Eina.Future Create(Efl.IModel model, Efl.Gfx.IEntity parent) {
271 var _ret_var = Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_create_ptr.Value.Delegate(this.NativeHandle,model, parent);
272 Eina.Error.RaiseIfUnhandledException();
275 /// <summary>Release a UI object and disconnect from models.</summary>
276 /// <param name="ui_view">Efl canvas</param>
277 public void Release(Efl.Gfx.IEntity ui_view) {
278 Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_release_ptr.Value.Delegate(this.NativeHandle,ui_view);
279 Eina.Error.RaiseIfUnhandledException();
281 /// <summary>bind the factory with the given key string. when the data is ready or changed, factory create the object and bind the data to the key action and process promised work. Note: the input <see cref="Efl.Ui.IFactory"/> need to be <see cref="Efl.Ui.IPropertyBind.PropertyBind"/> at least once.</summary>
282 /// <param name="key">Key string for bind model property data</param>
283 /// <param name="factory"><see cref="Efl.Ui.IFactory"/> for create and bind model property data</param>
284 public void FactoryBind(System.String key, Efl.Ui.IFactory factory) {
285 Efl.Ui.IFactoryBindConcrete.NativeMethods.efl_ui_factory_bind_ptr.Value.Delegate(this.NativeHandle,key, factory);
286 Eina.Error.RaiseIfUnhandledException();
288 /// <summary>bind property data with the given key string. when the data is ready or changed, bind the data to the key action and process promised work.</summary>
289 /// <param name="key">key string for bind model property data</param>
290 /// <param name="property">Model property name</param>
291 /// <returns>0 when it succeed, an error code otherwise.</returns>
292 public Eina.Error PropertyBind(System.String key, System.String property) {
293 var _ret_var = Efl.Ui.IPropertyBindConcrete.NativeMethods.efl_ui_property_bind_ptr.Value.Delegate(this.NativeHandle,key, property);
294 Eina.Error.RaiseIfUnhandledException();
297 /// <summary>Async wrapper for <see cref="Create" />.</summary>
298 /// <param name="model">Efl model</param>
299 /// <param name="parent">Efl canvas</param>
300 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
301 /// <returns>An async task wrapping the result of the operation.</returns>
302 public System.Threading.Tasks.Task<Eina.Value> CreateAsync(Efl.IModel model,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
304 Eina.Future future = Create( model, parent);
305 return Efl.Eo.Globals.WrapAsync(future, token);
308 private static IntPtr GetEflClassStatic()
310 return Efl.Ui.IFactoryConcrete.efl_ui_factory_interface_get();
312 /// <summary>Wrapper for native methods and virtual method delegates.
313 /// For internal use by generated code only.</summary>
314 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
316 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
317 /// <summary>Gets the list of Eo operations to override.</summary>
318 /// <returns>The list of Eo operations to be overload.</returns>
319 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
321 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
322 var methods = Efl.Eo.Globals.GetUserMethods(type);
324 if (efl_ui_factory_create_static_delegate == null)
326 efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create);
329 if (methods.FirstOrDefault(m => m.Name == "Create") != null)
331 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_factory_create"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_create_static_delegate) });
334 if (efl_ui_factory_release_static_delegate == null)
336 efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release);
339 if (methods.FirstOrDefault(m => m.Name == "Release") != null)
341 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_factory_release"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_release_static_delegate) });
344 if (efl_ui_factory_bind_static_delegate == null)
346 efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind);
349 if (methods.FirstOrDefault(m => m.Name == "FactoryBind") != null)
351 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_factory_bind"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_bind_static_delegate) });
354 if (efl_ui_property_bind_static_delegate == null)
356 efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
359 if (methods.FirstOrDefault(m => m.Name == "PropertyBind") != null)
361 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_property_bind"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_property_bind_static_delegate) });
366 /// <summary>Returns the Eo class for the native methods of this class.</summary>
367 /// <returns>The native class pointer.</returns>
368 public override IntPtr GetEflClass()
370 return Efl.Ui.IFactoryConcrete.efl_ui_factory_interface_get();
373 #pragma warning disable CA1707, CS1591, SA1300, SA1600
375 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
376 private delegate Eina.Future efl_ui_factory_create_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.IModel model, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity parent);
378 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
379 public delegate Eina.Future efl_ui_factory_create_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.IModel model, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity parent);
381 public static Efl.Eo.FunctionWrapper<efl_ui_factory_create_api_delegate> efl_ui_factory_create_ptr = new Efl.Eo.FunctionWrapper<efl_ui_factory_create_api_delegate>(Module, "efl_ui_factory_create");
383 private static Eina.Future create(System.IntPtr obj, System.IntPtr pd, Efl.IModel model, Efl.Gfx.IEntity parent)
385 Eina.Log.Debug("function efl_ui_factory_create was called");
386 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
389 Eina.Future _ret_var = default( Eina.Future);
392 _ret_var = ((IFactory)ws.Target).Create(model, parent);
396 Eina.Log.Warning($"Callback error: {e.ToString()}");
397 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
405 return efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), model, parent);
409 private static efl_ui_factory_create_delegate efl_ui_factory_create_static_delegate;
412 private delegate void efl_ui_factory_release_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity ui_view);
415 public delegate void efl_ui_factory_release_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity ui_view);
417 public static Efl.Eo.FunctionWrapper<efl_ui_factory_release_api_delegate> efl_ui_factory_release_ptr = new Efl.Eo.FunctionWrapper<efl_ui_factory_release_api_delegate>(Module, "efl_ui_factory_release");
419 private static void release(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view)
421 Eina.Log.Debug("function efl_ui_factory_release was called");
422 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
428 ((IFactory)ws.Target).Release(ui_view);
432 Eina.Log.Warning($"Callback error: {e.ToString()}");
433 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
440 efl_ui_factory_release_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view);
444 private static efl_ui_factory_release_delegate efl_ui_factory_release_static_delegate;
447 private delegate void efl_ui_factory_bind_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Ui.IFactory factory);
450 public delegate void efl_ui_factory_bind_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Ui.IFactory factory);
452 public static Efl.Eo.FunctionWrapper<efl_ui_factory_bind_api_delegate> efl_ui_factory_bind_ptr = new Efl.Eo.FunctionWrapper<efl_ui_factory_bind_api_delegate>(Module, "efl_ui_factory_bind");
454 private static void factory_bind(System.IntPtr obj, System.IntPtr pd, System.String key, Efl.Ui.IFactory factory)
456 Eina.Log.Debug("function efl_ui_factory_bind was called");
457 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
463 ((IFactory)ws.Target).FactoryBind(key, factory);
467 Eina.Log.Warning($"Callback error: {e.ToString()}");
468 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
475 efl_ui_factory_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, factory);
479 private static efl_ui_factory_bind_delegate efl_ui_factory_bind_static_delegate;
482 private delegate Eina.Error efl_ui_property_bind_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
485 public delegate Eina.Error efl_ui_property_bind_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String property);
487 public static Efl.Eo.FunctionWrapper<efl_ui_property_bind_api_delegate> efl_ui_property_bind_ptr = new Efl.Eo.FunctionWrapper<efl_ui_property_bind_api_delegate>(Module, "efl_ui_property_bind");
489 private static Eina.Error property_bind(System.IntPtr obj, System.IntPtr pd, System.String key, System.String property)
491 Eina.Log.Debug("function efl_ui_property_bind was called");
492 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
495 Eina.Error _ret_var = default(Eina.Error);
498 _ret_var = ((IFactory)ws.Target).PropertyBind(key, property);
502 Eina.Log.Warning($"Callback error: {e.ToString()}");
503 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
511 return efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, property);
515 private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate;
517 #pragma warning restore CA1707, CS1591, SA1300, SA1600
529 /// <summary>EFL Ui Factory event structure provided when an item was just created.</summary>
530 [StructLayout(LayoutKind.Sequential)]
531 [Efl.Eo.BindingEntity]
532 public struct FactoryItemCreatedEvent
534 /// <summary>The model already set on the new item.</summary>
535 public Efl.IModel Model;
536 /// <summary>The item that was just created.</summary>
537 public Efl.Gfx.IEntity Item;
538 ///<summary>Constructor for FactoryItemCreatedEvent.</summary>
539 public FactoryItemCreatedEvent(
540 Efl.IModel Model = default(Efl.IModel),
541 Efl.Gfx.IEntity Item = default(Efl.Gfx.IEntity) )
547 ///<summary>Implicit conversion to the managed representation from a native pointer.</summary>
548 ///<param name="ptr">Native pointer to be converted.</param>
549 public static implicit operator FactoryItemCreatedEvent(IntPtr ptr)
551 var tmp = (FactoryItemCreatedEvent.NativeStruct)Marshal.PtrToStructure(ptr, typeof(FactoryItemCreatedEvent.NativeStruct));
555 #pragma warning disable CS1591
557 ///<summary>Internal wrapper for struct FactoryItemCreatedEvent.</summary>
558 [StructLayout(LayoutKind.Sequential)]
559 public struct NativeStruct
561 ///<summary>Internal wrapper for field Model</summary>
562 public System.IntPtr Model;
563 ///<summary>Internal wrapper for field Item</summary>
564 public System.IntPtr Item;
565 ///<summary>Implicit conversion to the internal/marshalling representation.</summary>
566 public static implicit operator FactoryItemCreatedEvent.NativeStruct(FactoryItemCreatedEvent _external_struct)
568 var _internal_struct = new FactoryItemCreatedEvent.NativeStruct();
569 _internal_struct.Model = _external_struct.Model?.NativeHandle ?? System.IntPtr.Zero;
570 _internal_struct.Item = _external_struct.Item?.NativeHandle ?? System.IntPtr.Zero;
571 return _internal_struct;
574 ///<summary>Implicit conversion to the managed representation.</summary>
575 public static implicit operator FactoryItemCreatedEvent(FactoryItemCreatedEvent.NativeStruct _internal_struct)
577 var _external_struct = new FactoryItemCreatedEvent();
579 _external_struct.Model = (Efl.IModelConcrete) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Model);
581 _external_struct.Item = (Efl.Gfx.IEntityConcrete) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Item);
582 return _external_struct;
587 #pragma warning restore CS1591