int controlProc = display.controlProc; int [] mask = new int [] { OS.kEventClassControl, OS.kEventControlTrack, }; int controlTarget = OS.GetControlEventTarget (handle); OS.InstallEventHandler (controlTarget, controlProc, mask.length / 2, mask, handle, null);
void hookEvents () {	super.hookEvents ();	if (!OS.HIVIEW) {		int controlProc = display.controlProc;		int [] mask = new int [] {			OS.kEventClassControl, OS.kEventControlDraw,		};		int controlTarget = OS.GetControlEventTarget (handle);		OS.InstallEventHandler (controlTarget, controlProc, mask.length / 2, mask, handle, null);	}	if ((parent.state & CANVAS) == 0) {		oldActionProc = OS.GetControlAction (handle);		OS.SetControlAction (handle, display.actionProc);	}}