// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Graphics.DirectComposition;

/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionTexture"]/*' />
/// <unmanaged>IDCompositionTexture</unmanaged>
[Guid("929bb1aa-725f-433b-abd7-273075a835f2")]
[NativeTypeName("struct IDCompositionTexture : IUnknown")]
[NativeInheritance("IUnknown")]
public unsafe partial struct IDCompositionTexture : IDCompositionTexture.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDCompositionTexture
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0xAA, 0xB1, 0x9B, 0x92,
				0x5F, 0x72,
				0x3B, 0x43,
				0xAB,
				0xD7,
				0x27,
				0x30,
				0x75,
				0xA8,
				0x35,
				0xF2
			};

			Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
			return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
		}
	}

	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDCompositionTexture));

	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[MemberFunction]<IDCompositionTexture*, Guid*, void**, int>)(lpVtbl[0]))((IDCompositionTexture*)Unsafe.AsPointer(ref this), riid, ppvObject);
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, uint>)(lpVtbl[1]))((IDCompositionTexture*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, uint>)(lpVtbl[2]))((IDCompositionTexture*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionTexture::SetSourceRect"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult SetSourceRect(Win32.Numerics.Rect* sourceRect)
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, Win32.Numerics.Rect*, int>)(lpVtbl[3]))((IDCompositionTexture*)Unsafe.AsPointer(ref this), sourceRect);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionTexture::SetColorSpace"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult SetColorSpace(Graphics.Dxgi.Common.ColorSpaceType colorSpace)
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, Graphics.Dxgi.Common.ColorSpaceType, int>)(lpVtbl[4]))((IDCompositionTexture*)Unsafe.AsPointer(ref this), colorSpace);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionTexture::SetAlphaMode"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult SetAlphaMode(Graphics.Dxgi.Common.AlphaMode alphaMode)
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, Graphics.Dxgi.Common.AlphaMode, int>)(lpVtbl[5]))((IDCompositionTexture*)Unsafe.AsPointer(ref this), alphaMode);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionTexture::GetAvailableFence"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult GetAvailableFence(ulong* fenceValue, Guid* iid, void** availableFence)
	{
		return ((delegate* unmanaged[MemberFunction]<IDCompositionTexture*, ulong*, Guid*, void**, int>)(lpVtbl[6]))((IDCompositionTexture*)Unsafe.AsPointer(ref this), fenceValue, iid, availableFence);
	}

	public interface Interface : IUnknown.Interface
	{
		[VtblIndex(3)]
		HResult SetSourceRect(Win32.Numerics.Rect* sourceRect);

		[VtblIndex(4)]
		HResult SetColorSpace(Graphics.Dxgi.Common.ColorSpaceType colorSpace);

		[VtblIndex(5)]
		HResult SetAlphaMode(Graphics.Dxgi.Common.AlphaMode alphaMode);

		[VtblIndex(6)]
		HResult GetAvailableFence(ulong* fenceValue, Guid* iid, void** availableFence);
	}
}

