// ------------------------------------------------------------------------------
// <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.DirectWrite;

/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader"]/*' />
/// <unmanaged>IDWritePaintReader</unmanaged>
[Guid("8128e912-3b97-42a5-ab6c-24aad3a86e54")]
[NativeTypeName("struct IDWritePaintReader : IUnknown")]
[NativeInheritance("IUnknown")]
public unsafe partial struct IDWritePaintReader : IDWritePaintReader.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDWritePaintReader
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x12, 0xE9, 0x28, 0x81,
				0x97, 0x3B,
				0xA5, 0x42,
				0xAB,
				0x6C,
				0x24,
				0xAA,
				0xD3,
				0xA8,
				0x6E,
				0x54
			};

			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_IDWritePaintReader));

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

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

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::SetCurrentGlyph"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult SetCurrentGlyph(uint glyphIndex, PaintElement* paintElement, uint structSize, Win32.Numerics.RectF** clipBox, PaintAttributes* glyphAttributes)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, uint, PaintElement*, uint, Win32.Numerics.RectF**, PaintAttributes*, int>)(lpVtbl[3]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), glyphIndex, paintElement, structSize, clipBox, glyphAttributes);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::SetTextColor"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult SetTextColor(Color4* textColor)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, Color4*, int>)(lpVtbl[4]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), textColor);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::SetColorPaletteIndex"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult SetColorPaletteIndex(uint colorPaletteIndex)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, uint, int>)(lpVtbl[5]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), colorPaletteIndex);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::SetCustomColorPalette"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult SetCustomColorPalette(Color4** paletteEntries, uint paletteEntryCount)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, Color4**, uint, int>)(lpVtbl[6]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), paletteEntries, paletteEntryCount);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::MoveToFirstChild"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(7)]
	public HResult MoveToFirstChild(PaintElement* paintElement, uint structSize)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, PaintElement*, uint, int>)(lpVtbl[7]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), paintElement, structSize);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::MoveToNextSibling"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public HResult MoveToNextSibling(PaintElement* paintElement, uint structSize)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, PaintElement*, uint, int>)(lpVtbl[8]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), paintElement, structSize);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::MoveToParent"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(9)]
	public HResult MoveToParent()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, int>)(lpVtbl[9]))((IDWritePaintReader*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::GetGradientStops"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(10)]
	public HResult GetGradientStops(uint firstGradientStopIndex, uint gradientStopCount, Graphics.Direct2D.Common.GradientStop* gradientStops)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, uint, uint, Graphics.Direct2D.Common.GradientStop*, int>)(lpVtbl[10]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), firstGradientStopIndex, gradientStopCount, gradientStops);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWritePaintReader::GetGradientStopColors"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(11)]
	public HResult GetGradientStopColors(uint firstGradientStopIndex, uint gradientStopCount, PaintColor* gradientStopColors)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWritePaintReader*, uint, uint, PaintColor*, int>)(lpVtbl[11]))((IDWritePaintReader*)Unsafe.AsPointer(ref this), firstGradientStopIndex, gradientStopCount, gradientStopColors);
	}

	public interface Interface : IUnknown.Interface
	{
		[VtblIndex(3)]
		HResult SetCurrentGlyph(uint glyphIndex, PaintElement* paintElement, uint structSize, Win32.Numerics.RectF** clipBox, PaintAttributes* glyphAttributes);

		[VtblIndex(4)]
		HResult SetTextColor(Color4* textColor);

		[VtblIndex(5)]
		HResult SetColorPaletteIndex(uint colorPaletteIndex);

		[VtblIndex(6)]
		HResult SetCustomColorPalette(Color4** paletteEntries, uint paletteEntryCount);

		[VtblIndex(7)]
		HResult MoveToFirstChild(PaintElement* paintElement, uint structSize);

		[VtblIndex(8)]
		HResult MoveToNextSibling(PaintElement* paintElement, uint structSize);

		[VtblIndex(9)]
		HResult MoveToParent();

		[VtblIndex(10)]
		HResult GetGradientStops(uint firstGradientStopIndex, uint gradientStopCount, Graphics.Direct2D.Common.GradientStop* gradientStops);

		[VtblIndex(11)]
		HResult GetGradientStopColors(uint firstGradientStopIndex, uint gradientStopCount, PaintColor* gradientStopColors);
	}
}

