#45797 - fix consumers of NS_IMPL_ISUPPORTS

r=dveditz
This commit is contained in:
alecf%netscape.com 2000-11-17 20:54:21 +00:00
Родитель 7ae1196b75
Коммит deff2e336c
42 изменённых файлов: 50 добавлений и 1941 удалений

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

@ -296,7 +296,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(nsProxyLoadStream, NS_GET_IID(nsIInputStream));
NS_IMPL_ISUPPORTS1(nsProxyLoadStream, nsIInputStream);
//----------------------------------------------------------------------
//
@ -6438,7 +6438,7 @@ nsXULDocument::ParserObserver::~ParserObserver()
NS_IF_RELEASE(mDocument);
}
NS_IMPL_ISUPPORTS(nsXULDocument::ParserObserver, NS_GET_IID(nsIStreamObserver));
NS_IMPL_ISUPPORTS1(nsXULDocument::ParserObserver, nsIStreamObserver);
NS_IMETHODIMP
nsXULDocument::ParserObserver::OnStartRequest(nsIChannel* aChannel,
@ -6538,7 +6538,7 @@ XULElementFactoryImpl::~XULElementFactoryImpl()
}
NS_IMPL_ISUPPORTS(XULElementFactoryImpl, NS_GET_IID(nsIElementFactory));
NS_IMPL_ISUPPORTS1(XULElementFactoryImpl, nsIElementFactory)
nsresult

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

@ -357,7 +357,7 @@ NS_NewXULContentUtils(nsISupports* aOuter, const nsIID& aIID, void** aResult)
//------------------------------------------------------------------------
// nsISupports methods
NS_IMPL_ISUPPORTS(nsXULContentUtils, NS_GET_IID(nsIXULContentUtils));
NS_IMPL_ISUPPORTS1(nsXULContentUtils, nsIXULContentUtils)
//------------------------------------------------------------------------
// nsIXULContentUtils methods

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

@ -485,7 +485,7 @@ XULSortServiceImpl::~XULSortServiceImpl(void)
NS_IMPL_ISUPPORTS(XULSortServiceImpl, NS_GET_IID(nsIXULSortService));
NS_IMPL_ISUPPORTS1(XULSortServiceImpl, nsIXULSortService)

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

