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

namespace Decal.Interop.Inject;

[ComImport]
[SuppressUnmanagedCodeSecurity]
[InterfaceType(1)]
[Guid("D3006096-B293-47F5-9377-C12DEF5C1D34")]
public interface IRootLayer
{
	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[return: MarshalAs(UnmanagedType.Interface)]
	View CreateView([MarshalAs(UnmanagedType.BStr)] string Title, ref ViewParams pParams, [MarshalAs(UnmanagedType.Interface)] ILayer pLayer);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	void SelectBar(int nID);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[return: MarshalAs(UnmanagedType.Interface)]
	View LoadView([MarshalAs(UnmanagedType.BStr)] string strXML);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[return: MarshalAs(UnmanagedType.Interface)]
	View LoadViewObject([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
}
