// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ namespace Win32.Graphics.Direct2D; /// /// ID2D1Device2 [Guid("a44472e1-8dfb-4e60-8492-6e2861c9ca8b")] [NativeTypeName("struct ID2D1Device2 : ID2D1Device1")] [NativeInheritance("ID2D1Device1")] public unsafe partial struct ID2D1Device2 : INativeGuid { public static ref readonly Guid IID_ID2D1Device2 { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { 0xE1, 0x72, 0x44, 0xA4, 0xFB, 0x8D, 0x60, 0x4E, 0x84, 0x92, 0x6E, 0x28, 0x61, 0xC9, 0xCA, 0x8B }; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); } } #if NET6_0_OR_GREATER static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1Device2)); #else public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1Device2)); #endif public void** lpVtbl; /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(0)] public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this)); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this)); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(3)] public void GetFactory(ID2D1Factory** factory) { ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1Device2*)Unsafe.AsPointer(ref this), factory); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(4)] public HResult CreateDeviceContext(DeviceContextOptions options, ID2D1DeviceContext** deviceContext) { return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Device2*)Unsafe.AsPointer(ref this), options, deviceContext); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(5)] public void SetMaximumTextureMemory(ulong maximumInBytes) { ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Device2*)Unsafe.AsPointer(ref this), maximumInBytes); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] public ulong GetMaximumTextureMemory() { return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Device2*)Unsafe.AsPointer(ref this)); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] public void ClearResources(uint millisecondsSinceUse) { ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Device2*)Unsafe.AsPointer(ref this), millisecondsSinceUse); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] public RenderingPriority GetRenderingPriority() { return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1Device2*)Unsafe.AsPointer(ref this)); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] public void SetRenderingPriority(RenderingPriority renderingPriority) { ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1Device2*)Unsafe.AsPointer(ref this), renderingPriority); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] public HResult CreateDeviceContext(DeviceContextOptions options, ID2D1DeviceContext1** deviceContext1) { return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1Device2*)Unsafe.AsPointer(ref this), options, deviceContext1); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] public HResult CreateDeviceContext(DeviceContextOptions options, ID2D1DeviceContext2** deviceContext2) { return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1Device2*)Unsafe.AsPointer(ref this), options, deviceContext2); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] public void FlushDeviceContexts(ID2D1Bitmap* bitmap) { ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1Device2*)Unsafe.AsPointer(ref this), bitmap); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] public HResult GetDxgiDevice(Graphics.Dxgi.IDXGIDevice** dxgiDevice) { return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1Device2*)Unsafe.AsPointer(ref this), dxgiDevice); } }