@ -24,8 +24,6 @@
#include "nsIDeviceContext.h"
#include "il_util.h"
static NS_DEFINE_IID(kIBlenderIID, NS_IBLENDER_IID);
/** ---------------------------------------------------
* See documentation in nsBlender.h
* @update 2/25/00 dwc
@ -59,7 +57,7 @@ nsBlender::~nsBlender()
}
NS_IMPL_ISUPPORTS(nsBlender, kIBlenderIID);
NS_IMPL_ISUPPORTS1(nsBlender, nsIBlender);
//------------------------------------------------------------

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

@ -1,387 +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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsIServiceManager.h"
#include "nsIImageGroup.h"
#include "nsIImageManager.h"
#include "nsIImageObserver.h"
#include "nsIImageRequest.h"
#include "nsImageRequest.h"
#include "ilIImageRenderer.h"
#include "nsImageNet.h"
#include "nsVoidArray.h"
#include "nsCRT.h"
#include "libimg.h"
#include "il_util.h"
#include "nsIDeviceContext.h"
#include "nsIStreamListener.h"
#include "nsGfxCIID.h"
static NS_DEFINE_IID(kIImageGroupIID, NS_IIMAGEGROUP_IID);
static NS_DEFINE_IID(kImageManagerCID, NS_IMAGEMANAGER_CID);
class ImageGroupImpl : public nsIImageGroup
{
public:
ImageGroupImpl(nsIImageManager *aManager);
virtual ~ImageGroupImpl();
nsresult Init(nsIDeviceContext *aDeviceContext, nsISupports * aLoadContext);
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS
virtual PRBool AddObserver(nsIImageGroupObserver *aObserver);
virtual PRBool RemoveObserver(nsIImageGroupObserver *aObserver);
virtual nsIImageRequest* GetImage(const char* aUrl,
nsIImageRequestObserver *aObserver,
const nscolor* aBackgroundColor,
PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags);
NS_IMETHOD GetImageFromStream(const char* aURL,
nsIImageRequestObserver *aObserver,
const nscolor* aBackgroundColor,
PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags,
nsIImageRequest*& aResult,
nsIStreamListener*& aListenerResult);
virtual void Interrupt(void);
IL_GroupContext *GetGroupContext() { return mGroupContext; }
nsVoidArray *GetObservers() { return mObservers; }
NS_IMETHOD SetImgLoadAttributes(PRUint32 a_grouploading_attribs);
NS_IMETHOD GetImgLoadAttributes(PRUint32 *a_grouploading_attribs);
nsIImageManager *mManager;
IL_GroupContext *mGroupContext;
nsVoidArray *mObservers;
nsIDeviceContext *mDeviceContext;
ilINetContext* mNetContext;
nsIStreamListener** mListenerRequest;
//ptn
PRUint32 m_grouploading_attribs;
};
ImageGroupImpl::ImageGroupImpl(nsIImageManager *aManager)
{
NS_INIT_REFCNT();
mManager = aManager;
NS_ADDREF(mManager);
}
ImageGroupImpl::~ImageGroupImpl()
{
NS_IF_RELEASE(mDeviceContext);
if (mObservers != nsnull) {
PRInt32 i, count = mObservers->Count();
nsIImageGroupObserver *observer;
for (i = 0; i < count; i++) {
observer = (nsIImageGroupObserver *)mObservers->ElementAt(i);
if (observer != nsnull) {
NS_RELEASE(observer);
}
}
delete mObservers;
}
if (mGroupContext != nsnull) {
IL_DestroyGroupContext(mGroupContext);
}
NS_IF_RELEASE(mManager);
NS_IF_RELEASE(mNetContext);
}
NS_IMPL_ISUPPORTS(ImageGroupImpl, kIImageGroupIID)
static void ns_observer_proc (XP_Observable aSource,
XP_ObservableMsg aMsg,
void* aMsgData,
void* aClosure)
{
ImageGroupImpl *image_group = (ImageGroupImpl *)aClosure;
nsVoidArray *observer_list = image_group->GetObservers();
if (observer_list != nsnull) {
PRInt32 i, count = observer_list->Count();
nsIImageGroupObserver *observer;
for (i = 0; i < count; i++) {
observer = (nsIImageGroupObserver *)observer_list->ElementAt(i);
if (observer != nsnull) {
switch (aMsg) {
case IL_STARTED_LOADING:
observer->Notify(image_group,
nsImageGroupNotification_kStartedLoading);
break;
case IL_ABORTED_LOADING:
observer->Notify(image_group,
nsImageGroupNotification_kAbortedLoading);
case IL_FINISHED_LOADING:
observer->Notify(image_group,
nsImageGroupNotification_kFinishedLoading);
case IL_STARTED_LOOPING:
observer->Notify(image_group,
nsImageGroupNotification_kStartedLooping);
case IL_FINISHED_LOOPING:
observer->Notify(image_group,
nsImageGroupNotification_kFinishedLooping);
}
}
}
}
}
static PRBool
ReconnectHack(void* arg, nsIStreamListener* aListener)
{
ImageGroupImpl* ig = (ImageGroupImpl*) arg;
if (nsnull != ig->mListenerRequest) {
*ig->mListenerRequest = aListener;
NS_ADDREF(aListener);
return PR_TRUE;
}
return PR_FALSE;
}
nsresult
ImageGroupImpl::Init(nsIDeviceContext *aDeviceContext, nsISupports *aLoadContext)
{
ilIImageRenderer *renderer;
nsresult result;
if ((result = NS_NewImageRenderer(&renderer)) != NS_OK) {
return result;
}
mGroupContext = IL_NewGroupContext((void *)aDeviceContext,
renderer);
if (mGroupContext == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
// Create an async net context
result = NS_NewImageNetContext(&mNetContext, aLoadContext, ReconnectHack, this);
if (NS_OK != result) {
return result;
}
mDeviceContext = aDeviceContext;
NS_ADDREF(mDeviceContext);
// Get color space to use for this device context.
IL_ColorSpace* colorSpace;
mDeviceContext->GetILColorSpace(colorSpace);
// Set the image group context display mode
IL_DisplayData displayData;
displayData.dither_mode = IL_Auto;
displayData.color_space = colorSpace;
displayData.progressive_display = PR_TRUE;
IL_SetDisplayMode(mGroupContext,
IL_COLOR_SPACE | IL_PROGRESSIVE_DISPLAY | IL_DITHER_MODE,
&displayData);
// Release the color space
IL_ReleaseColorSpace(colorSpace);
return NS_OK;
}
PRBool
ImageGroupImpl::AddObserver(nsIImageGroupObserver *aObserver)
{
if (aObserver == nsnull) {
return PR_FALSE;
}
if (mObservers == nsnull) {
mObservers = new nsVoidArray();
if (mObservers == nsnull) {
return PR_FALSE;
}
IL_AddGroupObserver(mGroupContext, ns_observer_proc, (void *)this);
}
NS_ADDREF(aObserver);
mObservers->AppendElement((void *)aObserver);
return PR_TRUE;
}
PRBool
ImageGroupImpl::RemoveObserver(nsIImageGroupObserver *aObserver)
{
PRBool ret;
if (aObserver == nsnull || mObservers == nsnull) {
return PR_FALSE;
}
ret = mObservers->RemoveElement((void *)aObserver);
if (ret == PR_TRUE) {
NS_RELEASE(aObserver);
}
return ret;
}
nsIImageRequest*
ImageGroupImpl::GetImage(const char* aUrl,
nsIImageRequestObserver *aObserver,
const nscolor* aBackgroundColor,
PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags)
{
NS_PRECONDITION(nsnull != aUrl, "null URL");
ImageRequestImpl *image_req = new ImageRequestImpl;
if (nsnull != image_req) {
nsresult result;
// Ask the image request object to get the image.
PRUint32 groupload_attrib = 0;
GetImgLoadAttributes(&groupload_attrib);
if(!aFlags)
aFlags = groupload_attrib;
mListenerRequest = nsnull;
result = image_req->Init(mGroupContext, aUrl, aObserver, aBackgroundColor,
aWidth, aHeight, aFlags, mNetContext);
if (NS_SUCCEEDED(result)) {
NS_ADDREF(image_req);
} else {
delete image_req;
image_req = nsnull;
}
}
return image_req;
}
NS_IMETHODIMP
ImageGroupImpl::GetImageFromStream(const char* aUrl,
nsIImageRequestObserver *aObserver,
const nscolor* aBackgroundColor,
PRUint32 aWidth, PRUint32 aHeight,
PRUint32 aFlags,
nsIImageRequest*& aResult,
nsIStreamListener*& aListenerResult)
{
NS_PRECONDITION(nsnull != aUrl, "null URL");
nsresult result = NS_OK;
ImageRequestImpl *image_req = new ImageRequestImpl;
if (nsnull == image_req) {
return NS_ERROR_OUT_OF_MEMORY;
}
// Ask the image request object to get the image.
nsIStreamListener* listener = nsnull;
mListenerRequest = &listener;
PRUint32 groupload_attrib = 0;
GetImgLoadAttributes(&groupload_attrib);
if(!aFlags)
aFlags = groupload_attrib;
result = image_req->Init(mGroupContext, aUrl, aObserver, aBackgroundColor,
aWidth, aHeight, aFlags, mNetContext);
aListenerResult = listener;
mListenerRequest = nsnull;
if (NS_SUCCEEDED(result)) {
NS_ADDREF(image_req);
} else {
delete image_req;
image_req = nsnull;
}
aResult = image_req;
return result;
}
void
ImageGroupImpl::Interrupt(void)
{
if (mGroupContext != nsnull) {
IL_InterruptContext(mGroupContext);
}
}
NS_IMETHODIMP
ImageGroupImpl::SetImgLoadAttributes(PRUint32 a_grouploading_attribs){
m_grouploading_attribs = a_grouploading_attribs;
return NS_OK;
}
NS_IMETHODIMP
ImageGroupImpl::GetImgLoadAttributes(PRUint32 *a_grouploading_attribs){
*a_grouploading_attribs = m_grouploading_attribs;
return NS_OK;
}
extern "C" NS_GFX_(nsresult)
NS_NewImageGroup(nsIImageGroup **aInstancePtrResult)
{
nsresult result;
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
nsCOMPtr<nsIImageManager> manager;
manager = do_GetService(kImageManagerCID, &result);
if (NS_FAILED(result)) {
/* This is just to provide backwards compatibility, until the ImageManagerImpl
can be converted to a service on all platforms. Once, we done the conversion
on all platforms, we should be removing the call to NS_NewImageManager(...)
*/
if ((result = NS_NewImageManager(getter_AddRefs(manager))) != NS_OK) {
return result;
}
}
nsIImageGroup *group = new ImageGroupImpl(manager);
if (group == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
return group->QueryInterface(kIImageGroupIID, (void **) aInstancePtrResult);
}

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

