[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_tab_page.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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Ui {
11
12 ///<summary>Event argument wrapper for event <see cref="Efl.Ui.TabPage.TabChangedEvt"/>.</summary>
13 public class TabPageTabChangedEvt_Args : EventArgs {
14     ///<summary>Actual event payload.</summary>
15     public Efl.Ui.TabPageTabChangedEvent arg { get; set; }
16 }
17 /// <summary>Tab Page class</summary>
18 [Efl.Ui.TabPage.NativeMethods]
19 public class TabPage : Efl.Ui.LayoutBase, Efl.Eo.IWrapper,Efl.IContent
20 {
21     ///<summary>Pointer to the native class description.</summary>
22     public override System.IntPtr NativeClass
23     {
24         get
25         {
26             if (((object)this).GetType() == typeof(TabPage))
27             {
28                 return GetEflClassStatic();
29             }
30             else
31             {
32                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33             }
34         }
35     }
36
37     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
38         efl_ui_tab_page_class_get();
39     /// <summary>Initializes a new instance of the <see cref="TabPage"/> class.</summary>
40     /// <param name="parent">Parent instance.</param>
41     /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
42     public TabPage(Efl.Object parent
43             , System.String style = null) : base(efl_ui_tab_page_class_get(), typeof(TabPage), parent)
44     {
45         if (Efl.Eo.Globals.ParamHelperCheck(style))
46         {
47             SetStyle(Efl.Eo.Globals.GetParamHelper(style));
48         }
49
50         FinishInstantiation();
51     }
52
53     /// <summary>Initializes a new instance of the <see cref="TabPage"/> class.
54     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
55     /// <param name="raw">The native pointer to be wrapped.</param>
56     protected TabPage(System.IntPtr raw) : base(raw)
57     {
58             }
59
60     /// <summary>Initializes a new instance of the <see cref="TabPage"/> class.
61     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
62     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
63     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
64     /// <param name="parent">The Efl.Object parent of this instance.</param>
65     protected TabPage(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
66     {
67     }
68
69     /// <summary>Verifies if the given object is equal to this one.</summary>
70     /// <param name="instance">The object to compare to.</param>
71     /// <returns>True if both objects point to the same native object.</returns>
72     public override bool Equals(object instance)
73     {
74         var other = instance as Efl.Object;
75         if (other == null)
76         {
77             return false;
78         }
79         return this.NativeHandle == other.NativeHandle;
80     }
81
82     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
83     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
84     public override int GetHashCode()
85     {
86         return this.NativeHandle.ToInt32();
87     }
88
89     /// <summary>Turns the native pointer into a string representation.</summary>
90     /// <returns>A string with the type and the native pointer for this object.</returns>
91     public override String ToString()
92     {
93         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
94     }
95
96     /// <summary>Called when tab changed</summary>
97     public event EventHandler<Efl.Ui.TabPageTabChangedEvt_Args> TabChangedEvt
98     {
99         add
100         {
101             lock (eventLock)
102             {
103                 var wRef = new WeakReference(this);
104                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
105                 {
106                     var obj = wRef.Target as Efl.Eo.IWrapper;
107                     if (obj != null)
108                     {
109                                                 Efl.Ui.TabPageTabChangedEvt_Args args = new Efl.Ui.TabPageTabChangedEvt_Args();
110                         args.arg =  evt.Info;
111                         try
112                         {
113                             value?.Invoke(obj, args);
114                         }
115                         catch (Exception e)
116                         {
117                             Eina.Log.Error(e.ToString());
118                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
119                         }
120                     }
121                 };
122
123                 string key = "_EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED";
124                 AddNativeEventHandler(efl.Libs.Elementary, key, callerCb, value);
125             }
126         }
127
128         remove
129         {
130             lock (eventLock)
131             {
132                 string key = "_EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED";
133                 RemoveNativeEventHandler(efl.Libs.Elementary, key, value);
134             }
135         }
136     }
137     ///<summary>Method to raise event TabChangedEvt.</summary>
138     public void OnTabChangedEvt(Efl.Ui.TabPageTabChangedEvt_Args e)
139     {
140         var key = "_EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED";
141         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key);
142         if (desc == IntPtr.Zero)
143         {
144             Eina.Log.Error($"Failed to get native event {key}");
145             return;
146         }
147
148         IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));
149         try
150         {
151             Marshal.StructureToPtr(e.arg, info, false);
152             Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
153         }
154         finally
155         {
156             Marshal.FreeHGlobal(info);
157         }
158     }
159     /// <summary>Sent after the content is set or unset using the current content object.
160     /// (Since EFL 1.22)</summary>
161     public event EventHandler<Efl.IContentContentChangedEvt_Args> ContentChangedEvt
162     {
163         add
164         {
165             lock (eventLock)
166             {
167                 var wRef = new WeakReference(this);
168                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
169                 {
170                     var obj = wRef.Target as Efl.Eo.IWrapper;
171                     if (obj != null)
172                     {
173                                                 Efl.IContentContentChangedEvt_Args args = new Efl.IContentContentChangedEvt_Args();
174                         args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Gfx.IEntityConcrete);
175                         try
176                         {
177                             value?.Invoke(obj, args);
178                         }
179                         catch (Exception e)
180                         {
181                             Eina.Log.Error(e.ToString());
182                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
183                         }
184                     }
185                 };
186
187                 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
188                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
189             }
190         }
191
192         remove
193         {
194             lock (eventLock)
195             {
196                 string key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
197                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
198             }
199         }
200     }
201     ///<summary>Method to raise event ContentChangedEvt.</summary>
202     public void OnContentChangedEvt(Efl.IContentContentChangedEvt_Args e)
203     {
204         var key = "_EFL_CONTENT_EVENT_CONTENT_CHANGED";
205         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
206         if (desc == IntPtr.Zero)
207         {
208             Eina.Log.Error($"Failed to get native event {key}");
209             return;
210         }
211
212         IntPtr info = e.arg.NativeHandle;
213         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
214     }
215         public Efl.Ui.TabPagePartTab Tab
216     {
217         get
218         {
219             return GetPart("tab") as Efl.Ui.TabPagePartTab;
220         }
221     }
222     /// <summary>Sub-object currently set as this object&apos;s single content.
223     /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
224     /// (Since EFL 1.22)</summary>
225     /// <returns>The sub-object.</returns>
226     virtual public Efl.Gfx.IEntity GetContent() {
227          var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
228         Eina.Error.RaiseIfUnhandledException();
229         return _ret_var;
230  }
231     /// <summary>Sub-object currently set as this object&apos;s single content.
232     /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
233     /// (Since EFL 1.22)</summary>
234     /// <param name="content">The sub-object.</param>
235     /// <returns><c>true</c> if <c>content</c> was successfully swallowed.</returns>
236     virtual public bool SetContent(Efl.Gfx.IEntity content) {
237                                  var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),content);
238         Eina.Error.RaiseIfUnhandledException();
239                         return _ret_var;
240  }
241     /// <summary>Remove the sub-object currently set as content of this object and return it. This object becomes empty.
242     /// (Since EFL 1.22)</summary>
243     /// <returns>Unswallowed object</returns>
244     virtual public Efl.Gfx.IEntity UnsetContent() {
245          var _ret_var = Efl.IContentConcrete.NativeMethods.efl_content_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
246         Eina.Error.RaiseIfUnhandledException();
247         return _ret_var;
248  }
249     /// <summary>Sub-object currently set as this object&apos;s single content.
250 /// If it is set multiple times, previous sub-objects are removed first. Therefore, if an invalid <c>content</c> is set the object will become empty (it will have no sub-object).
251 /// (Since EFL 1.22)</summary>
252 /// <value>The sub-object.</value>
253     public Efl.Gfx.IEntity Content {
254         get { return GetContent(); }
255         set { SetContent(value); }
256     }
257     private static IntPtr GetEflClassStatic()
258     {
259         return Efl.Ui.TabPage.efl_ui_tab_page_class_get();
260     }
261     /// <summary>Wrapper for native methods and virtual method delegates.
262     /// For internal use by generated code only.</summary>
263     public new class NativeMethods : Efl.Ui.LayoutBase.NativeMethods
264     {
265         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
266         /// <summary>Gets the list of Eo operations to override.</summary>
267         /// <returns>The list of Eo operations to be overload.</returns>
268         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
269         {
270             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
271             var methods = Efl.Eo.Globals.GetUserMethods(type);
272
273             if (efl_content_get_static_delegate == null)
274             {
275                 efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
276             }
277
278             if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
279             {
280                 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) });
281             }
282
283             if (efl_content_set_static_delegate == null)
284             {
285                 efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
286             }
287
288             if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
289             {
290                 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) });
291             }
292
293             if (efl_content_unset_static_delegate == null)
294             {
295                 efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
296             }
297
298             if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
299             {
300                 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) });
301             }
302
303             descs.AddRange(base.GetEoOps(type));
304             return descs;
305         }
306         /// <summary>Returns the Eo class for the native methods of this class.</summary>
307         /// <returns>The native class pointer.</returns>
308         public override IntPtr GetEflClass()
309         {
310             return Efl.Ui.TabPage.efl_ui_tab_page_class_get();
311         }
312
313         #pragma warning disable CA1707, SA1300, SA1600
314
315         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
316         private delegate Efl.Gfx.IEntity efl_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
317
318         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
319         public delegate Efl.Gfx.IEntity efl_content_get_api_delegate(System.IntPtr obj);
320
321         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");
322
323         private static Efl.Gfx.IEntity content_get(System.IntPtr obj, System.IntPtr pd)
324         {
325             Eina.Log.Debug("function efl_content_get was called");
326             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
327             if (wrapper != null)
328             {
329             Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
330                 try
331                 {
332                     _ret_var = ((TabPage)wrapper).GetContent();
333                 }
334                 catch (Exception e)
335                 {
336                     Eina.Log.Warning($"Callback error: {e.ToString()}");
337                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
338                 }
339
340         return _ret_var;
341
342             }
343             else
344             {
345                 return efl_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
346             }
347         }
348
349         private static efl_content_get_delegate efl_content_get_static_delegate;
350
351         [return: MarshalAs(UnmanagedType.U1)]
352         private delegate bool efl_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
353
354         [return: MarshalAs(UnmanagedType.U1)]
355         public delegate bool efl_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IEntity content);
356
357         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");
358
359         private static bool content_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity content)
360         {
361             Eina.Log.Debug("function efl_content_set was called");
362             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
363             if (wrapper != null)
364             {
365                                     bool _ret_var = default(bool);
366                 try
367                 {
368                     _ret_var = ((TabPage)wrapper).SetContent(content);
369                 }
370                 catch (Exception e)
371                 {
372                     Eina.Log.Warning($"Callback error: {e.ToString()}");
373                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
374                 }
375
376                         return _ret_var;
377
378             }
379             else
380             {
381                 return efl_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), content);
382             }
383         }
384
385         private static efl_content_set_delegate efl_content_set_static_delegate;
386
387         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
388         private delegate Efl.Gfx.IEntity efl_content_unset_delegate(System.IntPtr obj, System.IntPtr pd);
389
390         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
391         public delegate Efl.Gfx.IEntity efl_content_unset_api_delegate(System.IntPtr obj);
392
393         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");
394
395         private static Efl.Gfx.IEntity content_unset(System.IntPtr obj, System.IntPtr pd)
396         {
397             Eina.Log.Debug("function efl_content_unset was called");
398             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
399             if (wrapper != null)
400             {
401             Efl.Gfx.IEntity _ret_var = default(Efl.Gfx.IEntity);
402                 try
403                 {
404                     _ret_var = ((TabPage)wrapper).UnsetContent();
405                 }
406                 catch (Exception e)
407                 {
408                     Eina.Log.Warning($"Callback error: {e.ToString()}");
409                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
410                 }
411
412         return _ret_var;
413
414             }
415             else
416             {
417                 return efl_content_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
418             }
419         }
420
421         private static efl_content_unset_delegate efl_content_unset_static_delegate;
422
423         #pragma warning restore CA1707, SA1300, SA1600
424
425 }
426 }
427 }
428
429 }
430
431 namespace Efl {
432
433 namespace Ui {
434
435 public enum TabPageTabChanged
436 {
437 /// <summary>Label changed</summary>
438 Label = 0,
439 /// <summary>Icon changed</summary>
440 Icon = 1,
441 }
442
443 }
444
445 }
446
447 namespace Efl {
448
449 namespace Ui {
450
451 /// <summary>Information of changed event</summary>
452 [StructLayout(LayoutKind.Sequential)]
453 public struct TabPageTabChangedEvent
454 {
455         public Efl.Ui.TabPageTabChanged Changed_info;
456     ///<summary>Constructor for TabPageTabChangedEvent.</summary>
457     public TabPageTabChangedEvent(
458         Efl.Ui.TabPageTabChanged Changed_info = default(Efl.Ui.TabPageTabChanged)    )
459     {
460         this.Changed_info = Changed_info;
461     }
462
463     public static implicit operator TabPageTabChangedEvent(IntPtr ptr)
464     {
465         var tmp = (TabPageTabChangedEvent.NativeStruct)Marshal.PtrToStructure(ptr, typeof(TabPageTabChangedEvent.NativeStruct));
466         return tmp;
467     }
468
469     ///<summary>Internal wrapper for struct TabPageTabChangedEvent.</summary>
470     [StructLayout(LayoutKind.Sequential)]
471     public struct NativeStruct
472     {
473         
474         public Efl.Ui.TabPageTabChanged Changed_info;
475         ///<summary>Implicit conversion to the internal/marshalling representation.</summary>
476         public static implicit operator TabPageTabChangedEvent.NativeStruct(TabPageTabChangedEvent _external_struct)
477         {
478             var _internal_struct = new TabPageTabChangedEvent.NativeStruct();
479             _internal_struct.Changed_info = _external_struct.Changed_info;
480             return _internal_struct;
481         }
482
483         ///<summary>Implicit conversion to the managed representation.</summary>
484         public static implicit operator TabPageTabChangedEvent(TabPageTabChangedEvent.NativeStruct _internal_struct)
485         {
486             var _external_struct = new TabPageTabChangedEvent();
487             _external_struct.Changed_info = _internal_struct.Changed_info;
488             return _external_struct;
489         }
490
491     }
492
493 }
494
495 }
496
497 }
498