1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl graphics view interface</summary>
13 [Efl.Gfx.IViewConcrete.NativeMethods]
14 public interface IView :
15 Efl.Eo.IWrapper, IDisposable
17 /// <summary>The dimensions of this object'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.
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.
22 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
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.
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'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.
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.
34 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
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.
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'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.
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.
46 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
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.
50 /// Refer to each implementing class specific documentation for more details.</summary>
51 /// <value>Size of the view.</value>
52 Eina.Size2D ViewSize {
57 /// <summary>Efl graphics view interface</summary>
58 sealed public class IViewConcrete :
63 ///<summary>Pointer to the native class description.</summary>
64 public override System.IntPtr NativeClass
68 if (((object)this).GetType() == typeof(IViewConcrete))
70 return GetEflClassStatic();
74 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
79 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
80 efl_gfx_view_interface_get();
81 /// <summary>Initializes a new instance of the <see cref="IView"/> class.
82 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
83 private IViewConcrete(System.IntPtr raw) : base(raw)
87 /// <summary>The dimensions of this object's viewport.
88 /// 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.
90 /// 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.
92 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
94 /// <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.
96 /// Refer to each implementing class specific documentation for more details.</summary>
97 /// <returns>Size of the view.</returns>
98 public Eina.Size2D GetViewSize() {
99 var _ret_var = Efl.Gfx.IViewConcrete.NativeMethods.efl_gfx_view_size_get_ptr.Value.Delegate(this.NativeHandle);
100 Eina.Error.RaiseIfUnhandledException();
103 /// <summary>The dimensions of this object's viewport.
104 /// 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.
106 /// 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.
108 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
110 /// <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.
112 /// Refer to each implementing class specific documentation for more details.</summary>
113 /// <param name="size">Size of the view.</param>
114 public void SetViewSize(Eina.Size2D size) {
115 Eina.Size2D.NativeStruct _in_size = size;
116 Efl.Gfx.IViewConcrete.NativeMethods.efl_gfx_view_size_set_ptr.Value.Delegate(this.NativeHandle,_in_size);
117 Eina.Error.RaiseIfUnhandledException();
119 /// <summary>The dimensions of this object's viewport.
120 /// 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.
122 /// 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.
124 /// In most cases the view should have the same dimensions as the object on the canvas, for best quality.
126 /// <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.
128 /// Refer to each implementing class specific documentation for more details.</summary>
129 /// <value>Size of the view.</value>
130 public Eina.Size2D ViewSize {
131 get { return GetViewSize(); }
132 set { SetViewSize(value); }
134 private static IntPtr GetEflClassStatic()
136 return Efl.Gfx.IViewConcrete.efl_gfx_view_interface_get();
138 /// <summary>Wrapper for native methods and virtual method delegates.
139 /// For internal use by generated code only.</summary>
140 public class NativeMethods : Efl.Eo.NativeClass
142 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
143 /// <summary>Gets the list of Eo operations to override.</summary>
144 /// <returns>The list of Eo operations to be overload.</returns>
145 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
147 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
148 var methods = Efl.Eo.Globals.GetUserMethods(type);
150 if (efl_gfx_view_size_get_static_delegate == null)
152 efl_gfx_view_size_get_static_delegate = new efl_gfx_view_size_get_delegate(view_size_get);
155 if (methods.FirstOrDefault(m => m.Name == "GetViewSize") != null)
157 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) });
160 if (efl_gfx_view_size_set_static_delegate == null)
162 efl_gfx_view_size_set_static_delegate = new efl_gfx_view_size_set_delegate(view_size_set);
165 if (methods.FirstOrDefault(m => m.Name == "SetViewSize") != null)
167 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) });
172 /// <summary>Returns the Eo class for the native methods of this class.</summary>
173 /// <returns>The native class pointer.</returns>
174 public override IntPtr GetEflClass()
176 return Efl.Gfx.IViewConcrete.efl_gfx_view_interface_get();
179 #pragma warning disable CA1707, CS1591, SA1300, SA1600
182 private delegate Eina.Size2D.NativeStruct efl_gfx_view_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
185 public delegate Eina.Size2D.NativeStruct efl_gfx_view_size_get_api_delegate(System.IntPtr obj);
187 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");
189 private static Eina.Size2D.NativeStruct view_size_get(System.IntPtr obj, System.IntPtr pd)
191 Eina.Log.Debug("function efl_gfx_view_size_get was called");
192 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
195 Eina.Size2D _ret_var = default(Eina.Size2D);
198 _ret_var = ((IView)ws.Target).GetViewSize();
202 Eina.Log.Warning($"Callback error: {e.ToString()}");
203 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
211 return efl_gfx_view_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
215 private static efl_gfx_view_size_get_delegate efl_gfx_view_size_get_static_delegate;
218 private delegate void efl_gfx_view_size_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct size);
221 public delegate void efl_gfx_view_size_set_api_delegate(System.IntPtr obj, Eina.Size2D.NativeStruct size);
223 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");
225 private static void view_size_set(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct size)
227 Eina.Log.Debug("function efl_gfx_view_size_set was called");
228 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
231 Eina.Size2D _in_size = size;
235 ((IView)ws.Target).SetViewSize(_in_size);
239 Eina.Log.Warning($"Callback error: {e.ToString()}");
240 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
247 efl_gfx_view_size_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), size);
251 private static efl_gfx_view_size_set_delegate efl_gfx_view_size_set_static_delegate;
253 #pragma warning restore CA1707, CS1591, SA1300, SA1600