[EflSharp] Update Circle and efl cs files (#995)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_duplicate.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 /// <summary>An interface for duplication of objects.
12 /// Objects implementing this interface can be duplicated with <see cref="Efl.IDuplicate.Duplicate"/>.</summary>
13 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
14 [Efl.IDuplicateConcrete.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public interface IDuplicate : 
17     Efl.Eo.IWrapper, IDisposable
18 {
19     /// <summary>Creates a carbon copy of this object and returns it.
20 /// The newly created object will have no event handlers or anything of the sort.</summary>
21 /// <returns>Returned carbon copy</returns>
22 Efl.IDuplicate Duplicate();
23     }
24 /// <summary>An interface for duplication of objects.
25 /// Objects implementing this interface can be duplicated with <see cref="Efl.IDuplicate.Duplicate"/>.</summary>
26 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
27 sealed public  class IDuplicateConcrete :
28     Efl.Eo.EoWrapper
29     , IDuplicate
30     
31 {
32     /// <summary>Pointer to the native class description.</summary>
33     public override System.IntPtr NativeClass
34     {
35         get
36         {
37             if (((object)this).GetType() == typeof(IDuplicateConcrete))
38             {
39                 return GetEflClassStatic();
40             }
41             else
42             {
43                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
44             }
45         }
46     }
47
48     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
49     /// Do not call this constructor directly.</summary>
50     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
51     private IDuplicateConcrete(ConstructingHandle ch) : base(ch)
52     {
53     }
54
55     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
56         efl_duplicate_interface_get();
57     /// <summary>Initializes a new instance of the <see cref="IDuplicate"/> class.
58     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
59     /// <param name="wh">The native pointer to be wrapped.</param>
60     private IDuplicateConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
61     {
62     }
63
64     /// <summary>Creates a carbon copy of this object and returns it.
65     /// The newly created object will have no event handlers or anything of the sort.</summary>
66     /// <returns>Returned carbon copy</returns>
67     public Efl.IDuplicate Duplicate() {
68          var _ret_var = Efl.IDuplicateConcrete.NativeMethods.efl_duplicate_ptr.Value.Delegate(this.NativeHandle);
69         Eina.Error.RaiseIfUnhandledException();
70         return _ret_var;
71  }
72     private static IntPtr GetEflClassStatic()
73     {
74         return Efl.IDuplicateConcrete.efl_duplicate_interface_get();
75     }
76     /// <summary>Wrapper for native methods and virtual method delegates.
77     /// For internal use by generated code only.</summary>
78     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
79     {
80         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
81         /// <summary>Gets the list of Eo operations to override.</summary>
82         /// <returns>The list of Eo operations to be overload.</returns>
83         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
84         {
85             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
86             var methods = Efl.Eo.Globals.GetUserMethods(type);
87
88             if (efl_duplicate_static_delegate == null)
89             {
90                 efl_duplicate_static_delegate = new efl_duplicate_delegate(duplicate);
91             }
92
93             if (methods.FirstOrDefault(m => m.Name == "Duplicate") != null)
94             {
95                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_duplicate"), func = Marshal.GetFunctionPointerForDelegate(efl_duplicate_static_delegate) });
96             }
97
98             return descs;
99         }
100         /// <summary>Returns the Eo class for the native methods of this class.</summary>
101         /// <returns>The native class pointer.</returns>
102         public override IntPtr GetEflClass()
103         {
104             return Efl.IDuplicateConcrete.efl_duplicate_interface_get();
105         }
106
107         #pragma warning disable CA1707, CS1591, SA1300, SA1600
108
109         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
110         private delegate Efl.IDuplicate efl_duplicate_delegate(System.IntPtr obj, System.IntPtr pd);
111
112         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
113         public delegate Efl.IDuplicate efl_duplicate_api_delegate(System.IntPtr obj);
114
115         public static Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate> efl_duplicate_ptr = new Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate>(Module, "efl_duplicate");
116
117         private static Efl.IDuplicate duplicate(System.IntPtr obj, System.IntPtr pd)
118         {
119             Eina.Log.Debug("function efl_duplicate was called");
120             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
121             if (ws != null)
122             {
123             Efl.IDuplicate _ret_var = default(Efl.IDuplicate);
124                 try
125                 {
126                     _ret_var = ((IDuplicate)ws.Target).Duplicate();
127                 }
128                 catch (Exception e)
129                 {
130                     Eina.Log.Warning($"Callback error: {e.ToString()}");
131                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
132                 }
133
134         return _ret_var;
135
136             }
137             else
138             {
139                 return efl_duplicate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
140             }
141         }
142
143         private static efl_duplicate_delegate efl_duplicate_static_delegate;
144
145         #pragma warning restore CA1707, CS1591, SA1300, SA1600
146
147 }
148 }
149 }
150
151 #if EFL_BETA
152 #pragma warning disable CS1591
153 public static class EflIDuplicateConcrete_ExtensionMethods {
154 }
155 #pragma warning restore CS1591
156 #endif