changed all IIDs to use NS_DEFINE_STATIC_IID_ACCESSOR

This commit is contained in:
rods%netscape.com 1999-07-15 14:54:02 +00:00
Родитель 42f3df044b
Коммит c861cab8fb
22 изменённых файлов: 16 добавлений и 499 удалений

Просмотреть файл

@ -33,7 +33,7 @@ class nsIClipboard : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_ICLIPBOARD_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARD_IID)
/**
* Given a transferable, set the data on the native clipboard

Просмотреть файл

@ -1,46 +0,0 @@
/* -*- 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 nsIClipboardOwner_h__
#define nsIClipboardOwner_h__
#include "nsISupports.h"
class nsITransferable;
// {5A31C7A1-E122-11d2-9A57-000064657374}
#define NS_ICLIPBOARDOWNER_IID \
{ 0x5a31c7a1, 0xe122, 0x11d2, { 0x9a, 0x57, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } };
class nsIClipboardOwner : public nsISupports {
public:
/**
* Notifies the owner of the clipboard transferable that the
* transferable is being removed from the clipboard
*
* @param aTransferable The transferable
* @result NS_Ok if no errors
*/
NS_IMETHOD LosingOwnership(nsITransferable * aTransferable) = 0;
};
#endif

Просмотреть файл

@ -1,41 +0,0 @@
/* -*- 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 nsIContentConnector_h___
#define nsIContentConnector_h___
#include "nsGUIEvent.h"
class nsIContent;
// {FC41CD61-796E-11d2-BF86-00105A1B0627}
#define NS_ICONTENTCONNECTOR_IID \
{ 0xfc41cd61, 0x796e, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
class nsIContentConnector : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_ICONTENTCONNECTOR_IID; return iid; }
NS_IMETHOD SetContentRoot(nsIContent* pContent) = 0;
NS_IMETHOD_(nsEventStatus) HandleEvent(nsGUIEvent *aEvent) = 0;
};
#endif /* nsIContentConnector_h___ */

Просмотреть файл

@ -42,7 +42,7 @@ class nsIMenuListener;
class nsIContextMenu : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_ICONTEXTMENU_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTEXTMENU_IID)
/**
* Creates the context menu

Просмотреть файл

@ -35,7 +35,7 @@ class nsIDragService : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDRAGSERVICE_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSERVICE_IID)
enum {
DRAGDROP_ACTION_NONE = 0x0000,

Просмотреть файл

@ -1,116 +0,0 @@
/* -*- 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 nsIDragSession_h__
#define nsIDragSession_h__
#include "nsISupports.h"
#include "nsString.h"
class nsITransferable;
struct nsSize;
// {CBA22C53-FCCE-11d2-96D4-0060B0FB9956}
#define NS_IDRAGSESSION_IID \
{ 0xcba22c53, 0xfcce, 0x11d2, { 0x96, 0xd4, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } };
class nsIDragSession : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDRAGSESSION_IID; return iid; }
/**
* Set the current state of the drag whether it can be dropped or not.
* usually the target "frame" sets this so the native system can render the correct feedback
*
* @param aCanDrop indicates whether it can be dropped here
*/
NS_IMETHOD SetCanDrop (PRBool aCanDrop) = 0;
/**
* Retrieves whether the drag can be dropped at this location
*
* @param aCanDrop indicates whether it can be dropped here
*/
NS_IMETHOD GetCanDrop (PRBool * aCanDrop) = 0;
/**
* Sets the action (copy, move, link, et.c) for the current drag
*
* @param anAction the current action
*/
NS_IMETHOD SetDragAction (PRUint32 anAction) = 0;
/**
* Gets the action (copy, move, link, et.c) for the current drag
*
* @param anAction the current action
*/
NS_IMETHOD GetDragAction (PRUint32 * anAction) = 0;
/**
* Sets the current width and height if the drag target area.
* It will contain the current size of the Frame that the drag is currently in
*
* @param aDragTargetSize contains width/height of the current target
*/
NS_IMETHOD SetTargetSize (nsSize aDragTargetSize) = 0;
/**
* Gets the current width and height if the drag target area.
* It will contain the current size of the Frame that the drag is currently in
*
* @param aCanDrop indicates whether it can be dropped here
*/
NS_IMETHOD GetTargetSize (nsSize * aDragTargetSize) = 0;
/**
* Get data from a Drag->Drop
*
* @param aTransferable the transferable for the data to be put into
* @param aItemIndex which of multiple drag items, zero-based
*/
NS_IMETHOD GetData (nsITransferable * aTransferable, PRUint32 aItemIndex) = 0;
/**
* Get the number items that were dropped
*
* @param aNumItems the number of dropped items
*/
NS_IMETHOD GetNumDropItems (PRUint32 * aNumItems) = 0;
/**
* Check to set if ant of the native data on the clipboard matches this data flavor
*
* @result NS_OK if if the data flavor is supported and, NS_ERROR_FAILURE is it is not
*/
NS_IMETHOD IsDataFlavorSupported(nsString * aDataFlavor) = 0;
};
#endif

