comparison mac/dw.m @ 2075:c020ad267ae2

Mac: Fix building pre-mountain lion 10.8.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 24 May 2020 23:32:59 +0000
parents 1a196ada0bc9
children a42267bf4208
comparison
equal deleted inserted replaced
2074:1a196ada0bc9 2075:c020ad267ae2
1338 1338
1339 DWObject *DWObj; 1339 DWObject *DWObj;
1340 1340
1341 /* Subclass for the application class */ 1341 /* Subclass for the application class */
1342 @interface DWAppDel : NSObject 1342 @interface DWAppDel : NSObject
1343 #ifdef BUILDING_FOR_SNOW_LEOPARD 1343 #ifdef BUILDING_FOR_MOUNTAIN_LION
1344 <NSApplicationDelegate, NSUserNotificationCenterDelegate> 1344 <NSApplicationDelegate, NSUserNotificationCenterDelegate>
1345 #elif defined(BUILDING_FOR_SNOW_LEOPARD)
1346 <NSApplicationDelegate>
1345 #endif 1347 #endif
1346 { 1348 {
1347 } 1349 }
1348 -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; 1350 -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
1349 -(void)applicationDidFinishLaunching:(NSNotification *)aNotification; 1351 -(void)applicationDidFinishLaunching:(NSNotification *)aNotification;
1352 #ifdef BUILDING_FOR_MOUNTAIN_LION
1350 -(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification; 1353 -(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification;
1354 #endif
1351 @end 1355 @end
1352 1356
1353 /* Apparently the WKWebKit API is only enabled on intel 64bit... 1357 /* Apparently the WKWebKit API is only enabled on intel 64bit...
1354 * Causing build failures on 32bit builds, so this should allow 1358 * Causing build failures on 32bit builds, so this should allow
1355 * WKWebKit on intel 64 and the old WebKit on intel 32 bit and earlier. 1359 * WKWebKit on intel 64 and the old WebKit on intel 32 bit and earlier.
1436 } 1440 }
1437 -(void)applicationDidFinishLaunching:(NSNotification *)aNotification 1441 -(void)applicationDidFinishLaunching:(NSNotification *)aNotification
1438 { 1442 {
1439 #ifdef BUILDING_FOR_MOJAVE 1443 #ifdef BUILDING_FOR_MOJAVE
1440 if (@available(macOS 10.14, *)) {} else 1444 if (@available(macOS 10.14, *)) {} else
1441 #endif 1445 #elif defined(BUILDING_FOR_MOUNTAIN_LION)
1442 { 1446 {
1443 NSUserNotificationCenter* unc = [NSUserNotificationCenter defaultUserNotificationCenter]; 1447 NSUserNotificationCenter* unc = [NSUserNotificationCenter defaultUserNotificationCenter];
1444 unc.delegate = self; 1448 unc.delegate = self;
1445 } 1449 }
1446 } 1450 #endif
1451 }
1452 #ifdef BUILDING_FOR_MOUNTAIN_LION
1447 -(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification 1453 -(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification
1448 { 1454 {
1449 return YES; 1455 return YES;
1450 } 1456 }
1457 #endif
1451 @end 1458 @end
1452 1459
1453 /* Subclass for a top-level window */ 1460 /* Subclass for a top-level window */
1454 @interface DWView : DWBox 1461 @interface DWView : DWBox
1455 #ifdef BUILDING_FOR_SNOW_LEOPARD 1462 #ifdef BUILDING_FOR_SNOW_LEOPARD