double [] x = new double [1]; double [] y = new double [1]; OS.gdk_event_get_coords (gdkEvent, x, y); event.x = (int) x [0]; event.y = (int) y [0];
double [] root_x = new double [1], root_y = new double [1]; OS.gdk_event_get_root_coords (gdkEvent, root_x, root_y); int window = OS.GTK_WIDGET_WINDOW (eventHandle ()); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); event.x = (int)(root_x [0] - origin_x [0]); event.y = (int)(root_y [0] - origin_y [0]);
void sendMouseEvent (int type, int button, int gdkEvent) {	Event event = new Event ();	event.time = OS.gdk_event_get_time (gdkEvent);	event.button = button;	double [] x = new double [1];	double [] y = new double [1];	OS.gdk_event_get_coords (gdkEvent, x, y);	event.x = (int) x [0];	event.y = (int) y [0];	int [] state = new int [1];	OS.gdk_event_get_state (gdkEvent, state);	setInputState (event, state [0]);	postEvent (type, event);}