Просмотреть файл

@ -30,7 +30,7 @@
class nsIDragSessionMac : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDRAGSESSIONMAC_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONMAC_IID)
/**
* Since the drag may originate in an external application, we need some way of

Просмотреть файл

@ -48,8 +48,7 @@ enum nsFileDlgResults {
class nsIFileDialogsMgr : public nsISupports
{
public:
static const nsIID& GetIID()
{ static nsIID iid = NS_IFILEDIALOGSMGR_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEDIALOGSMGR_IID)
NS_IMETHOD GetFile(
nsFileSpec & theFileSpec, // Populate with initial path for file dialog

Просмотреть файл

@ -1,54 +0,0 @@
/* -*- 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 nsIFileListTransferable_h__
#define nsIFileListTransferable_h__
#include "nsISupports.h"
#include "nsString.h"
class nsVoidArray;
#define FileListMime "filelist"
// {E93E73B1-0197-11d3-96D4-0060B0FB9956}
#define NS_IFILELISTTRANSFERABLE_IID \
{ 0xe93e73b1, 0x197, 0x11d3, { 0x96, 0xd4, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } }
class nsIFileListTransferable : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFILELISTTRANSFERABLE_IID; return iid; }
/**
* Copies the list of nsFileSpecs items from aFileList to the internal data member
*
*/
NS_IMETHOD SetFileList(nsVoidArray * aFileList) = 0;
/**
* Copies the list of nsFileSpecs items from the internal data member to the
* aFileList nsVoidArray
*
*/
NS_IMETHOD GetFileList(nsVoidArray * aFileList) = 0;
};
#endif

Просмотреть файл

@ -31,7 +31,7 @@ class nsIFontNameIterator : public nsISupports
// with C++ objects as standard iterators.
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFONTNAMEITERATOR_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFONTNAMEITERATOR_IID)
NS_IMETHOD Reset() = 0;
// does not need to be called initially, returns iterator to initial state

Просмотреть файл

@ -33,7 +33,7 @@ class nsIFontRetrieverService : public nsISupports
// This (singleton) service exists soley as a factory to manufacture iterators
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFONTRETRIEVERSERVICE_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFONTRETRIEVERSERVICE_IID)
NS_IMETHOD CreateFontNameIterator( nsIFontNameIterator** aIterator ) = 0;

Просмотреть файл

@ -31,7 +31,7 @@ class nsIFontSizeIterator : public nsISupports
// |Get| and |Advance| are distinct to facility wrapping with C++ objects as standard iterators.
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFONTSIZEITERATOR_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFONTSIZEITERATOR_IID)
NS_IMETHOD Reset() = 0;
// does not need to be called initially, returns iterator to initial state

Просмотреть файл

