Update generation code, drop netstandard2.0 and support net7.0 and net8.0 only, fix also issue #3

This commit is contained in:
Amer Koleci
2023-10-30 10:49:59 +01:00
parent 81d6ea831b
commit 9ea28d4664
620 changed files with 37301 additions and 57808 deletions

View File

@@ -40,11 +40,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
}
}
#if NET6_0_OR_GREATER
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1Bitmap1));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1Bitmap1));
#endif
public void** lpVtbl;
@@ -53,11 +49,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(0)]
public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, Guid*, void**, int>)(lpVtbl[0]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), riid, ppvObject);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Guid*, void**, int>)(lpVtbl[0]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), riid, ppvObject);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, Guid*, void**, int>)(lpVtbl[0]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
/// <inheritdoc cref="IUnknown.AddRef" />
@@ -66,11 +58,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, uint>)(lpVtbl[1]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, uint>)(lpVtbl[1]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, uint>)(lpVtbl[1]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="IUnknown.Release" />
@@ -79,11 +67,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[return: NativeTypeName("ULONG")]
public uint Release()
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, uint>)(lpVtbl[2]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, uint>)(lpVtbl[2]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, uint>)(lpVtbl[2]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="ID2D1Resource.GetFactory" />
@@ -91,11 +75,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(3)]
public void GetFactory(ID2D1Factory** factory)
{
#if NET6_0_OR_GREATER
((delegate* unmanaged<ID2D1Bitmap1*, ID2D1Factory**, void>)(lpVtbl[3]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), factory);
#else
((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, ID2D1Factory**, void>)(lpVtbl[3]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), factory);
#endif
((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, ID2D1Factory**, void>)(lpVtbl[3]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), factory);
}
/// <inheritdoc cref="ID2D1Bitmap.GetSize" />
@@ -104,11 +84,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
public System.Drawing.SizeF GetSize()
{
System.Drawing.SizeF result;
#if NET6_0_OR_GREATER
return *((delegate* unmanaged<ID2D1Bitmap1*, System.Drawing.SizeF*, System.Drawing.SizeF*>)(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#else
return *((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.SizeF*, System.Drawing.SizeF*>)(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#endif
return *((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, System.Drawing.SizeF*, System.Drawing.SizeF*>)(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
}
/// <inheritdoc cref="ID2D1Bitmap.GetPixelSize" />
@@ -117,11 +93,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
public System.Drawing.Size GetPixelSize()
{
System.Drawing.Size result;
#if NET6_0_OR_GREATER
return *((delegate* unmanaged<ID2D1Bitmap1*, System.Drawing.Size*, System.Drawing.Size*>)(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#else
return *((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Size*, System.Drawing.Size*>)(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#endif
return *((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, System.Drawing.Size*, System.Drawing.Size*>)(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
}
/// <inheritdoc cref="ID2D1Bitmap.GetPixelFormat" />
@@ -130,11 +102,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
public Common.PixelFormat GetPixelFormat()
{
Common.PixelFormat result;
#if NET6_0_OR_GREATER
return *((delegate* unmanaged<ID2D1Bitmap1*, Common.PixelFormat*, Common.PixelFormat*>)(lpVtbl[6]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#else
return *((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Common.PixelFormat*, Common.PixelFormat*>)(lpVtbl[6]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
#endif
return *((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, Common.PixelFormat*, Common.PixelFormat*>)(lpVtbl[6]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result);
}
/// <inheritdoc cref="ID2D1Bitmap.GetDpi" />
@@ -142,11 +110,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(7)]
public void GetDpi(float* dpiX, float* dpiY)
{
#if NET6_0_OR_GREATER
((delegate* unmanaged<ID2D1Bitmap1*, float*, float*, void>)(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dpiX, dpiY);
#else
((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, float*, float*, void>)(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dpiX, dpiY);
#endif
((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, float*, float*, void>)(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dpiX, dpiY);
}
/// <inheritdoc cref="ID2D1Bitmap.CopyFromBitmap" />
@@ -154,11 +118,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(8)]
public HResult CopyFromBitmap(System.Drawing.Point* destPoint, ID2D1Bitmap* bitmap, Win32.Numerics.Rect* srcRect)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1Bitmap*, Win32.Numerics.Rect*, int>)(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1Bitmap*, Win32.Numerics.Rect*, int>)(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1Bitmap*, Win32.Numerics.Rect*, int>)(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect);
}
/// <inheritdoc cref="ID2D1Bitmap.CopyFromRenderTarget" />
@@ -166,11 +126,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(9)]
public HResult CopyFromRenderTarget(System.Drawing.Point* destPoint, ID2D1RenderTarget* renderTarget, Win32.Numerics.Rect* srcRect)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1RenderTarget*, Win32.Numerics.Rect*, int>)(lpVtbl[9]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1RenderTarget*, Win32.Numerics.Rect*, int>)(lpVtbl[9]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1RenderTarget*, Win32.Numerics.Rect*, int>)(lpVtbl[9]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect);
}
/// <inheritdoc cref="ID2D1Bitmap.CopyFromMemory" />
@@ -178,11 +134,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(10)]
public HResult CopyFromMemory(Win32.Numerics.Rect* dstRect, void* srcData, uint pitch)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, Win32.Numerics.Rect*, void*, uint, int>)(lpVtbl[10]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dstRect, srcData, pitch);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Win32.Numerics.Rect*, void*, uint, int>)(lpVtbl[10]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dstRect, srcData, pitch);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, Win32.Numerics.Rect*, void*, uint, int>)(lpVtbl[10]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dstRect, srcData, pitch);
}
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap1::GetColorContext"]/*' />
@@ -190,11 +142,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(11)]
public void GetColorContext(ID2D1ColorContext** colorContext)
{
#if NET6_0_OR_GREATER
((delegate* unmanaged<ID2D1Bitmap1*, ID2D1ColorContext**, void>)(lpVtbl[11]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), colorContext);
#else
((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, ID2D1ColorContext**, void>)(lpVtbl[11]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), colorContext);
#endif
((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, ID2D1ColorContext**, void>)(lpVtbl[11]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), colorContext);
}
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap1::GetOptions"]/*' />
@@ -202,11 +150,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(12)]
public BitmapOptions GetOptions()
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, BitmapOptions>)(lpVtbl[12]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, BitmapOptions>)(lpVtbl[12]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, BitmapOptions>)(lpVtbl[12]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
}
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap1::GetSurface"]/*' />
@@ -214,11 +158,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(13)]
public HResult GetSurface(Graphics.Dxgi.IDXGISurface** dxgiSurface)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, Graphics.Dxgi.IDXGISurface**, int>)(lpVtbl[13]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dxgiSurface);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Graphics.Dxgi.IDXGISurface**, int>)(lpVtbl[13]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dxgiSurface);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, Graphics.Dxgi.IDXGISurface**, int>)(lpVtbl[13]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), dxgiSurface);
}
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap1::Map"]/*' />
@@ -226,11 +166,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(14)]
public HResult Map(MapOptions options, MappedRect* mappedRect)
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, MapOptions, MappedRect*, int>)(lpVtbl[14]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), options, mappedRect);
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, MapOptions, MappedRect*, int>)(lpVtbl[14]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), options, mappedRect);
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, MapOptions, MappedRect*, int>)(lpVtbl[14]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), options, mappedRect);
}
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap1::Unmap"]/*' />
@@ -238,11 +174,7 @@ public unsafe partial struct ID2D1Bitmap1 : ID2D1Bitmap1.Interface, INativeGuid
[VtblIndex(15)]
public HResult Unmap()
{
#if NET6_0_OR_GREATER
return ((delegate* unmanaged<ID2D1Bitmap1*, int>)(lpVtbl[15]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#else
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, int>)(lpVtbl[15]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
#endif
return ((delegate* unmanaged[MemberFunction]<ID2D1Bitmap1*, int>)(lpVtbl[15]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
}
public interface Interface : ID2D1Bitmap.Interface