@ -52,7 +52,6 @@
#include "nsIPref.h"
static NS_DEFINE_CID(kStreamConvServiceCID, NS_STREAMCONVERTERSERVICE_CID);
static NS_DEFINE_IID(kIImageNetContextIID, IL_INETCONTEXT_IID);
static NS_DEFINE_IID(kIURLIID, NS_IURL_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
@ -598,7 +597,7 @@ ImageNetContextImpl::~ImageNetContextImpl()
}
}
NS_IMPL_THREADSAFE_ISUPPORTS(ImageNetContextImpl, kIImageNetContextIID)
NS_IMPL_THREADSAFE_ISUPPORTS1(ImageNetContextImpl, ilINetContext)
ilINetContext*
ImageNetContextImpl::Clone()
@ -893,6 +892,6 @@ Need code to check freshness of necko cache.
return NS_ERROR_OUT_OF_MEMORY;
}
return cx->QueryInterface(kIImageNetContextIID, (void **) aInstancePtrResult);
return cx->QueryInterface(NS_GET_IID(ilINetContext), (void **) aInstancePtrResult);
}

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

@ -38,7 +38,6 @@
#include "nsCRT.h"
#include "nsIServiceManager.h"
static NS_DEFINE_IID(kIImageNetContextIID, IL_INETCONTEXT_IID);
static NS_DEFINE_IID(kIURLIID, NS_IURL_IID);
static NS_DEFINE_IID(kIIOServiceIID, NS_IIOSERVICE_IID);
@ -89,7 +88,7 @@ ImageNetContextSyncImpl::~ImageNetContextSyncImpl()
{
}
NS_IMPL_ISUPPORTS(ImageNetContextSyncImpl, kIImageNetContextIID)
NS_IMPL_ISUPPORTS1(ImageNetContextSyncImpl, ilINetContext)
ilINetContext*
ImageNetContextSyncImpl::Clone()
@ -312,5 +311,5 @@ nsresult NS_NewImageNetContextSync(ilINetContext **aInstancePtrResult)
return NS_ERROR_OUT_OF_MEMORY;
}
return cx->QueryInterface(kIImageNetContextIID, (void **) aInstancePtrResult);
return cx->QueryInterface(NS_GET_IID(ilINetContext), (void **) aInstancePtrResult);
}

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

