widget/cocoa/nsDragService.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsDragService_h_
     7 #define nsDragService_h_
     9 #include "nsBaseDragService.h"
    11 #include <Cocoa/Cocoa.h>
    13 extern NSString* const kWildcardPboardType;
    14 extern NSString* const kCorePboardType_url;
    15 extern NSString* const kCorePboardType_urld;
    16 extern NSString* const kCorePboardType_urln;
    18 class nsDragService : public nsBaseDragService
    19 {
    20 public:
    21   nsDragService();
    22   virtual ~nsDragService();
    24   // nsIDragService
    25   NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables,
    26                                nsIScriptableRegion * aRegion, uint32_t aActionType);
    27   NS_IMETHOD EndDragSession(bool aDoneDrag);
    29   // nsIDragSession
    30   NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t aItemIndex);
    31   NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
    32   NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
    34 private:
    36   NSImage* ConstructDragImage(nsIDOMNode* aDOMNode,
    37                               nsIntRect* aDragRect,
    38                               nsIScriptableRegion* aRegion);
    40   nsCOMPtr<nsISupportsArray> mDataItems; // only valid for a drag started within gecko
    41   NSView* mNativeDragView;
    42   NSEvent* mNativeDragEvent;
    43 };
    45 #endif // nsDragService_h_

mercurial