2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsDragService_h_
|
|
|
|
#define nsDragService_h_
|
|
|
|
|
|
|
|
#include "nsBaseDragService.h"
|
|
|
|
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
|
2007-05-28 22:06:12 -07:00
|
|
|
extern NSString* const kWildcardPboardType;
|
2007-09-24 15:41:10 -07:00
|
|
|
extern NSString* const kCorePboardType_url;
|
2007-09-27 18:50:09 -07:00
|
|
|
extern NSString* const kCorePboardType_urld;
|
2007-09-24 15:41:10 -07:00
|
|
|
extern NSString* const kCorePboardType_urln;
|
2007-05-28 22:06:12 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
class nsDragService : public nsBaseDragService
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDragService();
|
|
|
|
virtual ~nsDragService();
|
|
|
|
|
|
|
|
// nsIDragService
|
|
|
|
NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables,
|
2012-08-22 08:56:38 -07:00
|
|
|
nsIScriptableRegion * aRegion, uint32_t aActionType);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD EndDragSession(bool aDoneDrag);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// nsIDragSession
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t aItemIndex);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
NSImage* ConstructDragImage(nsIDOMNode* aDOMNode,
|
2009-01-14 19:27:09 -08:00
|
|
|
nsIntRect* aDragRect,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIScriptableRegion* aRegion);
|
2007-06-28 12:20:12 -07:00
|
|
|
|
|
|
|
nsCOMPtr<nsISupportsArray> mDataItems; // only valid for a drag started within gecko
|
2007-09-23 17:01:04 -07:00
|
|
|
NSView* mNativeDragView;
|
|
|
|
NSEvent* mNativeDragEvent;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDragService_h_
|