case OS.kEventClassAppleEvent: System.out.println("kEventClassAppleEvent"); break;
	private int handleApplicationCallback(int nextHandler, int eRefHandle, int userData) {			MacEvent mEvent= new MacEvent(eRefHandle);				int eventClass= OS.GetEventClass(eRefHandle);		int eventKind= OS.GetEventKind(eRefHandle);				switch (eventClass) {					case OS.kEventClassCommand:					if (eventKind == 1) {				int[] rc= new int[4];				OS.GetEventHICommand(eRefHandle, rc);								//System.out.println("kEventClassCommand: " + rc[3]);										// try to map the MenuRef to a SWT Menu				Widget w= findWidget (rc[2]);				if (w instanceof Menu) {					Menu menu= (Menu) w;					menu.handleMenu(rc[3]);					OS.HiliteMenu((short)0);	// unhighlight what MenuSelect (or MenuKey) hilited					return OS.kNoErr;				}				OS.HiliteMenu((short)0);	// unhighlight what MenuSelect (or MenuKey) hilited				// we do not return kNoErr here so that the default handler				// takes care of special menus like the Combo menu.			}			break;						case OS.kEventClassMenu:			switch (eventKind) {			case OS.kEventMenuBeginTracking:				//System.out.println("kEventMenuBeginTracking");				break;			case OS.kEventMenuEndTracking:				//System.out.println("kEventMenuEndTracking");				break;			}			break;				case OS.kEventClassKeyboard:			System.out.println("  handleApplicationCallback: kEventClassKeyboard");				switch (eventKind) {			case OS.kEventRawKeyDown:			case OS.kEventRawKeyRepeat:				System.out.println("    kEventRawKeyDown | kEventRawKeyRepeat");				int cmd= OS.MenuEvent(mEvent.getData());				if (OS.HiWord(cmd) != 0) {					System.out.println("    doMenuCommand: " + cmd);					//doMenuCommand(cmd);					return OS.kNoErr;				}				break;												case OS.kEventHotKeyPressed:				System.out.println("    kEventHotKeyPressed");				break;			}			System.out.println("    end handleApplicationCallback: kEventClassKeyboard");				break;					case OS.kEventClassMouse:			switch (eventKind) {							case OS.kEventMouseDown:							fTrackedControl= 0;								hideToolTip();					MacPoint where= mEvent.getWhere();				int[] w= new int[1];				short part= OS.FindWindow(where.getData(), w);												int oldPort= OS.GetPort();				OS.SetPortWindowPort(w[0]);				OS.GlobalToLocal(where.getData());				OS.SetPort(oldPort);								if (part == OS.inMenuBar) {					int id= OS.MenuSelect(mEvent.getWhere().getData());					//doMenuCommand(OS.MenuSelect(mEvent.getWhere().getData()));					return OS.kNoErr;				}				break;							case OS.kEventMouseDragged:				return handleMouseCallback(nextHandler, eRefHandle, 0);							case OS.kEventMouseUp:				return handleMouseCallback(nextHandler, eRefHandle, 0);			}			return OS.eventNotHandledErr;								case SWT_USER_EVENT:	// SWT1 user event			//System.out.println("handleApplicationCallback: user event " + eventKind);			return OS.kNoErr;					default:			System.out.println("handleApplicationCallback: unknown event class" + MacUtil.toString(eventClass));			break;		}		return OS.eventNotHandledErr;	}