Replace uses of deprecated NS_IMPL_ISUPPORTS and NS_IMPL_QUERYINTERFACE macros with NS_IMPL_{ISUPPORTS,QUERYINTERFACE}{1,0}. r=jag rs=brendan b=45797

This commit is contained in:
dbaron%fas.harvard.edu 2001-08-21 01:48:11 +00:00
parent 76c2f631f2
commit 113ad642ae
210 changed files with 239 additions and 460 deletions

View File

@ -68,7 +68,7 @@ nsSecurityNameSet::~nsSecurityNameSet()
{
}
NS_IMPL_ISUPPORTS(nsSecurityNameSet, NS_GET_IID(nsIScriptExternalNameSet));
NS_IMPL_ISUPPORTS1(nsSecurityNameSet, nsIScriptExternalNameSet)
static char *
getStringArgument(JSContext *cx, JSObject *obj, PRUint16 argNum, uintN argc, jsval *argv)

View File

@ -200,7 +200,7 @@ NameSpaceImpl::~NameSpaceImpl()
NS_IF_RELEASE(mPrefix);
}
NS_IMPL_ISUPPORTS(NameSpaceImpl, NS_GET_IID(nsINameSpace))
NS_IMPL_ISUPPORTS1(NameSpaceImpl, nsINameSpace)
NS_IMETHODIMP
NameSpaceImpl::GetNameSpaceManager(nsINameSpaceManager*& aManager) const
@ -364,7 +364,7 @@ NameSpaceManagerImpl::~NameSpaceManagerImpl()
ReleaseTable();
}
NS_IMPL_ISUPPORTS(NameSpaceManagerImpl, NS_GET_IID(nsINameSpaceManager))
NS_IMPL_ISUPPORTS1(NameSpaceManagerImpl, nsINameSpaceManager)
NS_IMETHODIMP
NameSpaceManagerImpl::CreateRootNameSpace(nsINameSpace*& aRootNameSpace)

View File

@ -321,7 +321,7 @@ StyleSetImpl::~StyleSetImpl()
}
#ifndef MOZ_PERF_METRICS
NS_IMPL_ISUPPORTS(StyleSetImpl, NS_GET_IID(nsIStyleSet))
NS_IMPL_ISUPPORTS1(StyleSetImpl, nsIStyleSet)
#else
NS_IMPL_ISUPPORTS2(StyleSetImpl, nsIStyleSet, nsITimeRecorder)
#endif

View File

@ -244,7 +244,7 @@ BodyRule::~BodyRule()
{
}
NS_IMPL_ISUPPORTS(BodyRule, NS_GET_IID(nsIStyleRule));
NS_IMPL_ISUPPORTS1(BodyRule, nsIStyleRule)
NS_IMETHODIMP
BodyRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const

View File

@ -1192,7 +1192,7 @@ CSSDeclarationImpl::~CSSDeclarationImpl(void)
#endif
}
NS_IMPL_ISUPPORTS(CSSDeclarationImpl, NS_GET_IID(nsICSSDeclaration));
NS_IMPL_ISUPPORTS1(CSSDeclarationImpl, nsICSSDeclaration)
#define CSS_IF_GET_ELSE(sid,ptr,result) \
if (sid.Equals(kCSS##ptr##SID)) { *result = m##ptr; } else

View File

@ -499,7 +499,7 @@ CSSLoaderImpl::~CSSLoaderImpl(void)
mSheetMapTable.Enumerate(DeleteSheetMap);
}
NS_IMPL_ISUPPORTS(CSSLoaderImpl, NS_GET_IID(nsICSSLoader))
NS_IMPL_ISUPPORTS1(CSSLoaderImpl, nsICSSLoader)
NS_IMETHODIMP
CSSLoaderImpl::Init(nsIDocument* aDocument)

View File

@ -412,7 +412,7 @@ CSSParserImpl::Init(nsICSSStyleSheet* aSheet)
return NS_OK;
}
NS_IMPL_ISUPPORTS(CSSParserImpl,NS_GET_IID(nsICSSParser))
NS_IMPL_ISUPPORTS1(CSSParserImpl, nsICSSParser)
CSSParserImpl::~CSSParserImpl()
{

View File

@ -1192,7 +1192,7 @@ CSSDeclarationImpl::~CSSDeclarationImpl(void)
#endif
}
NS_IMPL_ISUPPORTS(CSSDeclarationImpl, NS_GET_IID(nsICSSDeclaration));
NS_IMPL_ISUPPORTS1(CSSDeclarationImpl, nsICSSDeclaration)
#define CSS_IF_GET_ELSE(sid,ptr,result) \
if (sid.Equals(kCSS##ptr##SID)) { *result = m##ptr; } else

View File

@ -911,7 +911,7 @@ CSSImportantRule::~CSSImportantRule(void)
NS_IF_RELEASE(mDeclaration);
}
NS_IMPL_ISUPPORTS(CSSImportantRule, NS_GET_IID(nsIStyleRule));
NS_IMPL_ISUPPORTS1(CSSImportantRule, nsIStyleRule)
#if 0
NS_IMETHODIMP

View File

@ -964,10 +964,7 @@ HTMLAttributesImpl::~HTMLAttributesImpl(void)
Reset();
}
NS_IMPL_ADDREF(HTMLAttributesImpl)
NS_IMPL_RELEASE(HTMLAttributesImpl)
NS_IMPL_QUERY_INTERFACE(HTMLAttributesImpl, NS_GET_IID(nsIHTMLAttributes));
NS_IMPL_ISUPPORTS1(HTMLAttributesImpl, nsIHTMLAttributes)
const PRUnichar kNullCh = PRUnichar('\0');

View File

@ -77,7 +77,7 @@ CSSFirstLineRule::~CSSFirstLineRule()
{
}
NS_IMPL_ISUPPORTS(CSSFirstLineRule, NS_GET_IID(nsIStyleRule));
NS_IMPL_ISUPPORTS1(CSSFirstLineRule, nsIStyleRule)
NS_IMETHODIMP
CSSFirstLineRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const

