display.lastX = x; display.lastY = y;
boolean sendMouseEvent (int type, short button, int count, int detail, boolean send, int theEvent) {	if (!hooks (type) && !filters (type)) return true;	int x, y;	if (OS.HIVIEW) {		CGPoint pt = new CGPoint ();		OS.GetEventParameter (theEvent, OS.kEventParamWindowMouseLocation, OS.typeHIPoint, null, CGPoint.sizeof, null, pt);		OS.HIViewConvertPoint (pt, 0, handle);		x = (int) pt.x;		y = (int) pt.y;	} else {		int sizeof = org.eclipse.swt.internal.carbon.Point.sizeof;		org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();		OS.GetEventParameter (theEvent, OS.kEventParamMouseLocation, OS.typeQDPoint, null, sizeof, null, pt);		Rect rect = new Rect ();		int window = OS.GetControlOwner (handle);		OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect);		x = pt.h - rect.left;		y = pt.v - rect.top;		OS.GetControlBounds (handle, rect);		x -= rect.left;		y -= rect.top;	}	int [] chord = new int [1];	OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord);	int [] modifiers = new int [1];	OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);	return sendMouseEvent (type, button, count, detail, send, chord [0], (short) x, (short) y, modifiers [0]);}