[Bluetooth][Non-ACR] Fix no data exception issue (#787)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl_ui_property_bind.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { 
8 /// <summary>Efl UI Property_Bind interface. view object can have <see cref="Efl.Model"/> to manage the data, the interface can help loading and tracking child data from the model property. see <see cref="Efl.Model"/> see <see cref="Efl.Ui.Factory"/></summary>
9 [PropertyBindNativeInherit]
10 public interface PropertyBind : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <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>
14 /// <param name="key">key string for bind model property data</param>
15 /// <param name="property">Model property name</param>
16 /// <returns></returns>
17  void PropertyBind(  System.String key,   System.String property);
18    }
19 /// <summary>Efl UI Property_Bind interface. view object can have <see cref="Efl.Model"/> to manage the data, the interface can help loading and tracking child data from the model property. see <see cref="Efl.Model"/> see <see cref="Efl.Ui.Factory"/></summary>
20 sealed public class PropertyBindConcrete : 
21
22 PropertyBind
23    
24 {
25    ///<summary>Pointer to the native class description.</summary>
26    public System.IntPtr NativeClass {
27       get {
28          if (((object)this).GetType() == typeof (PropertyBindConcrete))
29             return Efl.Ui.PropertyBindNativeInherit.GetEflClassStatic();
30          else
31             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32       }
33    }
34    private  System.IntPtr handle;
35    ///<summary>Pointer to the native instance.</summary>
36    public System.IntPtr NativeHandle {
37       get { return handle; }
38    }
39    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
40       efl_ui_property_bind_interface_get();
41    ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
42    public PropertyBindConcrete(System.IntPtr raw)
43    {
44       handle = raw;
45       register_event_proxies();
46    }
47    ///<summary>Destructor.</summary>
48    ~PropertyBindConcrete()
49    {
50       Dispose(false);
51    }
52    ///<summary>Releases the underlying native instance.</summary>
53    void Dispose(bool disposing)
54    {
55       if (handle != System.IntPtr.Zero) {
56          Efl.Eo.Globals.efl_unref(handle);
57          handle = System.IntPtr.Zero;
58       }
59    }
60    ///<summary>Releases the underlying native instance.</summary>
61    public void Dispose()
62    {
63       Dispose(true);
64       GC.SuppressFinalize(this);
65    }
66    ///<summary>Casts obj into an instance of this type.</summary>
67    public static PropertyBindConcrete static_cast(Efl.Object obj)
68    {
69       if (obj == null)
70          throw new System.ArgumentNullException("obj");
71       return new PropertyBindConcrete(obj.NativeHandle);
72    }
73    ///<summary>Verifies if the given object is equal to this one.</summary>
74    public override bool Equals(object obj)
75    {
76       var other = obj as Efl.Object;
77       if (other == null)
78          return false;
79       return this.NativeHandle == other.NativeHandle;
80    }
81    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
82    public override int GetHashCode()
83    {
84       return this.NativeHandle.ToInt32();
85    }
86    ///<summary>Turns the native pointer into a string representation.</summary>
87    public override String ToString()
88    {
89       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
90    }
91     void register_event_proxies()
92    {
93    }
94    /// <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>
95    /// <param name="key">key string for bind model property data</param>
96    /// <param name="property">Model property name</param>
97    /// <returns></returns>
98    public  void PropertyBind(  System.String key,   System.String property) {
99                                            Efl.Ui.PropertyBindNativeInherit.efl_ui_property_bind_ptr.Value.Delegate(this.NativeHandle, key,  property);
100       Eina.Error.RaiseIfUnhandledException();
101                                }
102 }
103 public class PropertyBindNativeInherit  : Efl.Eo.NativeClass{
104    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
105    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
106    {
107       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
108       if (efl_ui_property_bind_static_delegate == null)
109       efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
110       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)});
111       return descs;
112    }
113    public override IntPtr GetEflClass()
114    {
115       return Efl.Ui.PropertyBindConcrete.efl_ui_property_bind_interface_get();
116    }
117    public static  IntPtr GetEflClassStatic()
118    {
119       return Efl.Ui.PropertyBindConcrete.efl_ui_property_bind_interface_get();
120    }
121
122
123     private delegate  void efl_ui_property_bind_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String key,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String property);
124
125
126     public delegate  void efl_ui_property_bind_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String key,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String property);
127     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");
128     private static  void property_bind(System.IntPtr obj, System.IntPtr pd,   System.String key,   System.String property)
129    {
130       Eina.Log.Debug("function efl_ui_property_bind was called");
131       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
132       if(wrapper != null) {
133                                                       
134          try {
135             ((PropertyBind)wrapper).PropertyBind( key,  property);
136          } catch (Exception e) {
137             Eina.Log.Warning($"Callback error: {e.ToString()}");
138             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
139          }
140                                     } else {
141          efl_ui_property_bind_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  key,  property);
142       }
143    }
144    private static efl_ui_property_bind_delegate efl_ui_property_bind_static_delegate;
145 }
146 } }