michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsITransferable.idl" michael@0: #include "nsIClipboardOwner.idl" michael@0: michael@0: interface nsIArray; michael@0: michael@0: [scriptable, uuid(ceaa0047-647f-4b8e-ad1c-aff9fa62aa51)] michael@0: interface nsIClipboard : nsISupports michael@0: { michael@0: const long kSelectionClipboard = 0; michael@0: const long kGlobalClipboard = 1; michael@0: const long kFindClipboard = 2; michael@0: michael@0: /** michael@0: * Given a transferable, set the data on the native clipboard michael@0: * michael@0: * @param aTransferable The transferable michael@0: * @param anOwner The owner of the transferable michael@0: * @param aWhichClipboard Specifies the clipboard to which this operation applies. michael@0: * @result NS_Ok if no errors michael@0: */ michael@0: michael@0: void setData ( in nsITransferable aTransferable, in nsIClipboardOwner anOwner, michael@0: in long aWhichClipboard ) ; michael@0: michael@0: /** michael@0: * Given a transferable, get the clipboard data. michael@0: * michael@0: * @param aTransferable The transferable michael@0: * @param aWhichClipboard Specifies the clipboard to which this operation applies. michael@0: * @result NS_Ok if no errors michael@0: */ michael@0: michael@0: void getData ( in nsITransferable aTransferable, in long aWhichClipboard ) ; michael@0: michael@0: /** michael@0: * This empties the clipboard and notifies the clipboard owner. michael@0: * This empties the "logical" clipboard. It does not clear the native clipboard. michael@0: * michael@0: * @param aWhichClipboard Specifies the clipboard to which this operation applies. michael@0: * @result NS_OK if successful. michael@0: */ michael@0: michael@0: void emptyClipboard ( in long aWhichClipboard ) ; michael@0: michael@0: /** michael@0: * This provides a way to give correct UI feedback about, for instance, a paste michael@0: * should be allowed. It does _NOT_ actually retreive the data and should be a very michael@0: * inexpensive call. All it does is check if there is data on the clipboard matching michael@0: * any of the flavors in the given list. michael@0: * michael@0: * @param aFlavorList An array of ASCII strings. michael@0: * @param aLength The length of the aFlavorList. michael@0: * @param aWhichClipboard Specifies the clipboard to which this operation applies. michael@0: * @outResult - if data is present matching one of michael@0: * @result NS_OK if successful. michael@0: */ michael@0: boolean hasDataMatchingFlavors ( [array, size_is(aLength)] in string aFlavorList, michael@0: in unsigned long aLength, michael@0: in long aWhichClipboard ) ; michael@0: michael@0: /** michael@0: * Allows clients to determine if the implementation supports the concept of a michael@0: * separate clipboard for selection. michael@0: * michael@0: * @outResult - true if michael@0: * @result NS_OK if successful. michael@0: */ michael@0: boolean supportsSelectionClipboard ( ) ; michael@0: michael@0: /** michael@0: * Allows clients to determine if the implementation supports the concept of a michael@0: * separate clipboard for find search strings. michael@0: * michael@0: * @result NS_OK if successful. michael@0: */ michael@0: boolean supportsFindClipboard ( ) ; michael@0: }; michael@0: michael@0: michael@0: %{ C++ michael@0: michael@0: %}