// ------------------------------------------------------------------------------
//
// 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;
///
/// ID2D1GdiMetafile1
[Guid("2e69f9e8-dd3f-4bf9-95ba-c04f49d788df")]
[NativeTypeName("struct ID2D1GdiMetafile1 : ID2D1GdiMetafile")]
[NativeInheritance("ID2D1GdiMetafile")]
public unsafe partial struct ID2D1GdiMetafile1 : ID2D1GdiMetafile1.Interface, INativeGuid
{
public static ref readonly Guid IID_ID2D1GdiMetafile1
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0xE8, 0xF9, 0x69, 0x2E,
0x3F, 0xDD,
0xF9, 0x4B,
0x95,
0xBA,
0xC0,
0x4F,
0x49,
0xD7,
0x88,
0xDF
};
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_ID2D1GdiMetafile1));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1GdiMetafile1));
#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]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public void GetFactory(ID2D1Factory** factory)
{
((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), factory);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult Stream(ID2D1GdiMetafileSink* sink)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), sink);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public HResult GetBounds(Common.RectF* bounds)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), bounds);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public HResult GetDpi(float* dpiX, float* dpiY)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), dpiX, dpiY);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public HResult GetSourceBounds(Common.RectF* bounds)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GdiMetafile1*)Unsafe.AsPointer(ref this), bounds);
}
public interface Interface : ID2D1GdiMetafile.Interface
{
[VtblIndex(6)]
HResult GetDpi(float* dpiX, float* dpiY);
[VtblIndex(7)]
HResult GetSourceBounds(Common.RectF* bounds);
}
}