#define EFL_BETA #pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { namespace Ui { /// Efl Ui Factory that provides . /// This factory is designed to build and optionally set their if it was connected with "style". /// This is a BETA class. It can be modified or removed in the future. Do not use it for product development. [Efl.Ui.WidgetFactory.NativeMethods] [Efl.Eo.BindingEntity] public class WidgetFactory : Efl.LoopConsumer, Efl.IPart, Efl.Ui.IFactory, Efl.Ui.IFactoryBind, Efl.Ui.IPropertyBind { /// Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(WidgetFactory)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr efl_ui_widget_factory_class_get(); /// Initializes a new instance of the class. /// Parent instance. /// Define the class of the item returned by this factory. See public WidgetFactory(Efl.Object parent , Type itemClass = null) : base(efl_ui_widget_factory_class_get(), parent) { if (Efl.Eo.Globals.ParamHelperCheck(itemClass)) { SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass)); } FinishInstantiation(); } /// Subclasses should override this constructor if they are expected to be instantiated from native code. /// Do not call this constructor directly. /// Tag struct storing the native handle of the object being constructed. protected WidgetFactory(ConstructingHandle ch) : base(ch) { } /// Initializes a new instance of the class. /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. protected WidgetFactory(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } /// Initializes a new instance of the class. /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. protected WidgetFactory(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { } /// Event triggered when an item has been successfully created. /// public event EventHandler CreatedEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { Efl.Ui.IFactoryCreatedEvt_Args args = new Efl.Ui.IFactoryCreatedEvt_Args(); args.arg = evt.Info; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_UI_FACTORY_EVENT_CREATED"; AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_UI_FACTORY_EVENT_CREATED"; RemoveNativeEventHandler(efl.Libs.Elementary, key, value); } } } /// Method to raise event CreatedEvt. public void OnCreatedEvt(Efl.Ui.IFactoryCreatedEvt_Args e) { var key = "_EFL_UI_FACTORY_EVENT_CREATED"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg)); try { Marshal.StructureToPtr(e.arg, info, false); Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } } /// 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. /// public event EventHandler PropertiesChangedEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { Efl.Ui.IPropertyBindPropertiesChangedEvt_Args args = new Efl.Ui.IPropertyBindPropertiesChangedEvt_Args(); args.arg = evt.Info; try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED"; AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED"; RemoveNativeEventHandler(efl.Libs.Elementary, key, value); } } } /// Method to raise event PropertiesChangedEvt. public void OnPropertiesChangedEvt(Efl.Ui.IPropertyBindPropertiesChangedEvt_Args e) { var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg)); try { Marshal.StructureToPtr(e.arg, info, false); Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } } /// Event dispatched when a property on the object is bound to a model. This is useful to not overgenerate event. /// public event EventHandler PropertyBoundEvt { add { lock (eflBindingEventLock) { Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) => { var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target; if (obj != null) { Efl.Ui.IPropertyBindPropertyBoundEvt_Args args = new Efl.Ui.IPropertyBindPropertyBoundEvt_Args(); args.arg = Eina.StringConversion.NativeUtf8ToManagedString(evt.Info); try { value?.Invoke(obj, args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } }; string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND"; AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value); } } remove { lock (eflBindingEventLock) { string key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND"; RemoveNativeEventHandler(efl.Libs.Elementary, key, value); } } } /// Method to raise event PropertyBoundEvt. public void OnPropertyBoundEvt(Efl.Ui.IPropertyBindPropertyBoundEvt_Args e) { var key = "_EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(e.arg); try { Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Eina.MemoryNative.Free(info); } } /// Define the class of the item returned by this factory. /// The class identifier to create item from. virtual public Type GetItemClass() { var _ret_var = Efl.Ui.WidgetFactory.NativeMethods.efl_ui_widget_factory_item_class_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Define the class of the item returned by this factory. /// The class identifier to create item from. virtual public void SetItemClass(Type klass) { Efl.Ui.WidgetFactory.NativeMethods.efl_ui_widget_factory_item_class_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),klass); Eina.Error.RaiseIfUnhandledException(); } /// Get a proxy object referring to a part of an object. /// (Since EFL 1.22) /// The part name. /// A (proxy) object, valid for a single call. virtual public Efl.Object GetPart(System.String name) { var _ret_var = Efl.IPartConcrete.NativeMethods.efl_part_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),name); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Create a UI object from the necessary properties in the specified model. /// 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 . /// Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call. /// Efl canvas /// Created UI object virtual public Eina.Future Create(Eina.Iterator models, Efl.Gfx.IEntity parent) { var _in_models = models.Handle; var _ret_var = Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_create_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),_in_models, parent); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Release a UI object and disconnect from models. /// Efl canvas virtual public void Release(Efl.Gfx.IEntity ui_view) { Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_release_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),ui_view); Eina.Error.RaiseIfUnhandledException(); } /// This function is called during the creation of an UI object between the Efl.Object.constructor and call. /// Note: if the does keep a cache of object, this won't be called when object are pulled out of the cache. /// The UI object being created. virtual public void Building(Efl.Gfx.IEntity ui_view) { Efl.Ui.IFactoryConcrete.NativeMethods.efl_ui_factory_building_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),ui_view); Eina.Error.RaiseIfUnhandledException(); } /// 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 need to be at least once. /// Key string for bind model property data /// for create and bind model property data virtual public void FactoryBind(System.String key, Efl.Ui.IFactory factory) { Efl.Ui.IFactoryBindConcrete.NativeMethods.efl_ui_factory_bind_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),key, factory); Eina.Error.RaiseIfUnhandledException(); } /// 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. /// key string for bind model property data /// Model property name /// 0 when it succeed, an error code otherwise. virtual public Eina.Error PropertyBind(System.String key, System.String property) { var _ret_var = Efl.Ui.IPropertyBindConcrete.NativeMethods.efl_ui_property_bind_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),key, property); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Async wrapper for . /// Efl iterator providing the model to be associated to the new item. It should remain valid until the end of the function call. /// Efl canvas /// Token to notify the async operation of external request to cancel. /// An async task wrapping the result of the operation. public System.Threading.Tasks.Task CreateAsync(Eina.Iterator models,Efl.Gfx.IEntity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { Eina.Future future = Create( models, parent); return Efl.Eo.Globals.WrapAsync(future, token); } /// Define the class of the item returned by this factory. /// The class identifier to create item from. public Type ItemClass { get { return GetItemClass(); } set { SetItemClass(value); } } private static IntPtr GetEflClassStatic() { return Efl.Ui.WidgetFactory.efl_ui_widget_factory_class_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.LoopConsumer.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary); /// Gets the list of Eo operations to override. /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); var methods = Efl.Eo.Globals.GetUserMethods(type); if (efl_ui_widget_factory_item_class_get_static_delegate == null) { efl_ui_widget_factory_item_class_get_static_delegate = new efl_ui_widget_factory_item_class_get_delegate(item_class_get); } if (methods.FirstOrDefault(m => m.Name == "GetItemClass") != null) { 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) }); } if (efl_ui_widget_factory_item_class_set_static_delegate == null) { efl_ui_widget_factory_item_class_set_static_delegate = new efl_ui_widget_factory_item_class_set_delegate(item_class_set); } if (methods.FirstOrDefault(m => m.Name == "SetItemClass") != null) { 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) }); } if (efl_part_get_static_delegate == null) { efl_part_get_static_delegate = new efl_part_get_delegate(part_get); } if (methods.FirstOrDefault(m => m.Name == "GetPart") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_part_get"), func = Marshal.GetFunctionPointerForDelegate(efl_part_get_static_delegate) }); } if (efl_ui_factory_create_static_delegate == null) { efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create); } if (methods.FirstOrDefault(m => m.Name == "Create") != null) { 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) }); } if (efl_ui_factory_release_static_delegate == null) { efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release); } if (methods.FirstOrDefault(m => m.Name == "Release") != null) { 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) }); } if (efl_ui_factory_building_static_delegate == null) { efl_ui_factory_building_static_delegate = new efl_ui_factory_building_delegate(building); } if (methods.FirstOrDefault(m => m.Name == "Building") != null) { 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) }); } if (efl_ui_factory_bind_static_delegate == null) { efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind); } if (methods.FirstOrDefault(m => m.Name == "FactoryBind") != null) { 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) }); } if (efl_ui_property_bind_static_delegate == null) { efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind); } if (methods.FirstOrDefault(m => m.Name == "PropertyBind") != null) { 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) }); } descs.AddRange(base.GetEoOps(type)); return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.Ui.WidgetFactory.efl_ui_widget_factory_class_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] private delegate Type efl_ui_widget_factory_item_class_get_delegate(System.IntPtr obj, System.IntPtr pd); [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEflClass))] public delegate Type efl_ui_widget_factory_item_class_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_ui_widget_factory_item_class_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_widget_factory_item_class_get"); private static Type item_class_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_ui_widget_factory_item_class_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Type _ret_var = default(Type); try { _ret_var = ((WidgetFactory)ws.Target).GetItemClass(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_ui_widget_factory_item_class_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_ui_widget_factory_item_class_get_delegate efl_ui_widget_factory_item_class_get_static_delegate; 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); 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); public static Efl.Eo.FunctionWrapper efl_ui_widget_factory_item_class_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_widget_factory_item_class_set"); private static void item_class_set(System.IntPtr obj, System.IntPtr pd, Type klass) { Eina.Log.Debug("function efl_ui_widget_factory_item_class_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((WidgetFactory)ws.Target).SetItemClass(klass); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_widget_factory_item_class_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass); } } private static efl_ui_widget_factory_item_class_set_delegate efl_ui_widget_factory_item_class_set_static_delegate; [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] private delegate Efl.Object efl_part_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name); [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] public delegate Efl.Object efl_part_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String name); public static Efl.Eo.FunctionWrapper efl_part_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_part_get"); private static Efl.Object part_get(System.IntPtr obj, System.IntPtr pd, System.String name) { Eina.Log.Debug("function efl_part_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Efl.Object _ret_var = default(Efl.Object); try { _ret_var = ((WidgetFactory)ws.Target).GetPart(name); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_part_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), name); } } private static efl_part_get_delegate efl_part_get_static_delegate; [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))] 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.Gfx.IEntity parent); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))] 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.Gfx.IEntity parent); public static Efl.Eo.FunctionWrapper efl_ui_factory_create_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_factory_create"); private static Eina.Future create(System.IntPtr obj, System.IntPtr pd, System.IntPtr models, Efl.Gfx.IEntity parent) { Eina.Log.Debug("function efl_ui_factory_create was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { var _in_models = new Eina.Iterator(models, false); Eina.Future _ret_var = default( Eina.Future); try { _ret_var = ((WidgetFactory)ws.Target).Create(_in_models, parent); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), models, parent); } } private static efl_ui_factory_create_delegate efl_ui_factory_create_static_delegate; private delegate void efl_ui_factory_release_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Gfx.IEntity ui_view); public delegate void efl_ui_factory_release_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Gfx.IEntity ui_view); public static Efl.Eo.FunctionWrapper efl_ui_factory_release_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_factory_release"); private static void release(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view) { Eina.Log.Debug("function efl_ui_factory_release was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((WidgetFactory)ws.Target).Release(ui_view); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_factory_release_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view); } } private static efl_ui_factory_release_delegate efl_ui_factory_release_static_delegate; private delegate void efl_ui_factory_building_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Gfx.IEntity ui_view); public delegate void efl_ui_factory_building_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))] Efl.Gfx.IEntity ui_view); public static Efl.Eo.FunctionWrapper efl_ui_factory_building_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_factory_building"); private static void building(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity ui_view) { Eina.Log.Debug("function efl_ui_factory_building was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((WidgetFactory)ws.Target).Building(ui_view); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_factory_building_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ui_view); } } private static efl_ui_factory_building_delegate efl_ui_factory_building_static_delegate; 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.Ui.IFactory factory); 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.Ui.IFactory factory); public static Efl.Eo.FunctionWrapper efl_ui_factory_bind_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_factory_bind"); private static void factory_bind(System.IntPtr obj, System.IntPtr pd, System.String key, Efl.Ui.IFactory factory) { Eina.Log.Debug("function efl_ui_factory_bind was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((WidgetFactory)ws.Target).FactoryBind(key, factory); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_factory_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, factory); } } private static efl_ui_factory_bind_delegate efl_ui_factory_bind_static_delegate; 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); 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); public static Efl.Eo.FunctionWrapper efl_ui_property_bind_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_property_bind"); private static Eina.Error property_bind(System.IntPtr obj, System.IntPtr pd, System.String key, System.String property) { Eina.Log.Debug("function efl_ui_property_bind was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { Eina.Error _ret_var = default(Eina.Error); try { _ret_var = ((WidgetFactory)ws.Target).PropertyBind(key, property); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key, property); } } private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } } } #if EFL_BETA #pragma warning disable CS1591 public static class Efl_UiWidgetFactory_ExtensionMethods { public static Efl.BindableProperty ItemClass(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.Ui.WidgetFactory { return new Efl.BindableProperty("item_class", fac); } } #pragma warning restore CS1591 #endif