66 行
2.6 KiB
C#
66 行
2.6 KiB
C#
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
|
|
|
// Ported from um/dwrite.h in the Windows SDK for Windows 10.0.20348.0
|
|
// Original source is Copyright © Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using TerraFX.Interop.Windows;
|
|
|
|
namespace TerraFX.Interop.DirectX
|
|
{
|
|
[Guid("1A0D8438-1D97-4EC1-AEF9-A2FB86ED6ACB")]
|
|
[NativeTypeName("struct IDWriteFontList : IUnknown")]
|
|
[NativeInheritance("IUnknown")]
|
|
internal unsafe partial struct IDWriteFontList
|
|
{
|
|
public void** lpVtbl;
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(0)]
|
|
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, Guid*, void**, int>)(lpVtbl[0]))((IDWriteFontList*)Unsafe.AsPointer(ref this), riid, ppvObject);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(1)]
|
|
[return: NativeTypeName("ULONG")]
|
|
public uint AddRef()
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, uint>)(lpVtbl[1]))((IDWriteFontList*)Unsafe.AsPointer(ref this));
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(2)]
|
|
[return: NativeTypeName("ULONG")]
|
|
public uint Release()
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, uint>)(lpVtbl[2]))((IDWriteFontList*)Unsafe.AsPointer(ref this));
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(3)]
|
|
public HRESULT GetFontCollection(IDWriteFontCollection** fontCollection)
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, IDWriteFontCollection**, int>)(lpVtbl[3]))((IDWriteFontList*)Unsafe.AsPointer(ref this), fontCollection);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(4)]
|
|
[return: NativeTypeName("UINT32")]
|
|
public uint GetFontCount()
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, uint>)(lpVtbl[4]))((IDWriteFontList*)Unsafe.AsPointer(ref this));
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
[VtblIndex(5)]
|
|
public HRESULT GetFont([NativeTypeName("UINT32")] uint index, IDWriteFont** font)
|
|
{
|
|
return ((delegate* unmanaged[Stdcall]<IDWriteFontList*, uint, IDWriteFont**, int>)(lpVtbl[5]))((IDWriteFontList*)Unsafe.AsPointer(ref this), index, font);
|
|
}
|
|
}
|
|
}
|