2 using System.ComponentModel;
3 using System.Runtime.InteropServices;
9 [EditorBrowsable(EditorBrowsableState.Never)]
10 public class NativeImageSource : NativeImageInterface
13 [EditorBrowsable(EditorBrowsableState.Never)]
14 public NativeImageSource(uint width, uint height, ColorDepth depth) : this(Interop.NativeImageSource.NewHandle(width, height, (int)depth), true)
16 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
19 private IntPtr Handle;
20 internal NativeImageSource(IntPtr cPtr, bool cMemoryOwn) : base(Interop.NativeImageSource.Upcast(Interop.NativeImageSource.New(cPtr)), cMemoryOwn)
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
28 Interop.NativeImageSource.Delete(Handle);
29 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public enum ColorDepth
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImageSource obj)
44 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public IntPtr AcquireBuffer(ref int width, ref int height, ref int stride) {
49 IntPtr ret = Interop.NativeImageSource.AcquireBuffer(this.swigCPtr.Handle, ref width, ref height, ref stride);
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 [EditorBrowsable(EditorBrowsableState.Never)]
55 public bool ReleaseBuffer() {
56 bool ret = Interop.NativeImageSource.ReleaseBuffer(this.swigCPtr.Handle);
57 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();