// ------------------------------------------------------------------------------
// <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="IDCompositionColorMatrixEffect"]/*' />
/// <unmanaged>IDCompositionColorMatrixEffect</unmanaged>
[Guid("c1170a22-3ce2-4966-90d4-55408bfc84c4")]
[NativeTypeName("struct IDCompositionColorMatrixEffect : IDCompositionFilterEffect")]
[NativeInheritance("IDCompositionFilterEffect")]
public unsafe partial struct IDCompositionColorMatrixEffect : IDCompositionColorMatrixEffect.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDCompositionColorMatrixEffect
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x22, 0x0A, 0x17, 0xC1,
				0xE2, 0x3C,
				0x66, 0x49,
				0x90,
				0xD4,
				0x55,
				0x40,
				0x8B,
				0xFC,
				0x84,
				0xC4
			};

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

#if NET6_0_OR_GREATER
	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDCompositionColorMatrixEffect));
#else
	public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDCompositionColorMatrixEffect));
#endif

	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]<IDCompositionColorMatrixEffect*, Guid*, void**, int>)(lpVtbl[0]))((IDCompositionColorMatrixEffect*)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]<IDCompositionColorMatrixEffect*, uint>)(lpVtbl[1]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this));
	}

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

	/// <inheritdoc cref="IDCompositionFilterEffect.SetInput" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult SetInput(uint index, IUnknown* input, uint flags)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, uint, IUnknown*, uint, int>)(lpVtbl[3]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), index, input, flags);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionColorMatrixEffect::SetMatrix"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult SetMatrix(Matrix5x4* matrix)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, Matrix5x4*, int>)(lpVtbl[4]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), matrix);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionColorMatrixEffect::SetMatrixElement"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult SetMatrixElement(int row, int column, IDCompositionAnimation* animation)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, int, int, IDCompositionAnimation*, int>)(lpVtbl[5]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), row, column, animation);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionColorMatrixEffect::SetMatrixElement"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult SetMatrixElement(int row, int column, float value)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, int, int, float, int>)(lpVtbl[6]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), row, column, value);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionColorMatrixEffect::SetAlphaMode"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(7)]
	public HResult SetAlphaMode(Graphics.Direct2D.Common.ColorMatrixAlphaMode mode)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, Graphics.Direct2D.Common.ColorMatrixAlphaMode, int>)(lpVtbl[7]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), mode);
	}

	/// <include file='../DirectComposition.xml' path='doc/member[@name="IDCompositionColorMatrixEffect::SetClampOutput"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public HResult SetClampOutput(Bool32 clamp)
	{
		return ((delegate* unmanaged[Stdcall]<IDCompositionColorMatrixEffect*, Bool32, int>)(lpVtbl[8]))((IDCompositionColorMatrixEffect*)Unsafe.AsPointer(ref this), clamp);
	}
	public interface Interface : IDCompositionFilterEffect.Interface
	{
		[VtblIndex(4)]
		HResult SetMatrix(Matrix5x4* matrix);

		[VtblIndex(5)]
		HResult SetMatrixElement(int row, int column, IDCompositionAnimation* animation);

		[VtblIndex(6)]
		HResult SetMatrixElement(int row, int column, float value);

		[VtblIndex(7)]
		HResult SetAlphaMode(Graphics.Direct2D.Common.ColorMatrixAlphaMode mode);

		[VtblIndex(8)]
		HResult SetClampOutput(Bool32 clamp);
	}
}