View File

@ -121,7 +121,7 @@ HTMLColorRule::~HTMLColorRule()
{
}
NS_IMPL_ISUPPORTS(HTMLColorRule, NS_GET_IID(nsIStyleRule));
NS_IMPL_ISUPPORTS1(HTMLColorRule, nsIStyleRule)
NS_IMETHODIMP
HTMLColorRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const

View File

@ -510,7 +510,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(nsProxyStream, NS_GET_IID(nsIInputStream));
NS_IMPL_ISUPPORTS1(nsProxyStream, nsIInputStream)
// Implementation /////////////////////////////////////////////////////////////////

View File

@ -1849,7 +1849,7 @@ XMLElementFactoryImpl::~XMLElementFactoryImpl()
}
NS_IMPL_ISUPPORTS(XMLElementFactoryImpl, NS_GET_IID(nsIElementFactory));
NS_IMPL_ISUPPORTS1(XMLElementFactoryImpl, nsIElementFactory)
nsresult

View File

@ -89,7 +89,7 @@ nsTransformMediator::Init(const nsString& aMimeType)
}
// nsISupports
NS_IMPL_ISUPPORTS(nsTransformMediator, NS_GET_IID(nsITransformMediator))
NS_IMPL_ISUPPORTS1(nsTransformMediator, nsITransformMediator)
void

View File

@ -402,7 +402,7 @@ nsJSContext::~nsJSContext()
}
}
NS_IMPL_ISUPPORTS(nsJSContext, NS_GET_IID(nsIScriptContext));
NS_IMPL_ISUPPORTS1(nsJSContext, nsIScriptContext)
NS_IMETHODIMP
nsJSContext::EvaluateStringWithValue(const nsAReadableString& aScript,

View File

@ -652,7 +652,7 @@ nsJSProtocolHandler::~nsJSProtocolHandler()
{
}
NS_IMPL_ISUPPORTS(nsJSProtocolHandler, NS_GET_IID(nsIProtocolHandler));
NS_IMPL_ISUPPORTS1(nsJSProtocolHandler, nsIProtocolHandler)
NS_METHOD
nsJSProtocolHandler::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)

View File

@ -47,7 +47,7 @@ nsBaseComposerCommand::nsBaseComposerCommand()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsBaseComposerCommand, NS_GET_IID(nsIControllerCommand));
NS_IMPL_ISUPPORTS1(nsBaseComposerCommand, nsIControllerCommand)
//--------------------------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ nsBaseEditorCommand::nsBaseEditorCommand()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsBaseEditorCommand, NS_GET_IID(nsIControllerCommand));
NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand)
#ifdef XP_MAC
#pragma mark -

View File

@ -104,7 +104,7 @@ nsHTMLURIRefObject::~nsHTMLURIRefObject()
}
//Interfaces for addref and release and queryinterface
NS_IMPL_ISUPPORTS(nsHTMLURIRefObject, NS_GET_IID(nsIURIRefObject))
NS_IMPL_ISUPPORTS1(nsHTMLURIRefObject, nsIURIRefObject)
NS_IMETHODIMP
nsHTMLURIRefObject::Reset()

View File

@ -47,7 +47,7 @@ nsBaseComposerCommand::nsBaseComposerCommand()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsBaseComposerCommand, NS_GET_IID(nsIControllerCommand));
NS_IMPL_ISUPPORTS1(nsBaseComposerCommand, nsIControllerCommand)
//--------------------------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ nsBaseEditorCommand::nsBaseEditorCommand()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsBaseEditorCommand, NS_GET_IID(nsIControllerCommand));
NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand)
#ifdef XP_MAC
#pragma mark -

View File

@ -104,7 +104,7 @@ nsHTMLURIRefObject::~nsHTMLURIRefObject()
}
//Interfaces for addref and release and queryinterface
NS_IMPL_ISUPPORTS(nsHTMLURIRefObject, NS_GET_IID(nsIURIRefObject))
NS_IMPL_ISUPPORTS1(nsHTMLURIRefObject, nsIURIRefObject)
NS_IMETHODIMP
nsHTMLURIRefObject::Reset()

View File

@ -443,7 +443,7 @@ public:
NS_DECL_ISUPPORTS
};
NS_IMPL_ISUPPORTS(TestTransaction, NS_GET_IID(nsITransaction))
NS_IMPL_ISUPPORTS1(TestTransaction, nsITransaction)
class SimpleTransaction : public TestTransaction
{

View File

@ -205,8 +205,7 @@ NS_IMETHODIMP nsPICSElementObserver::Observe(nsISupports*, const PRUnichar*, con
////////////////////////////////////////////////////////////////////////////////
// nsPICSElementObserverFactory Implementation
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
NS_IMPL_ISUPPORTS(nsPICSElementObserverFactory, kIFactoryIID);
NS_IMPL_ISUPPORTS1(nsPICSElementObserverFactory, nsIFactory)
nsPICSElementObserverFactory::nsPICSElementObserverFactory(void)
{

View File

@ -325,8 +325,6 @@ nsUniversalXPCOMStringDetector::~nsUniversalXPCOMStringDetector()
{
}
//---------------------------------------------------------------------
//MY_NS_IMPL_ISUPPORTS(nsUniversalXPCOMStringDetector,
// NS_GET_IID(nsIStringCharsetDetector), nsIStringCharsetDetector)
NS_IMPL_ISUPPORTS1(nsUniversalXPCOMStringDetector, nsIStringCharsetDetector)
//---------------------------------------------------------------------
void nsUniversalXPCOMStringDetector::Report(const char *aCharset)

View File

@ -59,7 +59,7 @@ class nsReporter : public nsICharsetDetectionObserver
};
NS_IMPL_ISUPPORTS(nsReporter, NS_GET_IID(nsICharsetDetectionObserver))
NS_IMPL_ISUPPORTS1(nsReporter, nsICharsetDetectionObserver)
nsresult GetDetector(const char* key, nsICharsetDetector** det)
{

View File

@ -45,7 +45,7 @@ SignonViewerImpl::~SignonViewerImpl()
{
}
NS_IMPL_ISUPPORTS(SignonViewerImpl, NS_GET_IID(nsISignonViewer));
NS_IMPL_ISUPPORTS1(SignonViewerImpl, nsISignonViewer)
NS_IMETHODIMP
SignonViewerImpl::GetNopreviewValue(PRUnichar** aValue)

View File

@ -59,9 +59,7 @@ static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kIDeviceContextSpecPSIID, NS_IDEVICE_CONTEXT_SPEC_PS_IID);
#if 0
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecBeOS, kDeviceContextSpecIID)
NS_IMPL_ADDREF(nsDeviceContextSpecBeOS)
NS_IMPL_RELEASE(nsDeviceContextSpecBeOS)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecBeOS, nsIDeviceContextSpec)
#endif
NS_IMETHODIMP nsDeviceContextSpecBeOS :: QueryInterface(REFNSIID aIID, void** aInstancePtr)

