diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/app/vclnsapp.mm | 25 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 38 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salgdicommon.cxx | 6 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salgdiutils.cxx | 2 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salnativewidgets.cxx | 4 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salvd.cxx | 6 | ||||
-rw-r--r-- | vcl/aqua/source/window/salframe.cxx | 254 | ||||
-rw-r--r-- | vcl/aqua/source/window/salframeview.mm | 12 | ||||
-rw-r--r-- | vcl/aqua/source/window/salmenu.cxx | 24 | ||||
-rw-r--r-- | vcl/aqua/source/window/salobj.cxx | 20 | ||||
-rw-r--r-- | vcl/inc/aqua/salframe.h | 8 | ||||
-rw-r--r-- | vcl/source/window/syschild.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 4 |
13 files changed, 195 insertions, 210 deletions
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index 738db9e252a6..7c55f8e6c318 100644 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -91,9 +91,9 @@ // instead. // Instead of: - // [pFrame->getWindow() windowShouldClose: nil]; + // [pFrame->getNSWindow() windowShouldClose: nil]; // do: - objc_msgSend(pFrame->getWindow(), @selector(windowShouldClose:), nil); + objc_msgSend(pFrame->getNSWindow(), @selector(windowShouldClose:), nil); return; } @@ -104,9 +104,9 @@ */ if( [[pEvent charactersIgnoringModifiers] isEqualToString: @"m"] ) { - if ( nModMask == NSCommandKeyMask && ([pFrame->getWindow() styleMask] & NSMiniaturizableWindowMask) ) + if ( nModMask == NSCommandKeyMask && ([pFrame->getNSWindow() styleMask] & NSMiniaturizableWindowMask) ) { - [pFrame->getWindow() performMiniaturize: nil]; + [pFrame->getNSWindow() performMiniaturize: nil]; return; } @@ -223,7 +223,7 @@ if( (*it)->mpDockMenuEntry != NULL && (*it)->mbShown ) { - [(*it)->getWindow() makeKeyAndOrderFront: NSApp]; + [(*it)->getNSWindow() makeKeyAndOrderFront: NSApp]; return; } } @@ -235,7 +235,7 @@ if( (*it)->mpDockMenuEntry != NULL && (*it)->mbShown ) { - [(*it)->getWindow() makeKeyAndOrderFront: NSApp]; + [(*it)->getNSWindow() makeKeyAndOrderFront: NSApp]; return; } ++it; @@ -263,7 +263,7 @@ if( (*it)->mpDockMenuEntry != NULL && (*it)->mbShown ) { - [(*it)->getWindow() makeKeyAndOrderFront: NSApp]; + [(*it)->getNSWindow() makeKeyAndOrderFront: NSApp]; return; } } @@ -275,7 +275,7 @@ if( (*it)->mpDockMenuEntry != NULL && (*it)->mbShown ) { - [(*it)->getWindow() makeKeyAndOrderFront: NSApp]; + [(*it)->getNSWindow() makeKeyAndOrderFront: NSApp]; return; } ++it; @@ -462,9 +462,10 @@ for( std::list< AquaSalFrame* >::const_iterator it = pSalData->maPresentationFrames.begin(); it != pSalData->maPresentationFrames.end(); ++it ) { - [(*it)->mpWindow setLevel: NSPopUpMenuWindowLevel]; - if( [(*it)->mpWindow isVisible] ) - [(*it)->mpWindow orderFront: NSApp]; + NSWindow* pNSWindow = (*it)->getNSWindow(); + [pNSWindow setLevel: NSPopUpMenuWindowLevel]; + if( [pNSWindow isVisible] ) + [pNSWindow orderFront: NSApp]; } } @@ -488,7 +489,7 @@ for( std::list< AquaSalFrame* >::const_iterator it = pSalData->maPresentationFrames.begin(); it != pSalData->maPresentationFrames.end(); ++it ) { - [(*it)->mpWindow setLevel: NSNormalWindowLevel]; + [(*it)->getNSWindow() setLevel: NSNormalWindowLevel]; } } #endif diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index 0ba51e5bb115..5c6ea0e0162c 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -141,30 +141,14 @@ class ControllerProperties mnLastPageCount = nPages; if( mpState->bNeedRestart ) { - #if 0 // Warning: bad hack ahead // Apple does not give us a chance of changing the page count, // and they don't let us cancel the dialog either // hack: send a cancel message to the window displaying our views. // this is ugly. - for( std::vector< NSObject* >::iterator it = maViews.begin(); it != maViews.end(); ++it ) - { - if( [*it isKindOfClass: [NSView class]] ) - { - NSView* pView = (NSView*)*it; - NSWindow* pWindow = [pView window]; - if( pWindow ) - { - [pWindow cancelOperation: nil]; - break; - } - } - } - #else - NSWindow* pWindow = [NSApp modalWindow]; - if( pWindow ) - [pWindow cancelOperation: nil]; - #endif + NSWindow* pNSWindow = [NSApp modalWindow]; + if( pNSWindow ) + [pNSWindow cancelOperation: nil]; [[mpOp printInfo] setJobDisposition: NSPrintCancelJob]; } else @@ -593,7 +577,7 @@ struct ColumnItem } }; -static void adjustViewAndChildren( NSView* pView, NSSize& rMaxSize, +static void adjustViewAndChildren( NSView* pNSView, NSSize& rMaxSize, std::vector< ColumnItem >& rLeftColumn, std::vector< ColumnItem >& rRightColumn ) @@ -653,7 +637,7 @@ static void adjustViewAndChildren( NSView* pView, NSSize& rMaxSize, } } - NSArray* pSubViews = [pView subviews]; + NSArray* pSubViews = [pNSView subviews]; unsigned int nViews = [pSubViews count]; NSRect aUnion = { { 0, 0 }, { 0, 0 } }; @@ -676,7 +660,7 @@ static void adjustViewAndChildren( NSView* pView, NSSize& rMaxSize, // resize the view itself aUnion.size.height += 10; aUnion.size.width += 20; - [pView setFrameSize: aUnion.size]; + [pNSView setFrameSize: aUnion.size]; if( aUnion.size.width > rMaxSize.width ) rMaxSize.width = aUnion.size.width; @@ -692,15 +676,15 @@ static void adjustTabViews( NSTabView* pTabView, NSSize aTabSize ) for( int i = 0; i < nViews; i++ ) { NSTabViewItem* pItem = (NSTabViewItem*)[pTabbedViews objectAtIndex: i]; - NSView* pView = [pItem view]; - if( pView ) + NSView* pNSView = [pItem view]; + if( pNSView ) { - NSRect aRect = [pView frame]; + NSRect aRect = [pNSView frame]; double nDiff = aTabSize.height - aRect.size.height; aRect.size = aTabSize; - [pView setFrame: aRect]; + [pNSView setFrame: aRect]; - NSArray* pSubViews = [pView subviews]; + NSArray* pSubViews = [pNSView subviews]; unsigned int nSubViews = [pSubViews count]; // move everything up diff --git a/vcl/aqua/source/gdi/salgdicommon.cxx b/vcl/aqua/source/gdi/salgdicommon.cxx index a1691fefc327..f49ce9f65776 100644 --- a/vcl/aqua/source/gdi/salgdicommon.cxx +++ b/vcl/aqua/source/gdi/salgdicommon.cxx @@ -492,7 +492,7 @@ void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics ) { if( !rGraphics.mnRealDPIY && rGraphics.mbWindow && rGraphics.mpFrame ) { - rGraphics.initResolution( rGraphics.mpFrame->mpWindow ); + rGraphics.initResolution( rGraphics.mpFrame->getNSWindow() ); } mnRealDPIX = rGraphics.mnRealDPIX; mnRealDPIY = rGraphics.mnRealDPIY; @@ -1207,7 +1207,7 @@ void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) { if( !mnRealDPIY ) { - initResolution( (mbWindow && mpFrame) ? mpFrame->mpWindow : nil ); + initResolution( (mbWindow && mpFrame) ? mpFrame->getNSWindow() : nil ); } rDPIX = static_cast<sal_Int32>(mfFakeDPIScale * mnRealDPIX); @@ -1594,7 +1594,7 @@ void AquaSalGraphics::updateResolution() { DBG_ASSERT( mbWindow, "updateResolution on inappropriate graphics" ); - initResolution( (mbWindow && mpFrame) ? mpFrame->mpWindow : nil ); + initResolution( (mbWindow && mpFrame) ? mpFrame->getNSWindow() : nil ); } diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx index 0f7f79aa2c3c..c0a8d0d7ea6e 100644 --- a/vcl/aqua/source/gdi/salgdiutils.cxx +++ b/vcl/aqua/source/gdi/salgdiutils.cxx @@ -190,7 +190,7 @@ bool AquaSalGraphics::CheckContext() if( !mrContext ) { const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) }; - NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getWindow()]; + NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()]; CGContextRef xCGContext = reinterpret_cast<CGContextRef>([pNSGContext graphicsPort]); mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, NULL ); if( mxLayer ) diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index d9219cf5bd16..18ee1cc3ea2e 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -447,7 +447,7 @@ sal_Bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart n */ UInt32 AquaSalGraphics::getState( ControlState nState ) { - bool bDrawActive = mpFrame ? ([mpFrame->getWindow() isKeyWindow] ? true : false) : true; + const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; if( (nState & CTRL_STATE_ENABLED) == 0 || ! bDrawActive ) { if( (nState & CTRL_STATE_HIDDEN) == 0 ) @@ -467,7 +467,7 @@ UInt32 AquaSalGraphics::getState( ControlState nState ) UInt32 AquaSalGraphics::getTrackState( ControlState nState ) { - bool bDrawActive = mpFrame ? ([mpFrame->getWindow() isKeyWindow] ? true : false) : true; + const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; if( (nState & CTRL_STATE_ENABLED) == 0 || ! bDrawActive ) return kThemeTrackInactive; diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index f58ce6fb4768..2be469c7ae2c 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -203,10 +203,10 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) if( pSalFrame ) { // #i91990# - NSWindow* pWindow = pSalFrame->getWindow(); - if ( pWindow ) + NSWindow* pNSWindow = pSalFrame->getNSWindow(); + if ( pNSWindow ) { - NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pWindow]; + NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow]; if( pNSContext ) xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]); } diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 87f1be1a9746..5b8126d68943 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -55,8 +55,8 @@ AquaSalFrame* AquaSalFrame::s_pCaptureFrame = NULL; // ======================================================================= AquaSalFrame::AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle ) : - mpWindow(nil), - mpView(nil), + mpNSWindow(nil), + mpNSView(nil), mpDockMenuEntry(nil), mpGraphics(NULL), mpParent(NULL), @@ -121,12 +121,12 @@ AquaSalFrame::~AquaSalFrame() if( mpDockMenuEntry ) // life cycle comment: the menu has ownership of the item, so no release [AquaSalInstance::GetDynamicDockMenu() removeItem: mpDockMenuEntry]; - if ( mpView ) { - [AquaA11yFactory revokeView: mpView]; - [mpView release]; + if ( mpNSView ) { + [AquaA11yFactory revokeView: mpNSView]; + [mpNSView release]; } - if ( mpWindow ) - [mpWindow release]; + if ( mpNSWindow ) + [mpNSWindow release]; } // ----------------------------------------------------------------------- @@ -135,13 +135,13 @@ void AquaSalFrame::initWindowAndView() { // initialize mirroring parameters // FIXME: screens changing - NSScreen * pScreen = [mpWindow screen]; - if( pScreen == nil ) - pScreen = [NSScreen mainScreen]; - maScreenRect = [pScreen frame]; + NSScreen* pNSScreen = [mpNSWindow screen]; + if( pNSScreen == nil ) + pNSScreen = [NSScreen mainScreen]; + maScreenRect = [pNSScreen frame]; // calculate some default geometry - NSRect aVisibleRect = [pScreen visibleFrame]; + NSRect aVisibleRect = [pNSScreen visibleFrame]; CocoaToVCL( aVisibleRect ); maGeometry.nX = static_cast<int>(aVisibleRect.origin.x + aVisibleRect.size.width / 10); @@ -187,8 +187,8 @@ void AquaSalFrame::initWindowAndView() // #i91990# support GUI-less (daemon) execution @try { - mpWindow = [[SalFrameWindow alloc] initWithSalFrame: this]; - mpView = [[SalFrameView alloc] initWithSalFrame: this]; + mpNSWindow = [[SalFrameWindow alloc] initWithSalFrame: this]; + mpNSView = [[SalFrameView alloc] initWithSalFrame: this]; } @catch ( id exception ) { @@ -196,10 +196,10 @@ void AquaSalFrame::initWindowAndView() } if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) ) - [mpWindow setIgnoresMouseEvents: YES]; + [mpNSWindow setIgnoresMouseEvents: YES]; else - [mpWindow setAcceptsMouseMovedEvents: YES]; - [mpWindow setHasShadow: YES]; + [mpNSWindow setAcceptsMouseMovedEvents: YES]; + [mpNSWindow setHasShadow: YES]; // WTF? With the 10.6 SDK and gcc 4.2.1, we get: class 'NSWindow' // does not implement the 'NSWindowDelegate' protocol. Anyway, @@ -208,22 +208,22 @@ void AquaSalFrame::initWindowAndView() // https://issues.apache.org/ooo/show_bug.cgi?id=91990 // So to silence the warning when compiling with -Werror, instead of: - // [mpWindow setDelegate: mpWindow]; + // [mpNSWindow setDelegate: mpNSWindow]; // do this: - objc_msgSend(mpWindow, @selector(setDelegate:), mpWindow); + objc_msgSend(mpNSWindow, @selector(setDelegate:), mpNSWindow); - if( [mpWindow respondsToSelector: @selector(setRestorable:)]) + if( [mpNSWindow respondsToSelector: @selector(setRestorable:)]) { - objc_msgSend(mpWindow, @selector(setRestorable:), NO); + objc_msgSend(mpNSWindow, @selector(setRestorable:), NO); } NSRect aRect = { { 0,0 }, { static_cast<CGFloat>(maGeometry.nWidth), static_cast<CGFloat>(maGeometry.nHeight) } }; mnTrackingRectTag = [mpView addTrackingRect: aRect owner: mpView userData: nil assumeInside: NO]; - maSysData.pView = mpView; + maSysData.mpNSView = mpNSView; UpdateFrameGeometry(); - [mpWindow setContentView: mpView]; + [mpNSWindow setContentView: mpNSView]; } // ----------------------------------------------------------------------- @@ -308,14 +308,14 @@ sal_Bool AquaSalFrame::PostEvent( void *pData ) // ----------------------------------------------------------------------- void AquaSalFrame::SetTitle(const OUString& rTitle) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); NSString* pTitle = CreateNSString( rTitle ); - [mpWindow setTitle: pTitle]; + [mpNSWindow setTitle: pTitle]; // create an entry in the dock menu const sal_uLong nAppWindowStyle = (SAL_FRAME_STYLE_CLOSEABLE | SAL_FRAME_STYLE_MOVEABLE); @@ -329,7 +329,7 @@ void AquaSalFrame::SetTitle(const OUString& rTitle) action: @selector(dockMenuItemTriggered:) keyEquivalent: @"" atIndex: 0]; - [mpDockMenuEntry setTarget: mpWindow]; + [mpDockMenuEntry setTarget: mpNSWindow]; // TODO: image (either the generic window image or an icon // check mark (for "main" window ?) @@ -363,7 +363,7 @@ void AquaSalFrame::SetRepresentedURL( const OUString& i_rDocURL ) if( pStr ) { [pStr autorelease]; - [mpWindow setRepresentedFilename: pStr]; + [mpNSWindow setRepresentedFilename: pStr]; } } } @@ -404,7 +404,7 @@ void AquaSalFrame::initShow() } // make sure the view is present in the wrapper list before any children receive focus - [AquaA11yFactory registerView: mpView]; + [AquaA11yFactory registerView: mpNSView]; } void AquaSalFrame::SendPaintEvent( const Rectangle* pRect ) @@ -425,7 +425,7 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect ) void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -441,10 +441,10 @@ void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate) // trigger filling our backbuffer SendPaintEvent(); - if( bNoActivate || [mpWindow canBecomeKeyWindow] == NO ) - [mpWindow orderFront: NSApp]; + if( bNoActivate || [mpNSWindow canBecomeKeyWindow] == NO ) + [mpNSWindow orderFront: NSApp]; else - [mpWindow makeKeyAndOrderFront: NSApp]; + [mpNSWindow makeKeyAndOrderFront: NSApp]; if( mpParent ) { @@ -457,12 +457,12 @@ void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate) */ if( mpParent->mbShown || (mnStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_FLOAT) ) ) { - [mpParent->mpWindow addChildWindow: mpWindow ordered: NSWindowAbove]; + [mpParent->mpNSWindow addChildWindow: mpNSWindow ordered: NSWindowAbove]; } } if( mbPresentation ) - [mpWindow makeMainWindow]; + [mpNSWindow makeMainWindow]; } else { @@ -473,14 +473,14 @@ void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate) // #i90440# #i94443# work around the focus going back to some other window // if a child gets hidden for a parent window - if( mpParent && mpParent->mbShown && [mpWindow isKeyWindow] ) - [mpParent->mpWindow makeKeyAndOrderFront: NSApp]; + if( mpParent && mpParent->mbShown && [mpNSWindow isKeyWindow] ) + [mpParent->mpNSWindow makeKeyAndOrderFront: NSApp]; [SalFrameView unsetMouseFrame: this]; - if( mpParent && [mpWindow parentWindow] == mpParent->mpWindow ) - [mpParent->mpWindow removeChildWindow: mpWindow]; + if( mpParent && [mpNSWindow parentWindow] == mpParent->mpNSWindow ) + [mpParent->mpNSWindow removeChildWindow: mpNSWindow]; - [mpWindow orderOut: NSApp]; + [mpNSWindow orderOut: NSApp]; } } @@ -500,7 +500,7 @@ void AquaSalFrame::SetMinClientSize( long nWidth, long nHeight ) mnMinWidth = nWidth; mnMinHeight = nHeight; - if( mpWindow ) + if( mpNSWindow ) { // Always add the decoration as the dimension concerns only // the content rectangle @@ -511,7 +511,7 @@ void AquaSalFrame::SetMinClientSize( long nWidth, long nHeight ) // Size of full window (content+structure) although we only // have the client size in arguments - [mpWindow setMinSize: aSize]; + [mpNSWindow setMinSize: aSize]; } } @@ -525,7 +525,7 @@ void AquaSalFrame::SetMaxClientSize( long nWidth, long nHeight ) mnMaxWidth = nWidth; mnMaxHeight = nHeight; - if( mpWindow ) + if( mpNSWindow ) { // Always add the decoration as the dimension concerns only // the content rectangle @@ -540,7 +540,7 @@ void AquaSalFrame::SetMaxClientSize( long nWidth, long nHeight ) // Size of full window (content+structure) although we only // have the client size in arguments - [mpWindow setMaxSize: aSize]; + [mpNSWindow setMaxSize: aSize]; } } @@ -551,11 +551,11 @@ void AquaSalFrame::SetClientSize( long nWidth, long nHeight ) // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - if( mpWindow ) + if( mpNSWindow ) { NSSize aSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) }; - [mpWindow setContentSize: aSize]; + [mpNSWindow setContentSize: aSize]; UpdateFrameGeometry(); if( mbShown ) // trigger filling our backbuffer @@ -586,10 +586,10 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - if ( mpWindow ) + if ( mpNSWindow ) { // set normal state - NSRect aStateRect = [mpWindow frame]; + NSRect aStateRect = [mpNSWindow frame]; aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask]; CocoaToVCL( aStateRect ); if( pState->mnMask & WINDOWSTATE_MASK_X ) @@ -603,11 +603,11 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) VCLToCocoa( aStateRect ); aStateRect = [NSWindow frameRectForContentRect: aStateRect styleMask: mnStyleMask]; - [mpWindow setFrame: aStateRect display: NO]; + [mpNSWindow setFrame: aStateRect display: NO]; if( pState->mnState == WINDOWSTATE_STATE_MINIMIZED ) - [mpWindow miniaturize: NSApp]; - else if( [mpWindow isMiniaturized] ) - [mpWindow deminiaturize: NSApp]; + [mpNSWindow miniaturize: NSApp]; + else if( [mpNSWindow isMiniaturized] ) + [mpNSWindow deminiaturize: NSApp]; /* ZOOMED is not really maximized (actually it toggles between a user set size and @@ -616,13 +616,13 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) */ if( pState->mnState == WINDOWSTATE_STATE_MAXIMIZED ) { - if(! [mpWindow isZoomed]) - [mpWindow zoom: NSApp]; + if(! [mpNSWindow isZoomed]) + [mpNSWindow zoom: NSApp]; } else { - if( [mpWindow isZoomed] ) - [mpWindow zoom: NSApp]; + if( [mpNSWindow isZoomed] ) + [mpNSWindow zoom: NSApp]; } } @@ -645,13 +645,13 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) if( nEvent ) CallCallback( nEvent, NULL ); - if( mbShown && mpWindow ) + if( mbShown && mpNSWindow ) { // trigger filling our backbuffer SendPaintEvent(); // tell the system the views need to be updated - [mpWindow display]; + [mpNSWindow display]; } } @@ -659,7 +659,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) sal_Bool AquaSalFrame::GetWindowState( SalFrameState* pState ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return FALSE; // #i113170# may not be the main thread if called from UNO API @@ -671,7 +671,7 @@ sal_Bool AquaSalFrame::GetWindowState( SalFrameState* pState ) WINDOWSTATE_MASK_HEIGHT | WINDOWSTATE_MASK_STATE; - NSRect aStateRect = [mpWindow frame]; + NSRect aStateRect = [mpNSWindow frame]; aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask]; CocoaToVCL( aStateRect ); pState->mnX = long(aStateRect.origin.x); @@ -679,9 +679,9 @@ sal_Bool AquaSalFrame::GetWindowState( SalFrameState* pState ) pState->mnWidth = long(aStateRect.size.width); pState->mnHeight = long(aStateRect.size.height); - if( [mpWindow isMiniaturized] ) + if( [mpNSWindow isMiniaturized] ) pState->mnState = WINDOWSTATE_STATE_MINIMIZED; - else if( ! [mpWindow isZoomed] ) + else if( ! [mpNSWindow isZoomed] ) pState->mnState = WINDOWSTATE_STATE_NORMAL; else pState->mnState = WINDOWSTATE_STATE_MAXIMIZED; @@ -693,7 +693,7 @@ sal_Bool AquaSalFrame::GetWindowState( SalFrameState* pState ) void AquaSalFrame::SetScreenNumber(unsigned int nScreen) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -709,17 +709,17 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen) NSRect aNewScreen = [pScreen frame]; // get current screen frame - pScreen = [mpWindow screen]; + pScreen = [mpNSWindow screen]; if( pScreen ) { NSRect aCurScreen = [pScreen frame]; if( aCurScreen.origin.x != aNewScreen.origin.x || aCurScreen.origin.y != aNewScreen.origin.y ) { - NSRect aFrameRect = [mpWindow frame]; + NSRect aFrameRect = [mpNSWindow frame]; aFrameRect.origin.x += aNewScreen.origin.x - aCurScreen.origin.x; aFrameRect.origin.y += aNewScreen.origin.y - aCurScreen.origin.y; - [mpWindow setFrame: aFrameRect display: NO]; + [mpNSWindow setFrame: aFrameRect display: NO]; UpdateFrameGeometry(); } } @@ -734,7 +734,7 @@ void AquaSalFrame::SetApplicationID( const OUString &/*rApplicationID*/ ) void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -789,7 +789,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) if( aNewContentRect.size.width == 0 && aNewContentRect.size.height == 0 ) { if( pScreen == nil ) - pScreen = [mpWindow screen]; + pScreen = [mpNSWindow screen]; if( pScreen == nil ) pScreen = [NSScreen mainScreen]; @@ -799,9 +799,9 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) if( bHideMenu ) [NSMenu setMenuBarVisible:NO]; - maFullScreenRect = [mpWindow frame]; + maFullScreenRect = [mpNSWindow frame]; { - [mpWindow setFrame: [NSWindow frameRectForContentRect: aNewContentRect styleMask: mnStyleMask] display: mbShown ? YES : NO]; + [mpNSWindow setFrame: [NSWindow frameRectForContentRect: aNewContentRect styleMask: mnStyleMask] display: mbShown ? YES : NO]; } UpdateFrameGeometry(); @@ -812,7 +812,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) else { { - [mpWindow setFrame: maFullScreenRect display: mbShown ? YES : NO]; + [mpNSWindow setFrame: maFullScreenRect display: mbShown ? YES : NO]; } UpdateFrameGeometry(); @@ -831,7 +831,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) void AquaSalFrame::StartPresentation( sal_Bool bStart ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -844,15 +844,15 @@ void AquaSalFrame::StartPresentation( sal_Bool bStart ) kIOPMAssertionLevelOn, CFSTR("LibreOffice presentation running"), &mnAssertionID); - [mpWindow setLevel: NSPopUpMenuWindowLevel]; + [mpNSWindow setLevel: NSPopUpMenuWindowLevel]; if( mbShown ) - [mpWindow makeMainWindow]; + [mpNSWindow makeMainWindow]; } else { GetSalData()->maPresentationFrames.remove( this ); IOPMAssertionRelease(mnAssertionID); - [mpWindow setLevel: NSNormalWindowLevel]; + [mpNSWindow setLevel: NSNormalWindowLevel]; } } @@ -866,7 +866,7 @@ void AquaSalFrame::SetAlwaysOnTop( sal_Bool ) void AquaSalFrame::ToTop(sal_uInt16 nFlags) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -874,13 +874,13 @@ void AquaSalFrame::ToTop(sal_uInt16 nFlags) if( ! (nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN) ) { - if( ! [mpWindow isVisible] || [mpWindow isMiniaturized] ) + if( ! [mpNSWindow isVisible] || [mpNSWindow isMiniaturized] ) return; } if( nFlags & SAL_FRAME_TOTOP_GRABFOCUS ) - [mpWindow makeKeyAndOrderFront: NSApp]; + [mpNSWindow makeKeyAndOrderFront: NSApp]; else - [mpWindow orderFront: NSApp]; + [mpNSWindow orderFront: NSApp]; } // ----------------------------------------------------------------------- @@ -926,7 +926,7 @@ NSCursor* AquaSalFrame::getCurrentCursor() const void AquaSalFrame::SetPointer( PointerStyle ePointerStyle ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -936,7 +936,7 @@ void AquaSalFrame::SetPointer( PointerStyle ePointerStyle ) return; mePointerStyle = ePointerStyle; - [mpWindow invalidateCursorRectsForView: mpView]; + [mpNSWindow invalidateCursorRectsForView: mpNSView]; } // ----------------------------------------------------------------------- @@ -955,21 +955,21 @@ void AquaSalFrame::SetPointerPos( long nX, long nY ) void AquaSalFrame::Flush( void ) { - if( !(mbGraphics && mpGraphics && mpView && mbShown) ) + if( !(mbGraphics && mpGraphics && mpNSView && mbShown) ) return; // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - [mpView setNeedsDisplay: YES]; + [mpNSView setNeedsDisplay: YES]; // outside of the application's event loop (e.g. IntroWindow) // nothing would trigger paint event handling // => fall back to synchronous painting if( ImplGetSVData()->maAppData.mnDispatchLevel <= 0 ) { - [mpView display]; + [mpNSView display]; } } @@ -977,7 +977,7 @@ void AquaSalFrame::Flush( void ) void AquaSalFrame::Flush( const Rectangle& rRect ) { - if( !(mbGraphics && mpGraphics && mpView && mbShown) ) + if( !(mbGraphics && mpGraphics && mpNSView && mbShown) ) return; // #i113170# may not be the main thread if called from UNO API @@ -985,14 +985,14 @@ void AquaSalFrame::Flush( const Rectangle& rRect ) NSRect aNSRect = { { static_cast<CGFloat>(rRect.Left()), static_cast<CGFloat>(rRect.Top()) }, { static_cast<CGFloat>(rRect.GetWidth()), static_cast<CGFloat>(rRect.GetHeight()) } }; VCLToCocoa( aNSRect, false ); - [mpView setNeedsDisplayInRect: aNSRect]; + [mpNSView setNeedsDisplayInRect: aNSRect]; // outside of the application's event loop (e.g. IntroWindow) // nothing would trigger paint event handling // => fall back to synchronous painting if( ImplGetSVData()->maAppData.mnDispatchLevel <= 0 ) { - [mpView display]; + [mpNSView display]; } } @@ -1000,13 +1000,13 @@ void AquaSalFrame::Flush( const Rectangle& rRect ) void AquaSalFrame::Sync() { - if( mbGraphics && mpGraphics && mpView && mbShown ) + if( mbGraphics && mpGraphics && mpNSView && mbShown ) { // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - [mpView setNeedsDisplay: YES]; - [mpView display]; + [mpNSView setNeedsDisplay: YES]; + [mpNSView display]; } } @@ -1220,13 +1220,13 @@ void AquaSalFrame::getResolution( sal_Int32& o_rDPIX, sal_Int32& o_rDPIY ) // doesn't make the anything cleaner for now void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - [mpView lockFocus]; + [mpNSView lockFocus]; StyleSettings aStyleSettings = rSettings.GetStyleSettings(); @@ -1275,22 +1275,22 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetIconFont( aLabelFont ); Color aHighlightColor( getColor( [NSColor selectedTextBackgroundColor], - aStyleSettings.GetHighlightColor(), mpWindow ) ); + aStyleSettings.GetHighlightColor(), mpNSWindow ) ); aStyleSettings.SetHighlightColor( aHighlightColor ); Color aHighlightTextColor( getColor( [NSColor selectedTextColor], - aStyleSettings.GetHighlightTextColor(), mpWindow ) ); + aStyleSettings.GetHighlightTextColor(), mpNSWindow ) ); aStyleSettings.SetHighlightTextColor( aHighlightTextColor ); Color aMenuHighlightColor( getColor( [NSColor selectedMenuItemColor], - aStyleSettings.GetMenuHighlightColor(), mpWindow ) ); + aStyleSettings.GetMenuHighlightColor(), mpNSWindow ) ); aStyleSettings.SetMenuHighlightColor( aMenuHighlightColor ); Color aMenuHighlightTextColor( getColor( [NSColor selectedMenuItemTextColor], - aStyleSettings.GetMenuHighlightTextColor(), mpWindow ) ); + aStyleSettings.GetMenuHighlightTextColor(), mpNSWindow ) ); aStyleSettings.SetMenuHighlightTextColor( aMenuHighlightTextColor ); aStyleSettings.SetMenuColor( aBackgroundColor ); Color aMenuTextColor( getColor( [NSColor textColor], - aStyleSettings.GetMenuTextColor(), mpWindow ) ); + aStyleSettings.GetMenuTextColor(), mpNSWindow ) ); aStyleSettings.SetMenuTextColor( aMenuTextColor ); aStyleSettings.SetMenuBarTextColor( aMenuTextColor ); aStyleSettings.SetMenuBarRolloverTextColor( aMenuTextColor ); @@ -1312,7 +1312,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) rSettings.SetStyleSettings( aStyleSettings ); - [mpView unlockFocus]; + [mpNSView unlockFocus]; } // ----------------------------------------------------------------------- @@ -1333,7 +1333,7 @@ void AquaSalFrame::Beep() void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API @@ -1341,8 +1341,8 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u sal_uInt16 nEvent = 0; - if( [mpWindow isMiniaturized] ) - [mpWindow deminiaturize: NSApp]; // expand the window + if( [mpNSWindow isMiniaturized] ) + [mpNSWindow deminiaturize: NSApp]; // expand the window if (nFlags & (SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y)) { @@ -1356,7 +1356,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u nEvent = (nEvent == SALEVENT_MOVE) ? SALEVENT_MOVERESIZE : SALEVENT_RESIZE; } - NSRect aFrameRect = [mpWindow frame]; + NSRect aFrameRect = [mpNSWindow frame]; NSRect aContentRect = [NSWindow contentRectForFrameRect: aFrameRect styleMask: mnStyleMask]; // position is always relative to parent frame @@ -1371,7 +1371,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u else nX = mpParent->maGeometry.nWidth - static_cast<long int>( aContentRect.size.width-1) - nX; } - NSRect aParentFrameRect = [mpParent->mpWindow frame]; + NSRect aParentFrameRect = [mpParent->mpNSWindow frame]; aParentContentRect = [NSWindow contentRectForFrameRect: aParentFrameRect styleMask: mpParent->mnStyleMask]; } else @@ -1403,7 +1403,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u // do not display yet, we need to update our backbuffer { - [mpWindow setFrame: [NSWindow frameRectForContentRect: aContentRect styleMask: mnStyleMask] display: NO]; + [mpNSWindow setFrame: [NSWindow frameRectForContentRect: aContentRect styleMask: mnStyleMask] display: NO]; } UpdateFrameGeometry(); @@ -1417,19 +1417,19 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u SendPaintEvent(); // now inform the system that the views need to be drawn - [mpWindow display]; + [mpNSWindow display]; } } void AquaSalFrame::GetWorkArea( Rectangle& rRect ) { - if ( !mpWindow ) + if ( !mpNSWindow ) return; // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - NSScreen* pScreen = [mpWindow screen]; + NSScreen* pScreen = [mpNSWindow screen]; if( pScreen == nil ) pScreen = [NSScreen mainScreen]; NSRect aRect = [pScreen visibleFrame]; @@ -1449,7 +1449,7 @@ SalPointerState AquaSalFrame::GetPointerState() state.mnState = 0; // get position - NSPoint aPt = [mpWindow mouseLocationOutsideOfEventStream]; + NSPoint aPt = [mpNSWindow mouseLocationOutsideOfEventStream]; CocoaToVCL( aPt, false ); state.maPos = Point(static_cast<long>(aPt.x), static_cast<long>(aPt.y)); @@ -1575,13 +1575,13 @@ void AquaSalFrame::SetMenu( SalMenu* pSalMenu ) void AquaSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle ) { - if ( mpWindow ) + if ( mpNSWindow ) { // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); if( (mnExtStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) != (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ) - [mpWindow setDocumentEdited: (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ? YES : NO]; + [mpNSWindow setDocumentEdited: (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ? YES : NO]; } mnExtStyle = nStyle; @@ -1604,7 +1604,7 @@ void AquaSalFrame::SetParent( SalFrame* pNewParent ) void AquaSalFrame::UpdateFrameGeometry() { - if ( !mpWindow ) + if ( !mpNSWindow ) { return; } @@ -1613,7 +1613,7 @@ void AquaSalFrame::UpdateFrameGeometry() // whereas vcl's are upper left // update screen rect - NSScreen * pScreen = [mpWindow screen]; + NSScreen * pScreen = [mpNSWindow screen]; if( pScreen ) { maScreenRect = [pScreen frame]; @@ -1622,14 +1622,14 @@ void AquaSalFrame::UpdateFrameGeometry() maGeometry.nDisplayScreenNumber = [pScreens indexOfObject: pScreen]; } - NSRect aFrameRect = [mpWindow frame]; + NSRect aFrameRect = [mpNSWindow frame]; NSRect aContentRect = [NSWindow contentRectForFrameRect: aFrameRect styleMask: mnStyleMask]; // release old track rect - [mpView removeTrackingRect: mnTrackingRectTag]; + [mpNSView removeTrackingRect: mnTrackingRectTag]; // install the new track rect NSRect aTrackRect = { { 0, 0 }, aContentRect.size }; - mnTrackingRectTag = [mpView addTrackingRect: aTrackRect owner: mpView userData: nil assumeInside: NO]; + mnTrackingRectTag = [mpNSView addTrackingRect: aTrackRect owner: mpNSView userData: nil assumeInside: NO]; // convert to vcl convention CocoaToVCL( aFrameRect ); @@ -1681,7 +1681,7 @@ void AquaSalFrame::CaptureMouse( sal_Bool bCapture ) void AquaSalFrame::ResetClipRegion() { - if ( !mpWindow ) + if ( !mpNSWindow ) { return; } @@ -1693,18 +1693,18 @@ void AquaSalFrame::ResetClipRegion() CGPathRelease( mrClippingPath ); mrClippingPath = NULL; - if( mpView && mbShown ) - [mpView setNeedsDisplay: YES]; - if( mpWindow ) + if( mpNSView && mbShown ) + [mpNSView setNeedsDisplay: YES]; + if( mpNSWindow ) { - [mpWindow setOpaque: YES]; - [mpWindow invalidateShadow]; + [mpNSWindow setOpaque: YES]; + [mpNSWindow invalidateShadow]; } } void AquaSalFrame::BeginSetClipRegion( sal_uLong nRects ) { - if ( !mpWindow ) + if ( !mpNSWindow ) { return; } @@ -1743,7 +1743,7 @@ void AquaSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight void AquaSalFrame::EndSetClipRegion() { - if ( !mpWindow ) + if ( !mpNSWindow ) { return; } @@ -1756,12 +1756,12 @@ void AquaSalFrame::EndSetClipRegion() mrClippingPath = CGPathCreateMutable(); CGPathAddRects( mrClippingPath, NULL, &maClippingRects[0], maClippingRects.size() ); } - if( mpView && mbShown ) - [mpView setNeedsDisplay: YES]; - if( mpWindow ) + if( mpNSView && mbShown ) + [mpNSView setNeedsDisplay: YES]; + if( mpNSWindow ) { - [mpWindow setOpaque: (mrClippingPath != NULL) ? NO : YES]; - [mpWindow setBackgroundColor: [NSColor clearColor]]; + [mpNSWindow setOpaque: (mrClippingPath != NULL) ? NO : YES]; + [mpNSWindow setBackgroundColor: [NSColor clearColor]]; // shadow is invalidated when view gets drawn again } } diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index c46b84d957dc..10986d06b423 100644 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -464,7 +464,7 @@ static AquaSalFrame* getMouseContainerFrame() -(id)initWithSalFrame: (AquaSalFrame*)pFrame { - if ((self = [super initWithFrame: [NSWindow contentRectForFrameRect: [pFrame->getWindow() frame] styleMask: pFrame->mnStyleMask]]) != nil) + if ((self = [super initWithFrame: [NSWindow contentRectForFrameRect: [pFrame->getNSWindow() frame] styleMask: pFrame->mnStyleMask]]) != nil) { mDraggingDestinationHandler = nil; mpFrame = pFrame; @@ -554,7 +554,7 @@ private: { mpFrame->mpGraphics->UpdateWindow( aRect ); if( mpFrame->getClipPath() ) - [mpFrame->getWindow() invalidateShadow]; + [mpFrame->getNSWindow() invalidateShadow]; } } } @@ -587,7 +587,7 @@ private: { // is this event actually inside that NSWindow ? NSPoint aPt = [NSEvent mouseLocation]; - NSRect aFrameRect = [pDispatchFrame->getWindow() frame]; + NSRect aFrameRect = [pDispatchFrame->getNSWindow() frame]; if ( ! NSPointInRect( aPt, aFrameRect ) ) { @@ -1725,7 +1725,7 @@ private: } -(id)parentAttribute { - return (NSView *) mpFrame -> mpWindow; + return mpFrame->getNSWindow(); } -(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext @@ -1743,9 +1743,9 @@ private: return [ super accessibleContext ]; } --(NSView *)viewElementForParent +-(NSView*)viewElementForParent { - return (NSView *) mpFrame -> mpWindow; + return mpFrame->getNSView(); } -(void)registerMouseEventListener: (id)theListener diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx index 6ec003c2afa2..37d28c5f9712 100644 --- a/vcl/aqua/source/window/salmenu.cxx +++ b/vcl/aqua/source/window/salmenu.cxx @@ -357,9 +357,9 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR // get the pointers AquaSalFrame * pParentAquaSalFrame = (AquaSalFrame *) pWin->ImplGetWindowImpl()->mpRealParent->ImplGetFrame(); - NSWindow * pParentNSWindow = pParentAquaSalFrame->mpWindow; - NSView * pParentNSView = [pParentNSWindow contentView]; - NSView * pPopupNSView = ((AquaSalFrame *) pWin->ImplGetWindow()->ImplGetFrame())->mpView; + NSWindow* pParentNSWindow = pParentAquaSalFrame->mpNSWindow; + NSView* pParentNSView = [pParentNSWindow contentView]; + NSView* pPopupNSView = ((AquaSalFrame *) pWin->ImplGetWindow()->ImplGetFrame())->mpNSView; NSRect popupFrame = [pPopupNSView frame]; // since we manipulate the menu below (removing entries) @@ -804,9 +804,9 @@ void AquaSalMenu::statusLayout() { if( GetSalData()->mpStatusItem ) { - NSView* pView = [GetSalData()->mpStatusItem view]; - if( [pView isMemberOfClass: [OOStatusItemView class]] ) // well of course it is - [(OOStatusItemView*)pView layout]; + NSView* pNSView = [GetSalData()->mpStatusItem view]; + if( [pNSView isMemberOfClass: [OOStatusItemView class]] ) // well of course it is + [(OOStatusItemView*)pNSView layout]; else OSL_FAIL( "someone stole our status view" ); } @@ -884,15 +884,15 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame if( ! pItem ) return Rectangle(); - NSView* pView = [pItem view]; - if( ! pView ) + NSView* pNSView = [pItem view]; + if( ! pNSView ) return Rectangle(); - NSWindow* pWin = [pView window]; - if( ! pWin ) + NSWindow* pNSWin = [pNSView window]; + if( ! pNSWin ) return Rectangle(); - NSRect aRect = [pWin frame]; - aRect.origin = [pWin convertBaseToScreen: NSMakePoint( 0, 0 )]; + NSRect aRect = [pNSWin frame]; + aRect.origin = [pNSWin convertBaseToScreen: NSMakePoint( 0, 0 )]; // make coordinates relative to reference frame static_cast<AquaSalFrame*>(i_pReferenceFrame)->CocoaToVCL( aRect.origin ); diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx index abf085cdd5d1..c5d09d73dac8 100644 --- a/vcl/aqua/source/window/salobj.cxx +++ b/vcl/aqua/source/window/salobj.cxx @@ -39,20 +39,20 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) : mnHeight( 20 ) { maSysData.nSize = sizeof( maSysData ); - maSysData.pView = NULL; + maSysData.mpNSView = NULL; NSRect aInitFrame = { { 0, 0 }, { 20, 20 } }; mpClipView = [[NSClipView alloc] initWithFrame: aInitFrame ]; if( mpClipView ) { - [mpFrame->getView() addSubview: mpClipView]; + [mpFrame->getNSView() addSubview: mpClipView]; [mpClipView setHidden: YES]; } - maSysData.pView = [[NSView alloc] initWithFrame: aInitFrame]; - if( maSysData.pView ) + maSysData.mpNSView = [[NSView alloc] initWithFrame: aInitFrame]; + if( maSysData.mpNSView ) { if( mpClipView ) - [mpClipView setDocumentView: maSysData.pView]; + [mpClipView setDocumentView: maSysData.mpNSView]; } } @@ -60,9 +60,9 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) : AquaSalObject::~AquaSalObject() { - if( maSysData.pView ) + if( maSysData.mpNSView ) { - NSView *pView = maSysData.pView; + NSView *pView = maSysData.mpNSView; [pView removeFromSuperview]; [pView release]; } @@ -163,10 +163,10 @@ void AquaSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) void AquaSalObject::setClippedPosSize() { NSRect aViewRect = { { 0, 0 }, { static_cast<CGFloat>(mnWidth), static_cast<CGFloat>(mnHeight) } }; - if( maSysData.pView ) + if( maSysData.mpNSView ) { - NSView *pView = maSysData.pView; - [pView setFrame: aViewRect]; + NSView* pNSView = maSysData.mpNSView; + [pNSView setFrame: aViewRect]; } NSRect aClipViewRect = { { static_cast<CGFloat>(mnX), static_cast<CGFloat>(mnY) }, { static_cast<CGFloat>(mnWidth), static_cast<CGFloat>(mnHeight) } }; diff --git a/vcl/inc/aqua/salframe.h b/vcl/inc/aqua/salframe.h index 11446a14bf05..06a82702221c 100644 --- a/vcl/inc/aqua/salframe.h +++ b/vcl/inc/aqua/salframe.h @@ -52,8 +52,8 @@ typedef struct SalFrame::SalPointerState SalPointerState; class AquaSalFrame : public SalFrame { public: - NSWindow* mpWindow; // Cocoa window - NSView* mpView; // Cocoa view (actually a custom view, see below + NSWindow* mpNSWindow; // Cocoa window + NSView* mpNSView; // Cocoa view (actually a custom view) NSMenuItem* mpDockMenuEntry; // entry in the dynamic dock menu NSRect maScreenRect; // for mirroring purposes AquaSalGraphics* mpGraphics; // current frame graphics @@ -175,8 +175,8 @@ public: static AquaSalFrame* GetCaptureFrame() { return s_pCaptureFrame; } - NSWindow* getWindow() const { return mpWindow; } - NSView* getView() const { return mpView; } + NSWindow* getNSWindow() const { return mpNSWindow; } + NSView* getNSView() const { return mpNSView; } unsigned int getStyleMask() const { return mnStyleMask; } void getResolution( sal_Int32& o_rDPIX, sal_Int32& o_rDPIY ); diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 9f328b6298b7..0b7aa9f7dfa2 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -224,7 +224,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava ) nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd ); #elif defined MACOSX // FIXME: this is wrong - nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->pView ); + nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->mpNSView ); #elif defined ANDROID // Nothing #elif defined IOS diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index ebe7d2a3a906..821ae214b4a2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8252,8 +8252,8 @@ uno::Reference< XDragSource > Window::GetDragSource() * Using Windows based dnd as a temporary solution */ aDragSourceSN = "com.sun.star.datatransfer.dnd.OleDragSource"; aDropTargetSN = "com.sun.star.datatransfer.dnd.OleDropTarget"; - aDragSourceAL[ 1 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->pView) ) ); - aDropTargetAL[ 0 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->pView) ) ); + aDragSourceAL[ 1 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->mpNSView) ) ); + aDropTargetAL[ 0 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->mpNSView) ) ); #elif HAVE_FEATURE_X11 aDragSourceSN = "com.sun.star.datatransfer.dnd.X11DragSource"; aDropTargetSN = "com.sun.star.datatransfer.dnd.X11DropTarget"; |