using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using Decal.Interop.Core;
using Decal.Interop.Inject;

namespace Decal.Interop.Controls;

[ComImport]
[SuppressUnmanagedCodeSecurity]
[Guid("58CBF550-DFBE-433C-88EC-3FED4A5E09F1")]
[TypeLibType(4096)]
public interface IFixedLayout : ILayout
{
	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	new void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);

	[DispId(2)]
	new int ID
	{
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		get;
	}

	[DispId(3)]
	new int ChildCount
	{
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		get;
	}

	[DispId(4)]
	new IControl Child
	{
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		[return: MarshalAs(UnmanagedType.Interface)]
		get;
	}

	[DispId(101)]
	new IImageCache Background
	{
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		[return: MarshalAs(UnmanagedType.Interface)]
		get;
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
		[param: In]
		[param: MarshalAs(UnmanagedType.Interface)]
		set;
	}

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	void CreateChild(ref LayerParams @params, [MarshalAs(UnmanagedType.Interface)] ILayer pSink);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	void PositionChild(int nID, ref tagRECT prcNew);
}
