OS.g_signal_connect (handle, OS.map_event, windowProc3, MAP_EVENT);
void hookEvents () {	//TODO - get rid of enter/exit for mouse crossing border	int eventHandle = eventHandle ();	int mask =		OS.GDK_EXPOSURE_MASK | OS.GDK_POINTER_MOTION_MASK |		OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | 		OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | 		OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK |		OS.GDK_FOCUS_CHANGE_MASK;	OS.gtk_widget_add_events (eventHandle, mask);	int windowProc2 = display.windowProc2;	int windowProc3 = display.windowProc3;	OS.g_signal_connect (eventHandle, OS.popup_menu, windowProc2, POPUP_MENU);	OS.g_signal_connect_after (handle, OS.realize, windowProc2, REALIZE);	OS.g_signal_connect (eventHandle, OS.show_help, windowProc3, SHOW_HELP);	OS.g_signal_connect (eventHandle, OS.button_press_event, windowProc3, BUTTON_PRESS_EVENT);	OS.g_signal_connect (eventHandle, OS.button_release_event, windowProc3, BUTTON_RELEASE_EVENT);	OS.g_signal_connect (eventHandle, OS.motion_notify_event, windowProc3, MOTION_NOTIFY_EVENT);	OS.g_signal_connect (eventHandle, OS.key_press_event, windowProc3, KEY_PRESS_EVENT);	OS.g_signal_connect (eventHandle, OS.key_release_event, windowProc3, KEY_RELEASE_EVENT);	OS.g_signal_connect (eventHandle, OS.focus_in_event, windowProc3, FOCUS_IN_EVENT);	OS.g_signal_connect (eventHandle, OS.focus_out_event, windowProc3, FOCUS_OUT_EVENT);	OS.g_signal_connect (eventHandle, OS.event_after, windowProc3, EVENT_AFTER);	OS.g_signal_connect (eventHandle, OS.enter_notify_event, windowProc3, ENTER_NOTIFY_EVENT);	OS.g_signal_connect (eventHandle, OS.leave_notify_event, windowProc3, LEAVE_NOTIFY_EVENT);	OS.g_signal_connect_after (eventHandle, OS.expose_event, windowProc3, EXPOSE_EVENT);	int imHandle = imHandle ();	if (imHandle != 0) {		int topHandle = topHandle ();		OS.g_signal_connect (handle, OS.map_event, windowProc3, MAP_EVENT);		OS.g_signal_connect (handle, OS.unrealize, windowProc2, UNREALIZE);		OS.g_signal_connect (topHandle, OS.hide, windowProc2, HIDE);		OS.g_signal_connect (imHandle, OS.commit, windowProc3, COMMIT);		OS.g_signal_connect (imHandle, OS.preedit_changed, windowProc2, PREEDIT_CHANGED);	}	/*	* Feature in GTK.  Events such as mouse move are propagate up	* the widget hierarchy and are seen by the parent.  This is the	* correct GTK behavior but not correct for SWT.  The fix is to	* hook a signal after and stop the propagation using a negative	* event number to distinguish this case.	*/	OS.g_signal_connect_after (eventHandle, OS.button_press_event, windowProc3, -BUTTON_PRESS_EVENT);	OS.g_signal_connect_after (eventHandle, OS.button_release_event, windowProc3, -BUTTON_RELEASE_EVENT);	OS.g_signal_connect_after (eventHandle, OS.motion_notify_event, windowProc3, -MOTION_NOTIFY_EVENT);}