* 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.
+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.
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
+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)
** 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.
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
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
*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
if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)])
{
bmRep = (NSBitmapImageRep *) rep;
- onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)];
if ([bmRep numberOfPlanes] >= 3)
[bmRep getBitmapDataPlanes: pixmapData];
| (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;
| ((int)(b * 255.0));
}
- return 0;
}
- (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)
pixmapData[3][loc] = a;
}
- else if (onTiger)
+ else
{
NSColor *color = [bmRep colorAtX: x y: y];
color = [color colorWithAlphaComponent: (a / 255.0)];
#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
}
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];
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];
#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
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;
/* ==========================================================================
- Rendering on Panther and above
+ Rendering
========================================================================== */
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
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 */
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 ();
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,