9f8d169e21166f41b6387c9abbc0c724e7843ea2
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_widget_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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Ui {
11
12 /// <summary>Efl Ui Factory that provides <see cref="Efl.Ui.Widget"/>.
13 /// This factory is designed to build <see cref="Efl.Ui.Widget"/> and optionally set their <see cref="Efl.Ui.Widget.Style"/> if it was connected with <see cref="Efl.Ui.IPropertyBind.PropertyBind"/> &quot;<c>style</c>&quot;.</summary>
14 [Efl.Ui.WidgetFactory.NativeMethods]
15 public class WidgetFactory : Efl.LoopConsumer, Efl.Eo.IWrapper,Efl.Ui.IFactory,Efl.Ui.IFactoryBind,Efl.Ui.IPropertyBind
16 {
17     ///<summary>Pointer to the native class description.</summary>
18     public override System.IntPtr NativeClass
19     {
20         get
21         {
22             if (((object)this).GetType() == typeof(WidgetFactory))
23             {
24                 return GetEflClassStatic();
25             }
26             else
27             {
28                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
29             }
30         }
31     }
32
33     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
34         efl_ui_widget_factory_class_get();
35     /// <summary>Initializes a new instance of the <see cref="WidgetFactory"/> class.</summary>
36     /// <param name="parent">Parent instance.</param>
37     /// <param name="itemClass">Define the class of the item returned by this factory. See <see cref="Efl.Ui.WidgetFactory.SetItemClass"/></param>
38     public WidgetFactory(Efl.Object parent
39             , Type itemClass = null) : base(efl_ui_widget_factory_class_get(), typeof(WidgetFactory), parent)
40     {
41         if (Efl.Eo.Globals.ParamHelperCheck(itemClass))
42         {
43             SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass));
44         }
45
46         FinishInstantiation();
47     }
48
49     /// <summary>Initializes a new instance of the <see cref="WidgetFactory"/> class.
50     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
51     /// <param name="raw">The native pointer to be wrapped.</param>
52     protected WidgetFactory(System.IntPtr raw) : base(raw)
53     {
54             }
55
56     /// <summary>Initializes a new instance of the <see cref="WidgetFactory"/> class.
57     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
58     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
59     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
60     /// <param name="parent">The Efl.Object parent of this instance.</param>
61     protected WidgetFactory(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
62     {
63     }
64
65     /// <summary>Verifies if the given object is equal to this one.</summary>
66     /// <param name="instance">The object to compare to.</param>
67     /// <returns>True if both objects point to the same native object.</returns>
68     public override bool Equals(object instance)
69     {
70         var other = instance as Efl.Object;
71         if (other == null)
72         {
73             return false;
74         }
75         return this.NativeHandle == other.NativeHandle;
76     }
77
78     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
79     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
80     public override int GetHashCode()
81     {
82         return this.NativeHandle.ToInt32();
83     }
84
85     /// <summary>Turns the native pointer into a string representation.</summary>
86     /// <returns>A string with the type and the native pointer for this object.</returns>
87     public override String ToString()
88     {
89         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
90     }
91
92     /// <summary>Event triggered when an item has been successfully created.</summary>
93     public event EventHandler<Efl.Ui.IFactoryCreatedEvt_Args> CreatedEvt
94     {
95         add
96         {
97             lock (eventLock)
98             {
99                 var wRef = new WeakReference(this);
100                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
101                 {
102                     var obj = wRef.Target as Efl.Eo.IWrapper;
103                     if (obj != null)
104                     {
105                                                 Efl.Ui.IFactoryCreatedEvt_Args args = new Efl.Ui.IFactoryCreatedEvt_Args();
106                         args.arg =  evt.Info;
107                         try
108                         {
109                             value?.Invoke(obj, args);
110                         }
111                         catch (Exception e)
112                         {
113                             Eina.Log.Error(e.ToString());
114                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
115                         }
116                     }
117                 };
118
119                 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
120                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
121             }
122         }
123
124         remove
125         {
126             lock (eventLock)
127             {
128                 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
129                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
130             }
131         }
132     }
133     ///<summary>Method to raise event CreatedEvt.</summary>
134     public void OnCreatedEvt(Efl.Ui.IFactoryCreatedEvt_Args e)
135     {
136         var key = "_EFL_UI_FACTORY_EVENT_CREATED";
137         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
138         if (desc == IntPtr.Zero)
139         {
140             Eina.Log.Error($"Failed to get native event {key}");
141             return;
142         }
143
144         IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
145         try
146         {
147             Marshal.StructureToPtr(e.arg, info, false);
148             Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
149         }
150         finally
151         {
152             Marshal.FreeHGlobal(info);
153         }
154     }
155     /// <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>
156     public event EventHandler<Efl.Ui.IPropertyBindPropertiesChangedEvt_Args> PropertiesChangedEvt
157     {
158         add
159         {
160             lock (eventLock)
161             {
162                 var wRef = new WeakReference(this);
163                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
164                 {
165                     var obj = wRef.Target as Efl.Eo.IWrapper;
166                     if (obj != null)
167                     {
168                                                 Efl.Ui.IPropertyBindPropertiesChangedEvt_Args args = new Efl.Ui.IPropertyBindPropertiesChangedEvt_Args();
169                         args.arg =  evt.Info;
170                         try
171                         {
172                             value?.Invoke(obj, args);
173                         }
174                         catch (Exception e)
175                         {
176                             Eina.Log.Error(e.ToString());
177                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
178                         }
179                     }
180                 };
181
182                 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
183                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
184             }
185         }
186
187         remove
188         {
189             lock (eventLock)
190             {
191                 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
192                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
193             }
194         }
195     }
196     ///<summary>Method to raise event PropertiesChangedEvt.</summary>
197     public void OnPropertiesChangedEvt(Efl.Ui.IPropertyBindPropertiesChangedEvt_Args e)
198     {
199         var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
200         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
201         if (desc == IntPtr.Zero)
202         {
203             Eina.Log.Error($"Failed to get native event {key}");
204             return;
205         }
206
207         IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
208         try
209         {
210             Marshal.StructureToPtr(e.arg, info, false);
211             Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
212         }
213         finally
214         {
215             Marshal.FreeHGlobal(info);
216         }
217     }
218     /// <summary>Event dispatched when a property on the object is bound to a model. This is useful to not overgenerate event.</summary>
219     public event EventHandler<Efl.Ui.IPropertyBindPropertyBoundEvt_Args> PropertyBoundEvt
220     {
221         add
222         {
223             lock (eventLock)
224             {
225                 var wRef = new WeakReference(this);
226                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
227                 {
228                     var obj = wRef.Target as Efl.Eo.IWrapper;
229                     if (obj != null)
230                     {
231                                                 Efl.Ui.IPropertyBindPropertyBoundEvt_Args args = new Efl.Ui.IPropertyBindPropertyBoundEvt_Args();
232                         args.arg = Eina.StringConversion.NativeUtf8ToManagedString(evt.Info);
233                         try
234                         {
235                             value?.Invoke(obj, args);
236                         }
237                         catch (Exception e)
238                         {
239                             Eina.Log.Error(e.ToString());
240                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
241                         }
242                     }
243                 };
244
245                 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
246                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
247             }
248         }
249
250         remove
251         {
252             lock (eventLock)
253             {
254                 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
255                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
256             }
257         }
258     }
259     ///<summary>Method to raise event PropertyBoundEvt.</summary>
260     public void OnPropertyBoundEvt(Efl.Ui.IPropertyBindPropertyBoundEvt_Args e)
261     {
262         var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
263         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
264         if (desc == IntPtr.Zero)
265         {
266             Eina.Log.Error($"Failed to get native event {key}");
267             return;
268         }
269
270         IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(e.arg);
271         try
272         {
273             Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
274         }
275         finally
276         {
277             Eina.MemoryNative.Free(info);
278         }
279     }
280     /// <summary>Define the class of the item returned by this factory.</summary>
281     /// <returns>The class identifier to create item from.</returns>
282     virtual public Type GetItemClass() {
283          var _ret_var = Efl.Ui.WidgetFactory.NativeMethods.efl_ui_widget_factory_item_class_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
284         Eina.Error.RaiseIfUnhandledException();
285         return _ret_var;
286  }
287     /// <summary>Define the class of the item returned by this factory.</summary>
288     /// <param name="klass">The class identifier to create item from.</param>
289     virtual public void SetItemClass(Type klass) {
290                                  Efl.Ui.WidgetFactory.NativeMethods.efl_ui_widget_factory_item_class_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),klass);
291         Eina.Error.RaiseIfUnhandledException();
292                          }
293     /// <summary>Create a UI object from the necessary properties in the specified model.</summary>
294     /// <param name="model">Efl model</param>
295     /// <param name="parent">Efl canvas</param>
296     /// <returns>Created UI object</returns>
297     virtual public  Eina.Future Create(Efl.IModel model, Efl.Gfx.IEntity parent) {
298                                                          var _ret_var = Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_create_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),model, parent);
299         Eina.Error.RaiseIfUnhandledException();
300                                         return _ret_var;
301  }
302     /// <summary>Release a UI object and disconnect from models.</summary>
303     /// <param name="ui_view">Efl canvas</param>
304     virtual public void Release(Efl.Gfx.IEntity ui_view) {
305                                  Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_release_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),ui_view);
306         Eina.Error.RaiseIfUnhandledException();
307                          }
308     /// <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>
309     /// <param name="key">Key string for bind model property data</param>
310     /// <param name="factory"><see cref="Efl.Ui.IFactory"/> for create and bind model property data</param>
311     virtual public void FactoryBind(System.String key, Efl.Ui.IFactory factory) {
312                                                          Efl.Ui.IFactoryBindConcrete.NativeMethods.efl_ui_factory_bind_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),key, factory);
313         Eina.Error.RaiseIfUnhandledException();
314                                          }
315     /// <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>
316     /// <param name="key">key string for bind model property data</param>
317     /// <param name="property">Model property name</param>
318     /// <returns>0 when it succeed, an error code otherwise.</returns>
319     virtual public Eina.Error PropertyBind(System.String key, System.String property) {
320                                                          var _ret_var = Efl.Ui.IPropertyBindConcrete.NativeMethods.efl_ui_property_bind_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),key, property);
321         Eina.Error.RaiseIfUnhandledException();
322                                         return _ret_var;
323  }
324     public System.Threading.Tasks.Task<Eina.Value> CreateAsync(Efl.IModel model,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
325     {
326         Eina.Future future = Create( model, parent);
327         return Efl.Eo.Globals.WrapAsync(future, token);
328     }
329     /// <summary>Define the class of the item returned by this factory.</summary>
330 /// <value>The class identifier to create item from.</value>
331     public Type ItemClass {
332         get { return GetItemClass(); }
333         set { SetItemClass(value); }
334     }
335     private static IntPtr GetEflClassStatic()
336     {
337         return Efl.Ui.WidgetFactory.efl_ui_widget_factory_class_get();
338     }
339     /// <summary>Wrapper for native methods and virtual method delegates.
340     /// For internal use by generated code only.</summary>
341     public new class NativeMethods : Efl.LoopConsumer.NativeMethods
342     {
343         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
344         /// <summary>Gets the list of Eo operations to override.</summary>
345         /// <returns>The list of Eo operations to be overload.</returns>
346         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
347         {
348             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
349             var methods = Efl.Eo.Globals.GetUserMethods(type);
350
351             if (efl_ui_widget_factory_item_class_get_static_delegate == null)
352             {
353                 efl_ui_widget_factory_item_class_get_static_delegate = new efl_ui_widget_factory_item_class_get_delegate(item_class_get);
354             }
355
356             if (methods.FirstOrDefault(m => m.Name == "GetItemClass") != null)
357             {
358                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_widget_factory_item_class_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_widget_factory_item_class_get_static_delegate) });
359             }
360
361             if (efl_ui_widget_factory_item_class_set_static_delegate == null)
362             {
363                 efl_ui_widget_factory_item_class_set_static_delegate = new efl_ui_widget_factory_item_class_set_delegate(item_class_set);
364             }
365
366             if (methods.FirstOrDefault(m => m.Name == "SetItemClass") != null)
367             {
368                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_widget_factory_item_class_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_widget_factory_item_class_set_static_delegate) });
369             }
370
371             if (efl_ui_factory_create_static_delegate == null)
372             {
373                 efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create);
374             }
375
376             if (methods.FirstOrDefault(m => m.Name == "Create") != null)
377             {
378                 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) });
379             }
380
381             if (efl_ui_factory_release_static_delegate == null)
382             {
383                 efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release);
384             }
385
386             if (methods.FirstOrDefault(m => m.Name == "Release") != null)
387             {
388                 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) });
389             }
390
391             if (efl_ui_factory_bind_static_delegate == null)
392             {
393                 efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind);
394             }
395
396             if (methods.FirstOrDefault(m => m.Name == "FactoryBind") != null)
397             {
398                 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) });
399             }
400
401             if (efl_ui_property_bind_static_delegate == null)
402             {
403                 efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
404             }
405
406             if (methods.FirstOrDefault(m => m.Name == "PropertyBind") != null)
407             {
408                 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) });
409             }
410
411             descs.AddRange(base.GetEoOps(type));
412             return descs;
413         }
414         /// <summary>Returns the Eo class for the native methods of this class.</summary>
415         /// <returns>The native class pointer.</returns>
416         public override IntPtr GetEflClass()
417         {
418             return Efl.Ui.WidgetFactory.efl_ui_widget_factory_class_get();
419         }
420
421         #pragma warning disable CA1707, SA1300, SA1600
422
423         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))]
424         private delegate Type efl_ui_widget_factory_item_class_get_delegate(System.IntPtr obj, System.IntPtr pd);
425
426         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))]
427         public delegate Type efl_ui_widget_factory_item_class_get_api_delegate(System.IntPtr obj);
428
429         public static Efl.Eo.FunctionWrapper<efl_ui_widget_factory_item_class_get_api_delegate> efl_ui_widget_factory_item_class_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_widget_factory_item_class_get_api_delegate>(Module, "efl_ui_widget_factory_item_class_get");
430
431         private static Type item_class_get(System.IntPtr obj, System.IntPtr pd)
432         {
433             Eina.Log.Debug("function efl_ui_widget_factory_item_class_get was called");
434             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
435             if (wrapper != null)
436             {
437             Type _ret_var = default(Type);
438                 try
439                 {
440                     _ret_var = ((WidgetFactory)wrapper).GetItemClass();
441                 }
442                 catch (Exception e)
443                 {
444                     Eina.Log.Warning($"Callback error: {e.ToString()}");
445                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
446                 }
447
448         return _ret_var;
449
450             }
451             else
452             {
453                 return efl_ui_widget_factory_item_class_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
454             }
455         }
456
457         private static efl_ui_widget_factory_item_class_get_delegate efl_ui_widget_factory_item_class_get_static_delegate;
458
459         
460         private delegate void efl_ui_widget_factory_item_class_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass);
461
462         
463         public delegate void efl_ui_widget_factory_item_class_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] Type klass);
464
465         public static Efl.Eo.FunctionWrapper<efl_ui_widget_factory_item_class_set_api_delegate> efl_ui_widget_factory_item_class_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_widget_factory_item_class_set_api_delegate>(Module, "efl_ui_widget_factory_item_class_set");
466
467         private static void item_class_set(System.IntPtr obj, System.IntPtr pd, Type klass)
468         {
469             Eina.Log.Debug("function efl_ui_widget_factory_item_class_set was called");
470             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
471             if (wrapper != null)
472             {
473                                     
474                 try
475                 {
476                     ((WidgetFactory)wrapper).SetItemClass(klass);
477                 }
478                 catch (Exception e)
479                 {
480                     Eina.Log.Warning($"Callback error: {e.ToString()}");
481                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
482                 }
483
484                         
485             }
486             else
487             {
488                 efl_ui_widget_factory_item_class_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass);
489             }
490         }
491
492         private static efl_ui_widget_factory_item_class_set_delegate efl_ui_widget_factory_item_class_set_static_delegate;
493
494         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
495         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);
496
497         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
498         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);
499
500         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");
501
502         private static  Eina.Future create(System.IntPtr obj, System.IntPtr pd, Efl.IModel model, Efl.Gfx.IEntity parent)
503         {
504             Eina.Log.Debug("function efl_ui_factory_create was called");
505             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
506             if (wrapper != null)
507             {
508                                                              Eina.Future _ret_var = default( Eina.Future);
509                 try
510                 {
511                     _ret_var = ((WidgetFactory)wrapper).Create(model, parent);
512                 }
513                 catch (Exception e)
514                 {
515                     Eina.Log.Warning($"Callback error: {e.ToString()}");
516                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
517                 }
518
519                                         return _ret_var;
520
521             }
522             else
523             {
524                 return efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), model, parent);
525             }
526         }
527
528         private static efl_ui_factory_create_delegate efl_ui_factory_create_static_delegate;
529
530         
531         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);
532
533         
534         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);
535
536         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");
537
538         private static void release(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view)
539         {
540             Eina.Log.Debug("function efl_ui_factory_release was called");
541             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
542             if (wrapper != null)
543             {
544                                     
545                 try
546                 {
547                     ((WidgetFactory)wrapper).Release(ui_view);
548                 }
549                 catch (Exception e)
550                 {
551                     Eina.Log.Warning($"Callback error: {e.ToString()}");
552                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
553                 }
554
555                         
556             }
557             else
558             {
559                 efl_ui_factory_release_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view);
560             }
561         }
562
563         private static efl_ui_factory_release_delegate efl_ui_factory_release_static_delegate;
564
565         
566         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);
567
568         
569         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);
570
571         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");
572
573         private static void factory_bind(System.IntPtr obj, System.IntPtr pd, System.String key, Efl.Ui.IFactory factory)
574         {
575             Eina.Log.Debug("function efl_ui_factory_bind was called");
576             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
577             if (wrapper != null)
578             {
579                                                             
580                 try
581                 {
582                     ((WidgetFactory)wrapper).FactoryBind(key, factory);
583                 }
584                 catch (Exception e)
585                 {
586                     Eina.Log.Warning($"Callback error: {e.ToString()}");
587                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
588                 }
589
590                                         
591             }
592             else
593             {
594                 efl_ui_factory_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, factory);
595             }
596         }
597
598         private static efl_ui_factory_bind_delegate efl_ui_factory_bind_static_delegate;
599
600         
601         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);
602
603         
604         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);
605
606         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");
607
608         private static Eina.Error property_bind(System.IntPtr obj, System.IntPtr pd, System.String key, System.String property)
609         {
610             Eina.Log.Debug("function efl_ui_property_bind was called");
611             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
612             if (wrapper != null)
613             {
614                                                             Eina.Error _ret_var = default(Eina.Error);
615                 try
616                 {
617                     _ret_var = ((WidgetFactory)wrapper).PropertyBind(key, property);
618                 }
619                 catch (Exception e)
620                 {
621                     Eina.Log.Warning($"Callback error: {e.ToString()}");
622                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
623                 }
624
625                                         return _ret_var;
626
627             }
628             else
629             {
630                 return efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, property);
631             }
632         }
633
634         private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate;
635
636         #pragma warning restore CA1707, SA1300, SA1600
637
638 }
639 }
640 }
641
642 }
643