widget/windows/nsDragService.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsDragService_h__
michael@0 7 #define nsDragService_h__
michael@0 8
michael@0 9 #include "nsBaseDragService.h"
michael@0 10 #include <windows.h>
michael@0 11 #include <shlobj.h>
michael@0 12
michael@0 13 struct IDropSource;
michael@0 14 struct IDataObject;
michael@0 15 class nsNativeDragTarget;
michael@0 16 class nsDataObjCollection;
michael@0 17 class nsString;
michael@0 18
michael@0 19 /**
michael@0 20 * Native Win32 DragService wrapper
michael@0 21 */
michael@0 22
michael@0 23 class nsDragService : public nsBaseDragService
michael@0 24 {
michael@0 25 public:
michael@0 26 nsDragService();
michael@0 27 virtual ~nsDragService();
michael@0 28
michael@0 29 // nsIDragService
michael@0 30 NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode,
michael@0 31 nsISupportsArray *anArrayTransferables,
michael@0 32 nsIScriptableRegion *aRegion,
michael@0 33 uint32_t aActionType);
michael@0 34
michael@0 35 // nsIDragSession
michael@0 36 NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t anItem);
michael@0 37 NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
michael@0 38 NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
michael@0 39 NS_IMETHOD EndDragSession(bool aDoneDrag);
michael@0 40
michael@0 41 // native impl.
michael@0 42 NS_IMETHOD SetIDataObject(IDataObject * aDataObj);
michael@0 43 NS_IMETHOD StartInvokingDragSession(IDataObject * aDataObj,
michael@0 44 uint32_t aActionType);
michael@0 45
michael@0 46 // A drop occurred within the application vs. outside of it.
michael@0 47 void SetDroppedLocal();
michael@0 48
michael@0 49 protected:
michael@0 50 nsDataObjCollection* GetDataObjCollection(IDataObject * aDataObj);
michael@0 51
michael@0 52 // determine if we have a single data object or one of our private
michael@0 53 // collections
michael@0 54 bool IsCollectionObject(IDataObject* inDataObj);
michael@0 55
michael@0 56 // Create a bitmap for drag operations
michael@0 57 bool CreateDragImage(nsIDOMNode *aDOMNode,
michael@0 58 nsIScriptableRegion *aRegion,
michael@0 59 SHDRAGIMAGE *psdi);
michael@0 60
michael@0 61 IDataObject * mDataObject;
michael@0 62 bool mSentLocalDropEvent;
michael@0 63 };
michael@0 64
michael@0 65 #endif // nsDragService_h__

mercurial