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"
|
|
|
|
|
|
|
|
class nsITransferable;
|
1999-03-23 15:22:03 +00:00
|
|
|
class nsIClipboardOwner;
|
|
|
|
class nsIDataFlavor;
|
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-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
|
|
|
|
|
|
|
/**
|
|
|
|
* Check to set if ant of the native data on the clipboard matches this data flavor
|
|
|
|
*
|
1999-03-31 19:53:40 +00:00
|
|
|
* @result NS_OK if if the data flavor is supported and, NS_ERROR_FAILURE is it is not
|
1999-03-23 15:22:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
NS_IMETHOD IsDataFlavorSupported(nsIDataFlavor * aDataFlavor) = 0;
|
1999-03-19 15:57:10 +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-03-19 15:57:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-03-31 19:53:40 +00:00
|
|
|
|