using System;
using System.Runtime.InteropServices;

namespace CM2
{
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("E68EB965-D026-4646-B527-B0B3B11C057A")]
	public interface ICM2VisPlug
	{
		// Basics
		void Name([MarshalAs(UnmanagedType.LPStr)] out string name);
		void Version(out ushort version);
		void RequiredCoreVersion(out ushort requiredCoreVersion);
		// Error
		void GetLastErrorMsg([MarshalAs(UnmanagedType.LPStr)] out string errorMessage);
		// Info
		void GetInfoCount(out int infoCount);
		void GetInfo(int index, [MarshalAs(UnmanagedType.LPStr)] out string infoName, [MarshalAs(UnmanagedType.LPStr)] out string infoValue);
		// Visual
		void SetDC(IntPtr hDC);
		void SetDimensions(int left, int top, int width, int height);
		void SetConfigString([MarshalAs(UnmanagedType.LPStr)] string newConfigString);
		// Events
		void Redraw();
		void Update(byte sensorStyle, [MarshalAs(UnmanagedType.LPStr)] string newString, double newValue);
		void Init(IntPtr hDC);
		void Terminating();
		void Setup();
		// Support
		void GetDefaultCount(out int count);
		void GetDefault(int index, [MarshalAs(UnmanagedType.LPStr)] out string name, [MarshalAs(UnmanagedType.LPStr)] out string defaultValue, [MarshalAs(UnmanagedType.LPStr)] out string description);
		void GetOptionalCount(out int count);
		void GetOptional(int index, [MarshalAs(UnmanagedType.LPStr)] out string name, [MarshalAs(UnmanagedType.LPStr)] out string defaultValue, [MarshalAs(UnmanagedType.LPStr)] out string description);
	}
}
