1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-22 18:35:09 +00:00

Check for OSX >= 10.4 to match what the maunal says and what we actually support.

* configure.ac: Check that OSX is 10.4 or newer.

* etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.

* src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
(ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.

* src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.

* src/nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2.

* src/nsselect.m (ns_string_from_pasteboard): Remove check for >=
MAC_OS_X_VERSION_10_4.

* src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
(EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
(struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
This commit is contained in:
Jan Djärv 2012-10-07 12:07:23 +02:00
parent 3bc0a2f7e9
commit 335f5ae444
11 changed files with 70 additions and 44 deletions

View File

@ -1,3 +1,7 @@
2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
* configure.ac: Check that OSX is 10.4 or newer.
2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
Improve sys_siglist detection.

View File

@ -1510,10 +1510,26 @@ fail;
AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
[AC_MSG_ERROR([`--with-ns' was specified, but the include
files are missing or cannot be compiled.])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
[
#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
; /* OK */
#else
#error "OSX 10.4 or newer required"
#endif
#endif
])],
ns_osx_have_104=yes,
ns_osx_have_104=no)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
[NSInteger i;])],
ns_have_nsinteger=yes,
ns_have_nsinteger=no)
if test $ns_osx_have_104 = no; then
AC_MSG_ERROR([`OSX 10.4 or newer is required']);
fi
if test $ns_have_nsinteger = yes; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
fi

View File

@ -1,3 +1,7 @@
2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
* NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.
2012-10-05 Douglas Lewan <d_lewan2000@yahoo.com> (tiny change)
* tutorials/TUTORIAL.pt_BR: Fix typo. (Bug#12557)

View File

@ -191,6 +191,8 @@ The PCL-CVS commands are still available via the keyboard.
** NextStep/OSX port changes.
---
*** OSX 10.4 or newer is required to build Emacs.
---
*** Fullscreen and frame parameter fullscreen is supported.
---
*** A file dialog is used when open/saved is done from the menu/toolbar.

View File

@ -1,5 +1,23 @@
2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
MAC_OS_X_VERSION_10_6.
(syms_of_nsterm): Remove comment about Panther and above for ns-antialias-text.
* nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
(EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
(struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
* nsselect.m (ns_string_from_pasteboard): Remove check for >=
MAC_OS_X_VERSION_10_4.
* nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2.
* nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
* nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
(ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
* nsterm.m (ns_in_resize): Remove (Bug#12479).
(ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
(ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize

View File

@ -1949,32 +1949,29 @@ and GNUstep implementations ("distributor-specific release
check_ns ();
svcs = [[NSMenu alloc] initWithTitle: @"Services"];
[NSApp setServicesMenu: svcs]; /* this and next rebuild on <10.4 */
[NSApp setServicesMenu: svcs];
[NSApp registerServicesMenuSendTypes: ns_send_types
returnTypes: ns_return_types];
/* On Tiger, services menu updating was made lazier (waits for user to
actually click on the menu), so we have to force things along: */
#ifdef NS_IMPL_COCOA
if (NSAppKitVersionNumber >= 744.0)
delegate = [svcs delegate];
if (delegate != nil)
{
delegate = [svcs delegate];
if (delegate != nil)
if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)])
[delegate menuNeedsUpdate: svcs];
if ([delegate respondsToSelector:
@selector (menu:updateItem:atIndex:shouldCancel:)])
{
if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)])
[delegate menuNeedsUpdate: svcs];
if ([delegate respondsToSelector:
@selector (menu:updateItem:atIndex:shouldCancel:)])
{
int i, len = [delegate numberOfItemsInMenu: svcs];
for (i =0; i<len; i++)
[svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""];
for (i =0; i<len; i++)
if (![delegate menu: svcs
updateItem: (NSMenuItem *)[svcs itemAtIndex: i]
atIndex: i shouldCancel: NO])
break;
}
int i, len = [delegate numberOfItemsInMenu: svcs];
for (i =0; i<len; i++)
[svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""];
for (i =0; i<len; i++)
if (![delegate menu: svcs
updateItem: (NSMenuItem *)[svcs itemAtIndex: i]
atIndex: i shouldCancel: NO])
break;
}
}
#endif
@ -2075,7 +2072,7 @@ and GNUstep implementations ("distributor-specific release
*result = Qt;
// script returned an AppleScript result
if ((typeUnicodeText == [returnDescriptor descriptorType]) ||
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
#if defined (NS_IMPL_COCOA)
(typeUTF16ExternalRepresentation
== [returnDescriptor descriptorType]) ||
#endif

View File

@ -403,7 +403,6 @@ - (void) setPixmapData
if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)])
{
bmRep = (NSBitmapImageRep *) rep;
onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)];
if ([bmRep numberOfPlanes] >= 3)
[bmRep getBitmapDataPlanes: pixmapData];
@ -435,7 +434,7 @@ - (unsigned long) getPixelAtX: (int)x Y: (int)y
| (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8)
| (pixmapData[2][loc]);
}
else if (onTiger)
else
{
NSColor *color = [bmRep colorAtX: x y: y];
CGFloat r, g, b, a;
@ -445,7 +444,6 @@ - (unsigned long) getPixelAtX: (int)x Y: (int)y
| ((int)(b * 255.0));
}
return 0;
}
- (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r
@ -463,7 +461,7 @@ - (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r
pixmapData[2][loc] = b;
pixmapData[3][loc] = a;
}
else if (onTiger)
else
{
[bmRep setColor:
[NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0)
@ -483,7 +481,7 @@ - (void) setAlphaAtX: (int) x Y: (int) y to: (unsigned char) a
pixmapData[3][loc] = a;
}
else if (onTiger)
else
{
NSColor *color = [bmRep colorAtX: x y: y];
color = [color colorWithAlphaComponent: (a / 255.0)];

View File

@ -722,11 +722,6 @@ - (void)fillWithWidgetValue: (void *)wvptr
#ifdef NS_IMPL_GNUSTEP
if ([[self window] isVisible])
[self sizeToFit];
#else
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2
if ([self supermenu] == nil)
[self sizeToFit];
#endif
#endif
}

View File

@ -295,7 +295,7 @@ Updated by Christian Limpach (chris@nice.ch)
utfStr = [mstr UTF8String];
length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
#if ! defined (NS_IMPL_COCOA)
if (!utfStr)
{
utfStr = [mstr cString];
@ -306,7 +306,7 @@ Updated by Christian Limpach (chris@nice.ch)
NS_HANDLER
{
message1 ("ns_string_from_pasteboard: UTF8String failed\n");
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
#if defined (NS_IMPL_COCOA)
utfStr = "Conversion failed";
#else
utfStr = [str lossyCString];

View File

@ -26,9 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_NS
#ifdef NS_IMPL_COCOA
#ifndef MAC_OS_X_VERSION_10_3
#define MAC_OS_X_VERSION_10_3 1030
#endif
#ifndef MAC_OS_X_VERSION_10_4
#define MAC_OS_X_VERSION_10_4 1040
#endif
@ -286,7 +283,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
int refCount;
NSBitmapImageRep *bmRep; /* used for accessing pixel data */
unsigned char *pixmapData[5]; /* shortcut to access pixel data */
BOOL onTiger;
NSColor *stippleMask;
}
+ allocInitFromFile: (Lisp_Object)file;
@ -355,7 +351,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* ==========================================================================
Rendering on Panther and above
Rendering
========================================================================== */
@ -380,7 +376,7 @@ extern NSString *ns_app_name;
extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
/* Apple removed the declaration, but kept the implementation */
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
#if defined (NS_IMPL_COCOA)
@interface NSApplication (EmacsApp)
- (void)setAppleMenu: (NSMenu *)menu;
@end
@ -483,10 +479,9 @@ struct nsfont_info
float size;
#ifdef __OBJC__
NSFont *nsfont;
/* cgfont and synthItal are used only on OS X 10.3+ */
#if defined (NS_IMPL_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
#if defined (NS_IMPL_COCOA)
CGFontRef cgfont;
#else /* GNUstep or OS X < 10.3 */
#else /* GNUstep */
void *cgfont;
#endif
#else /* ! OBJC */

View File

@ -569,9 +569,6 @@ Free a pool and temporary objects it refers to (callable from C)
static void
ns_update_auto_hide_menu_bar (void)
{
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
#ifdef NS_IMPL_COCOA
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
block_input ();
@ -7087,7 +7084,7 @@ Convert an X font name (XLFD) to an NS font name.
ns_function_modifier = Qnone;
DEFVAR_LISP ("ns-antialias-text", ns_antialias_text,
"Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above.");
"Non-nil (the default) means to render text antialiased.");
ns_antialias_text = Qt;
DEFVAR_LISP ("ns-confirm-quit", ns_confirm_quit,