@ -1,78 +0,0 @@
/* -*- 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 nsIFormatConverter_h__
#define nsIFormatConverter_h__
#include "nsISupports.h"
#include "nsString.h"
class nsVoidArray;
// {948A0023-E3A7-11d2-96CF-0060B0FB9956}
#define NS_IFORMATCONVERTER_IID \
{ 0x948a0023, 0xe3a7, 0x11d2, { 0x96, 0xcf, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } }
class nsIFormatConverter : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IFORMATCONVERTER_IID; return iid; }
/**
* Get the list of the "input" data flavors, in otherwords, the flavors
* that this converter can convert "from" (the incoming data to the converter)
*
* @param aDataFlavorList fills list with supported flavors
*/
NS_IMETHOD GetInputDataFlavors(nsVoidArray ** aDataFlavorList) = 0;
/**
* Get the list of the "output" data flavors, in otherwords, the flavors
* that this converter can convert "to" (the outgoing data of the converter)
*
* @param aDataFlavorList fills list with supported flavors
*/
NS_IMETHOD GetOutputDataFlavors(nsVoidArray ** aDataFlavorList) = 0;
/**
* Determines whether a converion from one flavor to another is supported
*
* @param aFromFormatConverter flavor to convert from
* @param aFromFormatConverter flavor to convert to
* @returns returns NS_OK if it can be converted
*/
NS_IMETHOD CanConvert(nsString * aFromDataFlavor, nsString * aToDataFlavor) = 0;
/**
* Determines whether a converion from one flavor to another
*
* @param aFromFormatConverter flavor to convert from
* @param aFromFormatConverter flavor to convert to (destination own the memory)
* @returns returns NS_OK if it was converted
*/
NS_IMETHOD Convert(nsString * aFromDataFlavor, void * aFromData, PRUint32 aDataLen,
nsString * aToDataFlavor, void ** aToData, PRUint32 * aDataToLen) = 0;
};
#endif

Просмотреть файл

