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