1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsIClipboardHelper.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 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 +#include "nsISupports.idl" 1.11 +#include "nsIClipboard.idl" 1.12 + 1.13 +%{ C++ 1.14 +#include "nsString.h" // needed for AString -> nsAString, unfortunately 1.15 +%} 1.16 + 1.17 +interface nsIDOMDocument; 1.18 + 1.19 +/** 1.20 + * helper service for common uses of nsIClipboard. 1.21 + */ 1.22 + 1.23 +[scriptable, uuid(c9d5a750-c3a8-11e1-9b21-0800200c9a66)] 1.24 +interface nsIClipboardHelper : nsISupports 1.25 +{ 1.26 + 1.27 + /** 1.28 + * copy string to given clipboard 1.29 + * 1.30 + * @param aString, the string to copy to the clipboard 1.31 + * @param aDoc, the source document for the string, if available 1.32 + * @param aClipboardID, the ID of the clipboard to copy to 1.33 + * (eg. kSelectionClipboard -- see nsIClipboard.idl) 1.34 + */ 1.35 + void copyStringToClipboard(in AString aString, in long aClipboardID, [optional] in nsIDOMDocument aDoc); 1.36 + 1.37 + /** 1.38 + * copy string to (default) clipboard 1.39 + * 1.40 + * @param aString, the string to copy to the clipboard 1.41 + * @param aDoc, the source document for the string, if available 1.42 + */ 1.43 + void copyString(in AString aString, [optional] in nsIDOMDocument aDoc); 1.44 + 1.45 +};