Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2019-09-14 21:27:16 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2019-09-14 21:27:16 +0300
commit2b9f4bcfa07046c2485db4d9cc2bc465c2582d39 (patch)
tree82eb9aee396fb7f27ef4f5d828e7c4e88e57e2c4 /intern/ghost/intern/GHOST_WindowCocoa.mm
parent9d282d7a8d689a17ae58e94453ae99a41e91b701 (diff)
macOS: Replaced deprecated Cocoa API calls.
Most of these calls were replaced with the successors as suggested by Xcode's Fix-It. Functionality should not be affected. This reduces the number of warnings when building on macOS.
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowCocoa.mm')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm20
1 files changed, 10 insertions, 10 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index cb4100c1188..0b8e808b84e 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -315,8 +315,8 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
m_window = [[CocoaWindow alloc]
initWithContentRect:rect
- styleMask:NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask |
- NSMiniaturizableWindowMask
+ styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
+ NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable
backing:NSBackingStoreBuffered
defer:NO];
@@ -388,7 +388,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
[m_window setAcceptsMouseMovedEvents:YES];
NSView *contentview = [m_window contentView];
- [contentview setAcceptsTouchEvents:YES];
+ [contentview setAllowedTouchTypes:(NSTouchTypeMaskDirect | NSTouchTypeMaskIndirect)];
[m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
NSStringPboardType,
@@ -550,8 +550,8 @@ void GHOST_WindowCocoa::getClientBounds(GHOST_Rect &bounds) const
// Max window contents as screen size (excluding title bar...)
NSRect contentRect = [CocoaWindow
contentRectForFrameRect:screenSize
- styleMask:(NSTitledWindowMask | NSClosableWindowMask |
- NSMiniaturizableWindowMask | NSResizableWindowMask)];
+ styleMask:(NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
+ NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable)];
rect = [m_window contentRectForFrameRect:[m_window frame]];
@@ -619,7 +619,7 @@ GHOST_TWindowState GHOST_WindowCocoa::getState() const
NSUInteger masks = [m_window styleMask];
- if (masks & NSFullScreenWindowMask) {
+ if (masks & NSWindowStyleMaskFullScreen) {
// Lion style fullscreen
if (!m_immediateDraw) {
state = GHOST_kWindowStateFullScreen;
@@ -748,7 +748,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
case GHOST_kWindowStateFullScreen: {
NSUInteger masks = [m_window styleMask];
- if (!(masks & NSFullScreenWindowMask)) {
+ if (!(masks & NSWindowStyleMaskFullScreen)) {
[m_window toggleFullScreen:nil];
}
break;
@@ -758,7 +758,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSUInteger masks = [m_window styleMask];
- if (masks & NSFullScreenWindowMask) {
+ if (masks & NSWindowStyleMaskFullScreen) {
// Lion style fullscreen
[m_window toggleFullScreen:nil];
}
@@ -851,7 +851,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setProgressBar(float progress)
[[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
fromRect:NSZeroRect
- operation:NSCompositeSourceOver
+ operation:NSCompositingOperationSourceOver
fraction:1.0];
// Track & Outline
@@ -904,7 +904,7 @@ GHOST_TSuccess GHOST_WindowCocoa::endProgressBar()
[dockIcon lockFocus];
[[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
fromRect:NSZeroRect
- operation:NSCompositeSourceOver
+ operation:NSCompositingOperationSourceOver
fraction:1.0];
[dockIcon unlockFocus];
[NSApp setApplicationIconImage:dockIcon];