unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33035: 27.0.50; Deprecated macOS functions
@ 2018-10-13 15:32 Philipp
  2020-08-16 17:45 ` Lars Ingebrigtsen
  2021-01-10 13:25 ` Mattias Engdegård
  0 siblings, 2 replies; 9+ messages in thread
From: Philipp @ 2018-10-13 15:32 UTC (permalink / raw)
  To: 33035


A few functions and variables have been deprecated in macOS Mojave,
these should be replaced or removed:

  CC       nsterm.o
nsterm.m:175:16: warning: 'colorUsingColorSpaceName:' is deprecated: first deprecated in macOS 10.14 - Use -colorUsingType: or -colorUsingColorSpace: instead
      [-Wdeprecated-declarations]
  return [self colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:405:1: note: 
      'colorUsingColorSpaceName:' has been explicitly marked deprecated here
- (nullable NSColor *)colorUsingColorSpaceName:(NSColorSpaceName)name NS_DEPRECATED_MAC(10_0, 10_14, "Use -colorUsingType: or -colorUsingColorSpace: instead");
^
nsterm.m:708:3: warning: 'NSDisableScreenUpdates' is deprecated: first deprecated in macOS 10.11 - As of 10.11 it is not generally necessary to take explicit
      action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for
      visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSDisableScreenUpdates.
      [-Wdeprecated-declarations]
  NSDisableScreenUpdates ();
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:234:20: note: 
      'NSDisableScreenUpdates' has been explicitly marked deprecated here
APPKIT_EXTERN void NSDisableScreenUpdates(void) NS_DEPRECATED_MAC(10_0, 10_11, "As of 10.11 it is not generally necessary to take explicit action to ach...
                   ^
nsterm.m:718:7: warning: 'NSEnableScreenUpdates' is deprecated: first deprecated in macOS 10.11 - As of 10.11 it is not generally necessary to take explicit
      action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for
      visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSEnableScreenUpdates.
      [-Wdeprecated-declarations]
      NSEnableScreenUpdates ();
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:236:20: note: 
      'NSEnableScreenUpdates' has been explicitly marked deprecated here
APPKIT_EXTERN void NSEnableScreenUpdates(void) NS_DEPRECATED_MAC(10_0, 10_11, "As of 10.11 it is not generally necessary to take explicit action to achi...
                   ^
nsterm.m:2848:26: warning: 'scrollRect:by:' is deprecated: first deprecated in macOS 10.14 - Use NSScrollView to achieve scrolling views.
      [-Wdeprecated-declarations]
      [FRAME_NS_VIEW (f) scrollRect: src
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:260:1: note: 
      'scrollRect:by:' has been explicitly marked deprecated here
- (void)scrollRect:(NSRect)rect by:(NSSize)delta NS_DEPRECATED_MAC(10_0, 10_14, "Use NSScrollView to achieve scrolling views.");
^
nsterm.m:3241:7: warning: 'NSDisableScreenUpdates' is deprecated: first deprecated in macOS 10.11 - As of 10.11 it is not generally necessary to take explicit
      action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for
      visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSDisableScreenUpdates.
      [-Wdeprecated-declarations]
      NSDisableScreenUpdates ();
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:234:20: note: 
      'NSDisableScreenUpdates' has been explicitly marked deprecated here
APPKIT_EXTERN void NSDisableScreenUpdates(void) NS_DEPRECATED_MAC(10_0, 10_11, "As of 10.11 it is not generally necessary to take explicit action to ach...
                   ^
nsterm.m:3279:7: warning: 'NSEnableScreenUpdates' is deprecated: first deprecated in macOS 10.11 - As of 10.11 it is not generally necessary to take explicit
      action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for
      visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSEnableScreenUpdates.
      [-Wdeprecated-declarations]
      NSEnableScreenUpdates ();
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:236:20: note: 
      'NSEnableScreenUpdates' has been explicitly marked deprecated here
APPKIT_EXTERN void NSEnableScreenUpdates(void) NS_DEPRECATED_MAC(10_0, 10_11, "As of 10.11 it is not generally necessary to take explicit action to achi...
                   ^
nsterm.m:5452:47: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
                                              ^~~~~~~~~~~~~~~~~~
                                              NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:5453:49: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
                                                ^~~~~~~~~~~~~~~~~~
                                                NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:5456:29: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
                            NSStringPboardType,
                            ^~~~~~~~~~~~~~~~~~
                            NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:5457:29: warning: 'NSTabularTextPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
                            NSTabularTextPboardType,
                            ^~~~~~~~~~~~~~~~~~~~~~~
                            NSPasteboardTypeTabularText
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:326:32: note: 
      'NSTabularTextPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSTabularTextPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeTabularText", 10_0, 10_14);
                               ^
nsterm.m:5458:29: warning: 'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple pasteboard items with
      NSPasteboardTypeFileURL or kUTTypeFileURL instead [-Wdeprecated-declarations]
                            NSFilenamesPboardType,
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32: note: 
      'NSFilenamesPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with NSPasteboardTypeFileURL or kU...
                               ^
nsterm.m:5459:29: warning: 'NSURLPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
                            NSURLPboardType, nil] retain];
                            ^~~~~~~~~~~~~~~
                            NSPasteboardTypeURL
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:332:32: note: 
      'NSURLPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSURLPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeURL", 10_0, 10_14);
                               ^
nsterm.m:8245:35: warning: 'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple pasteboard items with
      NSPasteboardTypeFileURL or kUTTypeFileURL instead [-Wdeprecated-declarations]
  else if ([type isEqualToString: NSFilenamesPboardType])
                                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32: note: 
      'NSFilenamesPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with NSPasteboardTypeFileURL or kU...
                               ^
nsterm.m:8266:35: warning: 'NSURLPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  else if ([type isEqualToString: NSURLPboardType])
                                  ^~~~~~~~~~~~~~~
                                  NSPasteboardTypeURL
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:332:32: note: 
      'NSURLPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSURLPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeURL", 10_0, 10_14);
                               ^
nsterm.m:8288:35: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  else if ([type isEqualToString: NSStringPboardType]
                                  ^~~~~~~~~~~~~~~~~~
                                  NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:8289:38: warning: 'NSTabularTextPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
           || [type isEqualToString: NSTabularTextPboardType])
                                     ^~~~~~~~~~~~~~~~~~~~~~~
                                     NSPasteboardTypeTabularText
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:326:32: note: 
      'NSTabularTextPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSTabularTextPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeTabularText", 10_0, 10_14);
                               ^
nsterm.m:8351:29: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  if ([types containsObject:NSStringPboardType] == NO) {
                            ^~~~~~~~~~~~~~~~~~
                            NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:8365:44: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  typesDeclared = [NSArray arrayWithObject:NSStringPboardType];
                                           ^~~~~~~~~~~~~~~~~~
                                           NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsterm.m:9027:10: warning: 'NSScrollerDecrementLine' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
    case NSScrollerDecrementLine:
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSScroller.h:24:5: note: 
      'NSScrollerDecrementLine' has been explicitly marked deprecated here
    NSScrollerDecrementLine NS_ENUM_DEPRECATED_MAC(10_0, 10_14) = 4,
    ^
nsterm.m:9029:10: warning: 'NSScrollerIncrementLine' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
    case NSScrollerIncrementLine:
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSScroller.h:25:5: note: 
      'NSScrollerIncrementLine' has been explicitly marked deprecated here
    NSScrollerIncrementLine NS_ENUM_DEPRECATED_MAC(10_0, 10_14) = 5,
    ^
20 warnings generated.
  CC       nsfns.o
  CC       nsmenu.o
nsmenu.m:670:25: warning: 'NSOnState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
        [item setState: NSOnState];
                        ^~~~~~~~~
                        NSControlStateValueOn
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:80:34: note: 
      'NSOnState' has been explicitly marked deprecated here
static const NSControlStateValue NSOnState NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSControlStateValueOn", 10_0, 10_14) = NSControlStateValueOn;
                                 ^
nsmenu.m:672:25: warning: 'NSOffState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
        [item setState: NSOffState];
                        ^~~~~~~~~~
                        NSControlStateValueOff
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:79:34: note: 
      'NSOffState' has been explicitly marked deprecated here
static const NSControlStateValue NSOffState NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSControlStateValueOff", 10_0, 10_14) = NSControlStateValueOff;
                                 ^
nsmenu.m:1596:24: warning: 'NSRoundedBezelStyle' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  [cell setBezelStyle: NSRoundedBezelStyle];
                       ^~~~~~~~~~~~~~~~~~~
                       NSBezelStyleRounded
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSButtonCell.h:182:27: note: 
      'NSRoundedBezelStyle' has been explicitly marked deprecated here
static const NSBezelStyle NSRoundedBezelStyle NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSBezelStyleRounded", 10_0, 10_14) = NSBezelStyleRounded;
                          ^
nsmenu.m:1609:9: warning: 'setOneShot:' is deprecated: first deprecated in macOS 10.14 - This property does not do anything and should not be used
      [-Wdeprecated-declarations]
  [self setOneShot: YES];
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:933:35: note: 
      property 'oneShot' is declared deprecated here
@property (getter=isOneShot) BOOL oneShot NS_DEPRECATED_MAC(10_0, 10_14, "This property does not do anything and should not be used");
                                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:933:35: note: 
      'setOneShot:' has been explicitly marked deprecated here
4 warnings generated.
  CC       nsselect.o
nsselect.m:60:38: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  if (EQ (sym, QTEXT))        return NSStringPboardType;
                                     ^~~~~~~~~~~~~~~~~~
                                     NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsselect.m:79:27: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  if ([t isEqualToString: NSStringPboardType])
                          ^~~~~~~~~~~~~~~~~~
                          NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsselect.m:81:27: warning: 'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple pasteboard items with
      NSPasteboardTypeFileURL or kUTTypeFileURL instead [-Wdeprecated-declarations]
  if ([t isEqualToString: NSFilenamesPboardType])
                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32: note: 
      'NSFilenamesPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with NSPasteboardTypeFileURL or kU...
                               ^
nsselect.m:83:27: warning: 'NSTabularTextPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  if ([t isEqualToString: NSTabularTextPboardType])
                          ^~~~~~~~~~~~~~~~~~~~~~~
                          NSPasteboardTypeTabularText
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:326:32: note: 
      'NSTabularTextPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSTabularTextPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeTabularText", 10_0, 10_14);
                               ^
nsselect.m:196:22: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
          eassert (gtype == NSStringPboardType);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsselect.m:348:10: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
  type = NSStringPboardType;
         ^~~~~~~~~~~~~~~~~~
         NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsselect.m:475:36: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
             [NSNumber numberWithLong:0], NSStringPboardType,
                                          ^~~~~~~~~~~~~~~~~~
                                          NSPasteboardTypeString
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32: note: 
      'NSStringPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSStringPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, 10_14);
                               ^
nsselect.m:476:36: warning: 'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple pasteboard items with
      NSPasteboardTypeFileURL or kUTTypeFileURL instead [-Wdeprecated-declarations]
             [NSNumber numberWithLong:0], NSFilenamesPboardType,
                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32: note: 
      'NSFilenamesPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with NSPasteboardTypeFileURL or kU...
                               ^
nsselect.m:477:36: warning: 'NSTabularTextPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
             [NSNumber numberWithLong:0], NSTabularTextPboardType,
                                          ^~~~~~~~~~~~~~~~~~~~~~~
                                          NSPasteboardTypeTabularText
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:326:32: note: 
      'NSTabularTextPboardType' has been explicitly marked deprecated here
APPKIT_EXTERN NSPasteboardType NSTabularTextPboardType NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeTabularText", 10_0, 10_14);
                               ^
9 warnings generated.
  CC       nsimage.o
nsimage.m:312:14: warning: 'colorSpaceName' is deprecated: first deprecated in macOS 10.14 - Use -type and NSColorType instead [-Wdeprecated-declarations]
  if ([color colorSpaceName] != NSCalibratedRGBColorSpace)
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:393:45: note: 
      property 'colorSpaceName' is declared deprecated here
@property (readonly, copy) NSColorSpaceName colorSpaceName NS_DEPRECATED_MAC(10_0, 10_14, "Use -type and NSColorType instead");
                                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:393:45: note: 
      'colorSpaceName' has been explicitly marked deprecated here
nsimage.m:313:23: warning: 'colorUsingColorSpaceName:' is deprecated: first deprecated in macOS 10.14 - Use -colorUsingType: or -colorUsingColorSpace: instead
      [-Wdeprecated-declarations]
    rgbColor = [color colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:405:1: note: 
      'colorUsingColorSpaceName:' has been explicitly marked deprecated here
- (nullable NSColor *)colorUsingColorSpaceName:(NSColorSpaceName)name NS_DEPRECATED_MAC(10_0, 10_14, "Use -colorUsingType: or -colorUsingColorSpace: instead");
^
2 warnings generated.



In GNU Emacs 27.0.50 (build 17, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102))
 of 2018-09-21
Repository revision: ee3be3fdfa96d7d1a0740c8145a26d758c12a711
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules --without-pop --with-mailutils
 --enable-gcc-warnings=yes --enable-checking
 --enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''

Configured features:
IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON LCMS2 GMP

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils phst pcase ffap thingatpt
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars subr-x rx gnutls puny seq byte-opt gv
bytecomp byte-compile cconv dbus xml cl-loaddefs cl-lib elec-pair
time-date tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 217139 7540)
 (symbols 48 21677 1)
 (strings 32 33362 1885)
 (string-bytes 1 903661)
 (vectors 16 37433)
 (vector-slots 8 753186 13106)
 (floats 8 50 66)
 (intervals 56 218 0)
 (buffers 992 11))





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2018-10-13 15:32 bug#33035: 27.0.50; Deprecated macOS functions Philipp
@ 2020-08-16 17:45 ` Lars Ingebrigtsen
  2021-01-10 13:25 ` Mattias Engdegård
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-16 17:45 UTC (permalink / raw)
  To: Philipp; +Cc: 33035

Philipp <p.stephani2@gmail.com> writes:

> A few functions and variables have been deprecated in macOS Mojave,
> these should be replaced or removed:

To replicate, I'm compiling Emacs 28 on Catalina (because I would assume
even more things have been deprecated there).

>   CC       nsterm.o
> nsterm.m:175:16: warning: 'colorUsingColorSpaceName:' is deprecated: first deprecated in macOS 10.14 - Use -colorUsingType: or -colorUsingColorSpace: instead
>       [-Wdeprecated-declarations]
>   return [self colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
>                ^

This one is gone...

>   NSDisableScreenUpdates ();
>   ^

And this one.

>       [FRAME_NS_VIEW (f) scrollRect: src
>                          ^

Ditto.

> nsterm.m:5452:47: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
>   ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
>                                               ^~~~~~~~~~~~~~~~~~
>                                               NSPasteboardTypeString

Still present.

> nsterm.m:9027:10: warning: 'NSScrollerDecrementLine' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
>     case NSScrollerDecrementLine:
>          ^

Gone.

> nsterm.m:9029:10: warning: 'NSScrollerIncrementLine' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
>     case NSScrollerIncrementLine:

Ditto.

> nsmenu.m:670:25: warning: 'NSOnState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
>         [item setState: NSOnState];
>                         ^~~~~~~~~
>                         NSControlStateValueOn

And this.

So it's basically just the Pboard...  And this new one:

sxwidget.m:75:31: warning: 'plugInsEnabled' is deprecated: first deprecated in
      macOS 10.15 - Plug-ins are no longer supported
      [-Wdeprecated-declarations]
    configuration.preferences.plugInsEnabled = YES;
                              ^


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2018-10-13 15:32 bug#33035: 27.0.50; Deprecated macOS functions Philipp
  2020-08-16 17:45 ` Lars Ingebrigtsen
@ 2021-01-10 13:25 ` Mattias Engdegård
  2021-01-10 15:43   ` Alan Third
  1 sibling, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2021-01-10 13:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 33035, Philipp Stephani, Alan Third

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]

Not sure if this is the right way to go about it, but it does silence the remaining warnings about NSFilenamesPboardType.
Tested on Mojave.


[-- Attachment #2: ns-pboard-warning.diff --]
[-- Type: application/octet-stream, Size: 1708 bytes --]

diff --git a/src/nsterm.m b/src/nsterm.m
index 2defb9e2ee..2ca3f6f3ff 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5602,7 +5602,7 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
   ns_drag_types = [[NSArray arrayWithObjects:
                             NSPasteboardTypeString,
                             NSPasteboardTypeTabularText,
-                            NSFilenamesPboardType,
+                            NSPasteboardTypeFileURL,
                             NSPasteboardTypeURL, nil] retain];
 
   /* If fullscreen is in init/default-frame-alist, focus isn't set
@@ -8533,23 +8533,17 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
     {
       return NO;
     }
-  /* FIXME: NSFilenamesPboardType is deprecated in 10.14, but the
-     NSURL method can only handle one file at a time.  Stick with the
-     existing code at the moment.  */
-  else if ([type isEqualToString: NSFilenamesPboardType])
+  else if ([type isEqualToString: NSPasteboardTypeFileURL])
     {
-      NSArray *files;
-      NSEnumerator *fenum;
-      NSString *file;
-
-      if (!(files = [pb propertyListForType: type]))
-        return NO;
-
       type_sym = Qfile;
 
-      fenum = [files objectEnumerator];
-      while ( (file = [fenum nextObject]) )
-        strings = Fcons ([file lispString], strings);
+      NSArray *a = [pb readObjectsForClasses: @[[NSURL self]]
+                                     options: nil];
+      NSEnumerator *ae = [a objectEnumerator];
+      NSURL *u;
+      while ((u = [ae nextObject])) {
+        strings = Fcons ([[u path] lispString], strings);
+      }
     }
   else if ([type isEqualToString: NSPasteboardTypeURL])
     {

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-10 13:25 ` Mattias Engdegård
@ 2021-01-10 15:43   ` Alan Third
  2021-01-10 16:22     ` Alan Third
  2021-01-10 16:22     ` Mattias Engdegård
  0 siblings, 2 replies; 9+ messages in thread
From: Alan Third @ 2021-01-10 15:43 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 33035, Lars Ingebrigtsen, Philipp Stephani

On Sun, Jan 10, 2021 at 02:25:28PM +0100, Mattias Engdegård wrote:
> Not sure if this is the right way to go about it, but it does
> silence the remaining warnings about NSFilenamesPboardType.
> Tested on Mojave.

It certainy seems to do the job. There are still a couple of warnings
in nsselect.m, and I don't think this works in GNUstep, so we'll need
to retain the old method with #ifdef's or whatever.

-- 
Alan Third





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-10 15:43   ` Alan Third
@ 2021-01-10 16:22     ` Alan Third
  2021-01-10 16:53       ` Mattias Engdegård
  2021-01-10 16:22     ` Mattias Engdegård
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Third @ 2021-01-10 16:22 UTC (permalink / raw)
  To: Mattias Engdegård, Lars Ingebrigtsen, Philipp Stephani,
	33035

On Sun, Jan 10, 2021 at 03:43:09PM +0000, Alan Third wrote:
> On Sun, Jan 10, 2021 at 02:25:28PM +0100, Mattias Engdegård wrote:
> > Not sure if this is the right way to go about it, but it does
> > silence the remaining warnings about NSFilenamesPboardType.
> > Tested on Mojave.
> 
> It certainy seems to do the job. There are still a couple of warnings
> in nsselect.m, and I don't think this works in GNUstep, so we'll need
> to retain the old method with #ifdef's or whatever.

And after a quick look, I don't think macOS < 10.13 will work either.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-10 15:43   ` Alan Third
  2021-01-10 16:22     ` Alan Third
@ 2021-01-10 16:22     ` Mattias Engdegård
  1 sibling, 0 replies; 9+ messages in thread
From: Mattias Engdegård @ 2021-01-10 16:22 UTC (permalink / raw)
  To: Alan Third; +Cc: 33035, Lars Ingebrigtsen, Philipp Stephani

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

10 jan. 2021 kl. 16.43 skrev Alan Third <alan@idiocy.org>:

> It certainy seems to do the job. There are still a couple of warnings
> in nsselect.m, and I don't think this works in GNUstep, so we'll need
> to retain the old method with #ifdef's or whatever.

Sorry, that was an oversight. Here is a proper patch.


[-- Attachment #2: 0001-Avoid-macOS-NSFilenamesPboardType-warning-bug-33035.patch --]
[-- Type: application/octet-stream, Size: 3834 bytes --]

From 2937497ca502db541fc78b4322c0ffb53c890912 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Sun, 10 Jan 2021 17:05:18 +0100
Subject: [PATCH] Avoid macOS NSFilenamesPboardType warning (bug#33035)

* src/nsterm.m (ns_term_init):
([EmacsView performDragOperation:]):
* src/nsselect.m (ns_string_to_symbol):
(nxatoms_of_nsselect):
NSFilenamesPboardType was deprecated in macOS 10.14; use
NSPasteboardTypeFileURL instead.
---
 src/nsselect.m | 15 +++++++++++++--
 src/nsterm.m   | 23 ++++++++++++++++++++---
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/src/nsselect.m b/src/nsselect.m
index 27db9248e4..e0f76f92e5 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -78,7 +78,13 @@ Updated by Christian Limpach (chris@nice.ch)
     return QSECONDARY;
   if ([t isEqualToString: NSPasteboardTypeString])
     return QTEXT;
-  if ([t isEqualToString: NSFilenamesPboardType])
+  if ([t isEqualToString:
+#ifdef NS_IMPL_COCOA
+           NSPasteboardTypeFileURL
+#else
+           NSFilenamesPboardType
+#endif
+       ])
     return QFILE_NAME;
   if ([t isEqualToString: NSPasteboardTypeTabularText])
     return QTEXT;
@@ -467,7 +473,12 @@ Updated by Christian Limpach (chris@nice.ch)
 	     [NSNumber numberWithLong:0], NXPrimaryPboard,
 	     [NSNumber numberWithLong:0], NXSecondaryPboard,
 	     [NSNumber numberWithLong:0], NSPasteboardTypeString,
-	     [NSNumber numberWithLong:0], NSFilenamesPboardType,
+	     [NSNumber numberWithLong:0],
+#ifdef NS_IMPL_COCOA
+                                          NSPasteboardTypeFileURL,
+#else
+                                          NSFilenamesPboardType,
+#endif
 	     [NSNumber numberWithLong:0], NSPasteboardTypeTabularText,
 	 nil] retain];
 }
diff --git a/src/nsterm.m b/src/nsterm.m
index 2defb9e2ee..6a03f0b1bc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5602,7 +5602,11 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
   ns_drag_types = [[NSArray arrayWithObjects:
                             NSPasteboardTypeString,
                             NSPasteboardTypeTabularText,
+#ifdef NS_IMPL_COCOA
+                            NSPasteboardTypeFileURL,
+#else
                             NSFilenamesPboardType,
+#endif
                             NSPasteboardTypeURL, nil] retain];
 
   /* If fullscreen is in init/default-frame-alist, focus isn't set
@@ -8533,9 +8537,21 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
     {
       return NO;
     }
-  /* FIXME: NSFilenamesPboardType is deprecated in 10.14, but the
-     NSURL method can only handle one file at a time.  Stick with the
-     existing code at the moment.  */
+  /* NSFilenamesPboardType is deprecated in macOS 10.14, but GNUstep may
+     not have NSPasteboardTypeFileURL. */
+#ifdef NS_IMPL_COCOA
+  else if ([type isEqualToString: NSPasteboardTypeFileURL])
+    {
+      type_sym = Qfile;
+
+      NSArray *urls = [pb readObjectsForClasses: @[[NSURL self]]
+                                        options: nil];
+      NSEnumerator *uenum = [urls objectEnumerator];
+      NSURL *url;
+      while ((url = [uenum nextObject]))
+        strings = Fcons ([[url path] lispString], strings);
+    }
+#else  // !defined NS_IMPL_COCOA
   else if ([type isEqualToString: NSFilenamesPboardType])
     {
       NSArray *files;
@@ -8551,6 +8567,7 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
       while ( (file = [fenum nextObject]) )
         strings = Fcons ([file lispString], strings);
     }
+#endif  // !defined NS_IMPL_COCOA
   else if ([type isEqualToString: NSPasteboardTypeURL])
     {
       NSURL *url = [NSURL URLFromPasteboard: pb];
-- 
2.21.1 (Apple Git-122.3)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-10 16:22     ` Alan Third
@ 2021-01-10 16:53       ` Mattias Engdegård
  2021-01-18 12:03         ` Mattias Engdegård
  0 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2021-01-10 16:53 UTC (permalink / raw)
  To: Alan Third; +Cc: 33035, Lars Ingebrigtsen, Philipp Stephani

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

10 jan. 2021 kl. 17.22 skrev Alan Third <alan@idiocy.org>:

> And after a quick look, I don't think macOS < 10.13 will work either.

So it seems! Updated patch below. (Still only tested on 10.14.)


[-- Attachment #2: 0001-Avoid-macOS-NSFilenamesPboardType-warning-bug-33035.patch --]
[-- Type: application/octet-stream, Size: 4540 bytes --]

From d87155035a81224af618625a8ae2fbcc58b0aa6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Sun, 10 Jan 2021 17:05:18 +0100
Subject: [PATCH] Avoid macOS NSFilenamesPboardType warning (bug#33035)

* src/nsterm.h (NS_USE_NSPasteboardTypeFileURL): New #define.
* src/nsterm.m (ns_term_init):
([EmacsView performDragOperation:]):
* src/nsselect.m (ns_string_to_symbol):
(nxatoms_of_nsselect):
NSFilenamesPboardType was deprecated in macOS 10.14; use
NSPasteboardTypeFileURL instead when available.
---
 src/nsselect.m | 15 +++++++++++++--
 src/nsterm.h   |  9 +++++++++
 src/nsterm.m   | 21 ++++++++++++++++++---
 3 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/src/nsselect.m b/src/nsselect.m
index 27db9248e4..5ab3ef77fe 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -78,7 +78,13 @@ Updated by Christian Limpach (chris@nice.ch)
     return QSECONDARY;
   if ([t isEqualToString: NSPasteboardTypeString])
     return QTEXT;
-  if ([t isEqualToString: NSFilenamesPboardType])
+  if ([t isEqualToString:
+#if NS_USE_NSPasteboardTypeFileURL != 0
+           NSPasteboardTypeFileURL
+#else
+           NSFilenamesPboardType
+#endif
+       ])
     return QFILE_NAME;
   if ([t isEqualToString: NSPasteboardTypeTabularText])
     return QTEXT;
@@ -467,7 +473,12 @@ Updated by Christian Limpach (chris@nice.ch)
 	     [NSNumber numberWithLong:0], NXPrimaryPboard,
 	     [NSNumber numberWithLong:0], NXSecondaryPboard,
 	     [NSNumber numberWithLong:0], NSPasteboardTypeString,
-	     [NSNumber numberWithLong:0], NSFilenamesPboardType,
+	     [NSNumber numberWithLong:0],
+#if NS_USE_NSPasteboardTypeFileURL != 0
+                                          NSPasteboardTypeFileURL,
+#else
+                                          NSFilenamesPboardType,
+#endif
 	     [NSNumber numberWithLong:0], NSPasteboardTypeTabularText,
 	 nil] retain];
 }
diff --git a/src/nsterm.h b/src/nsterm.h
index 2c9d8e85ba..eae1d0725e 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -39,6 +39,15 @@
 typedef float EmacsCGFloat;
 #endif
 
+/* NSFilenamesPboardType is deprecated in macOS 10.14, but
+   NSPasteboardTypeFileURL is only available in 10.13 (and GNUstep
+   probably lacks it too). */
+#if defined NS_IMPL_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+#define NS_USE_NSPasteboardTypeFileURL 1
+#else
+#define NS_USE_NSPasteboardTypeFileURL 0
+#endif
+
 /* ==========================================================================
 
    Trace support
diff --git a/src/nsterm.m b/src/nsterm.m
index 2defb9e2ee..c5815ce8d1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5602,7 +5602,11 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
   ns_drag_types = [[NSArray arrayWithObjects:
                             NSPasteboardTypeString,
                             NSPasteboardTypeTabularText,
+#if NS_USE_NSPasteboardTypeFileURL != 0
+                            NSPasteboardTypeFileURL,
+#else
                             NSFilenamesPboardType,
+#endif
                             NSPasteboardTypeURL, nil] retain];
 
   /* If fullscreen is in init/default-frame-alist, focus isn't set
@@ -8533,9 +8537,19 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
     {
       return NO;
     }
-  /* FIXME: NSFilenamesPboardType is deprecated in 10.14, but the
-     NSURL method can only handle one file at a time.  Stick with the
-     existing code at the moment.  */
+#if NS_USE_NSPasteboardTypeFileURL != 0
+  else if ([type isEqualToString: NSPasteboardTypeFileURL])
+    {
+      type_sym = Qfile;
+
+      NSArray *urls = [pb readObjectsForClasses: @[[NSURL self]]
+                                        options: nil];
+      NSEnumerator *uenum = [urls objectEnumerator];
+      NSURL *url;
+      while ((url = [uenum nextObject]))
+        strings = Fcons ([[url path] lispString], strings);
+    }
+#else  // !NS_USE_NSPasteboardTypeFileURL
   else if ([type isEqualToString: NSFilenamesPboardType])
     {
       NSArray *files;
@@ -8551,6 +8565,7 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
       while ( (file = [fenum nextObject]) )
         strings = Fcons ([file lispString], strings);
     }
+#endif   // !NS_USE_NSPasteboardTypeFileURL
   else if ([type isEqualToString: NSPasteboardTypeURL])
     {
       NSURL *url = [NSURL URLFromPasteboard: pb];
-- 
2.21.1 (Apple Git-122.3)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-10 16:53       ` Mattias Engdegård
@ 2021-01-18 12:03         ` Mattias Engdegård
  2021-01-18 20:58           ` Alan Third
  0 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2021-01-18 12:03 UTC (permalink / raw)
  To: Alan Third; +Cc: Lars Ingebrigtsen, 33035-done, Philipp Stephani

It's been a week without comment (Alan, I hope you are all right!) and if there is anything wrong with the patch we probably get faster response by pushing it to master so that is now done.

With that, the last warning when compiling on macOS 10.14 should be gone; closing the bug.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#33035: 27.0.50; Deprecated macOS functions
  2021-01-18 12:03         ` Mattias Engdegård
@ 2021-01-18 20:58           ` Alan Third
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Third @ 2021-01-18 20:58 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Lars Ingebrigtsen, 33035-done, Philipp Stephani

On Mon, Jan 18, 2021 at 01:03:35PM +0100, Mattias Engdegård wrote:
> It's been a week without comment (Alan, I hope you are all right!)
> and if there is anything wrong with the patch we probably get faster
> response by pushing it to master so that is now done.

Yes, sorry. I've not been looking at Emacs stuff much over the last
week or so.

> With that, the last warning when compiling on macOS 10.14 should be
> gone; closing the bug.

Thanks!
-- 
Alan Third





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-18 20:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 15:32 bug#33035: 27.0.50; Deprecated macOS functions Philipp
2020-08-16 17:45 ` Lars Ingebrigtsen
2021-01-10 13:25 ` Mattias Engdegård
2021-01-10 15:43   ` Alan Third
2021-01-10 16:22     ` Alan Third
2021-01-10 16:53       ` Mattias Engdegård
2021-01-18 12:03         ` Mattias Engdegård
2021-01-18 20:58           ` Alan Third
2021-01-10 16:22     ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).