-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- ::SizeControl( inControl , x , y ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- AGASizeControl( inControl , x ,y ) ;
- }
-#else
- {
- }
-#endif
-}
-
-void UMADeactivateControl( ControlHandle inControl )
-{
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- ::DeactivateControl( inControl ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- AGADeactivateControl( inControl ) ;
- }
-#else
- {
- }
-#endif
-}
-
-void UMASetThemeWindowBackground (WindowRef inWindow,
- ThemeBrush inBrush,
- Boolean inUpdate)
-{
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- ::SetThemeWindowBackground( inWindow ,inBrush , inUpdate ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- AGASetThemeWindowBackground( inWindow , inBrush , inUpdate ) ;
- }
-#else
- {
- }
-#endif
-}
-
-void UMAApplyThemeBackground (ThemeBackgroundKind inKind,
- const Rect * bounds,
- ThemeDrawState inState,
- SInt16 inDepth,
- Boolean inColorDev)
-{
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- /*
- if ( sUMAAppearanceVersion >= 0x0110 )
- ::ApplyThemeBackground( inKind ,bounds , inState , inDepth , inColorDev ) ;
- */
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- AGAApplyThemeBackground( inKind ,bounds , inState , inDepth , inColorDev ) ;
- }
-#else
- {
- }
-#endif
-}
-
-ControlHandle UMANewControl(WindowPtr owningWindow,
- const Rect * boundsRect,
- ConstStr255Param controlTitle,
- Boolean initiallyVisible,
- SInt16 initialValue,
- SInt16 minimumValue,
- SInt16 maximumValue,
- SInt16 procID,
- SInt32 controlReference)
-{
- ControlHandle theControl = NULL ;
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- theControl = NewControl( owningWindow , boundsRect , controlTitle , initiallyVisible ,
- initialValue , minimumValue , maximumValue , procID , controlReference ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- theControl = AGANewControl( owningWindow , boundsRect , controlTitle , initiallyVisible ,
- initialValue , minimumValue , maximumValue , procID , controlReference ) ;
- }
-#else
- {
- }
-#endif
- return theControl ;
-}
-
-void UMADisposeControl (ControlHandle theControl)
-{
- if ( UMAHasAppearance() )
- {
- ::DisposeControl( theControl ) ;
- }
- else
- {
- ::DisposeControl( theControl ) ;
- }
-}
-
-
-void UMAHiliteControl (ControlHandle theControl,
- ControlPartCode hiliteState)
- {
- if ( UMAHasAppearance() )
- {
- ::HiliteControl( theControl , hiliteState ) ;
- }
- else
- {
- ::HiliteControl( theControl , hiliteState ) ;
- }
-}
-
-
-void UMAShowControl (ControlHandle theControl)
-{
- if ( UMAHasAppearance() )
- {
- ::ShowControl( theControl ) ;
- }
- else
- {
- ::ShowControl( theControl ) ;
- }
-}
-
-
-void UMAHideControl (ControlHandle theControl)
-{
- if ( UMAHasAppearance() )
- {
- ::HideControl( theControl ) ;
- }
- else
- {
- ::HideControl( theControl ) ;
- }
-}
-
-
-void UMASetControlVisibility (ControlHandle inControl,
- Boolean inIsVisible,
- Boolean inDoDraw)
- {
- if ( UMAHasAppearance() )
- {
-#if UMA_USE_APPEARANCE
- ::SetControlVisibility( inControl , inIsVisible, inDoDraw ) ;
-#endif
- }
-}
-
-
-
-bool UMAIsControlActive (ControlHandle inControl)
-{
-#if TARGET_CARBON
- return IsControlActive( inControl ) ;
-#else
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- return IsControlActive( inControl ) ;
- }
- else
-#endif
- return (**inControl).contrlHilite == 0 ;
-#endif
-}
-
-
-bool UMAIsControlVisible (ControlHandle inControl)
-{
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- return IsControlVisible( inControl ) ;
- }
-#endif
- return true ;
-}
-
-OSErr UMAGetBestControlRect (ControlHandle inControl,
- Rect * outRect,
- SInt16 * outBaseLineOffset)
-{
-#if UMA_USE_APPEARANCE
- if ( UMAHasAppearance() )
- {
- return GetBestControlRect( inControl , outRect , outBaseLineOffset ) ;
- }
- else
-#endif
-#if !TARGET_CARBON
- {
- return AGAGetBestControlRect( inControl , outRect , outBaseLineOffset ) ;