1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsIClipboard.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,90 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 + 1.11 +#include "nsISupports.idl" 1.12 +#include "nsITransferable.idl" 1.13 +#include "nsIClipboardOwner.idl" 1.14 + 1.15 +interface nsIArray; 1.16 + 1.17 +[scriptable, uuid(ceaa0047-647f-4b8e-ad1c-aff9fa62aa51)] 1.18 +interface nsIClipboard : nsISupports 1.19 +{ 1.20 + const long kSelectionClipboard = 0; 1.21 + const long kGlobalClipboard = 1; 1.22 + const long kFindClipboard = 2; 1.23 + 1.24 + /** 1.25 + * Given a transferable, set the data on the native clipboard 1.26 + * 1.27 + * @param aTransferable The transferable 1.28 + * @param anOwner The owner of the transferable 1.29 + * @param aWhichClipboard Specifies the clipboard to which this operation applies. 1.30 + * @result NS_Ok if no errors 1.31 + */ 1.32 + 1.33 + void setData ( in nsITransferable aTransferable, in nsIClipboardOwner anOwner, 1.34 + in long aWhichClipboard ) ; 1.35 + 1.36 + /** 1.37 + * Given a transferable, get the clipboard data. 1.38 + * 1.39 + * @param aTransferable The transferable 1.40 + * @param aWhichClipboard Specifies the clipboard to which this operation applies. 1.41 + * @result NS_Ok if no errors 1.42 + */ 1.43 + 1.44 + void getData ( in nsITransferable aTransferable, in long aWhichClipboard ) ; 1.45 + 1.46 + /** 1.47 + * This empties the clipboard and notifies the clipboard owner. 1.48 + * This empties the "logical" clipboard. It does not clear the native clipboard. 1.49 + * 1.50 + * @param aWhichClipboard Specifies the clipboard to which this operation applies. 1.51 + * @result NS_OK if successful. 1.52 + */ 1.53 + 1.54 + void emptyClipboard ( in long aWhichClipboard ) ; 1.55 + 1.56 + /** 1.57 + * This provides a way to give correct UI feedback about, for instance, a paste 1.58 + * should be allowed. It does _NOT_ actually retreive the data and should be a very 1.59 + * inexpensive call. All it does is check if there is data on the clipboard matching 1.60 + * any of the flavors in the given list. 1.61 + * 1.62 + * @param aFlavorList An array of ASCII strings. 1.63 + * @param aLength The length of the aFlavorList. 1.64 + * @param aWhichClipboard Specifies the clipboard to which this operation applies. 1.65 + * @outResult - if data is present matching one of 1.66 + * @result NS_OK if successful. 1.67 + */ 1.68 + boolean hasDataMatchingFlavors ( [array, size_is(aLength)] in string aFlavorList, 1.69 + in unsigned long aLength, 1.70 + in long aWhichClipboard ) ; 1.71 + 1.72 + /** 1.73 + * Allows clients to determine if the implementation supports the concept of a 1.74 + * separate clipboard for selection. 1.75 + * 1.76 + * @outResult - true if 1.77 + * @result NS_OK if successful. 1.78 + */ 1.79 + boolean supportsSelectionClipboard ( ) ; 1.80 + 1.81 + /** 1.82 + * Allows clients to determine if the implementation supports the concept of a 1.83 + * separate clipboard for find search strings. 1.84 + * 1.85 + * @result NS_OK if successful. 1.86 + */ 1.87 + boolean supportsFindClipboard ( ) ; 1.88 +}; 1.89 + 1.90 + 1.91 +%{ C++ 1.92 + 1.93 +%}