switch (eventKind) { case OS.kEventWindowActivated: windowProc(whichWindow, SWT.FocusIn, new Boolean(true)); return OS.kNoErr; case OS.kEventWindowDeactivated: windowProc(whichWindow, SWT.FocusIn, new Boolean(false)); return OS.kNoErr; case OS.kEventWindowBoundsChanged: int[] attr= new int[1]; OS.GetEventParameter(eRefHandle, OS.kEventParamAttributes, OS.typeUInt32, null, null, attr); windowProc(whichWindow, SWT.Resize, new Integer(attr[0])); return OS.kNoErr; case OS.kEventWindowClose: windowProc(whichWindow, SWT.Dispose, null); return OS.kNoErr; case OS.kEventWindowDrawContent: if (toolTipWindowHandle == whichWindow) { processPaintToolTip(whichWindow);
switch (eventClass) {  case OS.kEventClassMouse: return handleMouseCallback(nextHandler, eRefHandle);  case OS.kEventClassWindow: switch (eventKind) { case OS.kEventWindowActivated: fActiveWindow= whichWindow; windowProc(whichWindow, SWT.FocusIn, new Boolean(true));
	private int handleWindowCallback(int nextHandler, int eRefHandle, int whichWindow) {		//whichWindow= getDirectObject(eRefHandle);		int eventKind= OS.GetEventKind(eRefHandle);		switch (eventKind) {		case OS.kEventWindowActivated:			windowProc(whichWindow, SWT.FocusIn, new Boolean(true));			return OS.kNoErr;		case OS.kEventWindowDeactivated:			windowProc(whichWindow, SWT.FocusIn, new Boolean(false));			return OS.kNoErr;		case OS.kEventWindowBoundsChanged:			int[] attr= new int[1];			OS.GetEventParameter(eRefHandle, OS.kEventParamAttributes, OS.typeUInt32, null, null, attr);				windowProc(whichWindow, SWT.Resize, new Integer(attr[0]));			return OS.kNoErr;		case OS.kEventWindowClose:			windowProc(whichWindow, SWT.Dispose, null);			return OS.kNoErr;		case OS.kEventWindowDrawContent:			if (toolTipWindowHandle == whichWindow) {				processPaintToolTip(whichWindow);				return OS.kNoErr;			} else {				updateWindow2(whichWindow);				return OS.kNoErr;			}			//break;		default:			System.out.println("handleWindowCallback: " + eventKind);			break;		}		return OS.eventNotHandledErr;	}