[EflSharp] Update Circle and efl cs files (#945)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_canvas_surface.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 Canvas {
11
12 /// <summary>Native surfaces usually bound to an externally-managed buffer.
13 /// The attached <see cref="Efl.Canvas.Surface.NativeBuffer"/> is entirely platform-dependent, which means some of this mixin&apos;s subclasses will not work (constructor returns <c>null</c>) on some platforms. This class is meant to be used from native code only (C or C++), with direct access to the display system or a buffer allocation system.</summary>
14 [Efl.Canvas.Surface.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public abstract class Surface : Efl.Canvas.ImageInternal
17 {
18     ///<summary>Pointer to the native class description.</summary>
19     public override System.IntPtr NativeClass
20     {
21         get
22         {
23             if (((object)this).GetType() == typeof(Surface))
24             {
25                 return GetEflClassStatic();
26             }
27             else
28             {
29                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
30             }
31         }
32     }
33
34     [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
35         efl_canvas_surface_class_get();
36     /// <summary>Initializes a new instance of the <see cref="Surface"/> class.</summary>
37     /// <param name="parent">Parent instance.</param>
38     public Surface(Efl.Object parent= null
39             ) : base(efl_canvas_surface_class_get(), parent)
40     {
41         FinishInstantiation();
42     }
43
44     /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
45     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
46     protected Surface(ConstructingHandle ch) : base(ch)
47     {
48     }
49
50     /// <summary>Initializes a new instance of the <see cref="Surface"/> class.
51     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
52     /// <param name="wh">The native pointer to be wrapped.</param>
53     protected Surface(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
54     {
55     }
56
57     [Efl.Eo.PrivateNativeClass]
58     private class SurfaceRealized : Surface
59     {
60         private SurfaceRealized(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
61         {
62         }
63     }
64     /// <summary>Initializes a new instance of the <see cref="Surface"/> class.
65     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
66     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
67     /// <param name="parent">The Efl.Object parent of this instance.</param>
68     protected Surface(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
69     {
70     }
71
72     /// <summary>External buffer attached to this native surface.
73     /// Set to <c>null</c> to detach this surface from the external buffer.</summary>
74     /// <returns>The external buffer, depends on its type.</returns>
75     virtual public System.IntPtr GetNativeBuffer() {
76          var _ret_var = Efl.Canvas.Surface.NativeMethods.efl_canvas_surface_native_buffer_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
77         Eina.Error.RaiseIfUnhandledException();
78         return _ret_var;
79  }
80     /// <summary>Set the buffer. If this fails, this function returns <c>false</c>, and the surface is left without any attached buffer.</summary>
81     /// <param name="buffer">The external buffer, depends on its type.</param>
82     /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
83     virtual public bool SetNativeBuffer(System.IntPtr buffer) {
84                                  var _ret_var = Efl.Canvas.Surface.NativeMethods.efl_canvas_surface_native_buffer_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),buffer);
85         Eina.Error.RaiseIfUnhandledException();
86                         return _ret_var;
87  }
88     /// <summary>External buffer attached to this native surface.
89     /// Set to <c>null</c> to detach this surface from the external buffer.</summary>
90     /// <value>The external buffer, depends on its type.</value>
91     public System.IntPtr NativeBuffer {
92         get { return GetNativeBuffer(); }
93         set { SetNativeBuffer(value); }
94     }
95     private static IntPtr GetEflClassStatic()
96     {
97         return Efl.Canvas.Surface.efl_canvas_surface_class_get();
98     }
99     /// <summary>Wrapper for native methods and virtual method delegates.
100     /// For internal use by generated code only.</summary>
101     public new class NativeMethods : Efl.Canvas.ImageInternal.NativeMethods
102     {
103         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Evas);
104         /// <summary>Gets the list of Eo operations to override.</summary>
105         /// <returns>The list of Eo operations to be overload.</returns>
106         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
107         {
108             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
109             var methods = Efl.Eo.Globals.GetUserMethods(type);
110
111             if (efl_canvas_surface_native_buffer_get_static_delegate == null)
112             {
113                 efl_canvas_surface_native_buffer_get_static_delegate = new efl_canvas_surface_native_buffer_get_delegate(native_buffer_get);
114             }
115
116             if (methods.FirstOrDefault(m => m.Name == "GetNativeBuffer") != null)
117             {
118                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_surface_native_buffer_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_native_buffer_get_static_delegate) });
119             }
120
121             if (efl_canvas_surface_native_buffer_set_static_delegate == null)
122             {
123                 efl_canvas_surface_native_buffer_set_static_delegate = new efl_canvas_surface_native_buffer_set_delegate(native_buffer_set);
124             }
125
126             if (methods.FirstOrDefault(m => m.Name == "SetNativeBuffer") != null)
127             {
128                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_surface_native_buffer_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_surface_native_buffer_set_static_delegate) });
129             }
130
131             descs.AddRange(base.GetEoOps(type));
132             return descs;
133         }
134         /// <summary>Returns the Eo class for the native methods of this class.</summary>
135         /// <returns>The native class pointer.</returns>
136         public override IntPtr GetEflClass()
137         {
138             return Efl.Canvas.Surface.efl_canvas_surface_class_get();
139         }
140
141         #pragma warning disable CA1707, CS1591, SA1300, SA1600
142
143         
144         private delegate System.IntPtr efl_canvas_surface_native_buffer_get_delegate(System.IntPtr obj, System.IntPtr pd);
145
146         
147         public delegate System.IntPtr efl_canvas_surface_native_buffer_get_api_delegate(System.IntPtr obj);
148
149         public static Efl.Eo.FunctionWrapper<efl_canvas_surface_native_buffer_get_api_delegate> efl_canvas_surface_native_buffer_get_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_surface_native_buffer_get_api_delegate>(Module, "efl_canvas_surface_native_buffer_get");
150
151         private static System.IntPtr native_buffer_get(System.IntPtr obj, System.IntPtr pd)
152         {
153             Eina.Log.Debug("function efl_canvas_surface_native_buffer_get was called");
154             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
155             if (ws != null)
156             {
157             System.IntPtr _ret_var = default(System.IntPtr);
158                 try
159                 {
160                     _ret_var = ((Surface)ws.Target).GetNativeBuffer();
161                 }
162                 catch (Exception e)
163                 {
164                     Eina.Log.Warning($"Callback error: {e.ToString()}");
165                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
166                 }
167
168         return _ret_var;
169
170             }
171             else
172             {
173                 return efl_canvas_surface_native_buffer_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
174             }
175         }
176
177         private static efl_canvas_surface_native_buffer_get_delegate efl_canvas_surface_native_buffer_get_static_delegate;
178
179         [return: MarshalAs(UnmanagedType.U1)]
180         private delegate bool efl_canvas_surface_native_buffer_set_delegate(System.IntPtr obj, System.IntPtr pd,  System.IntPtr buffer);
181
182         [return: MarshalAs(UnmanagedType.U1)]
183         public delegate bool efl_canvas_surface_native_buffer_set_api_delegate(System.IntPtr obj,  System.IntPtr buffer);
184
185         public static Efl.Eo.FunctionWrapper<efl_canvas_surface_native_buffer_set_api_delegate> efl_canvas_surface_native_buffer_set_ptr = new Efl.Eo.FunctionWrapper<efl_canvas_surface_native_buffer_set_api_delegate>(Module, "efl_canvas_surface_native_buffer_set");
186
187         private static bool native_buffer_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr buffer)
188         {
189             Eina.Log.Debug("function efl_canvas_surface_native_buffer_set was called");
190             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
191             if (ws != null)
192             {
193                                     bool _ret_var = default(bool);
194                 try
195                 {
196                     _ret_var = ((Surface)ws.Target).SetNativeBuffer(buffer);
197                 }
198                 catch (Exception e)
199                 {
200                     Eina.Log.Warning($"Callback error: {e.ToString()}");
201                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
202                 }
203
204                         return _ret_var;
205
206             }
207             else
208             {
209                 return efl_canvas_surface_native_buffer_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), buffer);
210             }
211         }
212
213         private static efl_canvas_surface_native_buffer_set_delegate efl_canvas_surface_native_buffer_set_static_delegate;
214
215         #pragma warning restore CA1707, CS1591, SA1300, SA1600
216
217 }
218 }
219 }
220
221 }
222