View File

@ -42,13 +42,10 @@ nsDeviceContextSpecFactoryBeOS :: ~nsDeviceContextSpecFactoryBeOS()
{
}
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID, NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryBeOS, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryBeOS)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryBeOS)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryBeOS, nsIDeviceContextSpecFactory)
/** -------------------------------------------------------
* Initialize the device context spec factory

View File

@ -376,8 +376,7 @@ nsFontEnumeratorBeOS::nsFontEnumeratorBeOS()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorBeOS,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorBeOS, nsIFontEnumerator)
static int
CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)

View File

@ -41,7 +41,7 @@ nsScreenBeOS :: ~nsScreenBeOS()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenBeOS, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenBeOS, nsIScreen)
NS_IMETHODIMP

View File

@ -41,7 +41,7 @@ nsScreenManagerBeOS :: ~nsScreenManagerBeOS()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerBeOS, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerBeOS, nsIScreenManager)
//

View File

@ -42,13 +42,10 @@ nsDeviceContextSpecFactoryGTK :: ~nsDeviceContextSpecFactoryGTK()
{
}
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID, NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryGTK, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryGTK)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryGTK)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryGTK, nsIDeviceContextSpecFactory)
/** -------------------------------------------------------
* Initialize the device context spec factory

View File

@ -64,9 +64,7 @@ static NS_DEFINE_IID(kIDeviceContextSpecXPIID, NS_IDEVICE_CONTEXT_SPEC_XP_IID);
#endif
#if 0
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecGTK, kDeviceContextSpecIID)
NS_IMPL_ADDREF(nsDeviceContextSpecGTK)
NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecGTK, nsIDeviceContextSpec)
#endif
NS_IMETHODIMP nsDeviceContextSpecGTK :: QueryInterface(REFNSIID aIID, void** aInstancePtr)

View File

@ -4071,8 +4071,7 @@ nsFontEnumeratorGTK::nsFontEnumeratorGTK()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorGTK,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorGTK, nsIFontEnumerator)
typedef struct EnumerateNodeInfo
{

View File

@ -46,7 +46,7 @@ nsScreenGtk :: ~nsScreenGtk()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenGtk, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenGtk, nsIScreen)
NS_IMETHODIMP

View File

@ -53,7 +53,7 @@ nsScreenManagerGtk :: ~nsScreenManagerGtk()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerGtk, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerGtk, nsIScreenManager)
// this function will make sure that everything has been initialized.

View File

@ -1041,8 +1041,8 @@ nsFontEnumeratorMac::nsFontEnumeratorMac()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorMac,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorMac, nsIFontEnumerator)
typedef struct EnumerateFamilyInfo
{
PRUnichar** mArray;

View File

@ -28,8 +28,6 @@
#include "nsUnicodeMappingUtil.h"
#include "nsGfxUtils.h"
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
#define BAD_FONT_NUM -1
@ -52,7 +50,7 @@ nsFontMetricsMac :: ~nsFontMetricsMac()
//------------------------------------------------------------------------
NS_IMPL_ISUPPORTS(nsFontMetricsMac, kIFontMetricsIID);
NS_IMPL_ISUPPORTS1(nsFontMetricsMac, nsIFontMetrics)
NS_IMETHODIMP nsFontMetricsMac::Init(const nsFont& aFont, nsIAtom* aLangGroup, nsIDeviceContext* aCX)

View File

@ -109,9 +109,7 @@ nsRenderingContextMac::~nsRenderingContextMac()
}
NS_IMPL_QUERY_INTERFACE(nsRenderingContextMac, NS_GET_IID(nsIRenderingContext));
NS_IMPL_ADDREF(nsRenderingContextMac);
NS_IMPL_RELEASE(nsRenderingContextMac);
NS_IMPL_ISUPPORTS1(nsRenderingContextMac, nsIRenderingContext)
//------------------------------------------------------------------------

View File

@ -44,7 +44,7 @@ nsScreenMac :: ~nsScreenMac()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenMac, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenMac, nsIScreen)
NS_IMETHODIMP

View File

@ -57,7 +57,7 @@ nsScreenManagerMac :: ~nsScreenManagerMac()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerMac, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerMac, nsIScreenManager)
//

View File

@ -29,8 +29,6 @@
#include "il_util.h"
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
#define NS_TO_X_COMPONENT(a) ((a << 8) | (a))
#define NS_TO_X_RED(a) (((NS_GET_R(a) >> (8 - mRedBits)) << mRedOffset) & mRedMask)
@ -102,9 +100,7 @@ nsDeviceContextMotif :: ~nsDeviceContextMotif()
delete mDeviceColors;
}
NS_IMPL_QUERY_INTERFACE(nsDeviceContextMotif, kDeviceContextIID)
NS_IMPL_ADDREF(nsDeviceContextMotif)
NS_IMPL_RELEASE(nsDeviceContextMotif)
NS_IMPL_ISUPPORTS1(nsDeviceContextMotif, nsIDeviceContext)
NS_IMETHODIMP nsDeviceContextMotif :: Init(nsNativeWidget aNativeWidget)
{

View File

@ -27,8 +27,6 @@
#include "nspr.h"
#include "nsCRT.h"
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
//#define NOISY_FONTS
nsFontMetricsMotif :: nsFontMetricsMotif()
@ -51,7 +49,7 @@ nsFontMetricsMotif :: ~nsFontMetricsMotif()
}
}
NS_IMPL_ISUPPORTS(nsFontMetricsMotif, kIFontMetricsIID)
NS_IMPL_ISUPPORTS1(nsFontMetricsMotif, nsIFontMetrics)
NS_IMETHODIMP nsFontMetricsMotif :: Init(const nsFont& aFont, nsIAtom* aLangGroup, nsIDeviceContext* aCX)
{

View File

@ -29,8 +29,6 @@
#define IsFlagSet(a,b) (a & b)
static NS_DEFINE_IID(kIImageIID, NS_IIMAGE_IID);
//------------------------------------------------------------
nsImageMotif :: nsImageMotif()
@ -80,7 +78,7 @@ nsImageMotif :: ~nsImageMotif()
}
NS_IMPL_ISUPPORTS(nsImageMotif, kIImageIID);
NS_IMPL_ISUPPORTS1(nsImageMotif, nsIImage)
//------------------------------------------------------------

View File

@ -22,8 +22,6 @@
#include "nsRegionMotif.h"
static NS_DEFINE_IID(kRegionIID, NS_IREGION_IID);
nsRegionMotif :: nsRegionMotif()
{
NS_INIT_REFCNT();
@ -39,9 +37,7 @@ nsRegionMotif :: ~nsRegionMotif()
mRegion = nsnull;
}
NS_IMPL_QUERY_INTERFACE(nsRegionMotif, kRegionIID)
NS_IMPL_ADDREF(nsRegionMotif)
NS_IMPL_RELEASE(nsRegionMotif)
NS_IMPL_ISUPPORTS1(nsRegionMotif, nsIRegion)
nsresult nsRegionMotif :: Init(void)
{

View File

@ -75,8 +75,6 @@ GraphicsState :: ~GraphicsState()
mFont = nsnull;
}
static NS_DEFINE_IID(kRenderingContextIID, NS_IRENDERING_CONTEXT_IID);
nsRenderingContextMotif :: nsRenderingContextMotif()
{
NS_INIT_REFCNT();
@ -142,9 +140,7 @@ nsRenderingContextMotif :: ~nsRenderingContextMotif()
}
NS_IMPL_QUERY_INTERFACE(nsRenderingContextMotif, kRenderingContextIID)
NS_IMPL_ADDREF(nsRenderingContextMotif)
NS_IMPL_RELEASE(nsRenderingContextMotif)
NS_IMPL_ISUPPORTS1(nsRenderingContextMotif, nsIRenderingContext)
NS_IMETHODIMP
nsRenderingContextMotif :: Init(nsIDeviceContext* aContext,

View File

@ -27,8 +27,6 @@
#define MAPPING_FACTOR_FOR_OTHERS 0.70f
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
nsresult
NS_NewRegressionTestFontMetrics(nsIFontMetrics** aMetrics)
{
@ -42,7 +40,7 @@ NS_NewRegressionTestFontMetrics(nsIFontMetrics** aMetrics)
return NS_ERROR_OUT_OF_MEMORY;
}
return fm->QueryInterface(kIFontMetricsIID, (void **) aMetrics);
return CallQueryInterface(fm, aMetrics);
}
nsRegressionTestFontMetrics:: nsRegressionTestFontMetrics()
@ -67,7 +65,7 @@ nsRegressionTestFontMetrics:: nsRegressionTestFontMetrics()
mUnderlineOffset = 0;
}
NS_IMPL_ISUPPORTS(nsRegressionTestFontMetrics, kIFontMetricsIID);
NS_IMPL_ISUPPORTS1(nsRegressionTestFontMetrics, nsIFontMetrics)
nsRegressionTestFontMetrics::~nsRegressionTestFontMetrics()
{

View File

@ -39,13 +39,10 @@ nsDeviceContextSpecFactoryOS2 :: ~nsDeviceContextSpecFactoryOS2()
{
}
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID, NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryOS2, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryOS2)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryOS2)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryOS2, nsIDeviceContextSpecFactory)
NS_IMETHODIMP nsDeviceContextSpecFactoryOS2 :: Init(void)
{

View File

@ -37,7 +37,7 @@ nsDeviceContextSpecOS2::~nsDeviceContextSpecOS2()
PrnClosePrinter( mQueue);
}
NS_IMPL_ISUPPORTS(nsDeviceContextSpecOS2, NS_GET_IID(nsIDeviceContextSpec))
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecOS2, nsIDeviceContextSpec)
nsresult nsDeviceContextSpecOS2::Init( PRTQUEUE *pq)
{

View File

@ -29,7 +29,7 @@
// Base class -- fonts, palette and xpcom -----------------------------------
NS_IMPL_ISUPPORTS(nsDrawingSurfaceOS2, NS_GET_IID(nsIDrawingSurface))
NS_IMPL_ISUPPORTS1(nsDrawingSurfaceOS2, nsIDrawingSurface)
// We start allocated lCIDs at 2. This leaves #1 for nsFontMetricsOS2 to
// do testing with, and 0 is, of course, LCID_DEFAULT.

View File

@ -215,7 +215,7 @@ nsFontMetricsOS2::~nsFontMetricsOS2()
}
}
NS_IMPL_ISUPPORTS( nsFontMetricsOS2, nsIFontMetrics::GetIID())
NS_IMPL_ISUPPORTS1(nsFontMetricsOS2, nsIFontMetrics)
nsresult nsFontMetricsOS2::Init( const nsFont &aFont, nsIAtom* aLangGroup, nsIDeviceContext *aContext)
{
@ -1210,8 +1210,7 @@ nsFontEnumeratorOS2::nsFontEnumeratorOS2()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorOS2,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorOS2, nsIFontEnumerator)
static int gInitializedFontEnumerator = 0;

View File

@ -69,7 +69,7 @@ PRBool nsImageOS2::gBlenderReady = PR_FALSE;
NS_IMPL_ISUPPORTS(nsImageOS2, NS_GET_IID(nsIImage));
NS_IMPL_ISUPPORTS1(nsImageOS2, nsIImage)
//------------------------------------------------------------
nsImageOS2::nsImageOS2()

View File

@ -22,7 +22,7 @@
#include "nsRegionOS2.h"
NS_IMPL_ISUPPORTS(nsRegionOS2, NS_GET_IID(nsIRegion))
NS_IMPL_ISUPPORTS1(nsRegionOS2, nsIRegion)
nsRegionOS2::nsRegionOS2()
{

View File

@ -41,7 +41,7 @@ nsScreenManagerOS2 :: ~nsScreenManagerOS2()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerOS2, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerOS2, nsIScreenManager)
//

View File

@ -40,7 +40,7 @@ nsScreenOS2 :: ~nsScreenOS2()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenOS2, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenOS2, nsIScreen)
NS_IMETHODIMP

View File

@ -34,7 +34,6 @@
#include "nsPhGfxLog.h"
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
#define NS_TO_PH_RGB(ns) (ns & 0xff) << 16 | (ns & 0xff00) | ((ns >> 16) & 0xff)
@ -77,12 +76,7 @@ nsDeviceContextPh :: ~nsDeviceContextPh( ) {
NS_IF_RELEASE( mSpec );
}
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
static NS_DEFINE_IID(kIDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextPh, kDeviceContextIID)
NS_IMPL_ADDREF(nsDeviceContextPh)
NS_IMPL_RELEASE(nsDeviceContextPh)
NS_IMPL_ISUPPORTS1(nsDeviceContextPh, nsIDeviceContext)
NS_IMETHODIMP nsDeviceContextPh :: Init( nsNativeWidget aWidget ) {
float newscale, origscale;

View File

@ -43,11 +43,8 @@ nsDeviceContextSpecFactoryPh :: ~nsDeviceContextSpecFactoryPh()
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID);
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID, NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryPh, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryPh)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryPh)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryPh, nsIDeviceContextSpecFactory)
NS_IMETHODIMP nsDeviceContextSpecFactoryPh :: Init(void)
{

View File

@ -30,7 +30,6 @@
#include "nsIServiceManager.h"
#include "nsIPrintOptions.h"
static NS_DEFINE_IID( kDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID );
static NS_DEFINE_CID( kPrintOptionsCID, NS_PRINTOPTIONS_CID );
nsDeviceContextSpecPh :: nsDeviceContextSpecPh()
@ -46,9 +45,7 @@ nsDeviceContextSpecPh :: ~nsDeviceContextSpecPh()
}
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecPh, kDeviceContextSpecIID)
NS_IMPL_ADDREF(nsDeviceContextSpecPh)
NS_IMPL_RELEASE(nsDeviceContextSpecPh)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecPh, nsIDeviceContextSpec)
NS_IMETHODIMP nsDeviceContextSpecPh :: Init(PRBool aQuiet)
{

View File

@ -430,7 +430,7 @@ nsFontEnumeratorPh::nsFontEnumeratorPh()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorPh, NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorPh, nsIFontEnumerator)
static int gInitializedFontEnumerator = 0;

View File

@ -38,7 +38,7 @@ nsScreenManagerPh :: ~nsScreenManagerPh( ) {
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerPh, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerPh, nsIScreenManager)
//

View File

@ -58,7 +58,7 @@ nsScreenPh :: nsScreenPh ( ) {
nsScreenPh :: ~nsScreenPh( ) { }
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenPh, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenPh, nsIScreen)
NS_IMETHODIMP nsScreenPh :: GetPixelDepth( PRInt32 *aPixelDepth ) {
*aPixelDepth = mPixelDepth;

View File

@ -54,62 +54,7 @@ nsFontMetricsPS :: ~nsFontMetricsPS()
mDeviceContext = nsnull;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
* @update 2/26/99 dwc
*/
#ifdef LEAK_DEBUG
nsrefcnt
nsFontMetricsPS :: AddRef()
{
NS_PRECONDITION(mRefCnt != 0, "resurrecting a dead object");
return ++mRefCnt;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
* @update 2/26/99 dwc
*/
nsrefcnt
nsFontMetricsPS :: Release()
{
NS_PRECONDITION(mRefCnt != 0, "too many release's");
if (--mRefCnt == 0) {
delete this;
}
return mRefCnt;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
* @update 2/26/99 dwc
*/
nsresult
nsFontMetricsPS :: QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
*aInstancePtr = NULL;
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, kIFontMetricsIID);
if (aIID.Equals(kClassIID)) {
*aInstancePtr = (void*) this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*) ((nsISupports*)this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
#else
NS_IMPL_ISUPPORTS(nsFontMetricsPS, kIFontMetricsIID)
#endif
NS_IMPL_ISUPPORTS1(nsFontMetricsPS, nsIFontMetrics)
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h

View File

@ -61,15 +61,10 @@ nsDeviceContextSpecFactoryQT::~nsDeviceContextSpecFactoryQT()
#endif
}
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID,
NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryQT,
kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryQT)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryQT)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryQT, nsIDeviceContextSpecFactory)
/** -------------------------------------------------------
* Initialize the device context spec factory

View File

@ -1999,8 +1999,7 @@ nsFontEnumeratorQT::nsFontEnumeratorQT()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorQT,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorQT, nsIFontEnumerator)
static int CompareFontNames(const void *aArg1,const void *aArg2,void *aClosure)
{

View File

@ -57,7 +57,7 @@ nsScreenManagerQT::~nsScreenManagerQT()
}
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerQT, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerQT, nsIScreenManager)
//
// CreateNewScreenObject

View File

@ -57,7 +57,7 @@ nsScreenQT::~nsScreenQT()
}
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenQT, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenQT, nsIScreen)
NS_IMETHODIMP
nsScreenQT::GetRect(PRInt32 *outLeft,PRInt32 *outTop,

View File

@ -26,13 +26,10 @@
#include "nsGfxCIID.h"
#include "plstr.h"
static NS_DEFINE_IID(kDeviceContextSpecFactoryIID, NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID);
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
static NS_DEFINE_IID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecFactoryXlib, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryXlib)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryXlib)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryXlib, nsIDeviceContextSpecFactory)
nsDeviceContextSpecFactoryXlib::nsDeviceContextSpecFactoryXlib()
{

View File

@ -28,8 +28,6 @@
#include "xlibrgb.h" // for xlib_rgb_get_visual_info
#include <X11/Xutil.h> // for XVisualInfo.
static NS_DEFINE_IID(kIDrawingSurfaceIID, NS_IDRAWING_SURFACE_IID);
#ifdef PR_LOGGING
static PRLogModuleInfo *DrawingSurfaceXlibLM = PR_NewLogModule("DrawingSurfaceXlib");
#endif /* PR_LOGGING */
@ -100,9 +98,7 @@ nsDrawingSurfaceXlib::~nsDrawingSurfaceXlib()
}
}
NS_IMPL_QUERY_INTERFACE(nsDrawingSurfaceXlib, kIDrawingSurfaceIID)
NS_IMPL_ADDREF(nsDrawingSurfaceXlib)
NS_IMPL_RELEASE(nsDrawingSurfaceXlib)
NS_IMPL_ISUPPORTS1(nsDrawingSurfaceXlib, nsIDrawingSurface)
NS_IMETHODIMP
nsDrawingSurfaceXlib::Init(Display * aDisplay,

View File

@ -4176,8 +4176,7 @@ nsFontEnumeratorXlib::nsFontEnumeratorXlib()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorXlib,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorXlib, nsIFontEnumerator)
typedef struct EnumerateNodeInfo
{

View File

@ -43,7 +43,7 @@ nsScreenManagerXlib :: ~nsScreenManagerXlib()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenManagerXlib, NS_GET_IID(nsIScreenManager))
NS_IMPL_ISUPPORTS1(nsScreenManagerXlib, nsIScreenManager)
//

