emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: Deprecations and Warnings for nsterm.m on Sierra


From: Alan Third
Subject: Re: FYI: Deprecations and Warnings for nsterm.m on Sierra
Date: Mon, 8 Aug 2016 21:04:03 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

Hi Bob, it’s generally a good idea to send this stuff to emacs-devel
rather than direct to myself. That way more people will get to see it.

On Sat, Aug 06, 2016 at 08:47:35AM -0700, Bob Halley wrote:
> I don't want to have to file papers, so I'm not submitting a patch,
> but a bunch of constants have been renamed and the old forms now
> cause deprecation warnings. E.g. "NSLeftMouseUp" becomes
> "NSEventTypeLeftMouseUp". It makes for an ugly compile as there are
> like 147 quite verbose warnings, but everything still works.
> 
> A possible approach to fixing this is to use the new names, and
> #define the new names to the old values on systems older than 10.12
> (or on NextStep).

That would be my preferred solution, I think.

> The affected symbols are:
> 
> NSEventModifierFlagCommand was NSCommandKeyMask
> NSEventModifierFlagControl was NSControlKeyMask
> NSEventModifierFlagHelp was NSHelpKeyMask
> NSEventModifierFlagNumericPad was NSNumericPadKeyMask
> NSEventModifierFlagOption was NSAlternateKeyMask
> NSEventModifierFlagShift was NSShiftKeyMask
> NSCompositingOperationSourceOver was NSCompositeSourceOver
> NSEventMaskApplicationDefined was NSApplicationDefinedMask
> NSEventTypeApplicationDefined was NSApplicationDefined
> NSEventTypeCursorUpdate was NSCursorUpdate
> NSEventTypeMouseMoved was NSMouseMoved
> NSEventTypeLeftMouseDown was NSLeftMouseDown
> NSEventTypeRightMouseDown was NSRightMouseDown
> NSEventTypeOtherMouseDown was NSOtherMouseDown
> NSEventTypeLeftMouseUp was NSLeftMouseUp
> NSEventTypeRightMouseUp was NSRightMouseUp
> NSEventTypeOtherMouseUp was NSOtherMouseUp
> NSEventTypeLeftMouseDragged was NSLeftMouseDragged
> NSEventTypeRightMouseDragged was NSRightMouseDragged
> NSEventTypeOtherMouseDragged was NSOtherMouseDragged
> NSEventTypeScrollWheel was NSScrollWheel
> NSEventTypeKeyDown was NSKeyDown
> NSEventTypeKeyUp was NSKeyUp
> NSEventTypeFlagsChanged was NSFlagsChanged
> NSEventMaskAny was NSAnyEventMask
> NSWindowStyleMaskBorderless was NSBorderlessWindowMask
> NSWindowStyleMaskClosable was NSClosableWindowMask
> NSWindowStyleMaskFullScreen was NSFullScreenWindowMask
> NSWindowStyleMaskMiniaturizable was NSMiniaturizableWindowMask
> NSWindowStyleMaskResizable was NSResizableWindowMask
> NSWindowStyleMaskTitled was NSTitledWindowMask
> NSAlertStyleCritical was NSCriticalAlertStyle
> NSControlSizeRegular was NSRegularControlSize
> 
> In the code making a "fake event" at nsterm.m:8470, it says that [e
> context] is always nil. Probably just replacing this with nil is
> safe, but I don't know enough to be sure. Otherwise I suppose you
> could just call [e context] on older stuff, and say nil on 10.12 and
> later.
> 
> In the invocation of [NSApp registerServicesMenuSendTypes:
> ns_send_types returnTypes: nil] at nsterm.m:6941, it complains that
> returnTypes is being set to nil but is supposed to be never-nil. My
> guess here is to pass ns_return_types, which the code creates but
> does not seem to use, but again I don't know enough to be sure!

I think I’ve looked at both of these and came to the same conclusion,
but also didn’t feel entirely confident so just left them. I’ll maybe
make the change and try running it myself for a while to see how it
goes.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]