int wHandle= OS.GetWindowFromPort(handle);  int rgn= OS.NewRgn(); OS.ScrollRect(r.getData(), (short)deltaX, (short)deltaY, rgn);  org.eclipse.swt.widgets.Display.getDefault().repairWindow(wHandle, rgn, fOffsetX, fOffsetY);  unfocus(true);
try { if (focus(true, null)) { int rgn= OS.NewRgn(); OS.ScrollRect(r.getData(), (short)deltaX, (short)deltaY, rgn); OS.InvalWindowRgn(OS.GetWindowFromPort(handle), rgn); OS.DisposeRgn(rgn); } } finally { unfocus(true); }
public void copyArea(int x, int y, int width, int height, int destX, int destY) {	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	if (width <= 0 || height <= 0) return;	int deltaX = destX - x, deltaY = destY - y;	if (deltaX == 0 && deltaY == 0) return;			focus(true);		Rectangle src= new Rectangle(x, y, width, height);	src= src.union(new Rectangle(destX, destY, width, height));	MacRect r= new MacRect(src);		int wHandle= OS.GetWindowFromPort(handle);	int rgn= OS.NewRgn();	OS.ScrollRect(r.getData(), (short)deltaX, (short)deltaY, rgn);	org.eclipse.swt.widgets.Display.getDefault().repairWindow(wHandle, rgn, fOffsetX, fOffsetY);	unfocus(true);}