View File

@ -42,7 +42,7 @@ nsScreenXlib :: ~nsScreenXlib()
// addref, release, QI
NS_IMPL_ISUPPORTS(nsScreenXlib, NS_GET_IID(nsIScreen))
NS_IMPL_ISUPPORTS1(nsScreenXlib, nsIScreen)
NS_IMETHODIMP

View File

@ -52,7 +52,6 @@ static NS_DEFINE_IID(kCTextFieldCID, NS_TEXTFIELD_CID);
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
static NS_DEFINE_IID(kIImageObserverIID, NS_IIMAGEREQUESTOBSERVER_IID);
static NS_DEFINE_IID(kCWindowIID, NS_WINDOW_CID);
static NS_DEFINE_IID(kCChildWindowIID, NS_CHILD_CID);
static NS_DEFINE_IID(kCScrollbarIID, NS_VERTSCROLLBAR_CID);
@ -137,7 +136,7 @@ MyBlendObserver::~MyBlendObserver()
//------------------------------------------------------------
NS_IMPL_ISUPPORTS(MyBlendObserver, kIImageObserverIID)
NS_IMPL_ISUPPORTS1(MyBlendObserver, nsIImageObserver)
void
MyBlendObserver::Notify(nsIImageRequest *aImageRequest,
@ -210,7 +209,7 @@ MyObserver::~MyObserver()
//------------------------------------------------------------
NS_IMPL_ISUPPORTS(MyObserver, kIImageObserverIID)
NS_IMPL_ISUPPORTS1(MyObserver, nsIImageObserver)
void
MyObserver::Notify(nsIImageRequest *aImageRequest,

View File

@ -40,7 +40,6 @@
#include "nsIInterfaceRequestor.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_IID(kIRobotSinkObserverIID, NS_IROBOTSINKOBSERVER_IID);
class RobotSinkObserver : public nsIRobotSinkObserver {
public:
@ -65,7 +64,7 @@ static int g_iMaxProcess = 5000;
static PRBool g_bHitTop;
static PRBool g_bReadyForNextUrl;
NS_IMPL_ISUPPORTS(RobotSinkObserver, kIRobotSinkObserverIID);
NS_IMPL_ISUPPORTS1(RobotSinkObserver, nsIRobotSinkObserver)
NS_IMETHODIMP RobotSinkObserver::VerifyDirectory(const char * verify_dir)
{

View File

@ -32,6 +32,8 @@ class nsString;
class nsIRobotSinkObserver : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IROBOTSINKOBSERVER_IID)
NS_IMETHOD ProcessLink(const nsString& aURLSpec) = 0;
NS_IMETHOD VerifyDirectory(const char * verify_dir) = 0;
};

View File

@ -408,7 +408,6 @@ nsParser::~nsParser() {
NS_IMPL_ADDREF(nsParser)
NS_IMPL_RELEASE(nsParser)
//NS_IMPL_ISUPPORTS(nsParser,NS_IHTML_HTMLPARSER_IID)
/**

View File

@ -44,8 +44,6 @@
#include "nsLoggingSink.h"
#endif
static NS_DEFINE_IID(kIParserServiceIID, NS_IPARSERSERVICE_IID);
class nsParserService : public nsIParserService {
public:
nsParserService();
@ -76,7 +74,7 @@ nsParserService::~nsParserService()
{
}
NS_IMPL_ISUPPORTS(nsParserService, kIParserServiceIID)
NS_IMPL_ISUPPORTS1(nsParserService, nsIParserService)
NS_IMETHODIMP

View File

@ -41,8 +41,6 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include <sys/stat.h>
#endif
NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
class StreamToFile : public nsIStreamListener {
public:
StreamToFile(FILE* fp);
@ -75,7 +73,7 @@ StreamToFile::StreamToFile(FILE* fp)
mFile = fp;
}
NS_IMPL_ISUPPORTS(StreamToFile,kIStreamListenerIID)
NS_IMPL_ISUPPORTS1(StreamToFile, nsIStreamListener)
StreamToFile::~StreamToFile()
{

View File

@ -197,7 +197,7 @@ static nsresult JA_AutoCharsetDetectBuffer(const char* aBuffer, const PRInt32 aL
}
//==========================================================
NS_IMPL_ISUPPORTS(nsClassicDetector, NS_GET_IID(nsICharsetDetector));
NS_IMPL_ISUPPORTS1(nsClassicDetector, nsICharsetDetector)
//----------------------------------------------------------
nsClassicDetector::nsClassicDetector(const char* language)
@ -252,7 +252,7 @@ NS_IMETHODIMP nsClassicDetector::Done()
//==========================================================
NS_IMPL_ISUPPORTS(nsClassicStringDetector, NS_GET_IID(nsIStringCharsetDetector));
NS_IMPL_ISUPPORTS1(nsClassicStringDetector, nsIStringCharsetDetector)
//----------------------------------------------------------
nsClassicStringDetector::nsClassicStringDetector(const char* language)

View File

@ -106,7 +106,7 @@ private:
char mCharset[65];
};
NS_IMPL_ISUPPORTS(nsNativeDetector, NS_GET_IID(nsICharsetDetector));
NS_IMPL_ISUPPORTS1(nsNativeDetector, nsICharsetDetector)
//----------------------------------------------------------
nsNativeDetector::nsNativeDetector(PRUint32 aCodePage)

View File

@ -262,7 +262,7 @@ class nsReporter : public nsICharsetDetectionObserver
};
NS_IMPL_ISUPPORTS(nsReporter, NS_GET_IID(nsICharsetDetectionObserver))
NS_IMPL_ISUPPORTS1(nsReporter, nsICharsetDetectionObserver)
nsresult GetDetector(const char* key, nsICharsetDetector** det)
{

View File

@ -29,7 +29,6 @@
#include "prprf.h"
#include <script.h>
NS_DEFINE_IID(kIMacLocaleIID, NS_IMACLOCALE_IID);
NS_DEFINE_IID(kMacLocaleCID, NS_MACLOCALE_CID);
struct iso_lang_map
@ -202,7 +201,7 @@ iso_country_map country_list[] = {
/* nsMacLocale ISupports */
NS_IMPL_ISUPPORTS(nsMacLocale,kIMacLocaleIID)
NS_IMPL_ISUPPORTS1(nsMacLocale,nsIMacLocale)
nsMacLocale::nsMacLocale(void)
{

View File

@ -40,11 +40,10 @@
#include "prprf.h"
#include "nsFileSpec.h"
NS_DEFINE_IID(kIOS2LocaleIID, NS_IOS2LOCALE_IID);
NS_DEFINE_IID(kOS2LocaleCID, NS_OS2LOCALE_CID);
/* nsOS2Locale ISupports */
NS_IMPL_ISUPPORTS(nsOS2Locale,kIOS2LocaleIID)
NS_IMPL_ISUPPORTS1(nsOS2Locale,nsIOS2Locale)
nsOS2Locale::nsOS2Locale(void)
{

View File

@ -94,7 +94,6 @@ protected: \
const PRUnichar*mText; \
PRUint32 mLen; \
}; \
NS_DEFINE_IID(kIBreakStateIID, NS_IBREAKSTATE_IID); \
NS_IMPL_ISUPPORTS( name , kIBreakStateIID);
NS_IMPL_ISUPPORTS1( name , nsIBreakState)
#endif /* nsIBreakState_h__ */

View File

@ -131,8 +131,7 @@ public:
};
NS_DEFINE_IID( kIFactoryIID, NS_IFACTORY_IID);
NS_IMPL_ISUPPORTS( nsOS2CharsetFactory , kIFactoryIID);
NS_IMPL_ISUPPORTS1( nsOS2CharsetFactory , nsIFactory)
NS_IMETHODIMP nsOS2CharsetFactory::CreateInstance(
nsISupports* aDelegate, const nsIID &aIID, void** aResult)

View File

@ -33,7 +33,7 @@
#include "nsIUBidiUtils.h"
NS_IMPL_ISUPPORTS(nsBidi, NS_GET_IID(nsIBidi))
NS_IMPL_ISUPPORTS1(nsBidi, nsIBidi)
/* Comparing the description of the Bidi algorithm with this implementation

View File

@ -32,7 +32,7 @@
#include "nsIUBidiUtils.h"
#include "nsIBidi.h"
static NS_DEFINE_CID(kBidiCID, NS_BIDI_CID);
NS_IMPL_ISUPPORTS(nsBidiUtilsImp, NS_GET_IID(nsIUBidiUtils));
NS_IMPL_ISUPPORTS1(nsBidiUtilsImp, nsIUBidiUtils)
static nsCharType ebc2ucd[15] = {
eCharType_OtherNeutral, /* Placeholder -- there will never be a 0 index value */

View File

@ -24,14 +24,12 @@
#define UCDATAFILEPATH "./res/unicharutil"
NS_DEFINE_IID(kCaseConversionIID, NS_ICASECONVERSION_IID);
#define CAST_PRUNICHAR_TO_ULONG(u) (unsigned long) (((u) & 0x0000FFFF))
#define CAST_ULONG_TO_PRUNICHAR(l) ((PRUnichar) (l))
PRBool nsCaseConversionImp::gInit = PR_FALSE;
NS_IMPL_ISUPPORTS(nsCaseConversionImp, kCaseConversionIID);
NS_IMPL_ISUPPORTS1(nsCaseConversionImp, nsICaseConversion)
void nsCaseConversionImp::Init()
{

View File

@ -53,9 +53,7 @@ NS_IMETHOD ToString( PRUint32 aOrder, nsString& aResult)
return NS_OK;
}
NS_DEFINE_IID(kIOrderIdFormaterIID, NS_IORDERIDFORMATER_IID);
NS_IMPL_ISUPPORTS(nsCharsOrderIdFormater, kIOrderIdFormaterIID);
NS_IMPL_ISUPPORTS1(nsCharsOrderIdFormater, nsIOrderIdFormater)
class nsCharsOrderIdFormaterFactory : public nsIFactory {
NS_DECL_ISUPPORTS
@ -77,7 +75,8 @@ private:
nsCID mCID;
}
NS_IMPL_ISUPPORTS(nsCharsOrderIdFormaterFactory, kFactoryIID);
NS_IMPL_ISUPPORTS1(nsCharsOrderIdFormaterFactory, nsIFactory)
NS_IMETHODIMP nsCharsOrderIdFormaterFactory::CreateInstance(
nsISupports *aDelegate,
const nsIID &aIID,

View File

@ -218,8 +218,7 @@ private:
Mode mMode;
};
static NS_DEFINE_IID(kMySecManIID, NS_IXPCSECURITYMANAGER_IID);
NS_IMPL_ISUPPORTS(MySecMan, kMySecManIID);
NS_IMPL_ISUPPORTS1(MySecMan, nsIXPCSecurityManager)
MySecMan::MySecMan()
: mMode(OK_ALL)

View File

@ -1149,7 +1149,7 @@ GeneratedContentIterator::GeneratedContentIterator(nsIPresContext* aPresContext,
First();
}
NS_IMPL_ISUPPORTS(GeneratedContentIterator, NS_GET_IID(nsIContentIterator));
NS_IMPL_ISUPPORTS1(GeneratedContentIterator, nsIContentIterator)
GeneratedContentIterator::~GeneratedContentIterator()
{

View File

@ -74,7 +74,7 @@ nsLayoutDebugger::~nsLayoutDebugger()
{
}
NS_IMPL_ISUPPORTS(nsLayoutDebugger, NS_GET_IID(nsILayoutDebugger));
NS_IMPL_ISUPPORTS1(nsLayoutDebugger, nsILayoutDebugger)
NS_IMETHODIMP
nsLayoutDebugger::SetShowFrameBorders(PRBool aEnable)

View File

@ -502,7 +502,7 @@ nsFrameUtil::~nsFrameUtil()
{
}
NS_IMPL_ISUPPORTS(nsFrameUtil, NS_GET_IID(nsIFrameUtil));
NS_IMPL_ISUPPORTS1(nsFrameUtil, nsIFrameUtil)
void
nsFrameUtil::DumpNode(Node* aNode, FILE* aOutputFile, PRInt32 aIndent)

View File

@ -74,7 +74,7 @@ nsLayoutDebugger::~nsLayoutDebugger()
{
}
NS_IMPL_ISUPPORTS(nsLayoutDebugger, NS_GET_IID(nsILayoutDebugger));
NS_IMPL_ISUPPORTS1(nsLayoutDebugger, nsILayoutDebugger)
NS_IMETHODIMP
nsLayoutDebugger::SetShowFrameBorders(PRBool aEnable)

View File

@ -88,7 +88,7 @@ nsSpaceManager::~nsSpaceManager()
ClearFrameInfo();
}
NS_IMPL_ISUPPORTS(nsSpaceManager, NS_GET_IID(nsISpaceManager));
NS_IMPL_ISUPPORTS1(nsSpaceManager, nsISpaceManager)
NS_IMETHODIMP
nsSpaceManager::GetFrame(nsIFrame*& aFrame) const

View File

@ -1372,5 +1372,5 @@ FrameLoadingInfo::FrameLoadingInfo(const nsSize& aSize)
/*
* Implementation of ISupports methods...
*/
NS_IMPL_ISUPPORTS(FrameLoadingInfo, NS_GET_IID(nsISupports));
NS_IMPL_ISUPPORTS0(FrameLoadingInfo)

View File

@ -502,7 +502,7 @@ nsFrameUtil::~nsFrameUtil()
{
}
NS_IMPL_ISUPPORTS(nsFrameUtil, NS_GET_IID(nsIFrameUtil));
NS_IMPL_ISUPPORTS1(nsFrameUtil, nsIFrameUtil)
void
nsFrameUtil::DumpNode(Node* aNode, FILE* aOutputFile, PRInt32 aIndent)

View File

@ -76,7 +76,7 @@ nsHTMLReflowCommand::~nsHTMLReflowCommand()
NS_IF_RELEASE(mListName);
}
NS_IMPL_ISUPPORTS(nsHTMLReflowCommand, NS_GET_IID(nsIReflowCommand));
NS_IMPL_ISUPPORTS1(nsHTMLReflowCommand, nsIReflowCommand)
nsIFrame* nsHTMLReflowCommand::GetContainingBlock(nsIFrame* aFloater) const
{

View File

@ -88,7 +88,7 @@ nsSpaceManager::~nsSpaceManager()
ClearFrameInfo();
}
NS_IMPL_ISUPPORTS(nsSpaceManager, NS_GET_IID(nsISpaceManager));
NS_IMPL_ISUPPORTS1(nsSpaceManager, nsISpaceManager)
NS_IMETHODIMP
nsSpaceManager::GetFrame(nsIFrame*& aFrame) const

Some files were not shown because too many files have changed in this diff Show More