Bug 431634 - Part 2 - remove unused methods from nsIWidget; r+sr=roc

This commit is contained in:
Jeremy D. Lea
2009-04-08 11:39:58 -07:00
parent ec9f250578
commit df181166b0
17 changed files with 11 additions and 872 deletions

View File

@@ -191,9 +191,6 @@ nsWindow::nsWindow()
mIsShown = PR_FALSE;
mEnabled = PR_TRUE;
mPreferredWidth = 0;
mPreferredHeight = 0;
mDrawingArea = nsnull;
mIsVisible = PR_FALSE;
mActivatePending = PR_FALSE;
@@ -720,35 +717,6 @@ nsWindow::Invalidate(const nsIntRect &aRect,
return NS_OK;
}
NS_IMETHODIMP
nsWindow::InvalidateRegion(const nsIRegion* aRegion,
PRBool aIsSynchronous)
{
QRegion *region = nsnull;
aRegion->GetNativeRegion((void *&)region);
if (region && mDrawingArea) {
QRect rect = region->boundingRect();
// LOGDRAW(("Invalidate (region) [%p]: %d %d %d %d (sync: %d)\n",
// (void *)this,
// rect.x, rect.y, rect.width, rect.height, aIsSynchronous));
if (aIsSynchronous && !mDrawingArea->paintingActive())
mDrawingArea->repaint(*region);
else
mDrawingArea->update(*region);
}
else {
qDebug("FIXME:>>>>>>Func:%s::%d\n", __PRETTY_FUNCTION__, __LINE__);
LOGDRAW(("Invalidate (region) [%p] with empty region\n",
(void *)this));
}
return NS_OK;
}
NS_IMETHODIMP
nsWindow::Update()
{
@@ -759,12 +727,6 @@ nsWindow::Update()
return NS_OK;
}
NS_IMETHODIMP
nsWindow::SetColorMap(nsColorMap *aColorMap)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsWindow::Scroll(PRInt32 aDx,
PRInt32 aDy,
@@ -787,26 +749,6 @@ nsWindow::Scroll(PRInt32 aDx,
return NS_OK;
}
NS_IMETHODIMP
nsWindow::ScrollWidgets(PRInt32 aDx,
PRInt32 aDy)
{
if (!mDrawingArea)
return NS_OK;
mDrawingArea->scroll(aDx, aDy);
return NS_OK;
}
NS_IMETHODIMP
nsWindow::ScrollRect(nsIntRect &aSrcRect,
PRInt32 aDx,
PRInt32 aDy)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
void*
nsWindow::GetNativeData(PRUint32 aDataType)
{
@@ -901,12 +843,6 @@ nsWindow::SetIcon(const nsAString& aIconSpec)
return SetWindowIconList(iconList);
}
NS_IMETHODIMP
nsWindow::ShowMenuBar(PRBool aShow)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
nsIntPoint
nsWindow::WidgetToScreenOffset()
{
@@ -937,12 +873,6 @@ nsWindow::EnableDragDrop(PRBool aEnable)
return NS_OK;
}
void
nsWindow::ConvertToDeviceCoordinates(nscoord &aX,
nscoord &aY)
{
}
NS_IMETHODIMP
nsWindow::PreCreateWidget(nsWidgetInitData *aWidgetInitData)
{
@@ -2521,25 +2451,6 @@ nsWindow::Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,
return NS_OK;
}
NS_IMETHODIMP
nsWindow::GetPreferredSize(PRInt32 &aWidth,
PRInt32 &aHeight)
{
aWidth = mPreferredWidth;
aHeight = mPreferredHeight;
return (mPreferredWidth != 0 && mPreferredHeight != 0) ?
NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsWindow::SetPreferredSize(PRInt32 aWidth,
PRInt32 aHeight)
{
mPreferredWidth = aWidth;
mPreferredHeight = aHeight;
return NS_OK;
}
NS_IMETHODIMP
nsWindow::Enable(PRBool aState)
{