-void UMAShowWatchCursor()
-{
- SetThemeCursor(kThemeWatchCursor);
-}
-
-void UMAShowArrowCursor()
-{
- SetThemeCursor(kThemeArrowCursor);
-}
-
-// window manager
-
-GrafPtr UMAGetWindowPort( WindowRef inWindowRef )
-{
- wxASSERT( inWindowRef != NULL ) ;
-
- return (GrafPtr) GetWindowPort( inWindowRef ) ;
-}
-
-void UMADisposeWindow( WindowRef inWindowRef )
-{
- wxASSERT( inWindowRef != NULL ) ;
-
- DisposeWindow( inWindowRef ) ;
-}
-
-void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding )
-{
- SetWindowTitleWithCFString( inWindowRef , wxMacCFStringHolder(title , encoding) ) ;
-}
-
-// appearance additions
-
-void UMASetControlTitle( ControlRef inControl , const wxString& title , wxFontEncoding encoding )
-{
- SetControlTitleWithCFString( inControl , wxMacCFStringHolder(title , encoding) ) ;
-}
-
-void UMAActivateControl( ControlRef inControl )
-{
- ::ActivateControl( inControl ) ;
-}
-
-void UMAMoveControl( ControlRef inControl , short x , short y )
-{
- ::MoveControl( inControl , x , y ) ;
-}
-
-void UMASizeControl( ControlRef inControl , short x , short y )
-{
- ::SizeControl( inControl , x , y ) ;
-}
-
-void UMADeactivateControl( ControlRef inControl )
-{
- ::DeactivateControl( inControl ) ;
-}
-
-// shows the control and adds the region to the update region
-void UMAShowControl( ControlRef inControl )
-{
- SetControlVisibility( inControl , true , false ) ;
- HIViewSetNeedsDisplay( inControl, true );
-}
-
-// hides the control and adds the region to the update region
-void UMAHideControl( ControlRef inControl )
-{
- SetControlVisibility( inControl , false , false ) ;
- HIViewSetNeedsDisplay( inControl, true );
-}
-
-// keyboard focus
-OSErr UMASetKeyboardFocus( WindowPtr inWindow,
- ControlRef inControl,
- ControlFocusPart inPart )
-{
- OSErr err = noErr;
-#ifndef __LP64__
- GrafPtr port ;
-
- GetPort( &port ) ;
- SetPortWindowPort( inWindow ) ;
-#endif
-
- err = SetKeyboardFocus( inWindow , inControl , inPart ) ;
-#ifndef __LP64__
- SetPort( port ) ;
-#endif
-
- return err ;
-}
-
-bool UMAIsWindowFloating( WindowRef inWindow )
-{
- WindowClass cl ;
-
- GetWindowClass( inWindow , &cl ) ;
- return cl == kFloatingWindowClass ;
-}
-
-bool UMAIsWindowModal( WindowRef inWindow )
-{
- WindowClass cl ;
-
- GetWindowClass( inWindow , &cl ) ;
- return cl < kFloatingWindowClass ;
-}
-
-// others
-
-void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
-{
- if ( inWindowRef )
- {
-// bool isHighlighted = IsWindowHighlited( inWindowRef ) ;
-// if ( inActivate != isHighlighted )
-#ifndef __LP64__
- GrafPtr port ;
- GetPort( &port ) ;
- SetPortWindowPort( inWindowRef ) ;
-#endif
- HiliteWindow( inWindowRef , inActivate ) ;
- ControlRef control = NULL ;
- ::GetRootControl( inWindowRef , &control ) ;
- if ( control )
- {
- if ( inActivate )
- UMAActivateControl( control ) ;
- else
- UMADeactivateControl( control ) ;
- }
-#ifndef __LP64__
- SetPort( port ) ;