[Bluetooth][Non-ACR] Fix no data exception issue (#787)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl_ui_factory.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { 
8 /// <summary>Efl UI factory interface</summary>
9 [FactoryNativeInherit]
10 public interface Factory : 
11    Efl.Ui.FactoryBind ,
12    Efl.Ui.PropertyBind ,
13    Efl.Eo.IWrapper, IDisposable
14 {
15    /// <summary>Create a UI object from the necessary properties in the specified model.</summary>
16 /// <param name="model">Efl model</param>
17 /// <param name="parent">Efl canvas</param>
18 /// <returns>Created UI object</returns>
19  Eina.Future Create( Efl.Model model,  Efl.Gfx.Entity parent);
20    /// <summary>Release a UI object and disconnect from models.</summary>
21 /// <param name="ui_view">Efl canvas</param>
22 /// <returns></returns>
23  void Release( Efl.Gfx.Entity ui_view);
24       System.Threading.Tasks.Task<Eina.Value> CreateAsync( Efl.Model model, Efl.Gfx.Entity parent, System.Threading.CancellationToken token=default(System.Threading.CancellationToken));
25       /// <summary>Event triggered when an item has been successfully created.</summary>
26    event EventHandler<Efl.Ui.FactoryCreatedEvt_Args> CreatedEvt;
27 }
28 ///<summary>Event argument wrapper for event <see cref="Efl.Ui.Factory.CreatedEvt"/>.</summary>
29 public class FactoryCreatedEvt_Args : EventArgs {
30    ///<summary>Actual event payload.</summary>
31    public Efl.Ui.FactoryItemCreatedEvent arg { get; set; }
32 }
33 /// <summary>Efl UI factory interface</summary>
34 sealed public class FactoryConcrete : 
35
36 Factory
37    , Efl.Ui.FactoryBind, Efl.Ui.PropertyBind
38 {
39    ///<summary>Pointer to the native class description.</summary>
40    public System.IntPtr NativeClass {
41       get {
42          if (((object)this).GetType() == typeof (FactoryConcrete))
43             return Efl.Ui.FactoryNativeInherit.GetEflClassStatic();
44          else
45             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
46       }
47    }
48    private EventHandlerList eventHandlers = new EventHandlerList();
49    private  System.IntPtr handle;
50    ///<summary>Pointer to the native instance.</summary>
51    public System.IntPtr NativeHandle {
52       get { return handle; }
53    }
54    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
55       efl_ui_factory_interface_get();
56    ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
57    public FactoryConcrete(System.IntPtr raw)
58    {
59       handle = raw;
60       register_event_proxies();
61    }
62    ///<summary>Destructor.</summary>
63    ~FactoryConcrete()
64    {
65       Dispose(false);
66    }
67    ///<summary>Releases the underlying native instance.</summary>
68    void Dispose(bool disposing)
69    {
70       if (handle != System.IntPtr.Zero) {
71          Efl.Eo.Globals.efl_unref(handle);
72          handle = System.IntPtr.Zero;
73       }
74    }
75    ///<summary>Releases the underlying native instance.</summary>
76    public void Dispose()
77    {
78       Dispose(true);
79       GC.SuppressFinalize(this);
80    }
81    ///<summary>Casts obj into an instance of this type.</summary>
82    public static FactoryConcrete static_cast(Efl.Object obj)
83    {
84       if (obj == null)
85          throw new System.ArgumentNullException("obj");
86       return new FactoryConcrete(obj.NativeHandle);
87    }
88    ///<summary>Verifies if the given object is equal to this one.</summary>
89    public override bool Equals(object obj)
90    {
91       var other = obj as Efl.Object;
92       if (other == null)
93          return false;
94       return this.NativeHandle == other.NativeHandle;
95    }
96    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
97    public override int GetHashCode()
98    {
99       return this.NativeHandle.ToInt32();
100    }
101    ///<summary>Turns the native pointer into a string representation.</summary>
102    public override String ToString()
103    {
104       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
105    }
106    private readonly object eventLock = new object();
107    private Dictionary<string, int> event_cb_count = new Dictionary<string, int>();
108    private bool add_cpp_event_handler(string lib, string key, Efl.EventCb evt_delegate) {
109       int event_count = 0;
110       if (!event_cb_count.TryGetValue(key, out event_count))
111          event_cb_count[key] = event_count;
112       if (event_count == 0) {
113          IntPtr desc = Efl.EventDescription.GetNative(lib, key);
114          if (desc == IntPtr.Zero) {
115             Eina.Log.Error($"Failed to get native event {key}");
116             return false;
117          }
118           bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
119          if (!result) {
120             Eina.Log.Error($"Failed to add event proxy for event {key}");
121             return false;
122          }
123          Eina.Error.RaiseIfUnhandledException();
124       } 
125       event_cb_count[key]++;
126       return true;
127    }
128    private bool remove_cpp_event_handler(string key, Efl.EventCb evt_delegate) {
129       int event_count = 0;
130       if (!event_cb_count.TryGetValue(key, out event_count))
131          event_cb_count[key] = event_count;
132       if (event_count == 1) {
133          IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
134          if (desc == IntPtr.Zero) {
135             Eina.Log.Error($"Failed to get native event {key}");
136             return false;
137          }
138          bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
139          if (!result) {
140             Eina.Log.Error($"Failed to remove event proxy for event {key}");
141             return false;
142          }
143          Eina.Error.RaiseIfUnhandledException();
144       } else if (event_count == 0) {
145          Eina.Log.Error($"Trying to remove proxy for event {key} when there is nothing registered.");
146          return false;
147       } 
148       event_cb_count[key]--;
149       return true;
150    }
151 private static object CreatedEvtKey = new object();
152    /// <summary>Event triggered when an item has been successfully created.</summary>
153    public event EventHandler<Efl.Ui.FactoryCreatedEvt_Args> CreatedEvt
154    {
155       add {
156          lock (eventLock) {
157             string key = "_EFL_UI_FACTORY_EVENT_CREATED";
158             if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_CreatedEvt_delegate)) {
159                eventHandlers.AddHandler(CreatedEvtKey , value);
160             } else
161                Eina.Log.Error($"Error adding proxy for event {key}");
162          }
163       }
164       remove {
165          lock (eventLock) {
166             string key = "_EFL_UI_FACTORY_EVENT_CREATED";
167             if (remove_cpp_event_handler(key, this.evt_CreatedEvt_delegate)) { 
168                eventHandlers.RemoveHandler(CreatedEvtKey , value);
169             } else
170                Eina.Log.Error($"Error removing proxy for event {key}");
171          }
172       }
173    }
174    ///<summary>Method to raise event CreatedEvt.</summary>
175    public void On_CreatedEvt(Efl.Ui.FactoryCreatedEvt_Args e)
176    {
177       EventHandler<Efl.Ui.FactoryCreatedEvt_Args> evt;
178       lock (eventLock) {
179       evt = (EventHandler<Efl.Ui.FactoryCreatedEvt_Args>)eventHandlers[CreatedEvtKey];
180       }
181       evt?.Invoke(this, e);
182    }
183    Efl.EventCb evt_CreatedEvt_delegate;
184    private void on_CreatedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
185    {
186       Efl.Ui.FactoryCreatedEvt_Args args = new Efl.Ui.FactoryCreatedEvt_Args();
187       args.arg =  evt.Info;;
188       try {
189          On_CreatedEvt(args);
190       } catch (Exception e) {
191          Eina.Log.Error(e.ToString());
192          Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
193       }
194    }
195
196     void register_event_proxies()
197    {
198       evt_CreatedEvt_delegate = new Efl.EventCb(on_CreatedEvt_NativeCallback);
199    }
200    /// <summary>Create a UI object from the necessary properties in the specified model.</summary>
201    /// <param name="model">Efl model</param>
202    /// <param name="parent">Efl canvas</param>
203    /// <returns>Created UI object</returns>
204    public  Eina.Future Create( Efl.Model model,  Efl.Gfx.Entity parent) {
205                                            var _ret_var = Efl.Ui.FactoryNativeInherit.efl_ui_factory_create_ptr.Value.Delegate(this.NativeHandle, model,  parent);
206       Eina.Error.RaiseIfUnhandledException();
207                               return _ret_var;
208  }
209    /// <summary>Release a UI object and disconnect from models.</summary>
210    /// <param name="ui_view">Efl canvas</param>
211    /// <returns></returns>
212    public  void Release( Efl.Gfx.Entity ui_view) {
213                          Efl.Ui.FactoryNativeInherit.efl_ui_factory_release_ptr.Value.Delegate(this.NativeHandle, ui_view);
214       Eina.Error.RaiseIfUnhandledException();
215                    }
216    /// <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.Factory"/> need to be <see cref="Efl.Ui.PropertyBind.PropertyBind"/> at least once.</summary>
217    /// <param name="key">Key string for bind model property data</param>
218    /// <param name="factory"><see cref="Efl.Ui.Factory"/> for create and bind model property data</param>
219    /// <returns></returns>
220    public  void FactoryBind(  System.String key,  Efl.Ui.Factory factory) {
221                                            Efl.Ui.FactoryBindNativeInherit.efl_ui_factory_bind_ptr.Value.Delegate(this.NativeHandle, key,  factory);
222       Eina.Error.RaiseIfUnhandledException();
223                                }
224    /// <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>
225    /// <param name="key">key string for bind model property data</param>
226    /// <param name="property">Model property name</param>
227    /// <returns></returns>
228    public  void PropertyBind(  System.String key,   System.String property) {
229                                            Efl.Ui.PropertyBindNativeInherit.efl_ui_property_bind_ptr.Value.Delegate(this.NativeHandle, key,  property);
230       Eina.Error.RaiseIfUnhandledException();
231                                }
232    public System.Threading.Tasks.Task<Eina.Value> CreateAsync( Efl.Model model, Efl.Gfx.Entity parent, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
233    {
234       Eina.Future future = Create(  model,  parent);
235       return Efl.Eo.Globals.WrapAsync(future, token);
236    }
237 }
238 public class FactoryNativeInherit  : Efl.Eo.NativeClass{
239    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
240    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
241    {
242       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
243       if (efl_ui_factory_create_static_delegate == null)
244       efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create);
245       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)});
246       if (efl_ui_factory_release_static_delegate == null)
247       efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release);
248       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)});
249       if (efl_ui_factory_bind_static_delegate == null)
250       efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind);
251       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)});
252       if (efl_ui_property_bind_static_delegate == null)
253       efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
254       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)});
255       return descs;
256    }
257    public override IntPtr GetEflClass()
258    {
259       return Efl.Ui.FactoryConcrete.efl_ui_factory_interface_get();
260    }
261    public static  IntPtr GetEflClassStatic()
262    {
263       return Efl.Ui.FactoryConcrete.efl_ui_factory_interface_get();
264    }
265
266
267    [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))] private delegate  Eina.Future efl_ui_factory_create_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.ModelConcrete, Efl.Eo.NonOwnTag>))]  Efl.Model model, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity parent);
268
269
270    [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))] public delegate  Eina.Future efl_ui_factory_create_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.ModelConcrete, Efl.Eo.NonOwnTag>))]  Efl.Model model, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity parent);
271     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");
272     private static  Eina.Future create(System.IntPtr obj, System.IntPtr pd,  Efl.Model model,  Efl.Gfx.Entity parent)
273    {
274       Eina.Log.Debug("function efl_ui_factory_create was called");
275       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
276       if(wrapper != null) {
277                                                        Eina.Future _ret_var = default( Eina.Future);
278          try {
279             _ret_var = ((Factory)wrapper).Create( model,  parent);
280          } catch (Exception e) {
281             Eina.Log.Warning($"Callback error: {e.ToString()}");
282             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
283          }
284                               return _ret_var;
285       } else {
286          return efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  model,  parent);
287       }
288    }
289    private static efl_ui_factory_create_delegate efl_ui_factory_create_static_delegate;
290
291
292     private delegate  void efl_ui_factory_release_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity ui_view);
293
294
295     public delegate  void efl_ui_factory_release_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity ui_view);
296     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");
297     private static  void release(System.IntPtr obj, System.IntPtr pd,  Efl.Gfx.Entity ui_view)
298    {
299       Eina.Log.Debug("function efl_ui_factory_release was called");
300       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
301       if(wrapper != null) {
302                                     
303          try {
304             ((Factory)wrapper).Release( ui_view);
305          } catch (Exception e) {
306             Eina.Log.Warning($"Callback error: {e.ToString()}");
307             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
308          }
309                         } else {
310          efl_ui_factory_release_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  ui_view);
311       }
312    }
313    private static efl_ui_factory_release_delegate efl_ui_factory_release_static_delegate;
314
315
316     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.MarshalTest<Efl.Ui.FactoryConcrete, Efl.Eo.NonOwnTag>))]  Efl.Ui.Factory factory);
317
318
319     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.MarshalTest<Efl.Ui.FactoryConcrete, Efl.Eo.NonOwnTag>))]  Efl.Ui.Factory factory);
320     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");
321     private static  void factory_bind(System.IntPtr obj, System.IntPtr pd,   System.String key,  Efl.Ui.Factory factory)
322    {
323       Eina.Log.Debug("function efl_ui_factory_bind was called");
324       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
325       if(wrapper != null) {
326                                                       
327          try {
328             ((Factory)wrapper).FactoryBind( key,  factory);
329          } catch (Exception e) {
330             Eina.Log.Warning($"Callback error: {e.ToString()}");
331             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
332          }
333                                     } else {
334          efl_ui_factory_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  key,  factory);
335       }
336    }
337    private static efl_ui_factory_bind_delegate efl_ui_factory_bind_static_delegate;
338
339
340     private delegate  void 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);
341
342
343     public delegate  void 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);
344     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");
345     private static  void property_bind(System.IntPtr obj, System.IntPtr pd,   System.String key,   System.String property)
346    {
347       Eina.Log.Debug("function efl_ui_property_bind was called");
348       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
349       if(wrapper != null) {
350                                                       
351          try {
352             ((Factory)wrapper).PropertyBind( key,  property);
353          } catch (Exception e) {
354             Eina.Log.Warning($"Callback error: {e.ToString()}");
355             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
356          }
357                                     } else {
358          efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  key,  property);
359       }
360    }
361    private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate;
362 }
363 } } 
364 namespace Efl { namespace Ui { 
365 /// <summary>EFL Ui Factory event structure provided when an item was just created.</summary>
366 [StructLayout(LayoutKind.Sequential)]
367 public struct FactoryItemCreatedEvent
368 {
369    /// <summary>The model already set on the new item.</summary>
370    public Efl.Model Model;
371    /// <summary>The item that was just created.</summary>
372    public Efl.Gfx.Entity Item;
373    ///<summary>Constructor for FactoryItemCreatedEvent.</summary>
374    public FactoryItemCreatedEvent(
375       Efl.Model Model=default(Efl.Model),
376       Efl.Gfx.Entity Item=default(Efl.Gfx.Entity)   )
377    {
378       this.Model = Model;
379       this.Item = Item;
380    }
381 public static implicit operator FactoryItemCreatedEvent(IntPtr ptr)
382    {
383       var tmp = (FactoryItemCreatedEvent_StructInternal)Marshal.PtrToStructure(ptr, typeof(FactoryItemCreatedEvent_StructInternal));
384       return FactoryItemCreatedEvent_StructConversion.ToManaged(tmp);
385    }
386 }
387 ///<summary>Internal wrapper for struct FactoryItemCreatedEvent.</summary>
388 [StructLayout(LayoutKind.Sequential)]
389 public struct FactoryItemCreatedEvent_StructInternal
390 {
391 ///<summary>Internal wrapper for field Model</summary>
392 public System.IntPtr Model;
393 ///<summary>Internal wrapper for field Item</summary>
394 public System.IntPtr Item;
395    ///<summary>Implicit conversion to the internal/marshalling representation.</summary>
396    public static implicit operator FactoryItemCreatedEvent(FactoryItemCreatedEvent_StructInternal struct_)
397    {
398       return FactoryItemCreatedEvent_StructConversion.ToManaged(struct_);
399    }
400    ///<summary>Implicit conversion to the managed representation.</summary>
401    public static implicit operator FactoryItemCreatedEvent_StructInternal(FactoryItemCreatedEvent struct_)
402    {
403       return FactoryItemCreatedEvent_StructConversion.ToInternal(struct_);
404    }
405 }
406 /// <summary>Conversion class for struct FactoryItemCreatedEvent</summary>
407 public static class FactoryItemCreatedEvent_StructConversion
408 {
409    internal static FactoryItemCreatedEvent_StructInternal ToInternal(FactoryItemCreatedEvent _external_struct)
410    {
411       var _internal_struct = new FactoryItemCreatedEvent_StructInternal();
412
413       _internal_struct.Model = _external_struct.Model.NativeHandle;
414       _internal_struct.Item = _external_struct.Item.NativeHandle;
415
416       return _internal_struct;
417    }
418
419    internal static FactoryItemCreatedEvent ToManaged(FactoryItemCreatedEvent_StructInternal _internal_struct)
420    {
421       var _external_struct = new FactoryItemCreatedEvent();
422
423
424       _external_struct.Model = (Efl.ModelConcrete) System.Activator.CreateInstance(typeof(Efl.ModelConcrete), new System.Object[] {_internal_struct.Model});
425       Efl.Eo.Globals.efl_ref(_internal_struct.Model);
426
427
428       _external_struct.Item = (Efl.Gfx.EntityConcrete) System.Activator.CreateInstance(typeof(Efl.Gfx.EntityConcrete), new System.Object[] {_internal_struct.Item});
429       Efl.Eo.Globals.efl_ref(_internal_struct.Item);
430
431
432       return _external_struct;
433    }
434
435 }
436 } }