aboutsummaryrefslogtreecommitdiffstats
path: root/src/macfont.m
diff options
context:
space:
mode:
authorAlan Third2019-04-02 21:49:36 +0100
committerAlan Third2019-05-21 20:57:33 +0100
commit9624f609493da7c08016ba00d6895bad0fe26a0e (patch)
tree766d6c8f60ad8e4d3053502de12634f960717e39 /src/macfont.m
parentcb367c8e0d4a881acf8255e1ff6bdd6442efb538 (diff)
downloademacs-9624f609493da7c08016ba00d6895bad0fe26a0e.tar.gz
emacs-9624f609493da7c08016ba00d6895bad0fe26a0e.zip
Fix some deprecation notices on macOS 10.14
* src/nsimage.m ([EmacsImage setXBMColor:]): Replace colorSpaceName code. * src/nsmenu.m ([EmacsDialogPanel initWithContentRect:styleMask:]): Remove reference to oneShot. * src/nsterm.h (ns_enable_screen_updates): Remove function prototype. (NSPasteboardTypeString): (NSPasteboardTypeTabularText): (NSControlStateValueOn): (NSControlStateValueOff): (NSBezelStyleRounded): (NSPasteboardTypeURL): Define new names and replace all callers. * src/nsterm.m ([EmacsColor colorUsingDefaultColorSpace]): Replace calls to colorUsingColorSpaceName on macOS > 10.7. ([EmacsView performDragOperation:]): Add FIXME about deprecation. (ns_disable_screen_updates): (ns_enable_screen_updates): Remove functions and all callers. (disable_screen_updates_count): Remove variable. * src/macfont.m (macfont_draw): Use CGContext instead of graphicsPort on macOS >= 10.10
Diffstat (limited to 'src/macfont.m')
-rw-r--r--src/macfont.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/macfont.m b/src/macfont.m
index d69af679813..f825e6291d3 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2818,7 +2818,18 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
2818 } 2818 }
2819 } 2819 }
2820 2820
2821 context = [[NSGraphicsContext currentContext] graphicsPort]; 2821#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
2822#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
2823 if ([[NSGraphicsContext currentContext] respondsToSelector:@selector(CGContext)])
2824#endif
2825 context = [[NSGraphicsContext currentContext] CGContext];
2826#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
2827 else
2828#endif
2829#endif
2830#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
2831 context = [[NSGraphicsContext currentContext] graphicsPort];
2832#endif
2822 CGContextSaveGState (context); 2833 CGContextSaveGState (context);
2823 2834
2824 if (!CGRectIsNull (background_rect)) 2835 if (!CGRectIsNull (background_rect))