Bug 882339 - Cache the blocklist state on plugin tags to avoid querying the blocklist...
[gecko.git] / widget / nsIClipboard.idl
blob746e1a9769a1b1bb1bc64a39db84484142caf9fe
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "nsISupports.idl"
9 #include "nsITransferable.idl"
10 #include "nsIClipboardOwner.idl"
12 interface nsIArray;
14 [scriptable, uuid(38984945-8674-4d04-b786-5c0ca9434457)]
15 interface nsIClipboard : nsISupports
17 const long kSelectionClipboard = 0;
18 const long kGlobalClipboard = 1;
20 /**
21 * Given a transferable, set the data on the native clipboard
23 * @param aTransferable The transferable
24 * @param anOwner The owner of the transferable
25 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
26 * @result NS_Ok if no errors
29 void setData ( in nsITransferable aTransferable, in nsIClipboardOwner anOwner,
30 in long aWhichClipboard ) ;
32 /**
33 * Given a transferable, get the clipboard data.
35 * @param aTransferable The transferable
36 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
37 * @result NS_Ok if no errors
40 void getData ( in nsITransferable aTransferable, in long aWhichClipboard ) ;
42 /**
43 * This empties the clipboard and notifies the clipboard owner.
44 * This empties the "logical" clipboard. It does not clear the native clipboard.
46 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
47 * @result NS_OK if successful.
50 void emptyClipboard ( in long aWhichClipboard ) ;
52 /**
53 * This provides a way to give correct UI feedback about, for instance, a paste
54 * should be allowed. It does _NOT_ actually retreive the data and should be a very
55 * inexpensive call. All it does is check if there is data on the clipboard matching
56 * any of the flavors in the given list.
58 * @param aFlavorList An array of ASCII strings.
59 * @param aLength The length of the aFlavorList.
60 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
61 * @outResult - if data is present matching one of
62 * @result NS_OK if successful.
64 boolean hasDataMatchingFlavors ( [array, size_is(aLength)] in string aFlavorList,
65 in unsigned long aLength,
66 in long aWhichClipboard ) ;
68 /**
69 * Allows clients to determine if the implementation supports the concept of a
70 * separate clipboard for selection.
72 * @outResult - true if
73 * @result NS_OK if successful.
75 boolean supportsSelectionClipboard ( ) ;
79 %{ C++