diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-10-28 13:43:39 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-10-29 14:08:36 +0200 |
commit | 34327fdbc4b1d9070ff39d0a2caddad983b48385 (patch) | |
tree | 70c2bdf9f2e3fce357ab64ec9b440dfc9e659b54 /vcl/osx/salinst.cxx | |
parent | d37a44a9ebdafec1435f98194417a1d8cc8208b5 (diff) |
Use non-deprecated names for bits and constants
Change-Id: I9004aaef7b2d526ad99b316b78733671a785c847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124328
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/osx/salinst.cxx')
-rw-r--r-- | vcl/osx/salinst.cxx | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 452821f33e14..6ac198554fb0 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -493,7 +493,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) break; default: - OSL_FAIL( "unhandled NSApplicationDefined event" ); + OSL_FAIL( "unhandled NSEventTypeApplicationDefined event" ); break; } } @@ -508,10 +508,8 @@ bool AquaSalInstance::RunInMainYield( bool bHandleAllCurrentEvents ) static bool isWakeupEvent( NSEvent *pEvent ) { -SAL_WNODEPRECATED_DECLARATIONS_PUSH - return NSApplicationDefined == [pEvent type] + return NSEventTypeApplicationDefined == [pEvent type] && AquaSalInstance::YieldWakeupEvent == static_cast<int>([pEvent subtype]); -SAL_WNODEPRECATED_DECLARATIONS_POP } bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) @@ -659,36 +657,18 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType ) } unsigned/*NSUInteger*/ nEventMask = 0; -SAL_WNODEPRECATED_DECLARATIONS_PUSH - // 'NSFlagsChangedMask' is deprecated: first deprecated in macOS 10.12 - // 'NSKeyDownMask' is deprecated: first deprecated in macOS 10.12 - // 'NSKeyUpMask' is deprecated: first deprecated in macOS 10.12 - // 'NSLeftMouseDownMask' is deprecated: first deprecated in macOS 10.12 - // 'NSLeftMouseDraggedMask' is deprecated: first deprecated in macOS 10.12 - // 'NSLeftMouseUpMask' is deprecated: first deprecated in macOS 10.12 - // 'NSMouseEnteredMask' is deprecated: first deprecated in macOS 10.12 - // 'NSMouseExitedMask' is deprecated: first deprecated in macOS 10.12 - // 'NSOtherMouseDownMask' is deprecated: first deprecated in macOS 10.12 - // 'NSOtherMouseDraggedMask' is deprecated: first deprecated in macOS 10.12 - // 'NSOtherMouseUpMask' is deprecated: first deprecated in macOS 10.12 - // 'NSRightMouseDownMask' is deprecated: first deprecated in macOS 10.12 - // 'NSRightMouseDraggedMask' is deprecated: first deprecated in macOS 10.12 - // 'NSRightMouseUpMask' is deprecated: first deprecated in macOS 10.12 - // 'NSScrollWheelMask' is deprecated: first deprecated in macOS 10.12 - // 'NSTabletPoint' is deprecated: first deprecated in macOS 10.12 if( nType & VclInputFlags::MOUSE) nEventMask |= - NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask | - NSLeftMouseUpMask | NSRightMouseUpMask | NSOtherMouseUpMask | - NSLeftMouseDraggedMask | NSRightMouseDraggedMask | NSOtherMouseDraggedMask | - NSScrollWheelMask | - // NSMouseMovedMask | - NSMouseEnteredMask | NSMouseExitedMask; + NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown | NSEventMaskOtherMouseDown | + NSEventMaskLeftMouseUp | NSEventMaskRightMouseUp | NSEventMaskOtherMouseUp | + NSEventMaskLeftMouseDragged | NSEventMaskRightMouseDragged | NSEventMaskOtherMouseDragged | + NSEventMaskScrollWheel | + // NSEventMaskMouseMoved | + NSEventMaskMouseEntered | NSEventMaskMouseExited; if( nType & VclInputFlags::KEYBOARD) - nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask; + nEventMask |= NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged; if( nType & VclInputFlags::OTHER) - nEventMask |= NSTabletPoint | NSApplicationDefinedMask; -SAL_WNODEPRECATED_DECLARATIONS_POP + nEventMask |= NSEventMaskTabletPoint | NSEventMaskApplicationDefined; // TODO: VclInputFlags::PAINT / more VclInputFlags::OTHER if( !bool(nType) ) return false; |