Skip to content

Commit

Permalink
Backport NSColorWell.colorWellStyle for older Xcode.
Browse files Browse the repository at this point in the history
This APIs are available only with Xcode 14.1 or later.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
  • Loading branch information
nevack authored and ckerr committed Feb 25, 2023
1 parent 37ce933 commit 04b5c8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions macosx/CocoaCompatibility.h
Expand Up @@ -37,4 +37,17 @@ typedef NS_ENUM(NSInteger, NSTableViewStyle) {

#endif

// Compatibility declarations to build `@available(macOS 13.0, *)` code with older Xcode 11.3.1 (the last 32-bit OS compatible Xcode)
#ifndef __MAC_13_0

typedef NS_ENUM(NSInteger, NSColorWellStyle) {
NSColorWellStyleMinimal = 1,
} API_AVAILABLE(macos(13.0));

@interface NSColorWell ()
@property(assign) NSColorWellStyle colorWellStyle API_AVAILABLE(macos(13.0));
@end

#endif

NS_ASSUME_NONNULL_END
2 changes: 2 additions & 0 deletions macosx/GroupsPrefsController.mm
Expand Up @@ -2,6 +2,8 @@
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.

#import "CocoaCompatibility.h"

#import "GroupsPrefsController.h"
#import "GroupsController.h"
#import "ExpandedPathToPathTransformer.h"
Expand Down

0 comments on commit 04b5c8b

Please sign in to comment.