1999-03-19 15:57:10 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
|
|
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* NPL.
|
|
|
|
*
|
|
|
|
* The Initial Developer of this code under the NPL is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
|
|
* Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsIClipboard_h__
|
|
|
|
#define nsIClipboard_h__
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
1999-05-13 21:53:57 +00:00
|
|
|
#include "nsString.h"
|
1999-03-19 15:57:10 +00:00
|
|
|
|
1999-09-01 20:14:48 +00:00
|
|
|
class nsISupportsArray;
|
1999-03-19 15:57:10 +00:00
|
|
|
class nsITransferable;
|
1999-03-23 15:22:03 +00:00
|
|
|
class nsIClipboardOwner;
|
1999-03-19 15:57:10 +00:00
|
|
|
|
|
|
|
// {8B5314BA-DB01-11d2-96CE-0060B0FB9956}
|
|
|
|
#define NS_ICLIPBOARD_IID \
|
|
|
|
{ 0x8b5314ba, 0xdb01, 0x11d2, { 0x96, 0xce, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } }
|
|
|
|
|
|
|
|
class nsIClipboard : public nsISupports {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
1999-07-15 14:54:02 +00:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARD_IID)
|
1999-04-02 00:06:37 +00:00
|
|
|
|
1999-03-19 15:57:10 +00:00
|
|
|
/**
|
1999-03-25 23:22:01 +00:00
|
|
|
* Given a transferable, set the data on the native clipboard
|
1999-03-19 15:57:10 +00:00
|
|
|
*
|
|
|
|
* @param aTransferable The transferable
|
1999-03-23 15:22:03 +00:00
|
|
|
* @param anOwner The owner of the transferable
|
1999-03-19 15:57:10 +00:00
|
|
|
* @result NS_Ok if no errors
|
|
|
|
*/
|
|
|
|
|
1999-03-25 23:22:01 +00:00
|
|
|
NS_IMETHOD SetData(nsITransferable * aTransferable, nsIClipboardOwner * anOwner) = 0;
|
1999-03-19 15:57:10 +00:00
|
|
|
|
1999-03-23 21:25:12 +00:00
|
|
|
/**
|
1999-03-25 23:22:01 +00:00
|
|
|
* Given a transferable, get the clipboard data.
|
1999-03-23 21:25:12 +00:00
|
|
|
*
|
|
|
|
* @param aTransferable The transferable
|
|
|
|
* @result NS_Ok if no errors
|
|
|
|
*/
|
|
|
|
|
1999-03-26 15:45:04 +00:00
|
|
|
NS_IMETHOD GetData(nsITransferable * aTransferable) = 0;
|
1999-03-23 15:22:03 +00:00
|
|
|
|
1999-03-23 21:25:12 +00:00
|
|
|
/**
|
|
|
|
* This empties the clipboard and notifies the clipboard owner
|
|
|
|
* This empties the "logical" clipboard it does not clear the native clipboard
|
|
|
|
*
|
1999-03-31 19:53:40 +00:00
|
|
|
* @result NS_OK if successful.
|
1999-03-23 21:25:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
NS_IMETHOD EmptyClipboard() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Some platforms support deferred notification for putting data on the clipboard
|
|
|
|
* This method forces the data onto the clipboard in its various formats
|
|
|
|
* This may be used if the application going away.
|
|
|
|
*
|
1999-03-31 19:53:40 +00:00
|
|
|
* @result NS_OK if successful.
|
1999-03-23 21:25:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
NS_IMETHOD ForceDataToClipboard() = 0;
|
|
|
|
|
1999-09-01 20:14:48 +00:00
|
|
|
/**
|
|
|
|
* This provides a way to give correct UI feedback about, for instance, a paste
|
|
|
|
* should be allowed. It does _NOT_ actually retreive the data and should be a very
|
|
|
|
* inexpensive call. All it does is check if there is data on the clipboard matching
|
|
|
|
* any of the flavors in the given list.
|
|
|
|
*
|
|
|
|
* @aFlavorList - nsISupportsString's in a nsISupportsArray (for JavaScript).
|
|
|
|
* @outResult - if data is present matching one of
|
|
|
|
* @result NS_OK if successful.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRBool * outResult ) = 0 ;
|
|
|
|
|
1999-03-19 15:57:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-03-31 19:53:40 +00:00
|
|
|
|