diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2014-10-12 10:35:50 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2014-10-12 10:35:50 +0200 |
commit | 9a265587d2f8ee034b8d00c4bcde070367fb0ad1 (patch) | |
tree | a899b66588961d5cadeff1cb03324f68a47b2b65 /src/nsterm.m | |
parent | 4c4c5b9121a550d006d1b57bc2ad97b0415cee9f (diff) | |
download | emacs-9a265587d2f8ee034b8d00c4bcde070367fb0ad1.tar.gz |
Require OSX >= 10.6. Remove PowerPC unexec code.
* configure.ac: Require OSX 10.6. Remove NSInteger test,
use nsfont for Gnustep, macfont for OSX.
* etc/NEWS: OSX required is 10.6 or newer.
* src/Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
comment.
* src/macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
(mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
* src/nsfns.m: Always include src/macfont.h on COCOA.
(ns_filename_from_panel, ns_directory_from_panel)
(Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
(Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
* src/nsterm.m: Always include src/macfont.h on COCOA.
(ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
(ns_dumpglyphs_image, ns_check_menu_open)
(applicationDidFinishLaunching)
(antialiasThresholdDidChange:)
(keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove
checks for OSX <= 10.5/10.6.
(changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
(syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
GNUSTEP.
* src/macfont.m: Remove >= 1050 check.
(macfont_create_family_with_symbol)
(macfont_get_glyph_for_character)
(mac_font_get_glyphs_for_variants)
(mac_ctfont_create_available_families, syms_of_macfont): Remove
code for OSX < 10.6.
(mac_font_family_group, mac_font_family_compare): Remove, only used
for OSX < 10.6.
* src/nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
* src/nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
(x_activate_menubar, trackingNotification:): Remove check for
OSX >= 10.5.
(menuNeedsUpdate:): Remove check for OSX < 10.5.
* src/nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
(NS_HAVE_NSINTEGER): Remove block.
Remove >= OSX 10.6 tests.
* src/unexmacosx.c: Remove include ppc/reloc.h.
(unrelocate, copy_dysymtab): Remove PPC code.
(rebase_reloc_address): Remove, only used for PPC:
Diffstat (limited to 'src/nsterm.m')
-rw-r--r-- | src/nsterm.m | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index b0a2994bcf5..19d246d526a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -65,10 +65,8 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) #endif #ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 #include "macfont.h" #endif -#endif /* call tracing */ #if 0 @@ -706,7 +704,6 @@ static void ns_update_auto_hide_menu_bar (void) { #ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 block_input (); NSTRACE (ns_update_auto_hide_menu_bar); @@ -739,7 +736,6 @@ ns_update_auto_hide_menu_bar (void) unblock_input (); #endif -#endif } @@ -2358,7 +2354,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, [img setXBMColor: bm_color]; } -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_COCOA [img drawInRect: r fromRect: NSZeroRect operation: NSCompositeSourceOver @@ -3037,7 +3033,7 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) /* Draw the image.. do we need to draw placeholder if img ==nil? */ if (img != nil) { -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_COCOA NSRect dr = NSMakeRect (x, y, s->slice.width, s->slice.height); NSRect ir = NSMakeRect (s->slice.x, s->slice.y, s->slice.width, s->slice.height); @@ -3450,8 +3446,7 @@ check_native_fs () #endif /* GNUstep and OSX <= 10.4 does not have cancelTracking. */ -#if defined (NS_IMPL_COCOA) && \ - MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#ifdef NS_IMPL_COCOA /* Check if menu open should be canceled or continued as normal. */ void ns_check_menu_open (NSMenu *menu) @@ -3514,7 +3509,7 @@ ns_check_pending_open_menu () menu_will_open_state = MENU_OPENING; } } -#endif /* NS_IMPL_COCOA) && >= MAC_OS_X_VERSION_10_5 */ +#endif /* NS_IMPL_COCOA */ static void unwind_apploopnr (Lisp_Object not_used) @@ -4720,14 +4715,12 @@ ns_term_shutdown (int sig) [self antialiasThresholdDidChange:nil]; #ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(antialiasThresholdDidChange:) name:NSAntialiasThresholdChangedNotification object:nil]; #endif -#endif ns_send_appdefined (-2); } @@ -4735,10 +4728,8 @@ ns_term_shutdown (int sig) - (void)antialiasThresholdDidChange:(NSNotification *)notification { #ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 macfont_update_antialias_threshold (); #endif -#endif } @@ -5078,13 +5069,11 @@ not_in_argv (NSString *arg) if (!emacs_event) return; - if (EQ (font->driver->type, Qns)) - nsfont = ((struct nsfont_info *)font)->nsfont; -#ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - else - nsfont = (NSFont *) macfont_get_nsctfont (font); +#ifdef NS_IMPL_GNUSTEP + nsfont = ((struct nsfont_info *)font)->nsfont; #endif +#ifdef NS_IMPL_COCOA + nsfont = (NSFont *) macfont_get_nsctfont (font); #endif if ((newFont = [sender convertFont: nsfont])) @@ -5136,7 +5125,7 @@ not_in_argv (NSString *arg) int code; unsigned fnKeysym = 0; static NSMutableArray *nsEvArray; -#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_GNUSTEP static BOOL firstTime = YES; #endif int left_is_none; @@ -5367,7 +5356,7 @@ not_in_argv (NSString *arg) } -#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_GNUSTEP /* if we get here we should send the key for input manager processing */ /* Disable warning, there is nothing a user can do about it anyway, and it does not seem to matter. */ @@ -6509,8 +6498,7 @@ if (cols > 0 && rows > 0) /* Hide dock and menubar if we are on the primary screen. */ if (onFirstScreen) { -#if defined (NS_IMPL_COCOA) && \ - MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_COCOA NSApplicationPresentationOptions options = NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar; @@ -6562,8 +6550,7 @@ if (cols > 0 && rows > 0) if (onFirstScreen) { -#if defined (NS_IMPL_COCOA) && \ - MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#ifdef NS_IMPL_COCOA [NSApp setPresentationOptions: NSApplicationPresentationDefault]; #else [NSMenu setMenuBarVisible:YES]; @@ -7285,7 +7272,7 @@ if (cols > 0 && rows > 0) if (portion >= whole) { -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 +#ifdef NS_IMPL_COCOA [self setKnobProportion: 1.0]; [self setDoubleValue: 1.0]; #else @@ -7299,7 +7286,7 @@ if (cols > 0 && rows > 0) portion = max ((float)whole*min_portion/pixel_height, portion); pos = (float)position / (whole - portion); por = (CGFloat)portion/whole; -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 +#ifdef NS_IMPL_COCOA [self setKnobProportion: por]; [self setDoubleValue: pos]; #else @@ -7829,14 +7816,12 @@ baseline level. The default value is nil. */); DEFSYM (Qcocoa, "cocoa"); DEFSYM (Qgnustep, "gnustep"); - syms_of_nsfont (); #ifdef NS_IMPL_COCOA Fprovide (Qcocoa, Qnil); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 syms_of_macfont (); -#endif #else Fprovide (Qgnustep, Qnil); + syms_of_nsfont (); #endif } |