using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;

namespace Decal.Interop.Inject;

[ComImport]
[TypeLibType(4096)]
[SuppressUnmanagedCodeSecurity]
[Guid("12ECCB0F-36A6-451C-B086-1306B74AAEC2")]
public interface IFontCache
{
	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	void DecalDrawText(ref tagPOINT pt, [MarshalAs(UnmanagedType.BStr)] string szText, int clr, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	tagSIZE MeasureText([MarshalAs(UnmanagedType.BStr)] string szText);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	int HitTest([MarshalAs(UnmanagedType.BStr)] string szText, int nPos);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	void DecalDrawTextEx(ref tagPOINT pt, [MarshalAs(UnmanagedType.BStr)] string szText, int clr1, int clr2, int flags, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget);
}
