[Bluetooth][Non-ACR] Fix no data exception issue (#787)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl_ui_list_empty_item.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>List Empty Item class. This item have only one swallow space, thus user can decorate item by filling the swallow with any kind of container.</summary>
9 [ListEmptyItemNativeInherit]
10 public class ListEmptyItem : Efl.Ui.ListItem, Efl.Eo.IWrapper,Efl.Content
11 {
12    public new static System.IntPtr klass = System.IntPtr.Zero;
13    public new static Efl.Ui.ListEmptyItemNativeInherit nativeInherit = new Efl.Ui.ListEmptyItemNativeInherit();
14    ///<summary>Pointer to the native class description.</summary>
15    public override System.IntPtr NativeClass {
16       get {
17          if (((object)this).GetType() == typeof (ListEmptyItem))
18             return Efl.Ui.ListEmptyItemNativeInherit.GetEflClassStatic();
19          else
20             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21       }
22    }
23    [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
24       efl_ui_list_empty_item_class_get();
25    ///<summary>Creates a new instance.</summary>
26    ///<param name="parent">Parent instance.</param>
27    ///<param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
28    public ListEmptyItem(Efl.Object parent
29          ,  System.String style = null) :
30       base(efl_ui_list_empty_item_class_get(), typeof(ListEmptyItem), parent)
31    {
32       if (Efl.Eo.Globals.ParamHelperCheck(style))
33          SetStyle(Efl.Eo.Globals.GetParamHelper(style));
34       FinishInstantiation();
35    }
36    ///<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>
37    public ListEmptyItem(System.IntPtr raw) : base(raw)
38    {
39             register_event_proxies();
40    }
41    ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
42    protected ListEmptyItem(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
43    ///<summary>Casts obj into an instance of this type.</summary>
44    public new static ListEmptyItem static_cast(Efl.Object obj)
45    {
46       if (obj == null)
47          throw new System.ArgumentNullException("obj");
48       return new ListEmptyItem(obj.NativeHandle);
49    }
50    ///<summary>Verifies if the given object is equal to this one.</summary>
51    public override bool Equals(object obj)
52    {
53       var other = obj as Efl.Object;
54       if (other == null)
55          return false;
56       return this.NativeHandle == other.NativeHandle;
57    }
58    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
59    public override int GetHashCode()
60    {
61       return this.NativeHandle.ToInt32();
62    }
63    ///<summary>Turns the native pointer into a string representation.</summary>
64    public override String ToString()
65    {
66       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
67    }
68 private static object ContentChangedEvtKey = new object();
69    /// <summary>Sent after the content is set or unset using the current content object.</summary>
70    public event EventHandler<Efl.ContentContentChangedEvt_Args> ContentChangedEvt
71    {
72       add {
73          lock (eventLock) {
74             string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
75             if (add_cpp_event_handler(efl.Libs.Efl, key, this.evt_ContentChangedEvt_delegate)) {
76                eventHandlers.AddHandler(ContentChangedEvtKey , value);
77             } else
78                Eina.Log.Error($"Error adding proxy for event {key}");
79          }
80       }
81       remove {
82          lock (eventLock) {
83             string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
84             if (remove_cpp_event_handler(key, this.evt_ContentChangedEvt_delegate)) { 
85                eventHandlers.RemoveHandler(ContentChangedEvtKey , value);
86             } else
87                Eina.Log.Error($"Error removing proxy for event {key}");
88          }
89       }
90    }
91    ///<summary>Method to raise event ContentChangedEvt.</summary>
92    public void On_ContentChangedEvt(Efl.ContentContentChangedEvt_Args e)
93    {
94       EventHandler<Efl.ContentContentChangedEvt_Args> evt;
95       lock (eventLock) {
96       evt = (EventHandler<Efl.ContentContentChangedEvt_Args>)eventHandlers[ContentChangedEvtKey];
97       }
98       evt?.Invoke(this, e);
99    }
100    Efl.EventCb evt_ContentChangedEvt_delegate;
101    private void on_ContentChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
102    {
103       Efl.ContentContentChangedEvt_Args args = new Efl.ContentContentChangedEvt_Args();
104       args.arg = new Efl.Gfx.EntityConcrete(evt.Info);
105       try {
106          On_ContentChangedEvt(args);
107       } catch (Exception e) {
108          Eina.Log.Error(e.ToString());
109          Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
110       }
111    }
112
113    protected override void register_event_proxies()
114    {
115       base.register_event_proxies();
116       evt_ContentChangedEvt_delegate = new Efl.EventCb(on_ContentChangedEvt_NativeCallback);
117    }
118    /// <summary>Swallowed sub-object contained in this object.</summary>
119    /// <returns>The object to swallow.</returns>
120    virtual public Efl.Gfx.Entity GetContent() {
121        var _ret_var = Efl.ContentNativeInherit.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
122       Eina.Error.RaiseIfUnhandledException();
123       return _ret_var;
124  }
125    /// <summary>Swallowed sub-object contained in this object.</summary>
126    /// <param name="content">The object to swallow.</param>
127    /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
128    virtual public bool SetContent( Efl.Gfx.Entity content) {
129                          var _ret_var = Efl.ContentNativeInherit.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), content);
130       Eina.Error.RaiseIfUnhandledException();
131                   return _ret_var;
132  }
133    /// <summary>Unswallow the object in the current container and return it.</summary>
134    /// <returns>Unswallowed object</returns>
135    virtual public Efl.Gfx.Entity UnsetContent() {
136        var _ret_var = Efl.ContentNativeInherit.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
137       Eina.Error.RaiseIfUnhandledException();
138       return _ret_var;
139  }
140    /// <summary>Swallowed sub-object contained in this object.</summary>
141 /// <value>The object to swallow.</value>
142    public Efl.Gfx.Entity Content {
143       get { return GetContent(); }
144       set { SetContent( value); }
145    }
146    private static new  IntPtr GetEflClassStatic()
147    {
148       return Efl.Ui.ListEmptyItem.efl_ui_list_empty_item_class_get();
149    }
150 }
151 public class ListEmptyItemNativeInherit : Efl.Ui.ListItemNativeInherit{
152    public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
153    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
154    {
155       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
156       if (efl_content_get_static_delegate == null)
157       efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
158       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)});
159       if (efl_content_set_static_delegate == null)
160       efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
161       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)});
162       if (efl_content_unset_static_delegate == null)
163       efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
164       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)});
165       descs.AddRange(base.GetEoOps(type));
166       return descs;
167    }
168    public override IntPtr GetEflClass()
169    {
170       return Efl.Ui.ListEmptyItem.efl_ui_list_empty_item_class_get();
171    }
172    public static new  IntPtr GetEflClassStatic()
173    {
174       return Efl.Ui.ListEmptyItem.efl_ui_list_empty_item_class_get();
175    }
176
177
178    [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
179
180
181    [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_get_api_delegate(System.IntPtr obj);
182     public static Efl.Eo.FunctionWrapper<efl_content_get_api_delegate> efl_content_get_ptr = new Efl.Eo.FunctionWrapper<efl_content_get_api_delegate>(_Module, "efl_content_get");
183     private static Efl.Gfx.Entity content_get(System.IntPtr obj, System.IntPtr pd)
184    {
185       Eina.Log.Debug("function efl_content_get was called");
186       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
187       if(wrapper != null) {
188                   Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
189          try {
190             _ret_var = ((ListEmptyItem)wrapper).GetContent();
191          } catch (Exception e) {
192             Eina.Log.Warning($"Callback error: {e.ToString()}");
193             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
194          }
195       return _ret_var;
196       } else {
197          return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
198       }
199    }
200    private static efl_content_get_delegate efl_content_get_static_delegate;
201
202
203     [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity content);
204
205
206     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))]  Efl.Gfx.Entity content);
207     public static Efl.Eo.FunctionWrapper<efl_content_set_api_delegate> efl_content_set_ptr = new Efl.Eo.FunctionWrapper<efl_content_set_api_delegate>(_Module, "efl_content_set");
208     private static bool content_set(System.IntPtr obj, System.IntPtr pd,  Efl.Gfx.Entity content)
209    {
210       Eina.Log.Debug("function efl_content_set was called");
211       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
212       if(wrapper != null) {
213                                     bool _ret_var = default(bool);
214          try {
215             _ret_var = ((ListEmptyItem)wrapper).SetContent( content);
216          } catch (Exception e) {
217             Eina.Log.Warning($"Callback error: {e.ToString()}");
218             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
219          }
220                   return _ret_var;
221       } else {
222          return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  content);
223       }
224    }
225    private static efl_content_set_delegate efl_content_set_static_delegate;
226
227
228    [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.Entity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
229
230
231    [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.EntityConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.Entity efl_content_unset_api_delegate(System.IntPtr obj);
232     public static Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate> efl_content_unset_ptr = new Efl.Eo.FunctionWrapper<efl_content_unset_api_delegate>(_Module, "efl_content_unset");
233     private static Efl.Gfx.Entity content_unset(System.IntPtr obj, System.IntPtr pd)
234    {
235       Eina.Log.Debug("function efl_content_unset was called");
236       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
237       if(wrapper != null) {
238                   Efl.Gfx.Entity _ret_var = default(Efl.Gfx.Entity);
239          try {
240             _ret_var = ((ListEmptyItem)wrapper).UnsetContent();
241          } catch (Exception e) {
242             Eina.Log.Warning($"Callback error: {e.ToString()}");
243             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
244          }
245       return _ret_var;
246       } else {
247          return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
248       }
249    }
250    private static efl_content_unset_delegate efl_content_unset_static_delegate;
251 }
252 } }