1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsDragService_h__
6 #define nsDragService_h__
8 #include "nsBaseDragService.h"
9 #include "nsIDragSessionOS2.h"
14 // forward declarations
17 class nsISupportsString
;
19 class nsDragService
: public nsBaseDragService
, public nsIDragSessionOS2
23 virtual ~nsDragService();
25 NS_DECL_ISUPPORTS_INHERITED
28 NS_IMETHOD
InvokeDragSession (nsIDOMNode
* aDOMNode
,
29 nsISupportsArray
* aTransferables
,
30 nsIScriptableRegion
* aRegion
,
31 uint32_t aActionType
);
32 NS_IMETHOD
StartDragSession();
33 NS_IMETHOD
EndDragSession(bool aDoneDrag
);
36 NS_IMETHOD
GetNumDropItems(uint32_t* aNumDropItems
);
37 NS_IMETHOD
GetData(nsITransferable
* aTransferable
, uint32_t aItemIndex
);
38 NS_IMETHOD
IsDataFlavorSupported(const char* aDataFlavor
, bool* _retval
);
41 NS_IMETHOD
DragOverMsg(PDRAGINFO pdinfo
, MRESULT
& mr
, uint32_t* dragFlags
);
42 NS_IMETHOD
GetDragoverResult(MRESULT
& mr
);
43 NS_IMETHOD
DragLeaveMsg(PDRAGINFO pdinfo
, uint32_t* dragFlags
);
44 NS_IMETHOD
DropHelpMsg(PDRAGINFO pdinfo
, uint32_t* dragFlags
);
45 NS_IMETHOD
ExitSession(uint32_t* dragFlags
);
46 NS_IMETHOD
DropMsg(PDRAGINFO pdinfo
, HWND hwnd
, uint32_t* dragFlags
);
47 NS_IMETHOD
RenderCompleteMsg(PDRAGTRANSFER pdxfer
, USHORT usResult
,
52 NS_IMETHOD
NativeDragEnter(PDRAGINFO pdinfo
);
53 NS_IMETHOD
NativeDrop(PDRAGINFO pdinfo
, HWND hwnd
, bool* rendering
);
54 NS_IMETHOD
NativeRenderComplete(PDRAGTRANSFER pdxfer
, USHORT usResult
);
55 NS_IMETHOD
NativeDataToTransferable( PCSZ pszText
, PCSZ pszTitle
,
58 nsresult
SaveAsContents(PCSZ szDest
, nsIURL
* aURL
);
59 nsresult
SaveAsURL(PCSZ szDest
, nsIURI
* aURI
);
60 nsresult
SaveAsText(PCSZ szDest
, nsISupportsString
* aString
);
61 nsresult
GetUrlAndTitle(nsISupports
* aGenericData
, char** aTargetName
);
62 nsresult
GetUniTextTitle(nsISupports
* aGenericData
, char** aTargetName
);
65 const char* mMimeType
;
66 nsCOMPtr
<nsISupportsArray
> mSourceDataItems
;
67 nsCOMPtr
<nsISupports
> mSourceData
;
69 friend MRESULT EXPENTRY
nsDragWindowProc( HWND
, ULONG
, MPARAM
, MPARAM
);
72 #endif // nsDragService_h__