Add ID2D1DeviceContextPool and ID2D1DeviceContextLease bindings
このコミットが含まれているのは:
1 親
66d932864d
コミット
303246fffd
2ファイル変更
+118
検索条件に一致するファイルはありません
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using TerraFX.Interop;
|
||||
using TerraFX.Interop.DirectX;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// An interface for a COM object that provides access to a pooled <see cref="ID2D1DeviceContext"/> object.
|
||||
/// </summary>
|
||||
[Guid("A0928F38-F7D5-44DD-A5C9-E23D94734BBB")]
|
||||
[NativeTypeName("class ID2D1DeviceContextLease : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ID2D1DeviceContextLease
|
||||
{
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(0)]
|
||||
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextLease*, Guid*, void**, int>)this.lpVtbl[0])((ID2D1DeviceContextLease*)Unsafe.AsPointer(ref this), riid, ppvObject);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IUnknown.AddRef"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(1)]
|
||||
[return: NativeTypeName("ULONG")]
|
||||
public uint AddRef()
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextLease*, uint>)this.lpVtbl[1])((ID2D1DeviceContextLease*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IUnknown.Release"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(2)]
|
||||
[return: NativeTypeName("ULONG")]
|
||||
public uint Release()
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextLease*, uint>)this.lpVtbl[2])((ID2D1DeviceContextLease*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the <see cref="ID2D1DeviceContext"/> object wrapped by the current instance.
|
||||
/// </summary>
|
||||
/// <param name="deviceContext">The resulting <see cref="ID2D1DeviceContext"/> object wrapped by the current instance.</param>
|
||||
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
|
||||
/// <remarks>The returned <see cref="ID2D1DeviceContext"/> cannot be used once the owning lease has been released.</remarks>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(3)]
|
||||
public HRESULT GetD2DDeviceContext(ID2D1DeviceContext** deviceContext)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextLease*, ID2D1DeviceContext**, int>)this.lpVtbl[3])((ID2D1DeviceContextLease*)Unsafe.AsPointer(ref this), deviceContext);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using TerraFX.Interop;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// An interface for an object that provides access to pooled <see cref="TerraFX.Interop.DirectX.ID2D1DeviceContext"/> objects.
|
||||
/// </summary>
|
||||
[Guid("454A82A1-F024-40DB-BD5B-8F527FD58AD0")]
|
||||
[NativeTypeName("class ID2D1DeviceContextPool : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ID2D1DeviceContextPool
|
||||
{
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(0)]
|
||||
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextPool*, Guid*, void**, int>)this.lpVtbl[0])((ID2D1DeviceContextPool*)Unsafe.AsPointer(ref this), riid, ppvObject);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IUnknown.AddRef"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(1)]
|
||||
[return: NativeTypeName("ULONG")]
|
||||
public uint AddRef()
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextPool*, uint>)this.lpVtbl[1])((ID2D1DeviceContextPool*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IUnknown.Release"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(2)]
|
||||
[return: NativeTypeName("ULONG")]
|
||||
public uint Release()
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextPool*, uint>)this.lpVtbl[2])((ID2D1DeviceContextPool*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a new <see cref="ID2D1DeviceContextLease"/> object from the current instance.
|
||||
/// </summary>
|
||||
/// <param name="lease">The resulting <see cref="ID2D1DeviceContextLease"/> object to use.</param>
|
||||
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[VtblIndex(3)]
|
||||
public HRESULT GetDeviceContextLease(ID2D1DeviceContextLease** lease)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContextPool*, ID2D1DeviceContextLease**, int>)this.lpVtbl[3])((ID2D1DeviceContextPool*)Unsafe.AsPointer(ref this), lease);
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする