1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-23 22:50:41 +00:00
transmission/macosx/CocoaCompatibility.h
Antoine Cœur 7f9264940e
Compatibility to build on the last macOS 32 bit system with its last compatible Xcode (#2844)
* Compatibility to build on the last macOS 32 bit system with its last compatible Xcode

* Code review: Compatibility declarations

* compatibility with `make`

* Code review: headers

* Avoiding dummy NSImageSymbolConfiguration implementation

* clang-format

* Don't force-include compat header

* Remove compat header from pch header

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-04-24 21:34:30 +01:00

42 lines
1.1 KiB
Objective-C

// This file Copyright © 2011-2022 Transmission authors and contributors.
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.
#import <AppKit/AppKit.h>
NS_ASSUME_NONNULL_BEGIN
// Compatibility declarations to build `@available(macOS 11.0, *)` code with older Xcode 11.3.1 (the last 32-bit OS compatible Xcode)
#ifndef __MAC_11_0
typedef NS_ENUM(NSInteger, NSImageSymbolScale)
{
NSImageSymbolScaleLarge = 3,
} API_AVAILABLE(macos(11.0));
@interface NSImage ()
+ (nullable instancetype)imageWithSystemSymbolName:(NSString*)symbolName
accessibilityDescription:(nullable NSString*)description API_AVAILABLE(macos(11.0));
@end
typedef NS_ENUM(NSInteger, NSWindowToolbarStyle)
{
NSWindowToolbarStylePreference = 2,
} API_AVAILABLE(macos(11.0));
@interface NSWindow ()
@property NSWindowToolbarStyle toolbarStyle API_AVAILABLE(macos(11.0));
@end
typedef NS_ENUM(NSInteger, NSTableViewStyle)
{
NSTableViewStyleFullWidth = 1,
} API_AVAILABLE(macos(11.0));
@interface NSTableView ()
@property NSTableViewStyle style API_AVAILABLE(macos(11.0));
@end
#endif
NS_ASSUME_NONNULL_END