// XCCom.idl : IDL source for XCCom.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (XCCom.tlb) and marshalling code.

[
	uuid(52D9664B-FF61-4EE8-B2A8-5D5ECBF11CFA),
	version(1.0),
	helpstring("XCCom 1.0 Type Library")
]
library XCCOMLib
{
	importlib("stdole2.tlb");

	interface IXCObject;
	interface IXCLineObject;
	interface IXCArc;
	interface IXCPolygon;
	interface IXCText;
	interface IXCPoint;
	interface IXCMenuItem;
	[
		object,
		uuid(8D9EF9C2-F1E6-4D3A-97EC-DD43BA49F393),
		/*dual,*/
		helpstring("IXCircuit Interface"),
		pointer_default(unique)
	]
	interface IXCircuit : IUnknown
	{
		[id(3), helpstring("method InitScript")] HRESULT InitScript();
		[id(4), helpstring("method TermScript")] HRESULT TermScript();
		[id(5), helpstring("method ExecuteStatement")] HRESULT ExecuteStatement(BSTR Statement);
		[id(0x00000bb8), helpstring("Script error event handler")] HRESULT ScriptError();
		[id(1), helpstring("method refresh")] HRESULT refresh();
		[id(2), helpstring("method quit")] HRESULT quit();
		[id(7), helpstring("method zoomin")] HRESULT zoomin();
		[id(8), helpstring("method zoomout")] HRESULT zoomout();
		[propput, id(6), helpstring("property zoom")] HRESULT zoom([in] VARIANT newVal);
		[propget, id(6), helpstring("property zoom")] HRESULT zoom([out, retval] VARIANT *pVal);
		[id(10), helpstring("method arc")] HRESULT arc([in] int x, [in] int y, [in] int radius,
							       [in, defaultvalue(0.0)] float angle1, [in, defaultvalue(360.0)] float angle2,
							       [out, retval] IXCArc **pparc);
		[id(12), helpstring("method setTimeout")] HRESULT setTimeout([in] BSTR expr, [in] int delay, [out, retval] int *ID);
		[id(13), helpstring("method clearTimeout")] HRESULT clearTimeout([in] int ID);
		[propput, id(14), helpstring("Automatic refresh on detected changes")] HRESULT autorefresh([in] VARIANT_BOOL newVal);
		[propget, id(14), helpstring("Automatic refresh on detected changes")] HRESULT autorefresh([out, retval] VARIANT_BOOL *pVal);
		[id(15), helpstring("Open file dialog")] HRESULT filepopup();
		[id(16), helpstring("Create new box")] HRESULT box([in] int x, [in] int y, [in] int width, [in] int height,
								   [out, retval] IXCPolygon **pppoly);
		[id(17), vararg, helpstring("Create new polygon")] HRESULT polygon([in] SAFEARRAY(VARIANT) coords, [out, retval] IXCPolygon **pppoly);
		[id(18), helpstring("Create new text")] HRESULT text([in] BSTR txt, [in] int x, [in] int y, [out, retval] IXCText **pptext);
		[id(19)] HRESULT init_dotnet([in, defaultvalue("")] BSTR assembly);
		[id(20)] HRESULT using([in] IDispatch *disp);
		[id(21)] HRESULT load_dotnet_plugin([in] BSTR filename);
		[id(22)] HRESULT new_menu(
				[in] BSTR parent,
				[in] BSTR name,
				[in] VARIANT_BOOL is_popup,
				[in, defaultvalue("")] BSTR after,
				[out, retval] IXCMenuItem **ppItem);
		[id(23)] HRESULT get_menu([in] BSTR name, [out, retval] IXCMenuItem **ppItem);
		[id(24)] HRESULT add_color(
				[in] int red,
				[in] int green,
				[in] int blue);
		[propput, id(25)] HRESULT color([in] int cval);
		[propget, id(25)] HRESULT color([out, retval] int *pVal);
	};
	[
		object,
		uuid(3EC15AA4-DD5E-4302-B0AB-3F2675504BE8),
		dual,
		helpstring("IXCObject Interface"),
		hidden
	]
	interface IXCObject : IDispatch
	{
		[propget, id(100), helpstring("property object_handle")] HRESULT object_handle([out, retval] long *pVal);
		[propget, id(102), helpstring("property color")] HRESULT color([out, retval] int *pVal);
		[propput, id(102), helpstring("property color")] HRESULT color([in] VARIANT newVal);
		[id(103), helpstring("method select")] HRESULT select([in, defaultvalue(0xffff)] VARIANT_BOOL doRefresh);
		[id(104), helpstring("method update")] HRESULT update([in, defaultvalue(0xffff)] VARIANT_BOOL doRefresh);
	};
	[
		object,
		uuid(3D0BB9DF-AD5A-49fa-8A70-7BF8F85253F2),
		dual,
		helpstring("IXCLineObject Interface"),
		hidden
	]
	interface IXCLineObject : IXCObject
	{
		[propget, id(200), helpstring("Line width")] HRESULT width([out, retval] float *pVal);
		[propput, id(200), helpstring("Line width")] HRESULT width([in] float newVal);
		[propput, id(201), helpstring("Border style")] HRESULT border([in] BSTR newVal);
		[propget, id(201), helpstring("Border style")] HRESULT border([out, retval] BSTR *pVal);
		[propput, id(202), helpstring("Border closed flag")] HRESULT closed([in] VARIANT_BOOL newVal);
		[propget, id(202), helpstring("Border closed flag")] HRESULT closed([out, retval] VARIANT_BOOL *pVal);
	};
	[
		object,
		uuid(167FC509-B936-4E3B-947A-623047A590F7),
		dual,
		helpstring("IXCArc Interface"),
		hidden
	]
	interface IXCArc : IXCLineObject
	{
		[propget, id(1), helpstring("Circle radius")] HRESULT r([out, retval] short *pVal);
		[propput, id(1), helpstring("Circle radius")] HRESULT r([in] short newVal);
		[propget, id(2), helpstring("X axis radius")] HRESULT rx([out, retval] short *pVal);
		[propput, id(2), helpstring("X axis radius")] HRESULT rx([in] short newVal);
		[propget, id(3), helpstring("Y axis radius")] HRESULT ry([out, retval] short *pVal);
		[propput, id(3), helpstring("Y axis radius")] HRESULT ry([in] short newVal);
		/*
		[propget, id(4), helpstring("Center X coordinate")] HRESULT cx([out, retval] short *pVal);
		[propput, id(4), helpstring("Center X coordinate")] HRESULT cx([in] short newVal);
		[propget, id(5), helpstring("Center Y coordinate")] HRESULT cy([out, retval] short *pVal);
		[propput, id(5), helpstring("Center Y coordinate")] HRESULT cy([in] short newVal);
		*/
		[propget, id(6), helpstring("Start angle (in degree)")] HRESULT start([out, retval] float *pVal);
		[propput, id(6), helpstring("Start angle (in degree)")] HRESULT start([in] float newVal);
		[propget, id(7), helpstring("Stop angle (in degree)")] HRESULT stop([out, retval] float *pVal);
		[propput, id(7), helpstring("Stop angle (in degree)")] HRESULT stop([in] float newVal);
		[propget, id(8), helpstring("Center")] HRESULT center([out, retval] IXCPoint **pt);
	};
	[
		object,
		uuid(024AD5B9-1CD9-4c34-AA1B-D635D923013D),
		dual,
		helpstring("IXCPolygon Interface"),
		hidden
	]
	interface IXCPolygon : IXCLineObject
	{
		[propget, id(1), helpstring("Get point")] HRESULT point([in] int index, [out, retval] IXCPoint **pt);
		[id(2), helpstring("Append point")] HRESULT append([in] int x, [in] int y);
	};
	[
		object,
		uuid(C8EDC9F7-9590-47f5-9A14-776D4688D41A),
		dual,
		helpstring("IXCPoint Interface"),
		hidden
	]
	interface IXCPoint : IDispatch
	{
		[propget, id(1), helpstring("X coordinate")] HRESULT x([out, retval] short *pVal);
		[propput, id(1), helpstring("X coordinate")] HRESULT x([in] short newpVal);
		[propget, id(2), helpstring("Y coordinate")] HRESULT y([out, retval] short *pVal);
		[propput, id(2), helpstring("Y coordinate")] HRESULT y([in] short newpVal);
	}
	[
		object,
		uuid(38B12FDA-208A-475d-B502-B8842AC9400B),
		dual,
		helpstring("IXCText Interface"),
		hidden
	]
	interface IXCText : IXCObject
	{
		[propget, id(1), helpstring("Position")] HRESULT position([out, retval] IXCPoint **pt);
		[propget, id(2), helpstring("Horizontal alignment")] HRESULT halign([out, retval] BSTR *pVal);
		[propput, id(2), helpstring("Horizontal alignment")] HRESULT halign([in] BSTR newVal);
		[propget, id(3), helpstring("Vertical alignment")] HRESULT valign([out, retval] BSTR *pVal);
		[propput, id(3), helpstring("Vertical alignment")] HRESULT valign([in] BSTR newVal);
		[propget, id(4), helpstring("Rotation")] HRESULT rotation([out, retval] short *pVal);
		[propput, id(4), helpstring("Rotation")] HRESULT rotation([in] short newVal);
		[propget, id(5), helpstring("Scale factor")] HRESULT scale([out, retval] float *pVal);
		[propput, id(5), helpstring("Scale factor")] HRESULT scale([in] float newVal);
		[propget, id(6), helpstring("String representation")] HRESULT text([out, retval] BSTR *pVal);
		[propput, id(6), helpstring("String representation")] HRESULT text([in] BSTR newVal);
	};
	[
		object,
		uuid(4E940CB7-1A02-415c-869E-090DA8CFC6E9),
		helpstring("IXCMenuItem Interface")
	]
	interface IXCMenuItem : IUnknown
	{
		[propput, id(1)] HRESULT activated([in] IDispatch *pDisp);
		[propget, id(2)] HRESULT name([out, retval] BSTR *pVal);
		[id(3)] HRESULT reset();
	};

	[
		uuid(79C34676-4775-4629-B71E-4C2E8EA7A082),
		helpstring("XCircuit Events Interface")
	]
	dispinterface DXCEvents
	{
		properties:
		methods:
			[id(0x00001000)]void ModifiedChanged();
			[id(0x00001001)]void ZoomChanged();
	};
	[
		uuid(767601BC-4876-4bab-8325-236D8BDBE36D),
		helpstring("XCircuit Menu Events Interface")
	]
	dispinterface DXCMenuEvents
	{
		properties:
		methods:
			[id(0x00001000)]void Click();
	};

/*
[
	uuid(52D9664B-FF61-4EE8-B2A8-5D5ECBF11CFA),
	version(1.0),
	helpstring("XCCom 1.0 Type Library")
]
library XCCOMLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");
*/

	[
		uuid(789139F5-5E9B-426A-869E-FD0F959C7F9C),
		helpstring("XCircuit Class")
	]
	coclass XCircuit
	{
		[default] interface IXCircuit;
		[source] dispinterface DXCEvents;
	};
	[
		uuid(7BE79413-5EF5-4118-AF9E-FD2C02501EBE),
		helpstring("XCMenuItem Class")
	]
	coclass XCMenuItem
	{
		[default] interface IXCMenuItem;
		[source] dispinterface DXCMenuEvents;
	};
/*
	[
		uuid(1353B2A5-5634-41C2-83A4-0E151A81ACA9),
		helpstring("XCArc Class"),
		noncreatable
	]
	coclass XCArc
	{
		[default] interface IXCArc;
	};
*/
};
