make getRect pass out an nsrect&

This commit is contained in:
pavlov%netscape.com 2001-03-14 01:14:23 +00:00
Родитель 3f44553e13
Коммит 2fc149e1f3
8 изменённых файлов: 17 добавлений и 14 удалений

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

@ -31,6 +31,7 @@
%}
interface gfxIImageFrame;
native nsRectRef(nsRect &);
/**
* gfxIImageFrame interface
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
/**
* The rectangle this frame ocupies.
* @param rect this is really an out parameter.
*/
[noscript] readonly attribute nsRect rect;
[noscript] void getRect(in nsRectRef rect);
/**
* The image data format the image was created with.

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

@ -33,5 +33,4 @@
typedef PRInt32 nscoord;
[ptr] native nsRect(nsRect);
[ref] native nsRectRef(nsRect);

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

@ -31,6 +31,7 @@
%}
interface gfxIImageFrame;
native nsRectRef(nsRect &);
/**
* gfxIImageFrame interface
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
/**
* The rectangle this frame ocupies.
* @param rect this is really an out parameter.
*/
[noscript] readonly attribute nsRect rect;
[noscript] void getRect(in nsRectRef rect);
/**
* The image data format the image was created with.

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

@ -33,5 +33,4 @@
typedef PRInt32 nscoord;
[ptr] native nsRect(nsRect);
[ref] native nsRectRef(nsRect);

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

@ -152,14 +152,14 @@ NS_IMETHODIMP gfxImageFrame::GetHeight(nscoord *aHeight)
return NS_OK;
}
/* readonly attribute nsRect rect; */
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect **aRect)
/* void getRect(in nsRectRef rect); */
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect &aRect)
{
if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED;
nsRect rect(mOffset.x, mOffset.y, mSize.width, mSize.height);
*aRect = ▭
aRect.SetRect(mOffset.x, mOffset.y, mSize.width, mSize.height);
return NS_OK;
}

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

@ -31,6 +31,7 @@
%}
interface gfxIImageFrame;
native nsRectRef(nsRect &);
/**
* gfxIImageFrame interface
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
/**
* The rectangle this frame ocupies.
* @param rect this is really an out parameter.
*/
[noscript] readonly attribute nsRect rect;
[noscript] void getRect(in nsRectRef rect);
/**
* The image data format the image was created with.

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

@ -33,5 +33,4 @@
typedef PRInt32 nscoord;
[ptr] native nsRect(nsRect);
[ref] native nsRectRef(nsRect);

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

@ -152,14 +152,14 @@ NS_IMETHODIMP gfxImageFrame::GetHeight(nscoord *aHeight)
return NS_OK;
}
/* readonly attribute nsRect rect; */
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect **aRect)
/* void getRect(in nsRectRef rect); */
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect &aRect)
{
if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED;
nsRect rect(mOffset.x, mOffset.y, mSize.width, mSize.height);
*aRect = ▭
aRect.SetRect(mOffset.x, mOffset.y, mSize.width, mSize.height);
return NS_OK;
}