@ -43,8 +43,7 @@
class nsIKeyBindMgr : public nsISupports
{
public:
static const nsIID& GetIID()
{ static nsIID iid = NS_IKEYBINDMGR_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IKEYBINDMGR_IID)
NS_IMETHOD ProcessKeyEvent(
nsIDOMDocument * domDoc,

Просмотреть файл

@ -30,7 +30,7 @@
class nsILookAndFeel: public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_ILOOKANDFEEL_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOOKANDFEEL_IID)
typedef enum {
eColor_WindowBackground,

Просмотреть файл

@ -42,7 +42,7 @@ class nsIMenuListener;
class nsIMenu : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IMENU_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMENU_IID)
/**
* Creates the Menu

Просмотреть файл

@ -37,7 +37,7 @@ class nsIWidget;
class nsIMenuBar : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IMENUBAR_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMENUBAR_IID)
/**
* Creates the MenuBar

Просмотреть файл

@ -50,7 +50,7 @@ enum {
class nsIMenuItem : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IMENUITEM_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMENUITEM_IID)
/**
* Creates the MenuItem

Просмотреть файл

@ -40,7 +40,7 @@ static NS_DEFINE_IID(kIMenuListenerIID, NS_IMENULISTENER_IID);
class nsIMenuListener : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IMENULISTENER_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMENULISTENER_IID)
/**
* Processes a menu item selected event

Просмотреть файл

@ -37,7 +37,7 @@ class nsIWidget;
class nsIPopUpMenu : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IPOPUPMENU_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPOPUPMENU_IID)
/**
* Creates the PopUpMenu

Просмотреть файл

@ -1,146 +0,0 @@
/* -*- 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 nsITransferable_h__
#define nsITransferable_h__
#include "nsISupports.h"
#include "nsString.h"
class nsString;
class nsVoidArray;
class nsIFormatConverter;
#define kTextMime "text/plain"
#define kXIFMime "text/xif"
#define kUnicodeMime "text/unicode"
#define kHTMLMime "text/html"
#define kAOLMailMime "AOLMAIL"
#define kPNGImageMime "image/png"
#define kJPEGImageMime "image/jpg"
#define kGIFImageMime "image/gif"
#define kDropFilesMime "text/dropfiles"
// {8B5314BC-DB01-11d2-96CE-0060B0FB9956}
#define NS_ITRANSFERABLE_IID \
{ 0x8b5314bc, 0xdb01, 0x11d2, { 0x96, 0xce, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } }
class nsITransferable : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_ITRANSFERABLE_IID; return iid; }
/**
* Computes a list of flavors that the transferable can export, either through
* intrinsic knowledge or output data converters.
*
* @param aDataFlavorList fills list with supported flavors. This is a copy of
* the internal list, so it may be edited w/out affecting the transferable.
*/
NS_IMETHOD FlavorsTransferableCanExport ( nsVoidArray** outFlavorList ) = 0;
/**
* Get the list of data flavors that this transferable supports (w/out conversion).
* (NOTE: We're not sure how useful this is in the presence of the above two methods,
* but figured we'd keep it around just in case).
*
* @param aDataFlavorList fills list with supported flavors. This is a copy of
* the internal list, so it may be edited w/out affecting the transferable.
*/
NS_IMETHOD GetTransferDataFlavors(nsVoidArray ** aDataFlavorList) = 0;
/**
* Given a flavor retrieve the data.
*
* @param aFlavor (in parameter) the flavor of data to retrieve
* @param aData the data. This is NOT a copy, so the caller MUST NOT DELETE it.
* @param aDataLen the length of the data
*/
NS_IMETHOD GetTransferData(nsString * aFlavor, void ** aData, PRUint32 * aDataLen) = 0;
/**
* Given a flavor retrieve the data.
*
* @param aFlavor (out parameter) the flavor of data that was retrieved
* @param aData the data. This is NOT a copy, so the caller MUST NOT DELETE it.
* @param aDataLen the length of the data
*/
NS_IMETHOD GetAnyTransferData(nsString * aFlavor, void ** aData, PRUint32 * aDataLen) = 0;
/**
* Returns PR_TRUE if the data is large.
*
*/
NS_IMETHOD_(PRBool) IsLargeDataSet() = 0;
///////////////////////////////
// Setter part of interface
///////////////////////////////
/**
* Computes a list of flavors that the transferable can accept into it, either through
* intrinsic knowledge or input data converters.
*
* @param outFlavorList fills list with supported flavors. This is a copy of
* the internal list, so it may be edited w/out affecting the transferable.
*/
NS_IMETHOD FlavorsTransferableCanImport ( nsVoidArray** outFlavorList ) = 0;
/**
* Gets the data from the transferable as a specified DataFlavor. The transferable still
* owns the data, so the caller must NOT delete it.
*
* @param aFlavor the flavor of data that is being set
* @param aData the data
* @param aDataLen the length of the data
*/
NS_IMETHOD SetTransferData(nsString * aFlavor, void * aData, PRUint32 aDataLen) = 0;
/**
* Add the data flavor, indicating that this transferable
* can receive this type of flavor
*
* @param aDataFlavor a new data flavor to handle
*/
NS_IMETHOD AddDataFlavor(nsString * aDataFlavor) = 0;
/**
* Removes the data flavor by MIME name (NOT by pointer addr)
*
* @param aDataFlavor a data flavor to remove
*/
NS_IMETHOD RemoveDataFlavor(nsString * aDataFlavor) = 0;
/**
* Sets the converter for this transferable
*
*/
NS_IMETHOD SetConverter(nsIFormatConverter * aConverter) = 0;
/**
* Gets the converter for this transferable
*
*/
NS_IMETHOD GetConverter(nsIFormatConverter ** aConverter) = 0;
};
#endif

Просмотреть файл

@ -150,7 +150,7 @@ class nsIWidget : public nsISupports {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IWIDGET_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWIDGET_IID)
/**
* Create and initialize a widget.