Remove a harmless unused parameter warning in wxOSX/Carbon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1192,7 +1192,7 @@ void wxNonOwnedWindowCarbonImpl::MacInstallTopLevelWindowEventHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxNonOwnedWindowCarbonImpl::Create(
|
void wxNonOwnedWindowCarbonImpl::Create(
|
||||||
wxWindow* parent,
|
wxWindow* WXUNUSED(parent),
|
||||||
WXWindow nativeWindow )
|
WXWindow nativeWindow )
|
||||||
{
|
{
|
||||||
m_macWindow = nativeWindow;
|
m_macWindow = nativeWindow;
|
||||||
@@ -1205,25 +1205,25 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
long style, long extraStyle,
|
long style, long extraStyle,
|
||||||
const wxString& WXUNUSED(name) )
|
const wxString& WXUNUSED(name) )
|
||||||
{
|
{
|
||||||
|
|
||||||
OSStatus err = noErr ;
|
OSStatus err = noErr ;
|
||||||
Rect theBoundsRect;
|
Rect theBoundsRect;
|
||||||
|
|
||||||
int x = (int)pos.x;
|
int x = (int)pos.x;
|
||||||
int y = (int)pos.y;
|
int y = (int)pos.y;
|
||||||
|
|
||||||
int w = size.x;
|
int w = size.x;
|
||||||
int h = size.y;
|
int h = size.y;
|
||||||
|
|
||||||
::SetRect(&theBoundsRect, x, y , x + w, y + h);
|
::SetRect(&theBoundsRect, x, y , x + w, y + h);
|
||||||
|
|
||||||
// translate the window attributes in the appropriate window class and attributes
|
// translate the window attributes in the appropriate window class and attributes
|
||||||
WindowClass wclass = 0;
|
WindowClass wclass = 0;
|
||||||
WindowAttributes attr = kWindowNoAttributes ;
|
WindowAttributes attr = kWindowNoAttributes ;
|
||||||
WindowGroupRef group = NULL ;
|
WindowGroupRef group = NULL ;
|
||||||
bool activationScopeSet = false;
|
bool activationScopeSet = false;
|
||||||
WindowActivationScope activationScope = kWindowActivationScopeNone;
|
WindowActivationScope activationScope = kWindowActivationScopeNone;
|
||||||
|
|
||||||
if ( style & wxFRAME_TOOL_WINDOW )
|
if ( style & wxFRAME_TOOL_WINDOW )
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
@@ -1236,7 +1236,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
wclass = kUtilityWindowClass;
|
wclass = kUtilityWindowClass;
|
||||||
else
|
else
|
||||||
wclass = kFloatingWindowClass ;
|
wclass = kFloatingWindowClass ;
|
||||||
|
|
||||||
if ( ( style &wxTINY_CAPTION_VERT) )
|
if ( ( style &wxTINY_CAPTION_VERT) )
|
||||||
attr |= kWindowSideTitlebarAttribute ;
|
attr |= kWindowSideTitlebarAttribute ;
|
||||||
}
|
}
|
||||||
@@ -1295,41 +1295,41 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
wclass = kPlainWindowClass ;
|
wclass = kPlainWindowClass ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( wclass != kPlainWindowClass )
|
if ( wclass != kPlainWindowClass )
|
||||||
{
|
{
|
||||||
if ( ( style & wxMINIMIZE_BOX ) )
|
if ( ( style & wxMINIMIZE_BOX ) )
|
||||||
attr |= kWindowCollapseBoxAttribute ;
|
attr |= kWindowCollapseBoxAttribute ;
|
||||||
|
|
||||||
if ( ( style & wxMAXIMIZE_BOX ) )
|
if ( ( style & wxMAXIMIZE_BOX ) )
|
||||||
attr |= kWindowFullZoomAttribute ;
|
attr |= kWindowFullZoomAttribute ;
|
||||||
|
|
||||||
if ( ( style & wxRESIZE_BORDER ) )
|
if ( ( style & wxRESIZE_BORDER ) )
|
||||||
attr |= kWindowResizableAttribute ;
|
attr |= kWindowResizableAttribute ;
|
||||||
|
|
||||||
if ( ( style & wxCLOSE_BOX) )
|
if ( ( style & wxCLOSE_BOX) )
|
||||||
attr |= kWindowCloseBoxAttribute ;
|
attr |= kWindowCloseBoxAttribute ;
|
||||||
}
|
}
|
||||||
attr |= kWindowLiveResizeAttribute;
|
attr |= kWindowLiveResizeAttribute;
|
||||||
|
|
||||||
if ( ( style &wxSTAY_ON_TOP) )
|
if ( ( style &wxSTAY_ON_TOP) )
|
||||||
group = GetWindowGroupOfClass(kUtilityWindowClass) ;
|
group = GetWindowGroupOfClass(kUtilityWindowClass) ;
|
||||||
|
|
||||||
if ( ( style & wxFRAME_FLOAT_ON_PARENT ) )
|
if ( ( style & wxFRAME_FLOAT_ON_PARENT ) )
|
||||||
group = GetWindowGroupOfClass(kFloatingWindowClass) ;
|
group = GetWindowGroupOfClass(kFloatingWindowClass) ;
|
||||||
|
|
||||||
if ( group == NULL && parent != NULL )
|
if ( group == NULL && parent != NULL )
|
||||||
{
|
{
|
||||||
WindowRef parenttlw = (WindowRef) parent->MacGetTopLevelWindowRef();
|
WindowRef parenttlw = (WindowRef) parent->MacGetTopLevelWindowRef();
|
||||||
if( parenttlw )
|
if( parenttlw )
|
||||||
group = GetWindowGroupParent( GetWindowGroup( parenttlw ) );
|
group = GetWindowGroupParent( GetWindowGroup( parenttlw ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
attr |= kWindowCompositingAttribute;
|
attr |= kWindowCompositingAttribute;
|
||||||
#if 0 // TODO : decide on overall handling of high dpi screens (pixel vs userscale)
|
#if 0 // TODO : decide on overall handling of high dpi screens (pixel vs userscale)
|
||||||
attr |= kWindowFrameworkScaledAttribute;
|
attr |= kWindowFrameworkScaledAttribute;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( ( style &wxFRAME_SHAPED) )
|
if ( ( style &wxFRAME_SHAPED) )
|
||||||
{
|
{
|
||||||
WindowDefSpec customWindowDefSpec;
|
WindowDefSpec customWindowDefSpec;
|
||||||
@@ -1348,28 +1348,28 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
{
|
{
|
||||||
err = ::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
err = ::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( err == noErr && m_macWindow != NULL && group != NULL )
|
if ( err == noErr && m_macWindow != NULL && group != NULL )
|
||||||
SetWindowGroup( (WindowRef) m_macWindow , group ) ;
|
SetWindowGroup( (WindowRef) m_macWindow , group ) ;
|
||||||
|
|
||||||
wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") );
|
wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") );
|
||||||
|
|
||||||
// setup a separate group for each window, so that overlays can be handled easily
|
// setup a separate group for each window, so that overlays can be handled easily
|
||||||
|
|
||||||
WindowGroupRef overlaygroup = NULL;
|
WindowGroupRef overlaygroup = NULL;
|
||||||
verify_noerr( CreateWindowGroup( kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrHideOnCollapse, &overlaygroup ));
|
verify_noerr( CreateWindowGroup( kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrHideOnCollapse, &overlaygroup ));
|
||||||
verify_noerr( SetWindowGroupParent( overlaygroup, GetWindowGroup( (WindowRef) m_macWindow )));
|
verify_noerr( SetWindowGroupParent( overlaygroup, GetWindowGroup( (WindowRef) m_macWindow )));
|
||||||
verify_noerr( SetWindowGroup( (WindowRef) m_macWindow , overlaygroup ));
|
verify_noerr( SetWindowGroup( (WindowRef) m_macWindow , overlaygroup ));
|
||||||
|
|
||||||
if ( activationScopeSet )
|
if ( activationScopeSet )
|
||||||
{
|
{
|
||||||
verify_noerr( SetWindowActivationScope( (WindowRef) m_macWindow , activationScope ));
|
verify_noerr( SetWindowActivationScope( (WindowRef) m_macWindow , activationScope ));
|
||||||
}
|
}
|
||||||
|
|
||||||
// the create commands are only for content rect,
|
// the create commands are only for content rect,
|
||||||
// so we have to set the size again as structure bounds
|
// so we have to set the size again as structure bounds
|
||||||
SetWindowBounds( m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
|
SetWindowBounds( m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
|
||||||
|
|
||||||
// Causes the inner part of the window not to be metal
|
// Causes the inner part of the window not to be metal
|
||||||
// if the style is used before window creation.
|
// if the style is used before window creation.
|
||||||
#if 0 // TARGET_API_MAC_OSX
|
#if 0 // TARGET_API_MAC_OSX
|
||||||
@@ -1379,24 +1379,24 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
MacSetMetalAppearance( true ) ;
|
MacSetMetalAppearance( true ) ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( m_macWindow != NULL )
|
if ( m_macWindow != NULL )
|
||||||
{
|
{
|
||||||
MacSetUnifiedAppearance( true ) ;
|
MacSetUnifiedAppearance( true ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
HIViewRef growBoxRef = 0 ;
|
HIViewRef growBoxRef = 0 ;
|
||||||
err = HIViewFindByID( HIViewGetRoot( m_macWindow ), kHIViewWindowGrowBoxID, &growBoxRef );
|
err = HIViewFindByID( HIViewGetRoot( m_macWindow ), kHIViewWindowGrowBoxID, &growBoxRef );
|
||||||
if ( err == noErr && growBoxRef != 0 )
|
if ( err == noErr && growBoxRef != 0 )
|
||||||
HIGrowBoxViewSetTransparent( growBoxRef, true ) ;
|
HIGrowBoxViewSetTransparent( growBoxRef, true ) ;
|
||||||
|
|
||||||
// the frame window event handler
|
// the frame window event handler
|
||||||
InstallStandardEventHandler( GetWindowEventTarget(m_macWindow) ) ;
|
InstallStandardEventHandler( GetWindowEventTarget(m_macWindow) ) ;
|
||||||
MacInstallTopLevelWindowEventHandler() ;
|
MacInstallTopLevelWindowEventHandler() ;
|
||||||
|
|
||||||
if ( extraStyle & wxFRAME_EX_METAL)
|
if ( extraStyle & wxFRAME_EX_METAL)
|
||||||
MacSetMetalAppearance(true);
|
MacSetMetalAppearance(true);
|
||||||
|
|
||||||
if ( ( style &wxFRAME_SHAPED) )
|
if ( ( style &wxFRAME_SHAPED) )
|
||||||
{
|
{
|
||||||
// default shape matches the window size
|
// default shape matches the window size
|
||||||
|
Reference in New Issue
Block a user