all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Bob Halley <halley@play-bow.org>
Cc: emacs-devel@gnu.org
Subject: Re: FYI: Deprecations and Warnings for nsterm.m on Sierra
Date: Mon, 8 Aug 2016 21:04:03 +0100	[thread overview]
Message-ID: <20160808200403.GB2486@breton.holly.idiocy.org> (raw)
In-Reply-To: <315BE3C4-D984-470E-A4B4-20C8148FBA5A@play-bow.org>

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	other threads:[~2016-08-08 20:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <315BE3C4-D984-470E-A4B4-20C8148FBA5A@play-bow.org>
2016-08-08 20:04 ` Alan Third [this message]
2016-08-18 19:04 ` [PATCH] Fix macOS 12 deprecation notices Alan Third
2016-08-20 23:15   ` Bob Halley
2016-08-21  6:59   ` Kalle Olavi Niemitalo
2016-08-24 18:21     ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160808200403.GB2486@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=halley@play-bow.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.