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