if (OS.GetEventClass(eRefHandle) != OS.kEventClassWindow || OS.GetEventKind(eRefHandle) != OS.kEventWindowDrawContent) return OS.eventNotHandledErr; processPaintToolTip(whichWindow); return OS.noErr;
int eventClass= OS.GetEventClass(eRefHandle); int eventKind= OS.GetEventKind(eRefHandle);  if (eventClass == OS.kEventClassWindow && eventKind == OS.kEventWindowDrawContent) { Rect bounds= new Rect(); OS.GetWindowBounds(whichWindow, (short)OS.kWindowContentRgn, bounds); int width= bounds.right - bounds.left; int height= bounds.bottom - bounds.top; OS.SetRect(bounds, (short)0, (short)0, (short)width, (short)height); MacUtil.RGBBackColor(COLOR_INFO_BACKGROUND.handle); MacUtil.RGBForeColor(COLOR_INFO_FOREGROUND.handle); OS.EraseRect(bounds); if (fToolTipText != null) { OS.SetRect(bounds, (short)TOOLTIP_MARGIN, (short)TOOLTIP_MARGIN, (short)(width-TOOLTIP_MARGIN), (short)(height-TOOLTIP_MARGIN)); int sHandle= OS.CFStringCreateWithCharacters(fToolTipText); OS.DrawThemeTextBox(sHandle, fHoverThemeFont, OS.kThemeStateActive, true, bounds, (short)0, 0); OS.CFRelease(sHandle); } return OS.noErr; } return OS.eventNotHandledErr;
	private int handleTooltipWindowCallback(int nextHandler, int eRefHandle, int whichWindow) {		if (OS.GetEventClass(eRefHandle) != OS.kEventClassWindow						|| OS.GetEventKind(eRefHandle) != OS.kEventWindowDrawContent)			return OS.eventNotHandledErr;		processPaintToolTip(whichWindow);		return OS.noErr;	}