/* @(#) 1.8 nt/src/storage/idl/DragDrp.idl, oddataxfer, od96nt, odnt9712d 11/1/96 18:16:27 [3/21/97 17:16:33] */
//#====START_GENERATED_PROLOG======================================
//#
//#
//#   COMPONENT_NAME: oddataxfer
//#
//#   CLASSES: none
//#
//#   ORIGINS: 82,27,94
//#
//#
//#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
//#   All Rights Reserved
//#   Licensed Materials - Property of IBM
//#   US Government Users Restricted Rights - Use, duplication or
//#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//#   	
//#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
//#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
//#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
//#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
//#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
//#   OR PERFORMANCE OF THIS SOFTWARE.
//#
//#====END_GENERATED_PROLOG========================================
//#

#ifdef __PRIVATE__
//#
//#	File:		DragDrp.idl
//#
//#	Contains:	Definition of ODDragAndDrop
//#
//#	Apple owner:	Vincent Lo
//# IBM owner:		Troy Folger
//#
//#	Copyright:	(r) 1994 by Apple Computer, Inc., all rights reserved.
//#	Copyright:	(r) IBM, all rights reserved.
//#
//# Format considerations:	formatted for tab width of 4
//#
//#	Change History (most recent first):
//#
//#		<17>	04/10/96	tdf		ported to WIN32 - this idl is now WIN32
//#									specific; no attempt has been made to
//#									make this file portable via #define
//#		<16>	 9/13/95	VL		1283523: Added fields for psn, AppleEvent
//#									and a boolean to show whether sending an
//#									event is necessary.
//#		<15>	  9/8/95	VL		1275241, 1283463: Use
//#									ODPlatformDragReference everywhere.
//#		<14>	 8/22/95	VL		1265957, 1278381: Added new field
//#									fFacetsRejected to keep track of facets
//#									which have rejected drags.
//#		<13>	  8/3/95	RR		#1257260: Collapse B classes. Remove
//#									somInit methods. Don't call IsInitialized
//#									or SubclassResponsibility
//#		<12>	 7/14/95	TJ		Made Some TypeDefs into Structs so SOM Slim
//#									can get there correct Sizes.
//#		<11>	 4/10/95	VL		1196870: Preserved HasLeftSourceFrame
//#									behavior.
//#		<10>	 3/22/95	CC		1230322: Changed parameter to
//#									ShowPasteAsDialog().
//#		 <9>	11/28/94	SS		Merged MacTech branch changes (1196544)
//#		 <8>	 9/23/94	CC		1187509 - Added ODStorageUnit parameter to
//#									ShowPasteAsDialog().
//#		 <7>	  9/9/94	jpa		Renamed "result" param to avoid d14 emitter
//#									bug.
//#		 <6>	  8/2/94	CC		#1178169 - ShowPasteAsDialog() takes
//#									ODFacet* instead of ODFrame*.
//#		 <5>	 7/27/94	CC		Removed unused typedef of AppleEvent.
//#		 <4>	 7/21/94	VL		Added Getters and Setters.
//#		 <3>	  7/7/94	CC		Moved constants to ODTypesB.idl.
//#		 <2>	 6/28/94	VL		Fixed header.
//#		 <1>	 6/28/94	VL		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	(r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
//#	Copyright:	(r) 1995 - 1996 by IBM, all rights reserved.
#endif  // PRIVATE

#ifndef _DRAGDROP_
#define _DRAGDROP_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif  // _ODOBJECT_

//=====================================================================================
// Classes defined in this interface
//=====================================================================================

interface  ODDragAndDrop;

//=====================================================================================
// Classes used by this interface
//=====================================================================================

interface	ODSession;
interface	ODPart;
interface	ODStorageUnit;
interface	ODFacet;
interface	ODFrame;
interface	ODDraft;
interface	ODStorageSystem;
interface	ODWindowState;
interface	ODPlatformDragReference;
interface	ODDragItemIterator;
interface   ODPoint;
interface   ODULong;
interface   ODRgnHandle;
interface   ODPlatformWindow;
interface   ODBoolean;

#ifdef __PRIVATE__
//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken LinkedList;
typedef somToken OpenHashTable;
typedef somToken DWORD;
typedef somToken LPVOID;
typedef somToken POINTL;
typedef somToken HGLOBAL;
typedef somToken OLEPromiseKeeper;
typedef somToken LPWRAPIDROPTARGET;		// temporary until OLE wrapper

#endif  // PRIVATE


//=====================================================================================
// ODDragAndDrop
//=====================================================================================


interface ODDragAndDrop :  ODObject
{
	void Clear();
	
	ODStorageUnit  GetContentStorageUnit();
	
	ODDropResult StartDrag(in ODFrame srcFrame,
					in ODType imageType,
					in ODByteArray image,
					out ODPart destPart,
					in ODByteArray refCon);

	ODBoolean ShowPasteAsDialog(
					in		ODBoolean				canPasteLink,
					in		ODPasteAsMergeSetting	mergeSetting,
					in		ODFacet					facet,
					in		ODTypeToken				viewType,
					in		ODStorageUnit			contentSU,
					out		ODPasteAsResult			theResult);

	ODULong GetDragAttributes();
	
	ODPlatformDragReference GetDragReference();
	
#ifdef __PRIVATE__

	void InitDragAndDrop(in ODSession session);    
	
	ODFacet  FindTargetFacet(in ODPlatformWindow theWindow,
								in  ODPoint mouse,
								out  ODPoint local);
	
	LinkedList* GetDragItemList();
	void SetDragItemList(in LinkedList* list);
	
	ODBoolean	GetListFromHandler();
	void SetListFromHandler(in ODBoolean listFromHandler);
	
	ODFrame	GetSourceFrame();
	void SetSourceFrame(in ODFrame sourceFrame);
	
