#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 Property interface. view object can have and need to set cotent with those model stored data. the interface can help binding the factory to create object with model property data. see see /// This is a BETA class. It can be modified or removed in the future. Do not use it for product development. [Efl.Ui.IFactoryBindConcrete.NativeMethods] [Efl.Eo.BindingEntity] public interface IFactoryBind : Efl.Eo.IWrapper, IDisposable { /// 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 void FactoryBind(System.String key, Efl.Ui.IFactory factory); } /// Efl UI Property interface. view object can have and need to set cotent with those model stored data. the interface can help binding the factory to create object with model property data. see see /// This is a BETA class. It can be modified or removed in the future. Do not use it for product development. sealed public class IFactoryBindConcrete : Efl.Eo.EoWrapper , IFactoryBind { /// Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(IFactoryBindConcrete)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } /// 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. private IFactoryBindConcrete(ConstructingHandle ch) : base(ch) { } [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr efl_ui_factory_bind_interface_get(); /// Initializes a new instance of the class. /// Internal usage: This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. private IFactoryBindConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } /// 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 public void FactoryBind(System.String key, Efl.Ui.IFactory factory) { Efl.Ui.IFactoryBindConcrete.NativeMethods.efl_ui_factory_bind_ptr.Value.Delegate(this.NativeHandle,key, factory); Eina.Error.RaiseIfUnhandledException(); } private static IntPtr GetEflClassStatic() { return Efl.Ui.IFactoryBindConcrete.efl_ui_factory_bind_interface_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl); /// 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_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) }); } return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.Ui.IFactoryBindConcrete.efl_ui_factory_bind_interface_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 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 { ((IFactoryBind)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; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } } } #if EFL_BETA #pragma warning disable CS1591 public static class Efl_UiIFactoryBindConcrete_ExtensionMethods { } #pragma warning restore CS1591 #endif