*/
protected void init () {	super.init ();		/* Create the callbacks */	fApplicationProc= OS.NewApplicationCallbackUPP(this, "handleApplicationCallback");	if (fApplicationProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);			int[] mask2= new int[] {		OS.kEventClassCommand, 1,				OS.kEventClassAppleEvent, OS.kEventParamAEEventID,				//OS.kEventClassMenu, OS.kEventMenuBeginTracking,		//OS.kEventClassMenu, OS.kEventMenuEndTracking,			// we track down events here because we need to know when the user 		//clicked in the menu bar		OS.kEventClassMouse, OS.kEventMouseDown,		// we track up and dragged events because		// we need to get these events even if the mouse is outside of the window.		OS.kEventClassMouse, OS.kEventMouseDragged,		OS.kEventClassMouse, OS.kEventMouseUp,				//OS.kEventClassKeyboard, OS.kEventRawKeyDown,		//OS.kEventClassKeyboard, OS.kEventRawKeyRepeat,				SWT_USER_EVENT, 54321,		SWT_USER_EVENT, 54322,	};	if (OS.InstallEventHandler(OS.GetApplicationEventTarget(), fApplicationProc, mask2, 0) != OS.kNoErr)		error (SWT.ERROR_NO_MORE_CALLBACKS);		fWindowProc= OS.NewWindowCallbackUPP(this, "handleWindowCallback");	if (fWindowProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	timerProc = OS.NewEventLoopTimerUPP(this, "timerProc");	if (timerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	caretProc = OS.NewEventLoopTimerUPP2(this, "caretProc");	if (caretProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fControlActionProc= OS.NewControlActionUPP(this, "handleControlAction");	if (fControlActionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fUserPaneDrawProc= OS.NewControlUserPaneDrawUPP(this, "handleUserPaneDraw");	if (fUserPaneDrawProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fUserPaneHitTestProc= OS.NewUserPaneHitTestUPP(this, "handleUserPaneHitTest");	if (fUserPaneHitTestProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fDataBrowserDataProc= OS.NewDataBrowserDataCallbackUPP(this, "handleDataBrowserDataCallback");	if (fDataBrowserDataProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fDataBrowserItemNotificationProc= OS.NewDataBrowserItemNotificationCallbackUPP(this, "handleDataBrowserItemNotificationCallback");	if (fDataBrowserItemNotificationProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fMenuProc= OS.NewMenuCallbackUPP(this, "handleMenuCallback");	if (fMenuProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);		fControlProc= OS.NewControlCallbackUPP(this, "handleControlCallback");	if (fControlProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	int textInputProc= OS.NewTextCallbackUPP(this, "handleTextCallback");	if (textInputProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	int[] mask= new int[] {		// OS.kEventClassTextInput, OS.kEventTextInputUnicodeForKeyEvent,				OS.kEventClassKeyboard, OS.kEventRawKeyDown,		OS.kEventClassKeyboard, OS.kEventRawKeyRepeat,		OS.kEventClassKeyboard, OS.kEventRawKeyUp,	};	if (OS.InstallEventHandler(OS.GetUserFocusEventTarget(), textInputProc, mask, 0) != OS.kNoErr)		error (SWT.ERROR_NO_MORE_CALLBACKS);		/*	fMouseProc= OS.NewMouseMovedCallbackUPP(this, "handleMouseCallback");	if (fMouseProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	*/		mouseHoverProc = OS.NewEventLoopTimerUPP3(this, "mouseHoverProc");	if (mouseHoverProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);	buttonFont = Font.carbon_new (this, getThemeFont(OS.kThemeSmallSystemFont));	buttonShadowThickness= 1;	//scrolledInsetX = scrolledInsetY = 15;	scrolledMarginX= scrolledMarginY= 15;	compositeForeground = 0x000000;	compositeBackground = 0xEEEEEE;		groupFont = Font.carbon_new (this, getThemeFont(OS.kThemeSmallEmphasizedSystemFont));		dialogForeground= 0x000000;	dialogBackground= 0xffffff;		labelForeground = 0x000000;	labelBackground = 0xffffff; 	labelFont = Font.carbon_new (this, getThemeFont(OS.kThemeSmallSystemFont));		listForeground = 0x000000;	listBackground = 0xffffff;	listSelect = listForeground;	// if reversed colors	listFont= Font.carbon_new (this, new MacFont((short)1)); // Mac Appl Font	scrollBarForeground = 0x000000;	scrollBarBackground = 0xffffff;	textForeground = 0x000000;	textBackground = 0xffffff;	textHighlightThickness = 1; // ???	textFont= Font.carbon_new (this, new MacFont((short)1));	// Mac Appl Font	COLOR_WIDGET_DARK_SHADOW = new Color (this, 0x33, 0x33, 0x33);		COLOR_WIDGET_NORMAL_SHADOW = new Color (this, 0x66, 0x66, 0x66);		COLOR_WIDGET_LIGHT_SHADOW = new Color (this, 0x99, 0x99, 0x99);	COLOR_WIDGET_HIGHLIGHT_SHADOW = new Color (this, 0xCC, 0xCC, 0xCC);		COLOR_WIDGET_BACKGROUND = new Color (this, 0xFF, 0xFF, 0xFF);		COLOR_WIDGET_BORDER = new Color (this, 0x00, 0x00, 0x00);		COLOR_LIST_FOREGROUND = new Color (this, 0x00, 0x00, 0x00);		COLOR_LIST_BACKGROUND = new Color (this, 0xFF, 0xFF, 0xFF);		COLOR_LIST_SELECTION = new Color (this, 0x66, 0x66, 0xCC);	COLOR_LIST_SELECTION_TEXT = new Color (this, 0xFF, 0xFF, 0xFF);	COLOR_INFO_BACKGROUND = new Color (this, 0xFF, 0xFF, 0xE1);		fHoverThemeFont= OS.kThemeSmallSystemFont;	defaultFont = Font.carbon_new (this, getThemeFont(OS.kThemeSmallSystemFont));		defaultForeground = compositeForeground;	defaultBackground = compositeBackground;}