#ifdef __PRIVATE__
//#
//#     File:           DragDrp.idl                             ** DO NOT REMERGE WITH APPLE CODE **
//#
//#     Contains:       Definition of ODDragAndDrop
//#
//#     Written by:     Vincent Lo
//#     Ported by:      Chris Andrew
//#
//#     Copyright:      c 1994 by Apple Computer, Inc., all rights reserved.
//#                     c 1995 by Novell, Inc., all rights reserved.
//#
//#     Change History (most recent first):
//#
//#     To Do:
//#
#else
//#     Copyright:      c 1993-1994 by Apple Computer, Inc., all rights reserved.
//#                     c 1995 by Novell, Inc., all rights reserved.
#endif

#ifndef _DRAGDROP_
#define _DRAGDROP_

#ifndef _DRAGDRPB_
#include "DragDrpB.idl"
#endif

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

interface  ODDragAndDrop;

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

interface       ODSession;
interface       ODPart;
interface       ODStorageUnit;
interface       ODFacet;
interface       ODFrame;
interface       ODStorageSystem;
interface       ODWindow;
interface       ODWindowState;
interface       ODDragItemIterator;
interface       ODStorageUnitView;

#ifdef __PRIVATE__

//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken LinkedList;
typedef somToken OSErr;
typedef somToken WindowPtr;
typedef somToken FlavorType;
typedef somToken ItemReference;
typedef somToken OLEPromiseKeeper;
typedef somToken DWORD;
typedef somToken LPVOID;
typedef somToken POINTL;
#endif

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

interface ODDragAndDrop :  ODBaseDragAndDrop
{
	ODBoolean ShowPasteAsDialog(
					in              ODBoolean               canPasteLink,
					in              ODBoolean               canEmbed,
					in              ODFacet                 facet,
					in              ODTypeToken             viewType,
					in              ODStorageUnit   contentSU,
					out             ODPasteAsResult theResult);

#ifdef __PRIVATE__

	void InitDragAndDrop(in ODSession session);
	
	ODULong GetDragAttributes();
	
	ODFacet  FindTargetFacet(in  ODPlatformWindow theWindow,
							 in  ODPoint mouse,
							 out ODPoint local);
	
	
	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();
	
#endif //# __PRIVATE__


	#ifdef __SOMIDL__
	implementation
	{
		override:
			somInit,
			somUninit,
			Clear,
			GetContentStorageUnit,
			StartDrag;
			
		releaseorder:
			ShowPasteAsDialog,
			GetDragAttributes,
			MyDragTrackingHandler,
			MyReceiveDropHandler,
			MySendDataProc,
			FindTargetFacet,
		#ifdef __PRIVATE__
			InitDragAndDrop,
			CanvasRequested,
			Locked,
			DrawDrag,
			ProcessDragOver,
			ProcessDragLeave,
			ProcessDrop,
			GetDragOrigin,
			GetDropKeyState,
			AllocDragItemList,
			FreeDragItemList,
			CloseAllDragItems;
		#else
			reserved1,
			reserved2,
			reserved3,
			reserved4,
			reserved5,
			reserved6,
			reserved7,
			reserved8,
			reserved9,
			reserved10,
			reserved11;
		#endif

		majorversion = 1; minorversion = 0;
	
		#ifdef __PRIVATE__
			passthru C_xih =
				""
				"class LinkedList;"
				"";
			passthru C_xh =
				""
				"class LinkedList;"
				"#define kODdragMove           			0x00000008"
				"#define kODdragCopy           			0x00000010"
				"#define kODdragLink           			0x00000020"
				"";
			passthru C_h =
				""
				"#define kODdragMove           			0x00000008"
				"#define kODdragCopy           			0x00000010"
				"#define kODdragLink           			0x00000020"
				"";
				
			ODSession               fSession;
			ODWindowState           fWindowState;
			ODStorageSystem         fStorageSystem;
			LinkedList              *fDragItemList;
			ODBoolean               fListFromHandler;
			ODDragItemIterator  	fDragItemIterator;
			ODULong                 fAttributes;
			ODFacet                 fPrevFacet;
			ODFrame                 fSourceFrame;
			ODPart                  fSourcePart;
			ODFacet                 fDestFacet;
			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
		#endif
	};
	#endif // __SOMIDL__

};

#endif // _DRAGDROP_
