[Bluetooth][Non-ACR] Fix no data exception issue (#787)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / 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.ComponentModel;
7 namespace Efl { namespace Gfx { 
8 /// <summary>Efl graphics view interface</summary>
9 [ViewNativeInherit]
10 public interface View : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>The dimensions of this object&apos;s viewport.
14 /// 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.
15 /// 
16 /// 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.
17 /// 
18 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
19 /// 
20 /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
21 /// 
22 /// Refer to each implementing class specific documentation for more details.</summary>
23 /// <returns>Size of the view.</returns>
24 Eina.Size2D GetViewSize();
25    /// <summary>The dimensions of this object&apos;s viewport.
26 /// 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.
27 /// 
28 /// 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.
29 /// 
30 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
31 /// 
32 /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
33 /// 
34 /// Refer to each implementing class specific documentation for more details.</summary>
35 /// <param name="size">Size of the view.</param>
36 /// <returns></returns>
37  void SetViewSize( Eina.Size2D size);
38          /// <summary>The dimensions of this object&apos;s viewport.
39 /// 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.
40 /// 
41 /// 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.
42 /// 
43 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
44 /// 
45 /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
46 /// 
47 /// Refer to each implementing class specific documentation for more details.</summary>
48 /// <value>Size of the view.</value>
49    Eina.Size2D ViewSize {
50       get ;
51       set ;
52    }
53 }
54 /// <summary>Efl graphics view interface</summary>
55 sealed public class ViewConcrete : 
56
57 View
58    
59 {
60    ///<summary>Pointer to the native class description.</summary>
61    public System.IntPtr NativeClass {
62       get {
63          if (((object)this).GetType() == typeof (ViewConcrete))
64             return Efl.Gfx.ViewNativeInherit.GetEflClassStatic();
65          else
66             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
67       }
68    }
69    private  System.IntPtr handle;
70    ///<summary>Pointer to the native instance.</summary>
71    public System.IntPtr NativeHandle {
72       get { return handle; }
73    }
74    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
75       efl_gfx_view_interface_get();
76    ///<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>
77    public ViewConcrete(System.IntPtr raw)
78    {
79       handle = raw;
80       register_event_proxies();
81    }
82    ///<summary>Destructor.</summary>
83    ~ViewConcrete()
84    {
85       Dispose(false);
86    }
87    ///<summary>Releases the underlying native instance.</summary>
88    void Dispose(bool disposing)
89    {
90       if (handle != System.IntPtr.Zero) {
91          Efl.Eo.Globals.efl_unref(handle);
92          handle = System.IntPtr.Zero;
93       }
94    }
95    ///<summary>Releases the underlying native instance.</summary>
96    public void Dispose()
97    {
98       Dispose(true);
99       GC.SuppressFinalize(this);
100    }
101    ///<summary>Casts obj into an instance of this type.</summary>
102    public static ViewConcrete static_cast(Efl.Object obj)
103    {
104       if (obj == null)
105          throw new System.ArgumentNullException("obj");
106       return new ViewConcrete(obj.NativeHandle);
107    }
108    ///<summary>Verifies if the given object is equal to this one.</summary>
109    public override bool Equals(object obj)
110    {
111       var other = obj as Efl.Object;
112       if (other == null)
113          return false;
114       return this.NativeHandle == other.NativeHandle;
115    }
116    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
117    public override int GetHashCode()
118    {
119       return this.NativeHandle.ToInt32();
120    }
121    ///<summary>Turns the native pointer into a string representation.</summary>
122    public override String ToString()
123    {
124       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
125    }
126     void register_event_proxies()
127    {
128    }
129    /// <summary>The dimensions of this object&apos;s viewport.
130    /// 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.
131    /// 
132    /// 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.
133    /// 
134    /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
135    /// 
136    /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
137    /// 
138    /// Refer to each implementing class specific documentation for more details.</summary>
139    /// <returns>Size of the view.</returns>
140    public Eina.Size2D GetViewSize() {
141        var _ret_var = Efl.Gfx.ViewNativeInherit.efl_gfx_view_size_get_ptr.Value.Delegate(this.NativeHandle);
142       Eina.Error.RaiseIfUnhandledException();
143       return Eina.Size2D_StructConversion.ToManaged(_ret_var);
144  }
145    /// <summary>The dimensions of this object&apos;s viewport.
146    /// 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.
147    /// 
148    /// 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.
149    /// 
150    /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
151    /// 
152    /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
153    /// 
154    /// Refer to each implementing class specific documentation for more details.</summary>
155    /// <param name="size">Size of the view.</param>
156    /// <returns></returns>
157    public  void SetViewSize( Eina.Size2D size) {
158        var _in_size = Eina.Size2D_StructConversion.ToInternal(size);
159                   Efl.Gfx.ViewNativeInherit.efl_gfx_view_size_set_ptr.Value.Delegate(this.NativeHandle, _in_size);
160       Eina.Error.RaiseIfUnhandledException();
161                    }
162    /// <summary>The dimensions of this object&apos;s viewport.
163 /// 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.
164 /// 
165 /// 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.
166 /// 
167 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
168 /// 
169 /// <see cref="Efl.Gfx.View.SetViewSize"/> may not be implemented. If it is, it might trigger a complete recalculation of the scene, or reload of the pixel data.
170 /// 
171 /// Refer to each implementing class specific documentation for more details.</summary>
172 /// <value>Size of the view.</value>
173    public Eina.Size2D ViewSize {
174       get { return GetViewSize(); }
175       set { SetViewSize( value); }
176    }
177 }
178 public class ViewNativeInherit  : Efl.Eo.NativeClass{
179    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
180    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
181    {
182       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
183       if (efl_gfx_view_size_get_static_delegate == null)
184       efl_gfx_view_size_get_static_delegate = new efl_gfx_view_size_get_delegate(view_size_get);
185       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)});
186       if (efl_gfx_view_size_set_static_delegate == null)
187       efl_gfx_view_size_set_static_delegate = new efl_gfx_view_size_set_delegate(view_size_set);
188       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)});
189       return descs;
190    }
191    public override IntPtr GetEflClass()
192    {
193       return Efl.Gfx.ViewConcrete.efl_gfx_view_interface_get();
194    }
195    public static  IntPtr GetEflClassStatic()
196    {
197       return Efl.Gfx.ViewConcrete.efl_gfx_view_interface_get();
198    }
199
200
201     private delegate Eina.Size2D_StructInternal efl_gfx_view_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
202
203
204     public delegate Eina.Size2D_StructInternal efl_gfx_view_size_get_api_delegate(System.IntPtr obj);
205     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");
206     private static Eina.Size2D_StructInternal view_size_get(System.IntPtr obj, System.IntPtr pd)
207    {
208       Eina.Log.Debug("function efl_gfx_view_size_get was called");
209       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
210       if(wrapper != null) {
211                   Eina.Size2D _ret_var = default(Eina.Size2D);
212          try {
213             _ret_var = ((View)wrapper).GetViewSize();
214          } catch (Exception e) {
215             Eina.Log.Warning($"Callback error: {e.ToString()}");
216             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
217          }
218       return Eina.Size2D_StructConversion.ToInternal(_ret_var);
219       } else {
220          return efl_gfx_view_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
221       }
222    }
223    private static efl_gfx_view_size_get_delegate efl_gfx_view_size_get_static_delegate;
224
225
226     private delegate  void efl_gfx_view_size_set_delegate(System.IntPtr obj, System.IntPtr pd,   Eina.Size2D_StructInternal size);
227
228
229     public delegate  void efl_gfx_view_size_set_api_delegate(System.IntPtr obj,   Eina.Size2D_StructInternal size);
230     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");
231     private static  void view_size_set(System.IntPtr obj, System.IntPtr pd,  Eina.Size2D_StructInternal size)
232    {
233       Eina.Log.Debug("function efl_gfx_view_size_set was called");
234       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
235       if(wrapper != null) {
236                var _in_size = Eina.Size2D_StructConversion.ToManaged(size);
237                      
238          try {
239             ((View)wrapper).SetViewSize( _in_size);
240          } catch (Exception e) {
241             Eina.Log.Warning($"Callback error: {e.ToString()}");
242             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
243          }
244                         } else {
245          efl_gfx_view_size_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  size);
246       }
247    }
248    private static efl_gfx_view_size_set_delegate efl_gfx_view_size_set_static_delegate;
249 }
250 } }