2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-03-23 18:37:34 +03:00
|
|
|
|
|
|
|
#ifndef nsDragService_h__
|
|
|
|
#define nsDragService_h__
|
|
|
|
|
1999-04-17 17:49:39 +04:00
|
|
|
#include "nsBaseDragService.h"
|
2006-02-20 23:48:35 +03:00
|
|
|
#include <windows.h>
|
|
|
|
#include <shlobj.h>
|
1999-03-23 18:37:34 +03:00
|
|
|
|
1999-04-17 17:49:39 +04:00
|
|
|
struct IDataObject;
|
2002-06-14 15:28:13 +04:00
|
|
|
class nsDataObjCollection;
|
2006-02-20 23:48:35 +03:00
|
|
|
|
1999-03-23 18:37:34 +03:00
|
|
|
/**
|
|
|
|
* Native Win32 DragService wrapper
|
|
|
|
*/
|
|
|
|
|
1999-04-17 17:49:39 +04:00
|
|
|
class nsDragService : public nsBaseDragService
|
1999-03-23 18:37:34 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDragService();
|
|
|
|
virtual ~nsDragService();
|
|
|
|
|
1999-04-23 18:35:26 +04:00
|
|
|
// nsIDragService
|
2005-03-15 03:26:15 +03:00
|
|
|
NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode,
|
|
|
|
nsISupportsArray *anArrayTransferables,
|
|
|
|
nsIScriptableRegion *aRegion,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aActionType);
|
1999-05-07 23:55:00 +04:00
|
|
|
|
|
|
|
// nsIDragSession
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t anItem);
|
|
|
|
NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
|
|
|
|
NS_IMETHOD EndDragSession(bool aDoneDrag);
|
1999-03-23 18:37:34 +03:00
|
|
|
|
1999-04-23 18:35:26 +04:00
|
|
|
// native impl.
|
2005-03-15 03:26:15 +03:00
|
|
|
NS_IMETHOD SetIDataObject(IDataObject * aDataObj);
|
|
|
|
NS_IMETHOD StartInvokingDragSession(IDataObject * aDataObj,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aActionType);
|
1999-03-23 18:37:34 +03:00
|
|
|
|
2010-05-13 16:19:50 +04:00
|
|
|
// A drop occurred within the application vs. outside of it.
|
2008-09-29 00:57:33 +04:00
|
|
|
void SetDroppedLocal();
|
|
|
|
|
1999-03-23 18:37:34 +03:00
|
|
|
protected:
|
2005-03-15 03:26:15 +03:00
|
|
|
nsDataObjCollection* GetDataObjCollection(IDataObject * aDataObj);
|
2000-06-05 04:34:11 +04:00
|
|
|
|
2005-03-15 03:26:15 +03:00
|
|
|
// determine if we have a single data object or one of our private
|
|
|
|
// collections
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsCollectionObject(IDataObject* inDataObj);
|
2000-06-05 04:34:11 +04:00
|
|
|
|
2007-11-17 07:31:32 +03:00
|
|
|
// Create a bitmap for drag operations
|
2011-09-29 10:19:26 +04:00
|
|
|
bool CreateDragImage(nsIDOMNode *aDOMNode,
|
2007-11-17 07:31:32 +03:00
|
|
|
nsIScriptableRegion *aRegion,
|
|
|
|
SHDRAGIMAGE *psdi);
|
|
|
|
|
2005-03-15 03:26:15 +03:00
|
|
|
IDataObject * mDataObject;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mSentLocalDropEvent;
|
1999-03-23 18:37:34 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDragService_h__
|