	ODULong	GetAttributes();
	void SetAttributes(in ODULong attr);

	ODPart GetSourcePart();
	void SetSourcePart(in ODPart sourcePart);
		
	ODDragItemIterator GetDragItemIterator();
	void SetDragItemIterator(in ODDragItemIterator iter);
	
	ODSession GetSession();
	ODStorageSystem GetStorageSystem();
	
	void SetDragReference(in ODPlatformDragReference ODPlatformDragReference);
	
	ODFacet GetPrevFacet();
	void SetPrevFacet(in ODFacet prevFacet);
	
	ODFacet GetDestFacet();
	void SetDestFacet(in ODFacet destFacet);
	
	ODDropResult GetDropResult();
	void SetDropResult(in ODDropResult dropResult);

	void CanvasRequested(in ODBoolean bRequest);

	void Locked(in ODBoolean bLock);

	void DrawDrag(in ODULong EraseDraw);

	void ProcessDragOver(in  DWORD  grfKeyState,
						 in  POINTL pt,
						 out DWORD  pdwEffect,
						 in  LPVOID pDataObj);

	void ProcessDragLeave();

	void ProcessDrop(in DWORD   grfKeyState,
					 in POINTL  pt,
					 out DWORD  pdwEffect);

	ODPoint GetDragOrigin();

	ODULong GetDropKeyState();

	HGLOBAL AllocDragItemList();

	void FreeDragItemList(in HGLOBAL hGlobList);

	void CloseAllDragItems();

	void SetupDropTarget(in HWND hwnd);

	void DraftClosing(in ODDraft draft);

#endif  // PRIVATE

  
#ifdef __SOMIDL__
	implementation
	{
		functionprefix = ODDragAndDrop;
		override:
			somUninit;
			
		releaseorder:
			Clear,
			GetContentStorageUnit,
			StartDrag,
			ShowPasteAsDialog,
			GetDragAttributes,
			GetDragReference,
	#ifdef __PRIVATE__
			InitDragAndDrop,
			FindTargetFacet,
			GetDragItemList,
			SetDragItemList,
			GetListFromHandler,
			SetListFromHandler,
			GetSourceFrame,
			SetSourceFrame,
			GetAttributes,
			SetAttributes,
			GetSourcePart,
			SetSourcePart,
			GetDragItemIterator,
			SetDragItemIterator,
			GetSession,
			GetStorageSystem,
			SetDragReference,
			GetPrevFacet,
			SetPrevFacet,
			GetDestFacet,
			SetDestFacet,
			GetDropResult,
			SetDropResult,
			CanvasRequested,
			Locked,
			DrawDrag,
			ProcessDragOver,
			ProcessDragLeave,
			ProcessDrop,
			GetDragOrigin,
			GetDropKeyState,
			AllocDragItemList,
			FreeDragItemList,
			CloseAllDragItems,
			SetupDropTarget,		// temporary until OLE wrapper
			DraftClosing;
	#else // PRIVATE
			// reserved01 -- Clear
			// reserved02 -- GetContentStorageUnit
			// reserved03 -- StartDrag
			// reserved04 -- ShowPasteAsDialog
			// reserved05 -- GetDragAttributes
			// reserved06 -- GetDragReference
			reserved07,
			reserved08,
			reserved09,
			reserved10,
			reserved11,
			reserved12,
			reserved13,
			reserved14,
			reserved15,
			reserved16,
			reserved17,
			reserved18,
			reserved19,
			reserved20,
			reserved21,
			reserved22,
			reserved23,
			reserved24,
			reserved25,
			reserved26,
			reserved27,
			reserved28,
			reserved29,
			reserved30,
			reserved31,
			reserved32,
			reserved33,
			reserved34,
			reserved35,
			reserved36,
			reserved37,
			reserved38,
			reserved39,
			reserved40,
			reserved41,
			reserved42;
	#endif  // PRIVATE

			majorversion = 1; minorversion = 0;
	
			passthru C_h = 
				"";

			passthru C_xh = 
		#ifdef __PRIVATE__
				""
				"class LinkedList;"
		#endif  // PRIVATE
				"";
				
		#ifdef __PRIVATE__
			passthru C_xih = 
				""
				"class LinkedList;"
				"class OpenHashTable;"
				"";
				
			ODSession					fSession;
			ODWindowState				fWindowState;
			ODStorageSystem				fStorageSystem;
			LinkedList*					fDragItemList;
			ODBoolean					fListFromHandler;
			ODDragItemIterator			fDragItemIterator;
			ODULong						fAttributes;
			ODPlatformDragReference		fDragReference;
			ODFacet						fPrevFacet;
			ODFrame						fSourceFrame;
			ODPart						fSourcePart;
			ODFacet						fDestFacet;

			ODBoolean					fHasLeftSourceFrame;
			ODBoolean					fHasLeftSourcePart;
			
			ODULong						fDropResult;
			
			OpenHashTable*				fFacetsRejected;

			ODPoint						fOrigin;
			ODULong						fKeyState;
			ODRgnHandle					fImage;						// OLE2
			ODPlatformWindow			fWnd;                       // OLE2
			ODBoolean					fDragSource;                // OLE2
			ODBoolean					fDropTarget;     	        // OLE2
			OLEPromiseKeeper			*fPromiseKeeper;            // OLE2
			ODBoolean					fNotDllVersion;             // OLE2
			ODBoolean					fDragItemsOpened;			// OLE2
			ODBoolean					fDragItemsClosed;			// OLE2
			LPWRAPIDROPTARGET			fpIDropTarget;				// temporary until OLE wrapper
			
     	#endif  // PRIVATE

	};
#endif  // __SOMIDL__

};
#endif  // _DRAGDROP_
