conditional compilation for Universal Interfaces (3.4 or later)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -457,8 +457,13 @@ void UMACloseWindow(WindowRef inWindowRef)
|
||||
|
||||
void UMAActivateControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -474,13 +479,22 @@ void UMAActivateControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMADrawControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -496,13 +510,22 @@ void UMADrawControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMAMoveControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -518,13 +541,22 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMASizeControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -540,13 +572,22 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMADeactivateControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -562,7 +603,11 @@ void UMADeactivateControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMASetThemeWindowBackground (WindowRef inWindow,
|
||||
@@ -656,48 +701,65 @@ void UMADisposeControl (ControlHandle theControl)
|
||||
}
|
||||
|
||||
|
||||
void UMAHiliteControl (ControlHandle theControl,
|
||||
void UMAHiliteControl (ControlHandle inControl,
|
||||
ControlPartCode hiliteState)
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(theControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::HiliteControl( theControl , hiliteState ) ;
|
||||
::HiliteControl( inControl , hiliteState ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::HiliteControl( theControl , hiliteState ) ;
|
||||
::HiliteControl( inControl , hiliteState ) ;
|
||||
}
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UMAShowControl (ControlHandle theControl)
|
||||
void UMAShowControl (ControlHandle inControl)
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(theControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::ShowControl( theControl ) ;
|
||||
::ShowControl( inControl ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::ShowControl( theControl ) ;
|
||||
::ShowControl( inControl ) ;
|
||||
}
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UMAHideControl (ControlHandle theControl)
|
||||
void UMAHideControl (ControlHandle inControl)
|
||||
{
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::HideControl( theControl ) ;
|
||||
::HideControl( inControl ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::HideControl( theControl ) ;
|
||||
::HideControl( inControl ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -939,7 +1001,11 @@ void UMAIdleControls (WindowPtr inWindow)
|
||||
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||
{
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -955,7 +1021,11 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( inWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl )
|
||||
|
104
src/mac/uma.cpp
104
src/mac/uma.cpp
@@ -457,8 +457,13 @@ void UMACloseWindow(WindowRef inWindowRef)
|
||||
|
||||
void UMAActivateControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -474,13 +479,22 @@ void UMAActivateControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMADrawControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -496,13 +510,22 @@ void UMADrawControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMAMoveControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -518,13 +541,22 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMASizeControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -540,13 +572,22 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMADeactivateControl( ControlHandle inControl )
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(inControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -562,7 +603,11 @@ void UMADeactivateControl( ControlHandle inControl )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UMASetThemeWindowBackground (WindowRef inWindow,
|
||||
@@ -656,48 +701,65 @@ void UMADisposeControl (ControlHandle theControl)
|
||||
}
|
||||
|
||||
|
||||
void UMAHiliteControl (ControlHandle theControl,
|
||||
void UMAHiliteControl (ControlHandle inControl,
|
||||
ControlPartCode hiliteState)
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(theControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::HiliteControl( theControl , hiliteState ) ;
|
||||
::HiliteControl( inControl , hiliteState ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::HiliteControl( theControl , hiliteState ) ;
|
||||
::HiliteControl( inControl , hiliteState ) ;
|
||||
}
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UMAShowControl (ControlHandle theControl)
|
||||
void UMAShowControl (ControlHandle inControl)
|
||||
{
|
||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
GetWindowUpdateRgn( GetControlOwner(theControl) , updateRgn ) ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||
#endif
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::ShowControl( theControl ) ;
|
||||
::ShowControl( inControl ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::ShowControl( theControl ) ;
|
||||
::ShowControl( inControl ) ;
|
||||
}
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( theWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UMAHideControl (ControlHandle theControl)
|
||||
void UMAHideControl (ControlHandle inControl)
|
||||
{
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
::HideControl( theControl ) ;
|
||||
::HideControl( inControl ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::HideControl( theControl ) ;
|
||||
::HideControl( inControl ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -939,7 +1001,11 @@ void UMAIdleControls (WindowPtr inWindow)
|
||||
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||
{
|
||||
RgnHandle updateRgn = NewRgn() ;
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||
#else
|
||||
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
||||
#endif
|
||||
#if UMA_USE_APPEARANCE
|
||||
if ( UMAHasAppearance() )
|
||||
{
|
||||
@@ -955,7 +1021,11 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
InvalWindowRgn( inWindow, updateRgn) ;
|
||||
#else
|
||||
InvalRgn( updateRgn ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl )
|
||||
|
Reference in New Issue
Block a user