widget/cocoa/nsClipboard.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial