widget/nsIClipboard.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7
michael@0 8 #include "nsISupports.idl"
michael@0 9 #include "nsITransferable.idl"
michael@0 10 #include "nsIClipboardOwner.idl"
michael@0 11
michael@0 12 interface nsIArray;
michael@0 13
michael@0 14 [scriptable, uuid(ceaa0047-647f-4b8e-ad1c-aff9fa62aa51)]
michael@0 15 interface nsIClipboard : nsISupports
michael@0 16 {
michael@0 17 const long kSelectionClipboard = 0;
michael@0 18 const long kGlobalClipboard = 1;
michael@0 19 const long kFindClipboard = 2;
michael@0 20
michael@0 21 /**
michael@0 22 * Given a transferable, set the data on the native clipboard
michael@0 23 *
michael@0 24 * @param aTransferable The transferable
michael@0 25 * @param anOwner The owner of the transferable
michael@0 26 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
michael@0 27 * @result NS_Ok if no errors
michael@0 28 */
michael@0 29
michael@0 30 void setData ( in nsITransferable aTransferable, in nsIClipboardOwner anOwner,
michael@0 31 in long aWhichClipboard ) ;
michael@0 32
michael@0 33 /**
michael@0 34 * Given a transferable, get the clipboard data.
michael@0 35 *
michael@0 36 * @param aTransferable The transferable
michael@0 37 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
michael@0 38 * @result NS_Ok if no errors
michael@0 39 */
michael@0 40
michael@0 41 void getData ( in nsITransferable aTransferable, in long aWhichClipboard ) ;
michael@0 42
michael@0 43 /**
michael@0 44 * This empties the clipboard and notifies the clipboard owner.
michael@0 45 * This empties the "logical" clipboard. It does not clear the native clipboard.
michael@0 46 *
michael@0 47 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
michael@0 48 * @result NS_OK if successful.
michael@0 49 */
michael@0 50
michael@0 51 void emptyClipboard ( in long aWhichClipboard ) ;
michael@0 52
michael@0 53 /**
michael@0 54 * This provides a way to give correct UI feedback about, for instance, a paste
michael@0 55 * should be allowed. It does _NOT_ actually retreive the data and should be a very
michael@0 56 * inexpensive call. All it does is check if there is data on the clipboard matching
michael@0 57 * any of the flavors in the given list.
michael@0 58 *
michael@0 59 * @param aFlavorList An array of ASCII strings.
michael@0 60 * @param aLength The length of the aFlavorList.
michael@0 61 * @param aWhichClipboard Specifies the clipboard to which this operation applies.
michael@0 62 * @outResult - if data is present matching one of
michael@0 63 * @result NS_OK if successful.
michael@0 64 */
michael@0 65 boolean hasDataMatchingFlavors ( [array, size_is(aLength)] in string aFlavorList,
michael@0 66 in unsigned long aLength,
michael@0 67 in long aWhichClipboard ) ;
michael@0 68
michael@0 69 /**
michael@0 70 * Allows clients to determine if the implementation supports the concept of a
michael@0 71 * separate clipboard for selection.
michael@0 72 *
michael@0 73 * @outResult - true if
michael@0 74 * @result NS_OK if successful.
michael@0 75 */
michael@0 76 boolean supportsSelectionClipboard ( ) ;
michael@0 77
michael@0 78 /**
michael@0 79 * Allows clients to determine if the implementation supports the concept of a
michael@0 80 * separate clipboard for find search strings.
michael@0 81 *
michael@0 82 * @result NS_OK if successful.
michael@0 83 */
michael@0 84 boolean supportsFindClipboard ( ) ;
michael@0 85 };
michael@0 86
michael@0 87
michael@0 88 %{ C++
michael@0 89
michael@0 90 %}

mercurial