unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Pankaj Jangid <pankaj.jangid@gmail.com>, 38083@debbugs.gnu.org
Subject: bug#38083: 27.0.50; Deprecation warnings in NS build
Date: Fri, 20 May 2022 19:52:58 +0800	[thread overview]
Message-ID: <87ilq0whd1.fsf@yahoo.com> (raw)
In-Reply-To: <874k1k4g9d.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 20 May 2022 13:04:14 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> There are several deprecation warnings in NS build. Good thing is that,
>> these are confined to just two files - nsterm.o and nsselect.o. I've
>> copied following warnings from the build output,
>>
>> CC       nsterm.o
>> nsterm.m:2771: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 by: delta];
>
> [etc]
>
> I haven't checked whether these are still present in Emacs 29, but
> perhaps Po Lu has some input here; added to the CCs.

I don't know about the nsselect ones, but we have this in nsterm.m now:

#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
  double scale = [[self window] backingScaleFactor];
  CGContextRef context = [(EmacsLayer *)[self layer] getContext];
  int bpp = CGBitmapContextGetBitsPerPixel (context) / 8;
  void *pixels = CGBitmapContextGetData (context);
  int rowSize = CGBitmapContextGetBytesPerRow (context);
  int srcRowSize = NSWidth (srcRect) * scale * bpp;
  void *srcPixels = (char *) pixels
    + (int) (NSMinY (srcRect) * scale * rowSize
             + NSMinX (srcRect) * scale * bpp);
  void *dstPixels = (char *) pixels
    + (int) (dest.y * scale * rowSize
             + dest.x * scale * bpp);

  if (NSIntersectsRect (srcRect, dstRect)
      && NSMinY (srcRect) < NSMinY (dstRect))
    for (int y = NSHeight (srcRect) * scale - 1 ; y >= 0 ; y--)
      memmove ((char *) dstPixels + y * rowSize,
               (char *) srcPixels + y * rowSize,
               srcRowSize);
  else
    for (int y = 0 ; y < NSHeight (srcRect) * scale ; y++)
      memmove ((char *) dstPixels + y * rowSize,
               (char *) srcPixels + y * rowSize,
               srcRowSize);

#else

So we are off the hook now, since scrollRect is no longer used on Mac OS
X 10.14 and later.





  reply	other threads:[~2022-05-20 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  5:26 bug#38083: 27.0.50; Deprecation warnings in NS build Pankaj Jangid
2022-05-20 11:04 ` Lars Ingebrigtsen
2022-05-20 11:52   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-20 12:39     ` Pankaj Jangid
2022-05-21 11:46       ` Lars Ingebrigtsen
2022-05-21 11:50         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-21 13:26           ` Lars Ingebrigtsen
2022-05-22  3:07         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-22 11:20           ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ilq0whd1.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=38083@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=pankaj.jangid@gmail.com \
    /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 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).