// -*- Mode: C++ -*-
/*++

Copyright (c) 1995-96 Microsoft Corporation

Abstract:

    Interface definitions for LiquidMotion components

--*/

#define DANIM_TLB "danim.tlb"

#include <olectl.h>
#include "lmbvrdispid.h"

import "danim.idl";

[
    uuid(183C2598-0480-11d1-87EA-00C04FC29D46),
    helpstring("LM Library"),
    lcid(0x0000),
    version(1.0)
]
library LiquidMotion
{
    importlib("STDOLE2.TLB");
	importlib(DANIM_TLB);

    //
    // Control classes
    //
	interface ILMEngine;

    [
	object,
	uuid(183C2599-0480-11d1-87EA-00C04FC29D46),
	dual,
	helpstring("LM ActiveX reader interface"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMReader : IDispatch
    {
		[propget, id(1), helpstring("Image property")]
	HRESULT Image([out, retval] IDAImage **pVal);
		[propget, id(2), helpstring("Sound property")]
	HRESULT Sound([out, retval] IDASound **pVal);
		[propget, id(3), helpstring("LMEngine COM object property")]
	HRESULT Engine([out, retval] ILMEngine **pVal);
		[id(4), helpstring("createEngine method")]
	HRESULT createEngine([out, retval] ILMEngine **pVal);
		[id(5), helpstring("execute method")]
	HRESULT execute([in, string] BSTR url, [out, retval] ILMEngine **pVal);
		[propget, id(6), helpstring("NoExports property")]
	HRESULT NoExports([out, retval] VARIANT_BOOL *pVal);
		[propput, id(6), helpstring("NoExports property")]
	HRESULT NoExports([in] VARIANT_BOOL pVal);
		[propget, id(7), helpstring("Async property")]
	HRESULT Async([out, retval] VARIANT_BOOL *pVal);
		[propput, id(7), helpstring("Async property")]
	HRESULT Async([in] VARIANT_BOOL pVal);
		[propget, id(8), helpstring("Src property")]
	HRESULT Src([out, retval] BSTR *url);
		[id(9), helpstring("create Async Engine method")]
	HRESULT createAsyncEngine([out, retval] ILMEngine **pVal);

    };

	[
	object,
	uuid(7A6DE760-FF0E-11d1-BABD-00A0C999C4C0),
	dual,
	helpstring("LM ActiveX reader interface"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMReader2 : ILMReader
	{
		[propget, id(10), helpstring("ViewerControl property")]
	HRESULT ViewerControl([out, retval] IDAViewerControl **viewerControl);
		[propput, id(10), helpstring("ViewerControl property")]
	HRESULT ViewerControl([in] IDAViewerControl *viewerControl);
		[propget, id(11), helpstring("Version String property")]
	HRESULT VersionString([out, retval] BSTR *versionString);
		[id(12), helpstring("releaseFilterGraph method")]
	HRESULT releaseFilterGraph();
	};

    [
	uuid(183C259A-0480-11d1-87EA-00C04FC29D46),
	helpstring("LM ActiveX reader class"),
    ]
    coclass LMReader
    {
	[default] interface ILMReader2;
    };


	[
	object,
	uuid(EB823ED0-110D-11d2-BAD2-00A0C999C4C0),
	local,
	helpstring("LM Engine Codec Download Interface"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMCodecDownload : IUnknown
    {
		[id(1), helpstring("method setAutoCodecDownloadEnabled")]
	HRESULT setAutoCodecDownloadEnabled([in] BOOL bEnabled);
    };

	[
	object,
	uuid(56565B88-3DD1-11d2-9F05-0060B0C3C4F4),
	local,
	helpstring("LM Engine Wrapper Interface"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMEngineWrapper : IUnknown
    {
		[id(1), helpstring("method getWrapped")]
	HRESULT GetWrapped([out,retval] IUnknown **ppWrapped);
		[id(2), helpstring("method setWrapped")]
	HRESULT SetWrapped([in] IUnknown *pWrapped);
		[id(3), helpstring("method invalidate")]
	HRESULT Invalidate();
    };

	[
	object,
	uuid(CEFB610E-3E9F-11d2-9F06-0060B0C3C4F4),
	local,
	helpstring("LM Engine Execute Interface"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMEngineExecute : IUnknown
    {
		[id(1), helpstring("method ExportBehavior")]
	HRESULT ExportBehavior([in]BSTR key, [in]IDABehavior *toExport);
		[id(2), helpstring("method SetImage")]
	HRESULT SetImage([in]IDAImage *pImage);
		[id(3), helpstring("method SetSound")]
	HRESULT SetSound([in]IDASound *pSound);
		[id(4), helpstring("method SetStopEvent")]
	HRESULT SetStopEvent([in]IDAEvent *pNewStopEvent, [in]BOOL bOverwrite);
		[id(5), helpstring("method SetStartEvent")]
	HRESULT SetStartEvent([in]IDAEvent *pNewStartEvent, [in]BOOL bOverwrite);
    };

    [
	object,
	uuid(C533ADF0-0C80-11d1-8C54-00A02468F316),
	dual,
	local,
	helpstring("LM Engine COM Control"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMEngine : IDispatch
    {
		[id(1), helpstring("method run")]
	HRESULT runFromStream([in] LPSTREAM pStream);
		[id(2), helpstring("method run")]
	HRESULT runFromURL([in] BSTR url);
		[propput, id(3), helpstring("ClientSite property")]
	HRESULT ClientSite([in] IOleClientSite *clientSite);
		[propget, id(4), helpstring("Image property")]
	HRESULT Image([out, retval] IDAImage **pVal);
		[propget, id(5), helpstring("Sound property")]
	HRESULT Sound([out, retval] IDASound **pVal);
		[propput, id(6), helpstring("Reader control property")]
	HRESULT Reader([in] ILMReader *pVal);
		[id(7), helpstring("method initNotify")]
	HRESULT initNotify([in] BYTE *bytes, [in] ULONG count, [out] IDAUntilNotifier **pNotifier);
		[id(8), helpstring("GetBehavior method")]
	HRESULT GetBehavior([in, string] BSTR tag, [in] IDABehavior *pIDefaultBvr, [out, retval] IDABehavior **pVal);
		[id(9), helpstring("SetAsyncBlkSize method")]
	HRESULT SetAsyncBlkSize([in] LONG blkSize);
		[id(10), helpstring("SetAsyncDelay method")]
	HRESULT SetAsyncDelay([in] LONG delay);
		[id(11), helpstring("AbortExecution method")]
	HRESULT AbortExecution();
		[id(12), helpstring("initAsync method")]
	HRESULT initAsync();
    };

	[
	object,
	uuid(686D9E60-FF11-11d1-BABD-00A0C999C4C0),
	dual,
	local,
	helpstring("LM Engine COM Control"),
	hidden,
	pointer_default(unique)
    ]
    interface ILMEngine2 : ILMEngine
	{
		[id(13), helpstring("OnMemDataAvailable method")]
	HRESULT OnMemDataAvailable([in] BOOLEAN lastBlock, [in] DWORD blockSize, [in] BYTE *block);
		[id(14), helpstring("Start Method")]
	HRESULT Start([in]LONGLONG rtNow);
		[id(15), helpstring("Stop Method")]
    HRESULT Stop();
		[id(16), helpstring("SetMediaCacheDir Method")]
    HRESULT SetMediaCacheDir([in]WCHAR *wsz);
		[id(17), helpstring("setParentEngine Method")]
	HRESULT setParentEngine([in]ILMEngine2 *ParentEngine);
		[id(18), helpstring("clearParentEngine Method")]
	HRESULT clearParentEngine();
		[id(19), helpstring("getCurrentGraphTime Method")]
	HRESULT getCurrentGraphTime( [out, retval]double *pGraphTime);
		[id(20), helpstring("releaseFilterGraph method")]
	HRESULT releaseFilterGraph();
		[id(21), helpstring("releaseAllFilterGraph method")]
	HRESULT releaseAllFilterGraph();
		[id(22), helpstring("disableAutoAntialias method")]
	HRESULT disableAutoAntialias();
		[id(23), helpstring("ensureBlockSize method")]
	HRESULT ensureBlockSize(ULONG blockSize);
	};

    [
	uuid(C533ADF1-0C80-11d1-8C54-00A02468F316),
	helpstring("LM Engine COM Control"),
    ]
    coclass LMEngine
    {
	[default] interface ILMEngine2;
    };

/**************************************************************/
	// AutoEffect
	[
		object,
		uuid(B2A46902-74E0-11d2-9BEE-00C04FA34789),
		dual,
		helpstring("ILMAutoEffectBvr Interface"),
		pointer_default(unique)
	]
	interface ILMAutoEffectBvr : IDispatch
	{
		[propget, id(DISPID_IAUTOEFFECTBVR_ANIMATES)]		HRESULT animates( [out, retval] VARIANT* pVal );
		[propput, id(DISPID_IAUTOEFFECTBVR_ANIMATES)]		HRESULT animates( [in] VARIANT newVal );
		[propget, id(DISPID_IAUTOEFFECTBVR_TYPE)]			HRESULT type([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_TYPE)]			HRESULT type([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_CAUSE)]			HRESULT cause([out, retval] VARIANT* pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_CAUSE)]			HRESULT cause([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_SPAN)]			HRESULT span([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_SPAN)]			HRESULT span([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_SIZE)]			HRESULT size([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_SIZE)]			HRESULT size([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_RATE)]			HRESULT rate([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_RATE)]			HRESULT rate([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_GRAVITY)]		HRESULT gravity([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_GRAVITY)]		HRESULT gravity([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_WIND)]			HRESULT wind([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_WIND)]			HRESULT wind([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_FILLCOLOR)]		HRESULT fillColor([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_FILLCOLOR)]		HRESULT fillColor([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_STROKECOLOR)]	HRESULT strokeColor([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_STROKECOLOR)]	HRESULT strokeColor([in] VARIANT newVal);
		[propget, id(DISPID_IAUTOEFFECTBVR_OPACITY)]		HRESULT opacity([out, retval] VARIANT *pVal);
		[propput, id(DISPID_IAUTOEFFECTBVR_OPACITY)]		HRESULT opacity([in] VARIANT newVal);
		[id(DISPID_IAUTOEFFECTBVR_BUILDBVRFRAGS)]			HRESULT buildBehaviorFragments(IDispatch *pActorDisp);
	    [id(DISPID_IAUTOEFFECTBVR_MOUSEEVENT)]
		HRESULT mouseEvent([in] long x,
						   [in] long y,
						   [in] VARIANT_BOOL bMove,
						   [in] VARIANT_BOOL bUp,
						   [in] VARIANT_BOOL bShift,
						   [in] VARIANT_BOOL bAlt,
						   [in] VARIANT_BOOL bCtrl,
						   [in] long button);
	
	};

	//coclass
	[
		uuid(BB339A46-7C49-11d2-9BF3-00C04FA34789),
		helpstring("LMAutoEffectBvr Class")
	]
	coclass LMAutoEffectBvr
	{
		[default] interface ILMAutoEffectBvr;
	};

/**************************************************************/
	//the AvoidFollow Behavior
/* //punted for V1
	[
		object,
		uuid(61abdb72-75ce-11d2-9528-0060b0c3c4f4),
		dual,
		helpstring("ILMAvoidFollowBvr Interface"),
		pointer_default(unique)
	]
	interface ILMAvoidFollowBvr : IDispatch
	{
	//properties
	//animates
	[propput, id( DISPID_IAVOIDFOLLOWBVR_ANIMATES ), helpstring( "Animates property" )]
	HRESULT animates( [in] VARIANT varAnimates );
	[propget, id( DISPID_IAVOIDFOLLOWBVR_ANIMATES ), helpstring( "Animates Property" )]
	HRESULT animates( [out, retval] VARIANT* varAnimates );
	//radius
	[propput, id( DISPID_IAVOIDFOLLOWBVR_RADIUS ), helpstring( "Radius property" )]
	HRESULT radius( [in] VARIANT varRadius );
	[propget, id( DISPID_IAVOIDFOLLOWBVR_RADIUS ), helpstring( "Radius Property" )]
	HRESULT radius( [out, retval] VARIANT* varRadius );
	//target
	[propput, id( DISPID_IAVOIDFOLLOWBVR_TARGET ), helpstring( "Target property" )]
	HRESULT target( [in] VARIANT varTarget );
	[propget, id( DISPID_IAVOIDFOLLOWBVR_TARGET ), helpstring( "Target Property" )]
	HRESULT target( [out, retval] VARIANT* varTarget );
	//velocity
	[propput, id( DISPID_IAVOIDFOLLOWBVR_VELOCITY ), helpstring( "Velocity property" )]
	HRESULT velocity( [in] VARIANT varVelocity );
	[propget, id( DISPID_IAVOIDFOLLOWBVR_VELOCITY ), helpstring( "Velocity Property" )]
	HRESULT velocity( [out, retval] VARIANT* varVelocity );
	//methods
	[id( DISPID_IAVOIDFOLLOWBVR_BUILDBVRFRAGS), helpstring( "buildBehaviorFragments Method" ) ]
	HRESULT buildBehaviorFragments( IDispatch *pActorDisp );
	};
//coclass
	[
		uuid(6e0a0e52-75ce-11d2-9528-0060b0c3c4f4),
		helpstring("LMAvoidFollowBvr Class")
	]
	coclass LMAvoidFollowBvr
	{
		[default] interface ILMAvoidFollowBvr;
	};
*/
/**************************************************************/

/*  //punted for V1
	// The Jump Behavior
	[
		object,
		uuid(c4be8e64-79b4-11d2-bbcf-00a0c999c4c1),
		dual,
		helpstring("ILMJumpBvr Interface"),
		pointer_default(unique)
	]
	interface ILMJumpBvr : IDispatch
	{
//interval property
		[propput, id( DISPID_IJUMPBVR_INTERVAL ), helpstring( "Interval Property" )]
	HRESULT interval( [in] VARIANT varInterval );
		[propget, id( DISPID_IJUMPBVR_INTERVAL ), helpstring( "Interval Property" )]
	HRESULT interval( [out, retval] VARIANT* varInterval );
//range property
		[propput, id( DISPID_IJUMPBVR_RANGE ), helpstring( "Range Property" )]
	HRESULT range( [in] VARIANT varRange );
		[propget, id( DISPID_IJUMPBVR_RANGE ), helpstring( "Range Property" )]
	HRESULT range( [out, retval] VARIANT* varRange );
		[id(DISPID_IJUMPBVR_BUILDBVRFRAGS)]
	HRESULT buildBehaviorFragments(IDispatch *pActorDisp);
	};
//coclass
	[
		uuid(c4be8e65-79b4-11d2-bbcf-00a0c999c4c1),
		helpstring("LMJumpBvr Class")
	]
	coclass LMJumpBvr
	{
		[default] interface ILMJumpBvr;
	};
*/
/**************************************************************/

	//our beloved factory
	[
		object,
		uuid(B1549E57-3894-11D2-BB7F-00A0C999C4C1),
		dual,
		helpstring("ILMBehaviorFactory Interface"),
		pointer_default(unique)
	]
	interface ILMBehaviorFactory : IDispatch
	{
		
	};
//coclass
	[
		uuid(B1549E58-3894-11D2-BB7F-00A0C999C4C1),
		helpstring("LMBehaviorFactory Class")
	]
	coclass LMBehaviorFactory
	{
		[default] interface ILMBehaviorFactory;
	};
/**************************************************************/
	#include "..\chrome\idl\crbehavior.idl"
}