@ -1,355 +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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "libimg.h"
#include "ilIImageRenderer.h"
#include "nsIImage.h"
#include "nsIRenderingContext.h"
#include "ni_pixmp.h"
#include "il_util.h"
#include "nsGfxCIID.h"
#include "nsIDeviceContext.h"
static NS_DEFINE_IID(kIImageRendererIID, IL_IIMAGERENDERER_IID);
class ImageRendererImpl : public ilIImageRenderer {
public:
ImageRendererImpl();
NS_DECL_ISUPPORTS
NS_IMETHOD NewPixmap(void* aDisplayContext,
PRInt32 aWidth, PRInt32 aHeight,
IL_Pixmap* aImage, IL_Pixmap* aMask);
NS_IMETHOD UpdatePixmap(void* aDisplayContext,
IL_Pixmap* aImage,
PRInt32 aXOffset, PRInt32 aYOffset,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD ControlPixmapBits(void* aDisplayContext,
IL_Pixmap* aImage, PRUint32 aControlMsg);
NS_IMETHOD DestroyPixmap(void* aDisplayContext, IL_Pixmap* aImage);
NS_IMETHOD DisplayPixmap(void* aDisplayContext,
IL_Pixmap* aImage, IL_Pixmap* aMask,
PRInt32 aX, PRInt32 aY,
PRInt32 aXOffset, PRInt32 aYOffset,
PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD DisplayIcon(void* aDisplayContext,
PRInt32 aX, PRInt32 aY, PRUint32 aIconNumber);
NS_IMETHOD GetIconDimensions(void* aDisplayContext,
PRInt32 *aWidthPtr, PRInt32 *aHeightPtr,
PRUint32 aIconNumber);
NS_IMETHOD SetImageNaturalDimensions(IL_Pixmap* aImage, PRInt32 naturalwidth, PRInt32 naturalheight);
NS_IMETHOD SetDecodedRect(IL_Pixmap* aImage,
PRInt32 x1, PRInt32 y1,
PRInt32 x2, PRInt32 y2);
};
NS_IMETHODIMP
ImageRendererImpl::SetImageNaturalDimensions(
IL_Pixmap* aImage,
PRInt32 naturalwidth,
PRInt32 naturalheight){
nsIImage *img = (nsIImage *)aImage->client_data;
if(img){
nsresult rv = img->SetNaturalWidth(naturalwidth);
rv = img->SetNaturalHeight(naturalheight);
}
return NS_OK;
}
ImageRendererImpl::ImageRendererImpl()
{
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(ImageRendererImpl, kIImageRendererIID)
NS_IMETHODIMP
ImageRendererImpl::NewPixmap(void* aDisplayContext,
PRInt32 aWidth, PRInt32 aHeight,
IL_Pixmap* aImage, IL_Pixmap* aMask)
{
nsIDeviceContext *dc = (nsIDeviceContext *)aDisplayContext;
nsIImage *img;
nsresult rv;
nsMaskRequirements maskflag;
static NS_DEFINE_IID(kImageCID, NS_IMAGE_CID);
static NS_DEFINE_IID(kImageIID, NS_IIMAGE_IID);
if (!aImage)
return NS_ERROR_NULL_POINTER;
// initialize in case of failure
NS_ASSERTION(!aImage->bits, "We have bits already?");
aImage->bits = nsnull;
aImage->haveBits = PR_FALSE;
if (aMask)
{
aMask->haveBits = PR_FALSE;
aMask->bits = nsnull;
}
// Create a new image object
rv = nsComponentManager::CreateInstance(kImageCID, nsnull, kImageIID, (void **)&img);
if (NS_FAILED(rv)) {
return rv;
}
// Have the image match the depth and color space associated with the
// device.
// XXX We probably don't want to do that for monomchrome images (e.g., XBM)
// or one-bit deep GIF images.
PRInt32 depth;
IL_ColorSpace *colorSpace;
rv = dc->GetILColorSpace(colorSpace);
if (NS_FAILED(rv)) {
return rv;
}
depth = colorSpace->pixmap_depth;
// Initialize the image object
if(aMask == nsnull)
maskflag = nsMaskRequirements_kNoMask;
else
maskflag = nsMaskRequirements_kNeeds1Bit;
if(aImage->header.alpha_bits == 8)
maskflag = nsMaskRequirements_kNeeds8Bit;
rv = img->Init(aWidth, aHeight, depth, maskflag);
if (NS_FAILED(rv)) {
return rv;
}
// Update the pixmap image and mask information
// Don't get the bits here, because we can't guarantee that this address
// will still be valid when we start using it. We *must* wait until we're
// inside a lock/unlocks pixels block before getting the bits address
// aImage->bits = img->GetBits();
aImage->haveBits = PR_TRUE;
aImage->client_data = img; // we don't need to add a ref here, because there's
// already one from the call to create the image object
aImage->header.width = aWidth;
aImage->header.height = aHeight;
aImage->header.widthBytes = img->GetLineStride();
if (aMask) {
// see comment about about getting the bits here
// aMask->bits = img->GetAlphaBits();
aMask->haveBits = PR_TRUE;
aMask->client_data = img;
// We must add another reference here, because when the mask's pixmap is
// destroyed it will release a reference
NS_ADDREF(img);
aMask->header.width = aWidth;
aMask->header.height = aHeight;
aMask->header.widthBytes = img->GetAlphaLineStride();
}
// Replace the existing color space with the color space associated
// with the device.
IL_ReleaseColorSpace(aImage->header.color_space);
aImage->header.color_space = colorSpace;
// XXX Why do we do this on a per-image basis?
if (8 == depth) {
IL_ColorMap *cmap = &colorSpace->cmap;
nsColorMap *nscmap = img->GetColorMap();
PRUint8 *mapptr = nscmap->Index;
int i;
for (i=0; i < cmap->num_colors; i++) {
*mapptr++ = cmap->map[i].red;
*mapptr++ = cmap->map[i].green;
*mapptr++ = cmap->map[i].blue;
}
img->ImageUpdated(dc, nsImageUpdateFlags_kColorMapChanged, nsnull);
if (aImage->header.transparent_pixel) {
PRUint8 red, green, blue;
PRUint8 *lookup_table = (PRUint8 *)aImage->header.color_space->cmap.table;
red = aImage->header.transparent_pixel->red;
green = aImage->header.transparent_pixel->green;
blue = aImage->header.transparent_pixel->blue;
aImage->header.transparent_pixel->index = lookup_table[((red >> 3) << 10) |
((green >> 3) << 5) |
(blue >> 3)];
}
}
return NS_OK;
}
NS_IMETHODIMP
ImageRendererImpl::UpdatePixmap(void* aDisplayContext,
IL_Pixmap* aImage,
PRInt32 aXOffset, PRInt32 aYOffset,
PRInt32 aWidth, PRInt32 aHeight)
{
nsIDeviceContext *dc = (nsIDeviceContext *)aDisplayContext;
nsIImage *img = (nsIImage *)aImage->client_data;
nsRect drect(aXOffset, aYOffset, aWidth, aHeight);
img->ImageUpdated(dc, nsImageUpdateFlags_kBitsChanged, &drect);
return NS_OK;
}
NS_IMETHODIMP
ImageRendererImpl::SetDecodedRect( IL_Pixmap* aImage,
PRInt32 x1, PRInt32 y1,
PRInt32 x2, PRInt32 y2)
{
nsIImage *img;
if(aImage == NULL)
return NS_OK;
img= (nsIImage *)aImage->client_data;
img->SetDecodedRect(x1, y1, x2, y2);
return NS_OK;
}
NS_IMETHODIMP
ImageRendererImpl::ControlPixmapBits(void* aDisplayContext,
IL_Pixmap* aImage, PRUint32 aControlMsg)
{
nsIDeviceContext *dc = (nsIDeviceContext *)aDisplayContext;
if (!aImage)
return NS_ERROR_NULL_POINTER;
nsIImage *img = (nsIImage *)aImage->client_data;
if (!img)
return NS_ERROR_UNEXPECTED;
PRBool isMask = aImage->header.is_mask;
nsresult rv = NS_OK;
switch (aControlMsg)
{
case IL_LOCK_BITS:
rv = img->LockImagePixels(isMask);
if (NS_FAILED(rv))
return rv;
// the pixels may have moved, so need to update the bits ptr
aImage->bits = (isMask) ? img->GetAlphaBits() : img->GetBits();
break;
case IL_UNLOCK_BITS:
rv = img->UnlockImagePixels(isMask);
break;
case IL_RELEASE_BITS:
rv = img->Optimize(dc);
break;
default:
NS_NOTREACHED("Uknown control msg");
}
return rv;
}
NS_IMETHODIMP
ImageRendererImpl::DestroyPixmap(void* aDisplayContext, IL_Pixmap* aImage)
{
nsIImage *img = (nsIImage *)aImage->client_data;
aImage->client_data = nsnull;
if (img) {
NS_RELEASE(img);
}
return NS_OK;
}
NS_IMETHODIMP
ImageRendererImpl::DisplayPixmap(void* aDisplayContext,
IL_Pixmap* aImage, IL_Pixmap* aMask,
PRInt32 aX, PRInt32 aY,
PRInt32 aXOffset, PRInt32 aYOffset,
PRInt32 aWidth, PRInt32 aHeight)
{
// Image library doesn't drive the display process.
// XXX Why is this part of the API?
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
ImageRendererImpl::DisplayIcon(void* aDisplayContext,
PRInt32 aX, PRInt32 aY, PRUint32 aIconNumber)
{
// XXX Why is this part of the API?
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
ImageRendererImpl::GetIconDimensions(void* aDisplayContext,
PRInt32 *aWidthPtr, PRInt32 *aHeightPtr,
PRUint32 aIconNumber)
{
// XXX Why is this part of the API?
return NS_ERROR_NOT_IMPLEMENTED;
}
extern "C" NS_GFX_(nsresult)
NS_NewImageRenderer(ilIImageRenderer **aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
ilIImageRenderer *renderer = new ImageRendererImpl();
if (renderer == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
return renderer->QueryInterface(kIImageRendererIID, (void **)aInstancePtrResult);
}

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

@ -36,13 +36,10 @@ nsDeviceContextSpecFactoryWin :: ~nsDeviceContextSpecFactoryWin()
{
}
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(nsDeviceContextSpecFactoryWin, kDeviceContextSpecFactoryIID)
NS_IMPL_ADDREF(nsDeviceContextSpecFactoryWin)
NS_IMPL_RELEASE(nsDeviceContextSpecFactoryWin)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryWin, nsIDeviceContextSpecFactory)
NS_IMETHODIMP nsDeviceContextSpecFactoryWin :: Init(void)
{

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

@ -54,11 +54,7 @@ nsDeviceContextSpecWin :: ~nsDeviceContextSpecWin()
}
}
static NS_DEFINE_IID(kDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecWin, kDeviceContextSpecIID)
NS_IMPL_ADDREF(nsDeviceContextSpecWin)
NS_IMPL_RELEASE(nsDeviceContextSpecWin)
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecWin, nsIDeviceContextSpec)
NS_IMETHODIMP nsDeviceContextSpecWin :: Init(char *aDriverName, char *aDeviceName, HGLOBAL aDEVMODE)
{

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

@ -85,7 +85,6 @@ static void GenerateSingleByte(nsCharSetInfo* aSelf);
static void GenerateMultiByte(nsCharSetInfo* aSelf);
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
nsGlobalFont* nsFontMetricsWin::gGlobalFonts = nsnull;
@ -229,31 +228,10 @@ nsFontMetricsWin :: Release()
return mRefCnt;
}
nsresult
nsFontMetricsWin :: 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;
}
NS_IMPL_QUERY_INTERFACE1(nsFontMetricsWin, nsIFontMetrics)
#else
NS_IMPL_ISUPPORTS(nsFontMetricsWin, kIFontMetricsIID)
NS_IMPL_ISUPPORTS1(nsFontMetricsWin, nsIFontMetrics)
#endif
NS_IMETHODIMP
@ -4208,8 +4186,7 @@ nsFontEnumeratorWin::nsFontEnumeratorWin()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsFontEnumeratorWin,
NS_GET_IID(nsIFontEnumerator));
NS_IMPL_ISUPPORTS1(nsFontEnumeratorWin,nsIFontEnumerator)
static int gInitializedFontEnumerator = 0;

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

@ -30,8 +30,6 @@
#define MAX_BUFFER_HEIGHT 128
static NS_DEFINE_IID(kIImageIID, NS_IIMAGE_IID);
static nsresult BuildDIB(LPBITMAPINFOHEADER *aBHead,PRInt32 aWidth,PRInt32 aHeight,PRInt32 aDepth,PRInt8 *aNumBitPix);
@ -83,7 +81,7 @@ nsImageWin :: ~nsImageWin()
}
NS_IMPL_ISUPPORTS(nsImageWin, kIImageIID);
NS_IMPL_ISUPPORTS1(nsImageWin, nsIImage);
/** ---------------------------------------------------
* See documentation in nsIImageWin.h

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

@ -23,8 +23,6 @@
#include "nsRegionWin.h"
#include "prmem.h"
static NS_DEFINE_IID(kRegionIID, NS_IREGION_IID);
nsRegionWin :: nsRegionWin()
{
NS_INIT_REFCNT();
@ -52,9 +50,7 @@ nsRegionWin :: ~nsRegionWin()
}
}
NS_IMPL_QUERY_INTERFACE(nsRegionWin, kRegionIID)
NS_IMPL_ADDREF(nsRegionWin)
NS_IMPL_RELEASE(nsRegionWin)
NS_IMPL_ISUPPORTS1(nsRegionWin, nsIRegion)
nsresult nsRegionWin :: Init(void)
{

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

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

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

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

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

@ -126,7 +126,7 @@ ContainerEnumeratorImpl::~ContainerEnumeratorImpl(void)
}
}
NS_IMPL_ISUPPORTS(ContainerEnumeratorImpl, NS_GET_IID(nsISimpleEnumerator));
NS_IMPL_ISUPPORTS1(ContainerEnumeratorImpl, nsISimpleEnumerator)
NS_IMETHODIMP

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

@ -418,7 +418,7 @@ InMemoryAssertionEnumeratorImpl::~InMemoryAssertionEnumeratorImpl()
NS_IF_RELEASE(mValue);
}
NS_IMPL_ISUPPORTS(InMemoryAssertionEnumeratorImpl, NS_GET_IID(nsISimpleEnumerator));
NS_IMPL_ISUPPORTS1(InMemoryAssertionEnumeratorImpl, nsISimpleEnumerator)
NS_IMETHODIMP
InMemoryAssertionEnumeratorImpl::HasMoreElements(PRBool* aResult)
@ -574,7 +574,7 @@ InMemoryArcsEnumeratorImpl::~InMemoryArcsEnumeratorImpl()
}
}
NS_IMPL_ISUPPORTS(InMemoryArcsEnumeratorImpl, NS_GET_IID(nsISimpleEnumerator));
NS_IMPL_ISUPPORTS1(InMemoryArcsEnumeratorImpl, nsISimpleEnumerator)
NS_IMETHODIMP
InMemoryArcsEnumeratorImpl::HasMoreElements(PRBool* aResult)

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

@ -106,7 +106,7 @@ nsIRDFResource* RDFContainerImpl::kRDF_nextVal;
////////////////////////////////////////////////////////////////////////
// nsISupports interface
NS_IMPL_ISUPPORTS(RDFContainerImpl, NS_GET_IID(nsIRDFContainer));
NS_IMPL_ISUPPORTS1(RDFContainerImpl, nsIRDFContainer)

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

@ -90,7 +90,7 @@ nsIRDFLiteral* RDFContainerUtilsImpl::kOne;
////////////////////////////////////////////////////////////////////////
// nsISupports interface
NS_IMPL_THREADSAFE_ISUPPORTS(RDFContainerUtilsImpl, NS_GET_IID(nsIRDFContainerUtils));
NS_IMPL_THREADSAFE_ISUPPORTS1(RDFContainerUtilsImpl, nsIRDFContainerUtils)
////////////////////////////////////////////////////////////////////////
// nsIRDFContainerUtils interface

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

@ -100,7 +100,6 @@
//----------------------------------------------------------------------
static NS_DEFINE_IID(kIDTDIID, NS_IDTD_IID);
static NS_DEFINE_IID(kIInputStreamIID, NS_IINPUTSTREAM_IID);
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
@ -194,7 +193,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(ProxyStream, kIInputStreamIID);
NS_IMPL_ISUPPORTS1(ProxyStream, nsIInputStream);
//----------------------------------------------------------------------
//

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -296,7 +296,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(nsProxyLoadStream, NS_GET_IID(nsIInputStream));
NS_IMPL_ISUPPORTS1(nsProxyLoadStream, nsIInputStream);
//----------------------------------------------------------------------
//
@ -6438,7 +6438,7 @@ nsXULDocument::ParserObserver::~ParserObserver()
NS_IF_RELEASE(mDocument);
}
NS_IMPL_ISUPPORTS(nsXULDocument::ParserObserver, NS_GET_IID(nsIStreamObserver));
NS_IMPL_ISUPPORTS1(nsXULDocument::ParserObserver, nsIStreamObserver);
NS_IMETHODIMP
nsXULDocument::ParserObserver::OnStartRequest(nsIChannel* aChannel,
@ -6538,7 +6538,7 @@ XULElementFactoryImpl::~XULElementFactoryImpl()
}
NS_IMPL_ISUPPORTS(XULElementFactoryImpl, NS_GET_IID(nsIElementFactory));
NS_IMPL_ISUPPORTS1(XULElementFactoryImpl, nsIElementFactory)
nsresult

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

@ -485,7 +485,7 @@ XULSortServiceImpl::~XULSortServiceImpl(void)
NS_IMPL_ISUPPORTS(XULSortServiceImpl, NS_GET_IID(nsIXULSortService));
NS_IMPL_ISUPPORTS1(XULSortServiceImpl, nsIXULSortService)

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

@ -360,7 +360,7 @@ FileSystemDataSource::~FileSystemDataSource (void)
NS_IMPL_ISUPPORTS(FileSystemDataSource, NS_GET_IID(nsIRDFDataSource));
NS_IMPL_ISUPPORTS1(FileSystemDataSource, nsIRDFDataSource)

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

@ -134,7 +134,7 @@ public:
}
};
NS_IMPL_ISUPPORTS(ConsoleOutputStreamImpl, NS_GET_IID(nsIOutputStream));
NS_IMPL_ISUPPORTS1(ConsoleOutputStreamImpl, nsIOutputStream)
////////////////////////////////////////////////////////////////////////

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

@ -150,7 +150,7 @@ Observer::Observer()
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(Observer, NS_GET_IID(nsIRDFObserver));
NS_IMPL_ISUPPORTS1(Observer, nsIRDFObserver)
static nsresult
rdf_WriteOp(const char* aOp,

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

@ -45,8 +45,6 @@
#include "nsIServiceManager.h"
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);
@ -88,7 +86,7 @@ MyObserver::~MyObserver()
{
}
NS_IMPL_ISUPPORTS(MyObserver, kIImageObserverIID)
NS_IMPL_ISUPPORTS1(MyObserver, nsIImageRequestObserver)
void
MyObserver::Notify(nsIImageRequest *aImageRequest,

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

@ -40,7 +40,6 @@
static NS_DEFINE_IID(kChildCID, NS_CHILD_CID);
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
static NS_DEFINE_IID(kIImageObserverIID, NS_IIMAGEREQUESTOBSERVER_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
@ -212,7 +211,7 @@ nsThrobber::Destroy()
}
}
NS_IMPL_ISUPPORTS(nsThrobber, kIImageObserverIID)
NS_IMPL_ISUPPORTS1(nsThrobber, nsIImageRequestObserver)
nsresult
nsThrobber::Init(nsIWidget* aParent, const nsRect& aBounds, const nsString& aFileNameMask, PRInt32 aNumImages)

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

@ -118,7 +118,6 @@ static NS_DEFINE_IID(kMetaCharsetCID, NS_META_CHARSET_CID);
static NS_DEFINE_IID(kIMetaCharsetServiceIID, NS_IMETA_CHARSET_SERVICE_IID);
static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
static NS_DEFINE_IID(kFormProcessorIID, NS_IFORMPROCESSOR_IID);
static NS_DEFINE_IID(kIDOMHTMLSelectElementIID, NS_IDOMHTMLSELECTELEMENT_IID);
#define DEFAULT_WIDTH 620
@ -220,9 +219,7 @@ public:
NS_IMPL_ADDREF(nsTestFormProcessor);
NS_IMPL_RELEASE(nsTestFormProcessor);
NS_IMPL_QUERY_INTERFACE(nsTestFormProcessor, kFormProcessorIID);
NS_IMPL_ISUPPORTS1(nsTestFormProcessor, nsIFormProcessor);
nsTestFormProcessor::nsTestFormProcessor()
{

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

@ -60,7 +60,6 @@
#include "nsIWebNavigation.h"
static NS_DEFINE_IID(kIDocumentLoaderObserverIID, NS_IDOCUMENTLOADEROBSERVER_IID);
static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
static NS_DEFINE_IID(kFrameUtilCID, NS_FRAME_UTIL_CID);
static NS_DEFINE_IID(kIFrameUtilIID, NS_IFRAME_UTIL_IID);
static NS_DEFINE_IID(kIXMLContentIID, NS_IXMLCONTENT_IID);
@ -212,7 +211,7 @@ nsWebCrawler::~nsWebCrawler()
delete mVisited;
}
NS_IMPL_ISUPPORTS(nsWebCrawler, kIDocumentLoaderObserverIID)
NS_IMPL_ISUPPORTS1(nsWebCrawler, nsIDocumentLoaderObserver)
NS_IMETHODIMP
nsWebCrawler::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL,
@ -760,7 +759,7 @@ nsWebCrawler::FindMoreURLs()
docShell->GetContentViewer(&cv);
if (nsnull != cv) {
nsIDocumentViewer* docv = nsnull;
cv->QueryInterface(kIDocumentViewerIID, (void**) &docv);
cv->QueryInterface(NS_GET_IID(nsIDocumentViewer), (void**) &docv);
if (nsnull != docv) {
nsIDocument* doc = nsnull;
docv->GetDocument(doc);
@ -863,7 +862,7 @@ nsWebCrawler::GetPresShell()
docShell->GetContentViewer(&cv);
if (nsnull != cv) {
nsIDocumentViewer* docv = nsnull;
cv->QueryInterface(kIDocumentViewerIID, (void**) &docv);
cv->QueryInterface(NS_GET_IID(nsIDocumentViewer), (void**) &docv);
if (nsnull != docv) {
nsIPresContext* cx;
docv->GetPresContext(cx);

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

@ -37,7 +37,7 @@
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kTimerManagerCID, NS_TIMERMANAGER_CID);
NS_IMPL_ISUPPORTS(nsAppShell, NS_IAPPSHELL_IID)
NS_IMPL_ISUPPORTS1(nsAppShell, nsIAppShell)
static int gKeepGoing = 1;
//-------------------------------------------------------------------------

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

@ -1,90 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsFontSizeIterator.h"
#include <windows.h>
#include "nsFont.h"
#include "nsVoidArray.h"
NS_IMPL_ADDREF(nsFontSizeIterator)
NS_IMPL_RELEASE(nsFontSizeIterator)
NS_IMPL_QUERY_INTERFACE(nsFontSizeIterator, NS_GET_IID(nsIFontSizeIterator))
//----------------------------------------------------------
nsFontSizeIterator::nsFontSizeIterator()
{
NS_INIT_REFCNT();
mFontInfo = nsnull;
mSizeIterInx = 0;
}
//----------------------------------------------------------
nsFontSizeIterator::~nsFontSizeIterator()
{
}
///----------------------------------------------------------
//-- nsIFontNameIterator
//----------------------------------------------------------
NS_IMETHODIMP nsFontSizeIterator::Reset()
{
mSizeIterInx = 0;
return NS_OK;
}
//----------------------------------------------------------
NS_IMETHODIMP nsFontSizeIterator::Get( double* aFontSize )
{
if (nsnull != mFontInfo->mSizes &&
mFontInfo->mSizes->Count() > 0 &&
mSizeIterInx < mFontInfo->mSizes->Count()) {
PRUint32 size = (PRUint32)mFontInfo->mSizes->ElementAt(mSizeIterInx);
*aFontSize = (double)size;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
//----------------------------------------------------------
NS_IMETHODIMP nsFontSizeIterator::Advance()
{
if (nsnull != mFontInfo->mSizes &&
mFontInfo->mSizes->Count() > 0 &&
mSizeIterInx < mFontInfo->mSizes->Count()-2) {
mSizeIterInx++;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
//----------------------------------------------------------
NS_IMETHODIMP nsFontSizeIterator::SetFontInfo( FontInfo * aFontInfo )
{
mFontInfo = aFontInfo;
return NS_OK;
}

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

@ -28,7 +28,7 @@
static NS_DEFINE_IID(kILookAndFeelIID, NS_ILOOKANDFEEL_IID);
NS_IMPL_ISUPPORTS(nsLookAndFeel, NS_ILOOKANDFEEL_IID)
NS_IMPL_ISUPPORTS1(nsLookAndFeel, nsILookAndFeel)
nsLookAndFeel::nsLookAndFeel() : nsILookAndFeel()
{

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

@ -30,7 +30,7 @@
#include "aimm.h"
#endif
NS_IMPL_ISUPPORTS(nsToolkit, NS_ITOOLKIT_IID)
NS_IMPL_ISUPPORTS1(nsToolkit, nsIToolkit)
//
// Static thread local storage index of the Toolkit

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

@ -28,7 +28,7 @@
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
NS_IMPL_ISUPPORTS(nsAbout, NS_GET_IID(nsIAboutModule));
NS_IMPL_ISUPPORTS1(nsAbout, nsIAboutModule)
static const char kURI[] = "chrome://global/locale/about.html";

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

@ -913,6 +913,6 @@ nsFindComponent::ResetContext( nsISupports *aContext,
}
// nsFindComponent::Context implementation...
NS_IMPL_ISUPPORTS( nsFindComponent::Context, NS_GET_IID(nsISearchContext) )
NS_IMPL_ISUPPORTS1( nsFindComponent::Context, nsISearchContext)
NS_IMPL_IAPPSHELLCOMPONENT( nsFindComponent, nsIFindComponent, NS_IFINDCOMPONENT_CONTRACTID, 0 )

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

@ -190,7 +190,7 @@ nsMdbTableEnumerator::~nsMdbTableEnumerator()
}
NS_IMPL_ISUPPORTS(nsMdbTableEnumerator, NS_GET_IID(nsISimpleEnumerator));
NS_IMPL_ISUPPORTS1(nsMdbTableEnumerator, nsISimpleEnumerator);
NS_IMETHODIMP
nsMdbTableEnumerator::HasMoreElements(PRBool* _result)

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

@ -766,7 +766,7 @@ nsRegistryDataSource::SubkeyEnumerator::ConvertRegistryNodeToResource(nsISupport
return NS_OK;
}
NS_IMPL_ISUPPORTS(nsRegistryDataSource::SubkeyEnumerator, NS_GET_IID(nsISimpleEnumerator));
NS_IMPL_ISUPPORTS1(nsRegistryDataSource::SubkeyEnumerator, nsISimpleEnumerator)
NS_IMETHODIMP
nsRegistryDataSource::SubkeyEnumerator::HasMoreElements(PRBool* _retval)

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

@ -230,7 +230,7 @@ RelatedLinksStreamListener::Init()
// nsISupports interface
NS_IMPL_ISUPPORTS(RelatedLinksStreamListener, NS_GET_IID(nsIStreamListener));
NS_IMPL_ISUPPORTS1(RelatedLinksStreamListener, nsIStreamListener)

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

@ -247,7 +247,7 @@ InternetSearchContext::Truncate()
NS_IMPL_THREADSAFE_ISUPPORTS(InternetSearchContext, NS_GET_IID(nsIInternetSearchContext));
NS_IMPL_THREADSAFE_ISUPPORTS1(InternetSearchContext, nsIInternetSearchContext)

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

@ -136,7 +136,7 @@ LocalSearchDataSource::Init()
NS_IMPL_ISUPPORTS(LocalSearchDataSource, NS_GET_IID(nsIRDFDataSource));
NS_IMPL_ISUPPORTS1(LocalSearchDataSource, nsIRDFDataSource)

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

@ -82,7 +82,7 @@ nsTimeBomb::~nsTimeBomb()
{
}
NS_IMPL_ISUPPORTS(nsTimeBomb, NS_GET_IID(nsITimeBomb));
NS_IMPL_ISUPPORTS1(nsTimeBomb, nsITimeBomb)
NS_IMETHODIMP
nsTimeBomb::Init()