[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_gfx_view.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 Gfx {
11
12 /// <summary>Efl graphics view interface</summary>
13 [Efl.Gfx.IViewConcrete.NativeMethods]
14 public interface IView : 
15     Efl.Eo.IWrapper, IDisposable
16 {
17     /// <summary>The dimensions of this object&apos;s viewport.
18 /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
19 /// 
20 /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
21 /// 
22 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
23 /// 
24 /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
25 /// 
26 /// Refer to each implementing class specific documentation for more details.</summary>
27 /// <returns>Size of the view.</returns>
28 Eina.Size2D GetViewSize();
29     /// <summary>The dimensions of this object&apos;s viewport.
30 /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
31 /// 
32 /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
33 /// 
34 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
35 /// 
36 /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
37 /// 
38 /// Refer to each implementing class specific documentation for more details.</summary>
39 /// <param name="size">Size of the view.</param>
40 void SetViewSize(Eina.Size2D size);
41             /// <summary>The dimensions of this object&apos;s viewport.
42 /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
43 /// 
44 /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
45 /// 
46 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
47 /// 
48 /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
49 /// 
50 /// Refer to each implementing class specific documentation for more details.</summary>
51 /// <value>Size of the view.</value>
52     Eina.Size2D ViewSize {
53         get ;
54         set ;
55     }
56 }
57 /// <summary>Efl graphics view interface</summary>
58 sealed public class IViewConcrete : 
59
60 IView
61     
62 {
63     ///<summary>Pointer to the native class description.</summary>
64     public System.IntPtr NativeClass
65     {
66         get
67         {
68             if (((object)this).GetType() == typeof(IViewConcrete))
69             {
70                 return GetEflClassStatic();
71             }
72             else
73             {
74                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
75             }
76         }
77     }
78
79     private  System.IntPtr handle;
80     ///<summary>Pointer to the native instance.</summary>
81     public System.IntPtr NativeHandle
82     {
83         get { return handle; }
84     }
85
86     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
87         efl_gfx_view_interface_get();
88     /// <summary>Initializes a new instance of the <see cref="IView"/> class.
89     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
90     private IViewConcrete(System.IntPtr raw)
91     {
92         handle = raw;
93     }
94     ///<summary>Destructor.</summary>
95     ~IViewConcrete()
96     {
97         Dispose(false);
98     }
99
100     ///<summary>Releases the underlying native instance.</summary>
101     private void Dispose(bool disposing)
102     {
103         if (handle != System.IntPtr.Zero)
104         {
105             IntPtr h = handle;
106             handle = IntPtr.Zero;
107
108             IntPtr gcHandlePtr = IntPtr.Zero;
109             if (disposing)
110             {
111                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
112             }
113             else
114             {
115                 Monitor.Enter(Efl.All.InitLock);
116                 if (Efl.All.MainLoopInitialized)
117                 {
118                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
119                 }
120
121                 Monitor.Exit(Efl.All.InitLock);
122             }
123         }
124
125     }
126
127     ///<summary>Releases the underlying native instance.</summary>
128     public void Dispose()
129     {
130         Dispose(true);
131         GC.SuppressFinalize(this);
132     }
133
134     /// <summary>Verifies if the given object is equal to this one.</summary>
135     /// <param name="instance">The object to compare to.</param>
136     /// <returns>True if both objects point to the same native object.</returns>
137     public override bool Equals(object instance)
138     {
139         var other = instance as Efl.Object;
140         if (other == null)
141         {
142             return false;
143         }
144         return this.NativeHandle == other.NativeHandle;
145     }
146
147     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
148     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
149     public override int GetHashCode()
150     {
151         return this.NativeHandle.ToInt32();
152     }
153
154     /// <summary>Turns the native pointer into a string representation.</summary>
155     /// <returns>A string with the type and the native pointer for this object.</returns>
156     public override String ToString()
157     {
158         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
159     }
160
161     /// <summary>The dimensions of this object&apos;s viewport.
162     /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
163     /// 
164     /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
165     /// 
166     /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
167     /// 
168     /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
169     /// 
170     /// Refer to each implementing class specific documentation for more details.</summary>
171     /// <returns>Size of the view.</returns>
172     public Eina.Size2D GetViewSize() {
173          var _ret_var = Efl.Gfx.IViewConcrete.NativeMethods.efl_gfx_view_size_get_ptr.Value.Delegate(this.NativeHandle);
174         Eina.Error.RaiseIfUnhandledException();
175         return _ret_var;
176  }
177     /// <summary>The dimensions of this object&apos;s viewport.
178     /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
179     /// 
180     /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
181     /// 
182     /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
183     /// 
184     /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
185     /// 
186     /// Refer to each implementing class specific documentation for more details.</summary>
187     /// <param name="size">Size of the view.</param>
188     public void SetViewSize(Eina.Size2D size) {
189          Eina.Size2D.NativeStruct _in_size = size;
190                         Efl.Gfx.IViewConcrete.NativeMethods.efl_gfx_view_size_set_ptr.Value.Delegate(this.NativeHandle,_in_size);
191         Eina.Error.RaiseIfUnhandledException();
192                          }
193     /// <summary>The dimensions of this object&apos;s viewport.
194 /// This property represents the size of an image (file on disk, vector graphics, GL or 3D scene, ...) view: this is the logical size of a view, not the number of pixels in the buffer, nor its visible size on the window.
195 /// 
196 /// For scalable scenes (vector graphics, 3D or GL), this means scaling the contents of the scene and drawing more pixels as a result; For pixmaps this means zooming and stretching up or down the backing buffer to fit this view.
197 /// 
198 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
199 /// 
200 /// <see cref="Efl.Gfx.IView.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
201 /// 
202 /// Refer to each implementing class specific documentation for more details.</summary>
203 /// <value>Size of the view.</value>
204     public Eina.Size2D ViewSize {
205         get { return GetViewSize(); }
206         set { SetViewSize(value); }
207     }
208     private static IntPtr GetEflClassStatic()
209     {
210         return Efl.Gfx.IViewConcrete.efl_gfx_view_interface_get();
211     }
212     /// <summary>Wrapper for native methods and virtual method delegates.
213     /// For internal use by generated code only.</summary>
214     public class NativeMethods  : Efl.Eo.NativeClass
215     {
216         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
217         /// <summary>Gets the list of Eo operations to override.</summary>
218         /// <returns>The list of Eo operations to be overload.</returns>
219         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
220         {
221             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
222             var methods = Efl.Eo.Globals.GetUserMethods(type);
223
224             if (efl_gfx_view_size_get_static_delegate == null)
225             {
226                 efl_gfx_view_size_get_static_delegate = new efl_gfx_view_size_get_delegate(view_size_get);
227             }
228
229             if (methods.FirstOrDefault(m => m.Name == "GetViewSize") != null)
230             {
231                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_view_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_view_size_get_static_delegate) });
232             }
233
234             if (efl_gfx_view_size_set_static_delegate == null)
235             {
236                 efl_gfx_view_size_set_static_delegate = new efl_gfx_view_size_set_delegate(view_size_set);
237             }
238
239             if (methods.FirstOrDefault(m => m.Name == "SetViewSize") != null)
240             {
241                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_view_size_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_view_size_set_static_delegate) });
242             }
243
244             return descs;
245         }
246         /// <summary>Returns the Eo class for the native methods of this class.</summary>
247         /// <returns>The native class pointer.</returns>
248         public override IntPtr GetEflClass()
249         {
250             return Efl.Gfx.IViewConcrete.efl_gfx_view_interface_get();
251         }
252
253         #pragma warning disable CA1707, SA1300, SA1600
254
255         
256         private delegate Eina.Size2D.NativeStruct efl_gfx_view_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
257
258         
259         public delegate Eina.Size2D.NativeStruct efl_gfx_view_size_get_api_delegate(System.IntPtr obj);
260
261         public static Efl.Eo.FunctionWrapper<efl_gfx_view_size_get_api_delegate> efl_gfx_view_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_view_size_get_api_delegate>(Module, "efl_gfx_view_size_get");
262
263         private static Eina.Size2D.NativeStruct view_size_get(System.IntPtr obj, System.IntPtr pd)
264         {
265             Eina.Log.Debug("function efl_gfx_view_size_get was called");
266             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
267             if (wrapper != null)
268             {
269             Eina.Size2D _ret_var = default(Eina.Size2D);
270                 try
271                 {
272                     _ret_var = ((IView)wrapper).GetViewSize();
273                 }
274                 catch (Exception e)
275                 {
276                     Eina.Log.Warning($"Callback error: {e.ToString()}");
277                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
278                 }
279
280         return _ret_var;
281
282             }
283             else
284             {
285                 return efl_gfx_view_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
286             }
287         }
288
289         private static efl_gfx_view_size_get_delegate efl_gfx_view_size_get_static_delegate;
290
291         
292         private delegate void efl_gfx_view_size_set_delegate(System.IntPtr obj, System.IntPtr pd,  Eina.Size2D.NativeStruct size);
293
294         
295         public delegate void efl_gfx_view_size_set_api_delegate(System.IntPtr obj,  Eina.Size2D.NativeStruct size);
296
297         public static Efl.Eo.FunctionWrapper<efl_gfx_view_size_set_api_delegate> efl_gfx_view_size_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_view_size_set_api_delegate>(Module, "efl_gfx_view_size_set");
298
299         private static void view_size_set(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct size)
300         {
301             Eina.Log.Debug("function efl_gfx_view_size_set was called");
302             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
303             if (wrapper != null)
304             {
305         Eina.Size2D _in_size = size;
306                             
307                 try
308                 {
309                     ((IView)wrapper).SetViewSize(_in_size);
310                 }
311                 catch (Exception e)
312                 {
313                     Eina.Log.Warning($"Callback error: {e.ToString()}");
314                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
315                 }
316
317                         
318             }
319             else
320             {
321                 efl_gfx_view_size_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size);
322             }
323         }
324
325         private static efl_gfx_view_size_set_delegate efl_gfx_view_size_set_static_delegate;
326
327         #pragma warning restore CA1707, SA1300, SA1600
328
329 }
330 }
331 }
332
333 }
334