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 committed Feb 23, 2023
1 parent 4113721 commit 18ab5ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions macosx/CocoaCompatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,19 @@ 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
Original file line number Diff line number Diff line change
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 18ab5ab

Please sign in to comment.