Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 nsClipboard_h_ |
michael@0 | 7 | #define nsClipboard_h_ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsBaseClipboard.h" |
michael@0 | 10 | #include "nsXPIDLString.h" |
michael@0 | 11 | |
michael@0 | 12 | #import <Cocoa/Cocoa.h> |
michael@0 | 13 | |
michael@0 | 14 | class nsITransferable; |
michael@0 | 15 | |
michael@0 | 16 | class nsClipboard : public nsBaseClipboard |
michael@0 | 17 | { |
michael@0 | 18 | |
michael@0 | 19 | public: |
michael@0 | 20 | nsClipboard(); |
michael@0 | 21 | virtual ~nsClipboard(); |
michael@0 | 22 | |
michael@0 | 23 | // nsIClipboard |
michael@0 | 24 | NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, uint32_t aLength, |
michael@0 | 25 | int32_t aWhichClipboard, bool *_retval); |
michael@0 | 26 | NS_IMETHOD SupportsFindClipboard(bool *_retval); |
michael@0 | 27 | |
michael@0 | 28 | // Helper methods, used also by nsDragService |
michael@0 | 29 | static NSDictionary* PasteboardDictFromTransferable(nsITransferable *aTransferable); |
michael@0 | 30 | static bool IsStringType(const nsCString& aMIMEType, NSString** aPasteboardType); |
michael@0 | 31 | static NSString* WrapHtmlForSystemPasteboard(NSString* aString); |
michael@0 | 32 | static nsresult TransferableFromPasteboard(nsITransferable *aTransferable, NSPasteboard *pboard); |
michael@0 | 33 | |
michael@0 | 34 | protected: |
michael@0 | 35 | |
michael@0 | 36 | // impelement the native clipboard behavior |
michael@0 | 37 | NS_IMETHOD SetNativeClipboardData(int32_t aWhichClipboard); |
michael@0 | 38 | NS_IMETHOD GetNativeClipboardData(nsITransferable * aTransferable, int32_t aWhichClipboard); |
michael@0 | 39 | |
michael@0 | 40 | private: |
michael@0 | 41 | int32_t mCachedClipboard; |
michael@0 | 42 | int32_t mChangeCount; // Set to the native change count after any modification of the clipboard. |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | #endif // nsClipboard_h_ |