1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Gfx {
8 /// <summary>Common APIs for all objects representing images and 2D pixel buffers.</summary>
10 public interface IBuffer :
11 Efl.Eo.IWrapper, IDisposable
13 /// <summary>Rectangular size of the pixel buffer as allocated in memory.</summary>
14 /// <returns>Size of the buffer in pixels.</returns>
15 Eina.Size2D GetBufferSize();
16 /// <summary>Potentially not implemented, <see cref="Efl.Gfx.IBuffer.BufferSize"/> may be read-only.</summary>
17 /// <param name="sz">Size of the buffer in pixels.</param>
18 /// <returns></returns>
19 void SetBufferSize( Eina.Size2D sz);
20 /// <summary>Returns the current encoding of this buffer's pixels.
21 /// See <see cref="Efl.Gfx.Colorspace"/> for more information on the supported formats.</summary>
22 /// <returns>Colorspace</returns>
23 Efl.Gfx.Colorspace GetColorspace();
24 /// <summary>Retrieve whether alpha channel data is used on this object.</summary>
25 /// <returns>Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</returns>
27 /// <summary>Change alpha channel usage for this object.
28 /// This function sets a flag on an image object indicating whether or not to use alpha channel data. A value of <c>true</c> makes it use alpha channel data, and <c>false</c> makes it ignore that data. Note that this has nothing to do with an object's color as manipulated by <see cref="Efl.Gfx.IColor.GetColor"/>.</summary>
29 /// <param name="alpha">Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</param>
30 /// <returns></returns>
31 void SetAlpha( bool alpha);
32 /// <summary>Length in bytes of one row of pixels in memory.
33 /// Usually this will be equal to width * 4, with a plain BGRA image. This may return 0 if the stride is not applicable.
35 /// When applicable, this will include the <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/> as well as potential extra padding.</summary>
36 /// <returns>Stride</returns>
38 /// <summary>Duplicated pixel borders inside this buffer.
39 /// Internally, EFL may require an image to have its border pixels duplicated, in particular for GL textures. This property exposes the internal duplicated borders to allow calling <see cref="Efl.Gfx.IBuffer.BufferMap"/> with the entire pixel data, including those edge pixels.</summary>
40 /// <param name="l">Left border pixels, usually 0 or 1</param>
41 /// <param name="r">Right border pixels, usually 0 or 1</param>
42 /// <param name="t">Top border pixels, usually 0 or 1</param>
43 /// <param name="b">Bottom border pixels, usually 0 or 1</param>
44 /// <returns></returns>
45 void GetBufferBorders( out uint l, out uint r, out uint t, out uint b);
46 /// <summary>Mark a sub-region of the given image object to be redrawn.
47 /// This function schedules a particular rectangular region of an image object to be updated (redrawn) at the next rendering cycle.</summary>
48 /// <param name="region">The updated region.</param>
49 /// <returns></returns>
50 void AddBufferUpdate( ref Eina.Rect region);
51 /// <summary>Map a region of this buffer for read or write access by the CPU.
52 /// Fetches data from the GPU if needed. This operation may be slow if cpu_readable_fast or cpu_writeable_fast are not true, or if the required colorspace is different from the internal one.
54 /// Note that if the buffer has <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/>, then <c>x</c> and <c>y</c> may be negative.</summary>
55 /// <param name="mode">Specifies whether to map for read-only, write-only or read-write access (OR combination of flags).</param>
56 /// <param name="region">The region to map.</param>
57 /// <param name="cspace">Requested colorspace. If different from the internal cspace, map should try to convert the data into a new buffer. argb8888 by default.</param>
58 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
59 /// <param name="stride">Returns the length in bytes of a mapped line</param>
60 /// <returns>The data slice. In case of failure, the memory pointer will be <c>null</c>.</returns>
61 Eina.RwSlice BufferMap( Efl.Gfx.BufferAccessMode mode, ref Eina.Rect region, Efl.Gfx.Colorspace cspace, int plane, out int stride);
62 /// <summary>Unmap a region of this buffer, and update the internal data if needed.
63 /// EFL will update the internal image if the map had write access.
65 /// Note: The <c>slice</c> struct does not need to be the one returned by <see cref="Efl.Gfx.IBuffer.BufferMap"/>, only its contents (<c>mem</c> and <c>len</c>) must match. But after a call to <see cref="Efl.Gfx.IBuffer.BufferUnmap"/> the original <c>slice</c> structure is not valid anymore.</summary>
66 /// <param name="slice">Data slice returned by a previous call to map.</param>
67 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
68 bool BufferUnmap( Eina.RwSlice slice);
69 /// <summary>Set the pixels for this buffer by copying them, or allocate a new memory region.
70 /// This will allocate a new buffer in memory and copy the input <c>pixels</c> to it. The internal colorspace is not guaranteed to be preserved, and colorspace conversion may happen internally.
72 /// If <c>pixels</c> is <c>null</c>, then a new empty buffer will be allocated. If the buffer already had pixel data, the previous image data will be dropped. This is the same as <see cref="Efl.Gfx.IBuffer.SetBufferManaged"/>.
74 /// The memory buffer <c>pixels</c> must be large enough to hold <c>width</c> x <c>height</c> pixels encoded in the colorspace <c>cspace</c>.
76 /// <c>slice</c> should not be the return value of <see cref="Efl.Gfx.IBuffer.GetBufferManaged"/>.</summary>
77 /// <param name="slice">If <c>null</c>, allocates an empty buffer</param>
78 /// <param name="size">The size in pixels.</param>
79 /// <param name="stride">If 0, automatically guessed from the <c>width</c>.</param>
80 /// <param name="cspace">argb8888 by default.</param>
81 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
82 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
83 bool SetBufferCopy( Eina.Slice slice, Eina.Size2D size, int stride, Efl.Gfx.Colorspace cspace, int plane);
84 /// <summary>Set the pixels for this buffer, managed externally by the client.
85 /// EFL will use the pixel data directly, and update the GPU-side texture if required. This will mark the image as dirty. If <c>slice</c> is <c>null</c>, this will detach the pixel data.
87 /// If the buffer already had pixel data, the previous image data will be dropped. This is the same as <see cref="Efl.Gfx.IBuffer.SetBufferCopy"/>.
89 /// The memory buffer <c>pixels</c> must be large enough to hold <c>width</c> x <c>height</c> pixels encoded in the colorspace <c>cspace</c>.
91 /// See also <see cref="Efl.Gfx.IBuffer.SetBufferCopy"/> if you want EFL to copy the input buffer internally.</summary>
92 /// <param name="slice">If <c>null</c>, detaches the previous buffer.</param>
93 /// <param name="size">The size in pixels.</param>
94 /// <param name="stride">If 0, automatically guessed from the <c>width</c>.</param>
95 /// <param name="cspace">argb8888 by default.</param>
96 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
97 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
98 bool SetBufferManaged( Eina.Slice slice, Eina.Size2D size, int stride, Efl.Gfx.Colorspace cspace, int plane);
99 /// <summary>Get a direct pointer to the internal pixel data, if available.
100 /// This will return <c>null</c> unless <see cref="Efl.Gfx.IBuffer.SetBufferManaged"/> was used to pass in an external data pointer.</summary>
101 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
102 /// <returns>The data slice. The memory pointer will be <c>null</c> in case of failure.</returns>
103 Eina.Slice GetBufferManaged( int plane);
104 /// <summary>Rectangular size of the pixel buffer as allocated in memory.</summary>
105 /// <value>Size of the buffer in pixels.</value>
106 Eina.Size2D BufferSize {
110 /// <summary>The colorspace defines how pixels are encoded in the image in memory.
111 /// By default, images are encoded in 32-bit BGRA, ie. each pixel takes 4 bytes in memory, with each channel B,G,R,A encoding the color with values from 0 to 255.
113 /// All images used in EFL use alpha-premultipied BGRA values, which means that for each pixel, B <= A, G <= A and R <= A.</summary>
114 /// <value>Colorspace</value>
115 Efl.Gfx.Colorspace Colorspace {
118 /// <summary>Indicates whether the alpha channel should be used.
119 /// This does not indicate whether the image source file contains an alpha channel, only whether to respect it or discard it.</summary>
120 /// <value>Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</value>
125 /// <summary>Length in bytes of one row of pixels in memory.
126 /// Usually this will be equal to width * 4, with a plain BGRA image. This may return 0 if the stride is not applicable.
128 /// When applicable, this will include the <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/> as well as potential extra padding.</summary>
129 /// <value>Stride</value>
134 /// <summary>Common APIs for all objects representing images and 2D pixel buffers.</summary>
135 sealed public class IBufferConcrete :
140 ///<summary>Pointer to the native class description.</summary>
141 public System.IntPtr NativeClass {
143 if (((object)this).GetType() == typeof (IBufferConcrete))
144 return Efl.Gfx.IBufferNativeInherit.GetEflClassStatic();
146 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
149 private System.IntPtr handle;
150 ///<summary>Pointer to the native instance.</summary>
151 public System.IntPtr NativeHandle {
152 get { return handle; }
154 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
155 efl_gfx_buffer_interface_get();
156 ///<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>
157 private IBufferConcrete(System.IntPtr raw)
160 RegisterEventProxies();
162 ///<summary>Destructor.</summary>
167 ///<summary>Releases the underlying native instance.</summary>
168 void Dispose(bool disposing)
170 if (handle != System.IntPtr.Zero) {
171 Efl.Eo.Globals.efl_unref(handle);
172 handle = System.IntPtr.Zero;
175 ///<summary>Releases the underlying native instance.</summary>
176 public void Dispose()
179 GC.SuppressFinalize(this);
181 ///<summary>Verifies if the given object is equal to this one.</summary>
182 public override bool Equals(object obj)
184 var other = obj as Efl.Object;
187 return this.NativeHandle == other.NativeHandle;
189 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
190 public override int GetHashCode()
192 return this.NativeHandle.ToInt32();
194 ///<summary>Turns the native pointer into a string representation.</summary>
195 public override String ToString()
197 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
199 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
200 void RegisterEventProxies()
203 /// <summary>Rectangular size of the pixel buffer as allocated in memory.</summary>
204 /// <returns>Size of the buffer in pixels.</returns>
205 public Eina.Size2D GetBufferSize() {
206 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_size_get_ptr.Value.Delegate(this.NativeHandle);
207 Eina.Error.RaiseIfUnhandledException();
210 /// <summary>Potentially not implemented, <see cref="Efl.Gfx.IBuffer.BufferSize"/> may be read-only.</summary>
211 /// <param name="sz">Size of the buffer in pixels.</param>
212 /// <returns></returns>
213 public void SetBufferSize( Eina.Size2D sz) {
214 Eina.Size2D.NativeStruct _in_sz = sz;
215 Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_size_set_ptr.Value.Delegate(this.NativeHandle, _in_sz);
216 Eina.Error.RaiseIfUnhandledException();
218 /// <summary>Returns the current encoding of this buffer's pixels.
219 /// See <see cref="Efl.Gfx.Colorspace"/> for more information on the supported formats.</summary>
220 /// <returns>Colorspace</returns>
221 public Efl.Gfx.Colorspace GetColorspace() {
222 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_colorspace_get_ptr.Value.Delegate(this.NativeHandle);
223 Eina.Error.RaiseIfUnhandledException();
226 /// <summary>Retrieve whether alpha channel data is used on this object.</summary>
227 /// <returns>Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</returns>
228 public bool GetAlpha() {
229 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_alpha_get_ptr.Value.Delegate(this.NativeHandle);
230 Eina.Error.RaiseIfUnhandledException();
233 /// <summary>Change alpha channel usage for this object.
234 /// This function sets a flag on an image object indicating whether or not to use alpha channel data. A value of <c>true</c> makes it use alpha channel data, and <c>false</c> makes it ignore that data. Note that this has nothing to do with an object's color as manipulated by <see cref="Efl.Gfx.IColor.GetColor"/>.</summary>
235 /// <param name="alpha">Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</param>
236 /// <returns></returns>
237 public void SetAlpha( bool alpha) {
238 Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_alpha_set_ptr.Value.Delegate(this.NativeHandle, alpha);
239 Eina.Error.RaiseIfUnhandledException();
241 /// <summary>Length in bytes of one row of pixels in memory.
242 /// Usually this will be equal to width * 4, with a plain BGRA image. This may return 0 if the stride is not applicable.
244 /// When applicable, this will include the <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/> as well as potential extra padding.</summary>
245 /// <returns>Stride</returns>
246 public int GetStride() {
247 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_stride_get_ptr.Value.Delegate(this.NativeHandle);
248 Eina.Error.RaiseIfUnhandledException();
251 /// <summary>Duplicated pixel borders inside this buffer.
252 /// Internally, EFL may require an image to have its border pixels duplicated, in particular for GL textures. This property exposes the internal duplicated borders to allow calling <see cref="Efl.Gfx.IBuffer.BufferMap"/> with the entire pixel data, including those edge pixels.</summary>
253 /// <param name="l">Left border pixels, usually 0 or 1</param>
254 /// <param name="r">Right border pixels, usually 0 or 1</param>
255 /// <param name="t">Top border pixels, usually 0 or 1</param>
256 /// <param name="b">Bottom border pixels, usually 0 or 1</param>
257 /// <returns></returns>
258 public void GetBufferBorders( out uint l, out uint r, out uint t, out uint b) {
259 Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_borders_get_ptr.Value.Delegate(this.NativeHandle, out l, out r, out t, out b);
260 Eina.Error.RaiseIfUnhandledException();
262 /// <summary>Mark a sub-region of the given image object to be redrawn.
263 /// This function schedules a particular rectangular region of an image object to be updated (redrawn) at the next rendering cycle.</summary>
264 /// <param name="region">The updated region.</param>
265 /// <returns></returns>
266 public void AddBufferUpdate( ref Eina.Rect region) {
267 Eina.Rect.NativeStruct _in_region = region;
268 Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_update_add_ptr.Value.Delegate(this.NativeHandle, ref _in_region);
269 Eina.Error.RaiseIfUnhandledException();
272 /// <summary>Map a region of this buffer for read or write access by the CPU.
273 /// Fetches data from the GPU if needed. This operation may be slow if cpu_readable_fast or cpu_writeable_fast are not true, or if the required colorspace is different from the internal one.
275 /// Note that if the buffer has <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/>, then <c>x</c> and <c>y</c> may be negative.</summary>
276 /// <param name="mode">Specifies whether to map for read-only, write-only or read-write access (OR combination of flags).</param>
277 /// <param name="region">The region to map.</param>
278 /// <param name="cspace">Requested colorspace. If different from the internal cspace, map should try to convert the data into a new buffer. argb8888 by default.</param>
279 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
280 /// <param name="stride">Returns the length in bytes of a mapped line</param>
281 /// <returns>The data slice. In case of failure, the memory pointer will be <c>null</c>.</returns>
282 public Eina.RwSlice BufferMap( Efl.Gfx.BufferAccessMode mode, ref Eina.Rect region, Efl.Gfx.Colorspace cspace, int plane, out int stride) {
283 Eina.Rect.NativeStruct _in_region = region;
284 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_map_ptr.Value.Delegate(this.NativeHandle, mode, ref _in_region, cspace, plane, out stride);
285 Eina.Error.RaiseIfUnhandledException();
289 /// <summary>Unmap a region of this buffer, and update the internal data if needed.
290 /// EFL will update the internal image if the map had write access.
292 /// Note: The <c>slice</c> struct does not need to be the one returned by <see cref="Efl.Gfx.IBuffer.BufferMap"/>, only its contents (<c>mem</c> and <c>len</c>) must match. But after a call to <see cref="Efl.Gfx.IBuffer.BufferUnmap"/> the original <c>slice</c> structure is not valid anymore.</summary>
293 /// <param name="slice">Data slice returned by a previous call to map.</param>
294 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
295 public bool BufferUnmap( Eina.RwSlice slice) {
296 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_unmap_ptr.Value.Delegate(this.NativeHandle, slice);
297 Eina.Error.RaiseIfUnhandledException();
300 /// <summary>Set the pixels for this buffer by copying them, or allocate a new memory region.
301 /// This will allocate a new buffer in memory and copy the input <c>pixels</c> to it. The internal colorspace is not guaranteed to be preserved, and colorspace conversion may happen internally.
303 /// If <c>pixels</c> is <c>null</c>, then a new empty buffer will be allocated. If the buffer already had pixel data, the previous image data will be dropped. This is the same as <see cref="Efl.Gfx.IBuffer.SetBufferManaged"/>.
305 /// The memory buffer <c>pixels</c> must be large enough to hold <c>width</c> x <c>height</c> pixels encoded in the colorspace <c>cspace</c>.
307 /// <c>slice</c> should not be the return value of <see cref="Efl.Gfx.IBuffer.GetBufferManaged"/>.</summary>
308 /// <param name="slice">If <c>null</c>, allocates an empty buffer</param>
309 /// <param name="size">The size in pixels.</param>
310 /// <param name="stride">If 0, automatically guessed from the <c>width</c>.</param>
311 /// <param name="cspace">argb8888 by default.</param>
312 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
313 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
314 public bool SetBufferCopy( Eina.Slice slice, Eina.Size2D size, int stride, Efl.Gfx.Colorspace cspace, int plane) {
315 var _in_slice = Eina.PrimitiveConversion.ManagedToPointerAlloc(slice);
316 Eina.Size2D.NativeStruct _in_size = size;
317 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_copy_set_ptr.Value.Delegate(this.NativeHandle, _in_slice, _in_size, stride, cspace, plane);
318 Eina.Error.RaiseIfUnhandledException();
321 /// <summary>Set the pixels for this buffer, managed externally by the client.
322 /// EFL will use the pixel data directly, and update the GPU-side texture if required. This will mark the image as dirty. If <c>slice</c> is <c>null</c>, this will detach the pixel data.
324 /// If the buffer already had pixel data, the previous image data will be dropped. This is the same as <see cref="Efl.Gfx.IBuffer.SetBufferCopy"/>.
326 /// The memory buffer <c>pixels</c> must be large enough to hold <c>width</c> x <c>height</c> pixels encoded in the colorspace <c>cspace</c>.
328 /// See also <see cref="Efl.Gfx.IBuffer.SetBufferCopy"/> if you want EFL to copy the input buffer internally.</summary>
329 /// <param name="slice">If <c>null</c>, detaches the previous buffer.</param>
330 /// <param name="size">The size in pixels.</param>
331 /// <param name="stride">If 0, automatically guessed from the <c>width</c>.</param>
332 /// <param name="cspace">argb8888 by default.</param>
333 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
334 /// <returns><c>true</c> on success, <c>false</c> otherwise</returns>
335 public bool SetBufferManaged( Eina.Slice slice, Eina.Size2D size, int stride, Efl.Gfx.Colorspace cspace, int plane) {
336 var _in_slice = Eina.PrimitiveConversion.ManagedToPointerAlloc(slice);
337 Eina.Size2D.NativeStruct _in_size = size;
338 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_managed_set_ptr.Value.Delegate(this.NativeHandle, _in_slice, _in_size, stride, cspace, plane);
339 Eina.Error.RaiseIfUnhandledException();
342 /// <summary>Get a direct pointer to the internal pixel data, if available.
343 /// This will return <c>null</c> unless <see cref="Efl.Gfx.IBuffer.SetBufferManaged"/> was used to pass in an external data pointer.</summary>
344 /// <param name="plane">Plane ID. 0 by default. Useful for planar formats only.</param>
345 /// <returns>The data slice. The memory pointer will be <c>null</c> in case of failure.</returns>
346 public Eina.Slice GetBufferManaged( int plane) {
347 var _ret_var = Efl.Gfx.IBufferNativeInherit.efl_gfx_buffer_managed_get_ptr.Value.Delegate(this.NativeHandle, plane);
348 Eina.Error.RaiseIfUnhandledException();
351 /// <summary>Rectangular size of the pixel buffer as allocated in memory.</summary>
352 /// <value>Size of the buffer in pixels.</value>
353 public Eina.Size2D BufferSize {
354 get { return GetBufferSize(); }
355 set { SetBufferSize( value); }
357 /// <summary>The colorspace defines how pixels are encoded in the image in memory.
358 /// By default, images are encoded in 32-bit BGRA, ie. each pixel takes 4 bytes in memory, with each channel B,G,R,A encoding the color with values from 0 to 255.
360 /// All images used in EFL use alpha-premultipied BGRA values, which means that for each pixel, B <= A, G <= A and R <= A.</summary>
361 /// <value>Colorspace</value>
362 public Efl.Gfx.Colorspace Colorspace {
363 get { return GetColorspace(); }
365 /// <summary>Indicates whether the alpha channel should be used.
366 /// This does not indicate whether the image source file contains an alpha channel, only whether to respect it or discard it.</summary>
367 /// <value>Whether to use alpha channel (<c>true</c>) data or not (<c>false</c>).</value>
369 get { return GetAlpha(); }
370 set { SetAlpha( value); }
372 /// <summary>Length in bytes of one row of pixels in memory.
373 /// Usually this will be equal to width * 4, with a plain BGRA image. This may return 0 if the stride is not applicable.
375 /// When applicable, this will include the <see cref="Efl.Gfx.IBuffer.GetBufferBorders"/> as well as potential extra padding.</summary>
376 /// <value>Stride</value>
378 get { return GetStride(); }
380 private static IntPtr GetEflClassStatic()
382 return Efl.Gfx.IBufferConcrete.efl_gfx_buffer_interface_get();
385 public class IBufferNativeInherit : Efl.Eo.NativeClass{
386 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
387 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
389 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
390 var methods = Efl.Eo.Globals.GetUserMethods(type);
391 if (efl_gfx_buffer_size_get_static_delegate == null)
392 efl_gfx_buffer_size_get_static_delegate = new efl_gfx_buffer_size_get_delegate(buffer_size_get);
393 if (methods.FirstOrDefault(m => m.Name == "GetBufferSize") != null)
394 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_size_get_static_delegate)});
395 if (efl_gfx_buffer_size_set_static_delegate == null)
396 efl_gfx_buffer_size_set_static_delegate = new efl_gfx_buffer_size_set_delegate(buffer_size_set);
397 if (methods.FirstOrDefault(m => m.Name == "SetBufferSize") != null)
398 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_size_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_size_set_static_delegate)});
399 if (efl_gfx_buffer_colorspace_get_static_delegate == null)
400 efl_gfx_buffer_colorspace_get_static_delegate = new efl_gfx_buffer_colorspace_get_delegate(colorspace_get);
401 if (methods.FirstOrDefault(m => m.Name == "GetColorspace") != null)
402 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_colorspace_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_colorspace_get_static_delegate)});
403 if (efl_gfx_buffer_alpha_get_static_delegate == null)
404 efl_gfx_buffer_alpha_get_static_delegate = new efl_gfx_buffer_alpha_get_delegate(alpha_get);
405 if (methods.FirstOrDefault(m => m.Name == "GetAlpha") != null)
406 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_alpha_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_alpha_get_static_delegate)});
407 if (efl_gfx_buffer_alpha_set_static_delegate == null)
408 efl_gfx_buffer_alpha_set_static_delegate = new efl_gfx_buffer_alpha_set_delegate(alpha_set);
409 if (methods.FirstOrDefault(m => m.Name == "SetAlpha") != null)
410 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_alpha_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_alpha_set_static_delegate)});
411 if (efl_gfx_buffer_stride_get_static_delegate == null)
412 efl_gfx_buffer_stride_get_static_delegate = new efl_gfx_buffer_stride_get_delegate(stride_get);
413 if (methods.FirstOrDefault(m => m.Name == "GetStride") != null)
414 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_stride_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_stride_get_static_delegate)});
415 if (efl_gfx_buffer_borders_get_static_delegate == null)
416 efl_gfx_buffer_borders_get_static_delegate = new efl_gfx_buffer_borders_get_delegate(buffer_borders_get);
417 if (methods.FirstOrDefault(m => m.Name == "GetBufferBorders") != null)
418 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_borders_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_borders_get_static_delegate)});
419 if (efl_gfx_buffer_update_add_static_delegate == null)
420 efl_gfx_buffer_update_add_static_delegate = new efl_gfx_buffer_update_add_delegate(buffer_update_add);
421 if (methods.FirstOrDefault(m => m.Name == "AddBufferUpdate") != null)
422 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_update_add"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_update_add_static_delegate)});
423 if (efl_gfx_buffer_map_static_delegate == null)
424 efl_gfx_buffer_map_static_delegate = new efl_gfx_buffer_map_delegate(buffer_map);
425 if (methods.FirstOrDefault(m => m.Name == "BufferMap") != null)
426 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_map"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_map_static_delegate)});
427 if (efl_gfx_buffer_unmap_static_delegate == null)
428 efl_gfx_buffer_unmap_static_delegate = new efl_gfx_buffer_unmap_delegate(buffer_unmap);
429 if (methods.FirstOrDefault(m => m.Name == "BufferUnmap") != null)
430 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_unmap"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_unmap_static_delegate)});
431 if (efl_gfx_buffer_copy_set_static_delegate == null)
432 efl_gfx_buffer_copy_set_static_delegate = new efl_gfx_buffer_copy_set_delegate(buffer_copy_set);
433 if (methods.FirstOrDefault(m => m.Name == "SetBufferCopy") != null)
434 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_copy_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_copy_set_static_delegate)});
435 if (efl_gfx_buffer_managed_set_static_delegate == null)
436 efl_gfx_buffer_managed_set_static_delegate = new efl_gfx_buffer_managed_set_delegate(buffer_managed_set);
437 if (methods.FirstOrDefault(m => m.Name == "SetBufferManaged") != null)
438 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_managed_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_managed_set_static_delegate)});
439 if (efl_gfx_buffer_managed_get_static_delegate == null)
440 efl_gfx_buffer_managed_get_static_delegate = new efl_gfx_buffer_managed_get_delegate(buffer_managed_get);
441 if (methods.FirstOrDefault(m => m.Name == "GetBufferManaged") != null)
442 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_buffer_managed_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_buffer_managed_get_static_delegate)});
445 public override IntPtr GetEflClass()
447 return Efl.Gfx.IBufferConcrete.efl_gfx_buffer_interface_get();
449 public static IntPtr GetEflClassStatic()
451 return Efl.Gfx.IBufferConcrete.efl_gfx_buffer_interface_get();
455 private delegate Eina.Size2D.NativeStruct efl_gfx_buffer_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
458 public delegate Eina.Size2D.NativeStruct efl_gfx_buffer_size_get_api_delegate(System.IntPtr obj);
459 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_size_get_api_delegate> efl_gfx_buffer_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_size_get_api_delegate>(_Module, "efl_gfx_buffer_size_get");
460 private static Eina.Size2D.NativeStruct buffer_size_get(System.IntPtr obj, System.IntPtr pd)
462 Eina.Log.Debug("function efl_gfx_buffer_size_get was called");
463 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
464 if(wrapper != null) {
465 Eina.Size2D _ret_var = default(Eina.Size2D);
467 _ret_var = ((IBuffer)wrapper).GetBufferSize();
468 } catch (Exception e) {
469 Eina.Log.Warning($"Callback error: {e.ToString()}");
470 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
474 return efl_gfx_buffer_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
477 private static efl_gfx_buffer_size_get_delegate efl_gfx_buffer_size_get_static_delegate;
480 private delegate void efl_gfx_buffer_size_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct sz);
483 public delegate void efl_gfx_buffer_size_set_api_delegate(System.IntPtr obj, Eina.Size2D.NativeStruct sz);
484 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_size_set_api_delegate> efl_gfx_buffer_size_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_size_set_api_delegate>(_Module, "efl_gfx_buffer_size_set");
485 private static void buffer_size_set(System.IntPtr obj, System.IntPtr pd, Eina.Size2D.NativeStruct sz)
487 Eina.Log.Debug("function efl_gfx_buffer_size_set was called");
488 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
489 if(wrapper != null) {
490 Eina.Size2D _in_sz = sz;
493 ((IBuffer)wrapper).SetBufferSize( _in_sz);
494 } catch (Exception e) {
495 Eina.Log.Warning($"Callback error: {e.ToString()}");
496 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
499 efl_gfx_buffer_size_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), sz);
502 private static efl_gfx_buffer_size_set_delegate efl_gfx_buffer_size_set_static_delegate;
505 private delegate Efl.Gfx.Colorspace efl_gfx_buffer_colorspace_get_delegate(System.IntPtr obj, System.IntPtr pd);
508 public delegate Efl.Gfx.Colorspace efl_gfx_buffer_colorspace_get_api_delegate(System.IntPtr obj);
509 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_colorspace_get_api_delegate> efl_gfx_buffer_colorspace_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_colorspace_get_api_delegate>(_Module, "efl_gfx_buffer_colorspace_get");
510 private static Efl.Gfx.Colorspace colorspace_get(System.IntPtr obj, System.IntPtr pd)
512 Eina.Log.Debug("function efl_gfx_buffer_colorspace_get was called");
513 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
514 if(wrapper != null) {
515 Efl.Gfx.Colorspace _ret_var = default(Efl.Gfx.Colorspace);
517 _ret_var = ((IBuffer)wrapper).GetColorspace();
518 } catch (Exception e) {
519 Eina.Log.Warning($"Callback error: {e.ToString()}");
520 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
524 return efl_gfx_buffer_colorspace_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
527 private static efl_gfx_buffer_colorspace_get_delegate efl_gfx_buffer_colorspace_get_static_delegate;
530 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_buffer_alpha_get_delegate(System.IntPtr obj, System.IntPtr pd);
533 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_buffer_alpha_get_api_delegate(System.IntPtr obj);
534 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_alpha_get_api_delegate> efl_gfx_buffer_alpha_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_alpha_get_api_delegate>(_Module, "efl_gfx_buffer_alpha_get");
535 private static bool alpha_get(System.IntPtr obj, System.IntPtr pd)
537 Eina.Log.Debug("function efl_gfx_buffer_alpha_get was called");
538 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
539 if(wrapper != null) {
540 bool _ret_var = default(bool);
542 _ret_var = ((IBuffer)wrapper).GetAlpha();
543 } catch (Exception e) {
544 Eina.Log.Warning($"Callback error: {e.ToString()}");
545 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
549 return efl_gfx_buffer_alpha_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
552 private static efl_gfx_buffer_alpha_get_delegate efl_gfx_buffer_alpha_get_static_delegate;
555 private delegate void efl_gfx_buffer_alpha_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool alpha);
558 public delegate void efl_gfx_buffer_alpha_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool alpha);
559 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_alpha_set_api_delegate> efl_gfx_buffer_alpha_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_alpha_set_api_delegate>(_Module, "efl_gfx_buffer_alpha_set");
560 private static void alpha_set(System.IntPtr obj, System.IntPtr pd, bool alpha)
562 Eina.Log.Debug("function efl_gfx_buffer_alpha_set was called");
563 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
564 if(wrapper != null) {
567 ((IBuffer)wrapper).SetAlpha( alpha);
568 } catch (Exception e) {
569 Eina.Log.Warning($"Callback error: {e.ToString()}");
570 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
573 efl_gfx_buffer_alpha_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), alpha);
576 private static efl_gfx_buffer_alpha_set_delegate efl_gfx_buffer_alpha_set_static_delegate;
579 private delegate int efl_gfx_buffer_stride_get_delegate(System.IntPtr obj, System.IntPtr pd);
582 public delegate int efl_gfx_buffer_stride_get_api_delegate(System.IntPtr obj);
583 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_stride_get_api_delegate> efl_gfx_buffer_stride_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_stride_get_api_delegate>(_Module, "efl_gfx_buffer_stride_get");
584 private static int stride_get(System.IntPtr obj, System.IntPtr pd)
586 Eina.Log.Debug("function efl_gfx_buffer_stride_get was called");
587 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
588 if(wrapper != null) {
589 int _ret_var = default(int);
591 _ret_var = ((IBuffer)wrapper).GetStride();
592 } catch (Exception e) {
593 Eina.Log.Warning($"Callback error: {e.ToString()}");
594 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
598 return efl_gfx_buffer_stride_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
601 private static efl_gfx_buffer_stride_get_delegate efl_gfx_buffer_stride_get_static_delegate;
604 private delegate void efl_gfx_buffer_borders_get_delegate(System.IntPtr obj, System.IntPtr pd, out uint l, out uint r, out uint t, out uint b);
607 public delegate void efl_gfx_buffer_borders_get_api_delegate(System.IntPtr obj, out uint l, out uint r, out uint t, out uint b);
608 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_borders_get_api_delegate> efl_gfx_buffer_borders_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_borders_get_api_delegate>(_Module, "efl_gfx_buffer_borders_get");
609 private static void buffer_borders_get(System.IntPtr obj, System.IntPtr pd, out uint l, out uint r, out uint t, out uint b)
611 Eina.Log.Debug("function efl_gfx_buffer_borders_get was called");
612 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
613 if(wrapper != null) {
614 l = default(uint); r = default(uint); t = default(uint); b = default(uint);
616 ((IBuffer)wrapper).GetBufferBorders( out l, out r, out t, out b);
617 } catch (Exception e) {
618 Eina.Log.Warning($"Callback error: {e.ToString()}");
619 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
622 efl_gfx_buffer_borders_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out l, out r, out t, out b);
625 private static efl_gfx_buffer_borders_get_delegate efl_gfx_buffer_borders_get_static_delegate;
628 private delegate void efl_gfx_buffer_update_add_delegate(System.IntPtr obj, System.IntPtr pd, ref Eina.Rect.NativeStruct region);
631 public delegate void efl_gfx_buffer_update_add_api_delegate(System.IntPtr obj, ref Eina.Rect.NativeStruct region);
632 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_update_add_api_delegate> efl_gfx_buffer_update_add_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_update_add_api_delegate>(_Module, "efl_gfx_buffer_update_add");
633 private static void buffer_update_add(System.IntPtr obj, System.IntPtr pd, ref Eina.Rect.NativeStruct region)
635 Eina.Log.Debug("function efl_gfx_buffer_update_add was called");
636 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
637 if(wrapper != null) {
638 Eina.Rect _in_region = region;
641 ((IBuffer)wrapper).AddBufferUpdate( ref _in_region);
642 } catch (Exception e) {
643 Eina.Log.Warning($"Callback error: {e.ToString()}");
644 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
648 efl_gfx_buffer_update_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref region);
651 private static efl_gfx_buffer_update_add_delegate efl_gfx_buffer_update_add_static_delegate;
654 private delegate Eina.RwSlice efl_gfx_buffer_map_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.BufferAccessMode mode, ref Eina.Rect.NativeStruct region, Efl.Gfx.Colorspace cspace, int plane, out int stride);
657 public delegate Eina.RwSlice efl_gfx_buffer_map_api_delegate(System.IntPtr obj, Efl.Gfx.BufferAccessMode mode, ref Eina.Rect.NativeStruct region, Efl.Gfx.Colorspace cspace, int plane, out int stride);
658 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_map_api_delegate> efl_gfx_buffer_map_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_map_api_delegate>(_Module, "efl_gfx_buffer_map");
659 private static Eina.RwSlice buffer_map(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.BufferAccessMode mode, ref Eina.Rect.NativeStruct region, Efl.Gfx.Colorspace cspace, int plane, out int stride)
661 Eina.Log.Debug("function efl_gfx_buffer_map was called");
662 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
663 if(wrapper != null) {
664 Eina.Rect _in_region = region;
665 stride = default(int); Eina.RwSlice _ret_var = default(Eina.RwSlice);
667 _ret_var = ((IBuffer)wrapper).BufferMap( mode, ref _in_region, cspace, plane, out stride);
668 } catch (Exception e) {
669 Eina.Log.Warning($"Callback error: {e.ToString()}");
670 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
675 return efl_gfx_buffer_map_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), mode, ref region, cspace, plane, out stride);
678 private static efl_gfx_buffer_map_delegate efl_gfx_buffer_map_static_delegate;
681 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_buffer_unmap_delegate(System.IntPtr obj, System.IntPtr pd, Eina.RwSlice slice);
684 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_buffer_unmap_api_delegate(System.IntPtr obj, Eina.RwSlice slice);
685 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_unmap_api_delegate> efl_gfx_buffer_unmap_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_unmap_api_delegate>(_Module, "efl_gfx_buffer_unmap");
686 private static bool buffer_unmap(System.IntPtr obj, System.IntPtr pd, Eina.RwSlice slice)
688 Eina.Log.Debug("function efl_gfx_buffer_unmap was called");
689 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
690 if(wrapper != null) {
691 bool _ret_var = default(bool);
693 _ret_var = ((IBuffer)wrapper).BufferUnmap( slice);
694 } catch (Exception e) {
695 Eina.Log.Warning($"Callback error: {e.ToString()}");
696 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
700 return efl_gfx_buffer_unmap_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), slice);
703 private static efl_gfx_buffer_unmap_delegate efl_gfx_buffer_unmap_static_delegate;
706 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_buffer_copy_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane);
709 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_buffer_copy_set_api_delegate(System.IntPtr obj, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane);
710 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_copy_set_api_delegate> efl_gfx_buffer_copy_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_copy_set_api_delegate>(_Module, "efl_gfx_buffer_copy_set");
711 private static bool buffer_copy_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane)
713 Eina.Log.Debug("function efl_gfx_buffer_copy_set was called");
714 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
715 if(wrapper != null) {
716 var _in_slice = Eina.PrimitiveConversion.PointerToManaged<Eina.Slice>(slice);
717 Eina.Size2D _in_size = size;
718 bool _ret_var = default(bool);
720 _ret_var = ((IBuffer)wrapper).SetBufferCopy( _in_slice, _in_size, stride, cspace, plane);
721 } catch (Exception e) {
722 Eina.Log.Warning($"Callback error: {e.ToString()}");
723 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
727 return efl_gfx_buffer_copy_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), slice, size, stride, cspace, plane);
730 private static efl_gfx_buffer_copy_set_delegate efl_gfx_buffer_copy_set_static_delegate;
733 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_buffer_managed_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane);
736 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_buffer_managed_set_api_delegate(System.IntPtr obj, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane);
737 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_managed_set_api_delegate> efl_gfx_buffer_managed_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_managed_set_api_delegate>(_Module, "efl_gfx_buffer_managed_set");
738 private static bool buffer_managed_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr slice, Eina.Size2D.NativeStruct size, int stride, Efl.Gfx.Colorspace cspace, int plane)
740 Eina.Log.Debug("function efl_gfx_buffer_managed_set was called");
741 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
742 if(wrapper != null) {
743 var _in_slice = Eina.PrimitiveConversion.PointerToManaged<Eina.Slice>(slice);
744 Eina.Size2D _in_size = size;
745 bool _ret_var = default(bool);
747 _ret_var = ((IBuffer)wrapper).SetBufferManaged( _in_slice, _in_size, stride, cspace, plane);
748 } catch (Exception e) {
749 Eina.Log.Warning($"Callback error: {e.ToString()}");
750 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
754 return efl_gfx_buffer_managed_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), slice, size, stride, cspace, plane);
757 private static efl_gfx_buffer_managed_set_delegate efl_gfx_buffer_managed_set_static_delegate;
760 private delegate Eina.Slice efl_gfx_buffer_managed_get_delegate(System.IntPtr obj, System.IntPtr pd, int plane);
763 public delegate Eina.Slice efl_gfx_buffer_managed_get_api_delegate(System.IntPtr obj, int plane);
764 public static Efl.Eo.FunctionWrapper<efl_gfx_buffer_managed_get_api_delegate> efl_gfx_buffer_managed_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_buffer_managed_get_api_delegate>(_Module, "efl_gfx_buffer_managed_get");
765 private static Eina.Slice buffer_managed_get(System.IntPtr obj, System.IntPtr pd, int plane)
767 Eina.Log.Debug("function efl_gfx_buffer_managed_get was called");
768 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
769 if(wrapper != null) {
770 Eina.Slice _ret_var = default(Eina.Slice);
772 _ret_var = ((IBuffer)wrapper).GetBufferManaged( plane);
773 } catch (Exception e) {
774 Eina.Log.Warning($"Callback error: {e.ToString()}");
775 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
779 return efl_gfx_buffer_managed_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), plane);
782 private static efl_gfx_buffer_managed_get_delegate efl_gfx_buffer_managed_get_static_delegate;
785 namespace Efl { namespace Gfx {
786 /// <summary>Graphics buffer access mode</summary>
787 public enum BufferAccessMode
789 /// <summary>No buffer access</summary>
791 /// <summary>Read access to buffer</summary>
793 /// <summary>Write aces to buffer</summary>
795 /// <summary>Forces copy-on-write if already mapped as read-only. Requires write.</summary>