summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_wnd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/cocoa/cocoa_wnd.h')
-rw-r--r--src/video/cocoa/cocoa_wnd.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/video/cocoa/cocoa_wnd.h b/src/video/cocoa/cocoa_wnd.h
index 0b5c51b99..d0c946067 100644
--- a/src/video/cocoa/cocoa_wnd.h
+++ b/src/video/cocoa/cocoa_wnd.h
@@ -14,6 +14,10 @@
#include "toolbar_gui.h"
#include "table/sprites.h"
+#ifdef MAC_OS_X_VERSION_10_12_2
+# define HAVE_TOUCHBAR_SUPPORT
+#endif
+
class VideoDriver_Cocoa;
/* Right Mouse Button Emulation enum */
@@ -30,7 +34,7 @@ extern NSString *OTTDMainLaunchGameEngine;
+ (NSCursor *) clearCocoaCursor;
@end
-#ifdef HAVE_OSX_1015_SDK
+#ifdef HAVE_TOUCHBAR_SUPPORT
/* 9 items can be displayed on the touch bar when using default buttons. */
static NSArray *touchBarButtonIdentifiers = @[
@"openttd.pause",
@@ -83,12 +87,11 @@ static NSDictionary *touchBarFallbackText = @{
#endif
/** Subclass of NSWindow to cater our special needs */
-#ifdef HAVE_OSX_1015_SDK
-@interface OTTD_CocoaWindow : NSWindow <NSTouchBarDelegate>
-@property (strong) NSSet *touchbarItems;
-- (NSImage*)generateImage:(int)spriteId;
-#else
@interface OTTD_CocoaWindow : NSWindow
+#ifdef HAVE_TOUCHBAR_SUPPORT
+ <NSTouchBarDelegate>
+
+- (NSImage *)generateImage:(int)spriteId;
#endif
- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag driver:(VideoDriver_Cocoa *)drv;