michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsDragService_h_ michael@0: #define nsDragService_h_ michael@0: michael@0: #include "nsBaseDragService.h" michael@0: michael@0: #include michael@0: michael@0: extern NSString* const kWildcardPboardType; michael@0: extern NSString* const kCorePboardType_url; michael@0: extern NSString* const kCorePboardType_urld; michael@0: extern NSString* const kCorePboardType_urln; michael@0: michael@0: class nsDragService : public nsBaseDragService michael@0: { michael@0: public: michael@0: nsDragService(); michael@0: virtual ~nsDragService(); michael@0: michael@0: // nsIDragService michael@0: NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables, michael@0: nsIScriptableRegion * aRegion, uint32_t aActionType); michael@0: NS_IMETHOD EndDragSession(bool aDoneDrag); michael@0: michael@0: // nsIDragSession michael@0: NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t aItemIndex); michael@0: NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval); michael@0: NS_IMETHOD GetNumDropItems(uint32_t * aNumItems); michael@0: michael@0: private: michael@0: michael@0: NSImage* ConstructDragImage(nsIDOMNode* aDOMNode, michael@0: nsIntRect* aDragRect, michael@0: nsIScriptableRegion* aRegion); michael@0: michael@0: nsCOMPtr mDataItems; // only valid for a drag started within gecko michael@0: NSView* mNativeDragView; michael@0: NSEvent* mNativeDragEvent; michael@0: }; michael@0: michael@0: #endif // nsDragService_h_