mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
updated the invalidate method
This commit is contained in:
parent
61b4870db2
commit
a2b1bb00cb
@ -721,7 +721,33 @@ NS_IMETHODIMP nsWindow::SetCursor(nsCursor aCursor)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Invalidate this component visible area
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsWindow::Invalidate(const nsRect &aRect, PRBool aIsSynchronous)
|
||||
{
|
||||
GrafPtr curport;
|
||||
RgnHandle thergn;
|
||||
|
||||
|
||||
if(mWindowRegion)
|
||||
{
|
||||
::GetPort(&curport);
|
||||
::SetPort(mWindowPtr);
|
||||
thergn = ::NewRgn();
|
||||
::SetRectRgn(thergn,aRect.x,aRect.y,aRect.x+aRect.width,aRect.y+aRect.height);
|
||||
::SectRgn(thergn,mWindowRegion,thergn);
|
||||
::InvalRgn(thergn);
|
||||
::DisposeRgn(thergn);
|
||||
::SetPort(curport);
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Invalidate this component visible area
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
virtual nsCursor GetCursor();
|
||||
NS_IMETHOD SetCursor(nsCursor aCursor);
|
||||
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
|
||||
NS_IMETHOD Invalidate(const nsRect &aRect,PRBool aIsSynchronous);
|
||||
virtual void* GetNativeData(PRUint32 aDataType);
|
||||
virtual nsIRenderingContext* GetRenderingContext();
|
||||
NS_IMETHOD SetColorMap(nsColorMap *aColorMap);
|
||||
|
Loading…
Reference in New Issue
Block a user