2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>Efl UI factory interface</summary>
14 /// <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>
15 [Efl.Ui.IFactoryConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IFactory :
19 Efl.Ui.IPropertyBind ,
20 Efl.Eo.IWrapper, IDisposable
22 /// <summary>Create a UI object from the necessary properties in the specified model.
23 /// Note: This is the function you need to implement for a custom factory, but if you want to use a factory, you should rely on <see cref="Efl.Ui.ViewFactory.CreateWithEvent"/>.</summary>
24 /// <param name="models">Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call.</param>
25 /// <param name="parent">Efl canvas</param>
26 /// <returns>Created UI object</returns>
27 Eina.Future Create(Eina.Iterator<Efl.IModel> models, Efl.Gfx.IEntity parent);
28 /// <summary>Release a UI object and disconnect from models.</summary>
29 /// <param name="ui_view">Efl canvas</param>
30 void Release(Efl.Gfx.IEntity ui_view);
31 /// <summary>This function is called during the creation of an UI object between the Efl.Object.constructor and <see cref="Efl.Object.FinalizeAdd"/> call.
32 /// Note: if the <see cref="Efl.Ui.IFactory"/> does keep a cache of object, this won't be called when object are pulled out of the cache.</summary>
33 /// <param name="ui_view">The UI object being created.</param>
34 void Building(Efl.Gfx.IEntity ui_view);
35 /// <summary>Async wrapper for <see cref="Create" />.</summary>
36 /// <param name="models">Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call.</param>
37 /// <param name="parent">Efl canvas</param>
38 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
39 /// <returns>An async task wrapping the result of the operation.</returns>
40 System.Threading.Tasks.Task<Eina.Value> CreateAsync(Eina.Iterator<Efl.IModel> models,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken));
42 /// <summary>Event triggered when an item has been successfully created.</summary>
43 /// <value><see cref="Efl.Ui.IFactoryCreatedEvt_Args"/></value>
44 event EventHandler<Efl.Ui.IFactoryCreatedEvt_Args> CreatedEvt;
46 /// <summary>Event argument wrapper for event <see cref="Efl.Ui.IFactory.CreatedEvt"/>.</summary>
47 [Efl.Eo.BindingEntity]
48 public class IFactoryCreatedEvt_Args : EventArgs {
49 /// <summary>Actual event payload.</summary>
50 /// <value>Event triggered when an item has been successfully created.</value>
51 public Efl.Ui.FactoryItemCreatedEvent arg { get; set; }
53 /// <summary>Efl UI factory interface</summary>
54 /// <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>
55 sealed public class IFactoryConcrete :
58 , Efl.Ui.IFactoryBind, Efl.Ui.IPropertyBind
60 /// <summary>Pointer to the native class description.</summary>
61 public override System.IntPtr NativeClass
65 if (((object)this).GetType() == typeof(IFactoryConcrete))
67 return GetEflClassStatic();
71 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
76 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
77 /// Do not call this constructor directly.</summary>
78 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
79 private IFactoryConcrete(ConstructingHandle ch) : base(ch)
83 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
84 efl_ui_factory_interface_get();
85 /// <summary>Initializes a new instance of the <see cref="IFactory"/> class.
86 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
87 /// <param name="wh">The native pointer to be wrapped.</param>
88 private IFactoryConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
92 /// <summary>Event triggered when an item has been successfully created.</summary>
93 /// <value><see cref="Efl.Ui.IFactoryCreatedEvt_Args"/></value>
94 public event EventHandler<Efl.Ui.IFactoryCreatedEvt_Args> CreatedEvt
98 lock (eflBindingEventLock)
100 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
102 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
105 Efl.Ui.IFactoryCreatedEvt_Args args = new Efl.Ui.IFactoryCreatedEvt_Args();
109 value?.Invoke(obj, args);
113 Eina.Log.Error(e.ToString());
114 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
119 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
120 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
126 lock (eflBindingEventLock)
128 string key = "_EFL_UI_FACTORY_EVENT_CREATED";
129 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
133 /// <summary>Method to raise event CreatedEvt.</summary>
134 public void OnCreatedEvt(Efl.Ui.IFactoryCreatedEvt_Args e)
136 var key = "_EFL_UI_FACTORY_EVENT_CREATED";
137 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
138 if (desc == IntPtr.Zero)
140 Eina.Log.Error($"Failed to get native event {key}");
144 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
147 Marshal.StructureToPtr(e.arg, info, false);
148 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
152 Marshal.FreeHGlobal(info);
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 /// <value><see cref="Efl.Ui.IPropertyBindPropertiesChangedEvt_Args"/></value>
157 public event EventHandler<Efl.Ui.IPropertyBindPropertiesChangedEvt_Args> PropertiesChangedEvt
161 lock (eflBindingEventLock)
163 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
165 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
168 Efl.Ui.IPropertyBindPropertiesChangedEvt_Args args = new Efl.Ui.IPropertyBindPropertiesChangedEvt_Args();
172 value?.Invoke(obj, args);
176 Eina.Log.Error(e.ToString());
177 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
182 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
183 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
189 lock (eflBindingEventLock)
191 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED";
192 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
196 /// <summary>Method to raise event PropertiesChangedEvt.</summary>
197 public void OnPropertiesChangedEvt(Efl.Ui.IPropertyBindPropertiesChangedEvt_Args e)
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)
203 Eina.Log.Error($"Failed to get native event {key}");
207 IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
210 Marshal.StructureToPtr(e.arg, info, false);
211 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
215 Marshal.FreeHGlobal(info);
218 /// <summary>Event dispatched when a property on the object is bound to a model. This is useful to not overgenerate event.</summary>
219 /// <value><see cref="Efl.Ui.IPropertyBindPropertyBoundEvt_Args"/></value>
220 public event EventHandler<Efl.Ui.IPropertyBindPropertyBoundEvt_Args> PropertyBoundEvt
224 lock (eflBindingEventLock)
226 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
228 var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
231 Efl.Ui.IPropertyBindPropertyBoundEvt_Args args = new Efl.Ui.IPropertyBindPropertyBoundEvt_Args();
232 args.arg = Eina.StringConversion.NativeUtf8ToManagedString(evt.Info);
235 value?.Invoke(obj, args);
239 Eina.Log.Error(e.ToString());
240 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
245 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
246 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
252 lock (eflBindingEventLock)
254 string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND";
255 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
259 /// <summary>Method to raise event PropertyBoundEvt.</summary>
260 public void OnPropertyBoundEvt(Efl.Ui.IPropertyBindPropertyBoundEvt_Args e)
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)
266 Eina.Log.Error($"Failed to get native event {key}");
270 IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(e.arg);
273 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
277 Eina.MemoryNative.Free(info);
280 /// <summary>Create a UI object from the necessary properties in the specified model.
281 /// Note: This is the function you need to implement for a custom factory, but if you want to use a factory, you should rely on <see cref="Efl.Ui.ViewFactory.CreateWithEvent"/>.</summary>
282 /// <param name="models">Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call.</param>
283 /// <param name="parent">Efl canvas</param>
284 /// <returns>Created UI object</returns>
285 public Eina.Future Create(Eina.Iterator<Efl.IModel> models, Efl.Gfx.IEntity parent) {
286 var _in_models = models.Handle;
287 var _ret_var = Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_create_ptr.Value.Delegate(this.NativeHandle,_in_models, parent);
288 Eina.Error.RaiseIfUnhandledException();
291 /// <summary>Release a UI object and disconnect from models.</summary>
292 /// <param name="ui_view">Efl canvas</param>
293 public void Release(Efl.Gfx.IEntity ui_view) {
294 Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_release_ptr.Value.Delegate(this.NativeHandle,ui_view);
295 Eina.Error.RaiseIfUnhandledException();
297 /// <summary>This function is called during the creation of an UI object between the Efl.Object.constructor and <see cref="Efl.Object.FinalizeAdd"/> call.
298 /// Note: if the <see cref="Efl.Ui.IFactory"/> does keep a cache of object, this won't be called when object are pulled out of the cache.</summary>
299 /// <param name="ui_view">The UI object being created.</param>
300 public void Building(Efl.Gfx.IEntity ui_view) {
301 Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_building_ptr.Value.Delegate(this.NativeHandle,ui_view);
302 Eina.Error.RaiseIfUnhandledException();
304 /// <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>
305 /// <param name="key">Key string for bind model property data</param>
306 /// <param name="factory"><see cref="Efl.Ui.IFactory"/> for create and bind model property data</param>
307 public void FactoryBind(System.String key, Efl.Ui.IFactory factory) {
308 Efl.Ui.IFactoryBindConcrete.NativeMethods.efl_ui_factory_bind_ptr.Value.Delegate(this.NativeHandle,key, factory);
309 Eina.Error.RaiseIfUnhandledException();
311 /// <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>
312 /// <param name="key">key string for bind model property data</param>
313 /// <param name="property">Model property name</param>
314 /// <returns>0 when it succeed, an error code otherwise.</returns>
315 public Eina.Error PropertyBind(System.String key, System.String property) {
316 var _ret_var = Efl.Ui.IPropertyBindConcrete.NativeMethods.efl_ui_property_bind_ptr.Value.Delegate(this.NativeHandle,key, property);
317 Eina.Error.RaiseIfUnhandledException();
320 /// <summary>Async wrapper for <see cref="Create" />.</summary>
321 /// <param name="models">Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call.</param>
322 /// <param name="parent">Efl canvas</param>
323 /// <param name="token">Token to notify the async operation of external request to cancel.</param>
324 /// <returns>An async task wrapping the result of the operation.</returns>
325 public System.Threading.Tasks.Task<Eina.Value> CreateAsync(Eina.Iterator<Efl.IModel> models,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken))
327 Eina.Future future = Create( models, parent);
328 return Efl.Eo.Globals.WrapAsync(future, token);
331 private static IntPtr GetEflClassStatic()
333 return Efl.Ui.IFactoryConcrete.efl_ui_factory_interface_get();
335 /// <summary>Wrapper for native methods and virtual method delegates.
336 /// For internal use by generated code only.</summary>
337 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
339 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
340 /// <summary>Gets the list of Eo operations to override.</summary>
341 /// <returns>The list of Eo operations to be overload.</returns>
342 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
344 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
345 var methods = Efl.Eo.Globals.GetUserMethods(type);
347 if (efl_ui_factory_create_static_delegate == null)
349 efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create);
352 if (methods.FirstOrDefault(m => m.Name == "Create") != null)
354 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) });
357 if (efl_ui_factory_release_static_delegate == null)
359 efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release);
362 if (methods.FirstOrDefault(m => m.Name == "Release") != null)
364 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) });
367 if (efl_ui_factory_building_static_delegate == null)
369 efl_ui_factory_building_static_delegate = new efl_ui_factory_building_delegate(building);
372 if (methods.FirstOrDefault(m => m.Name == "Building") != null)
374 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_factory_building"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_building_static_delegate) });
377 if (efl_ui_factory_bind_static_delegate == null)
379 efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind);
382 if (methods.FirstOrDefault(m => m.Name == "FactoryBind") != null)
384 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) });
387 if (efl_ui_property_bind_static_delegate == null)
389 efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
392 if (methods.FirstOrDefault(m => m.Name == "PropertyBind") != null)
394 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) });
399 /// <summary>Returns the Eo class for the native methods of this class.</summary>
400 /// <returns>The native class pointer.</returns>
401 public override IntPtr GetEflClass()
403 return Efl.Ui.IFactoryConcrete.efl_ui_factory_interface_get();
406 #pragma warning disable CA1707, CS1591, SA1300, SA1600
408 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
409 private delegate Eina.Future efl_ui_factory_create_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr models, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity parent);
411 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]
412 public delegate Eina.Future efl_ui_factory_create_api_delegate(System.IntPtr obj, System.IntPtr models, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity parent);
414 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");
416 private static Eina.Future create(System.IntPtr obj, System.IntPtr pd, System.IntPtr models, Efl.Gfx.IEntity parent)
418 Eina.Log.Debug("function efl_ui_factory_create was called");
419 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
422 var _in_models = new Eina.Iterator<Efl.IModel>(models, false);
423 Eina.Future _ret_var = default( Eina.Future);
426 _ret_var = ((IFactory)ws.Target).Create(_in_models, parent);
430 Eina.Log.Warning($"Callback error: {e.ToString()}");
431 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
439 return efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), models, parent);
443 private static efl_ui_factory_create_delegate efl_ui_factory_create_static_delegate;
446 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);
449 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);
451 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");
453 private static void release(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view)
455 Eina.Log.Debug("function efl_ui_factory_release was called");
456 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
462 ((IFactory)ws.Target).Release(ui_view);
466 Eina.Log.Warning($"Callback error: {e.ToString()}");
467 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
474 efl_ui_factory_release_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view);
478 private static efl_ui_factory_release_delegate efl_ui_factory_release_static_delegate;
481 private delegate void efl_ui_factory_building_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity ui_view);
484 public delegate void efl_ui_factory_building_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity ui_view);
486 public static Efl.Eo.FunctionWrapper<efl_ui_factory_building_api_delegate> efl_ui_factory_building_ptr = new Efl.Eo.FunctionWrapper<efl_ui_factory_building_api_delegate>(Module, "efl_ui_factory_building");
488 private static void building(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view)
490 Eina.Log.Debug("function efl_ui_factory_building was called");
491 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
497 ((IFactory)ws.Target).Building(ui_view);
501 Eina.Log.Warning($"Callback error: {e.ToString()}");
502 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
509 efl_ui_factory_building_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view);
513 private static efl_ui_factory_building_delegate efl_ui_factory_building_static_delegate;
516 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);
519 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);
521 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");
523 private static void factory_bind(System.IntPtr obj, System.IntPtr pd, System.String key, Efl.Ui.IFactory factory)
525 Eina.Log.Debug("function efl_ui_factory_bind was called");
526 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
532 ((IFactory)ws.Target).FactoryBind(key, factory);
536 Eina.Log.Warning($"Callback error: {e.ToString()}");
537 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
544 efl_ui_factory_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, factory);
548 private static efl_ui_factory_bind_delegate efl_ui_factory_bind_static_delegate;
551 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);
554 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);
556 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");
558 private static Eina.Error property_bind(System.IntPtr obj, System.IntPtr pd, System.String key, System.String property)
560 Eina.Log.Debug("function efl_ui_property_bind was called");
561 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
564 Eina.Error _ret_var = default(Eina.Error);
567 _ret_var = ((IFactory)ws.Target).PropertyBind(key, property);
571 Eina.Log.Warning($"Callback error: {e.ToString()}");
572 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
580 return efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, property);
584 private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate;
586 #pragma warning restore CA1707, CS1591, SA1300, SA1600
595 #pragma warning disable CS1591
596 public static class Efl_UiIFactoryConcrete_ExtensionMethods {
598 #pragma warning restore CS1591
604 /// <summary>EFL Ui Factory event structure provided when an item was just created.</summary>
605 [StructLayout(LayoutKind.Sequential)]
606 [Efl.Eo.BindingEntity]
607 public struct FactoryItemCreatedEvent
609 /// <summary>The model already set on the new item.</summary>
610 public Efl.IModel Model;
611 /// <summary>The item that was just created.</summary>
612 public Efl.Gfx.IEntity Item;
613 /// <summary>Constructor for FactoryItemCreatedEvent.</summary>
614 /// <param name="Model">The model already set on the new item.</param>;
615 /// <param name="Item">The item that was just created.</param>;
616 public FactoryItemCreatedEvent(
617 Efl.IModel Model = default(Efl.IModel),
618 Efl.Gfx.IEntity Item = default(Efl.Gfx.IEntity) )
624 /// <summary>Implicit conversion to the managed representation from a native pointer.</summary>
625 /// <param name="ptr">Native pointer to be converted.</param>
626 public static implicit operator FactoryItemCreatedEvent(IntPtr ptr)
628 var tmp = (FactoryItemCreatedEvent.NativeStruct)Marshal.PtrToStructure(ptr, typeof(FactoryItemCreatedEvent.NativeStruct));
632 #pragma warning disable CS1591
634 /// <summary>Internal wrapper for struct FactoryItemCreatedEvent.</summary>
635 [StructLayout(LayoutKind.Sequential)]
636 public struct NativeStruct
638 /// <summary>Internal wrapper for field Model</summary>
639 public System.IntPtr Model;
640 /// <summary>Internal wrapper for field Item</summary>
641 public System.IntPtr Item;
642 /// <summary>Implicit conversion to the internal/marshalling representation.</summary>
643 public static implicit operator FactoryItemCreatedEvent.NativeStruct(FactoryItemCreatedEvent _external_struct)
645 var _internal_struct = new FactoryItemCreatedEvent.NativeStruct();
646 _internal_struct.Model = _external_struct.Model?.NativeHandle ?? System.IntPtr.Zero;
647 _internal_struct.Item = _external_struct.Item?.NativeHandle ?? System.IntPtr.Zero;
648 return _internal_struct;
651 /// <summary>Implicit conversion to the managed representation.</summary>
652 public static implicit operator FactoryItemCreatedEvent(FactoryItemCreatedEvent.NativeStruct _internal_struct)
654 var _external_struct = new FactoryItemCreatedEvent();
656 _external_struct.Model = (Efl.IModelConcrete) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Model);
658 _external_struct.Item = (Efl.Gfx.IEntityConcrete) Efl.Eo.Globals.CreateWrapperFor(_internal_struct.Item);
659 return _external_struct;
664 #pragma warning restore CS1591