OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains forward declarations for items in later SDKs than the | 5 // This file contains forward declarations for items in later SDKs than the |
6 // default one with which Chromium is built (currently 10.10). | 6 // default one with which Chromium is built (currently 10.10). |
7 // If you call any function from this header, be sure to check at runtime for | 7 // If you call any function from this header, be sure to check at runtime for |
8 // respondsToSelector: before calling these functions (else your code will crash | 8 // respondsToSelector: before calling these functions (else your code will crash |
9 // on older OS X versions that chrome still supports). | 9 // on older OS X versions that chrome still supports). |
10 | 10 |
11 #ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 11 #ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
12 #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 12 #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
13 | 13 |
14 #import <AppKit/AppKit.h> | 14 #import <AppKit/AppKit.h> |
15 #import <CoreBluetooth/CoreBluetooth.h> | 15 #import <CoreBluetooth/CoreBluetooth.h> |
16 #import <CoreWLAN/CoreWLAN.h> | 16 #import <CoreWLAN/CoreWLAN.h> |
17 #import <ImageCaptureCore/ImageCaptureCore.h> | 17 #import <ImageCaptureCore/ImageCaptureCore.h> |
18 #import <IOBluetooth/IOBluetooth.h> | 18 #import <IOBluetooth/IOBluetooth.h> |
19 #include <stdint.h> | 19 #include <stdint.h> |
20 | 20 |
21 #include "base/base_export.h" | 21 #include "base/base_export.h" |
22 | 22 |
23 // ---------------------------------------------------------------------------- | 23 // ---------------------------------------------------------------------------- |
24 // Define typedefs, enums, and protocols not available in the version of the | 24 // Define typedefs, enums, and protocols not available in the version of the |
25 // OSX SDK being compiled against. | 25 // OSX SDK being compiled against. |
26 // ---------------------------------------------------------------------------- | 26 // ---------------------------------------------------------------------------- |
27 | 27 |
| 28 #if !defined(MAC_OS_X_VERSION_10_12) || \ |
| 29 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 |
| 30 |
| 31 // The protocol was formalized by the 10.12 SDK, but it was informally used |
| 32 // before. |
| 33 @protocol CAAnimationDelegate |
| 34 - (void)animationDidStart:(CAAnimation*)animation; |
| 35 - (void)animationDidStop:(CAAnimation*)animation finished:(BOOL)finished; |
| 36 @end |
| 37 |
| 38 @protocol CALayerDelegate |
| 39 @end |
| 40 |
| 41 #endif // MAC_OS_X_VERSION_10_12 |
| 42 |
28 #if !defined(MAC_OS_X_VERSION_10_11) || \ | 43 #if !defined(MAC_OS_X_VERSION_10_11) || \ |
29 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 | 44 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 |
30 | 45 |
31 enum { | 46 enum { |
32 NSPressureBehaviorUnknown = -1, | 47 NSPressureBehaviorUnknown = -1, |
33 NSPressureBehaviorPrimaryDefault = 0, | 48 NSPressureBehaviorPrimaryDefault = 0, |
34 NSPressureBehaviorPrimaryClick = 1, | 49 NSPressureBehaviorPrimaryClick = 1, |
35 NSPressureBehaviorPrimaryGeneric = 2, | 50 NSPressureBehaviorPrimaryGeneric = 2, |
36 NSPressureBehaviorPrimaryAccelerator = 3, | 51 NSPressureBehaviorPrimaryAccelerator = 3, |
37 NSPressureBehaviorPrimaryDeepClick = 5, | 52 NSPressureBehaviorPrimaryDeepClick = 5, |
38 NSPressureBehaviorPrimaryDeepDrag = 6 | 53 NSPressureBehaviorPrimaryDeepDrag = 6 |
39 }; | 54 }; |
40 typedef NSInteger NSPressureBehavior; | 55 typedef NSInteger NSPressureBehavior; |
41 | 56 |
42 @interface NSPressureConfiguration : NSObject | 57 @interface NSPressureConfiguration : NSObject |
43 - (instancetype)initWithPressureBehavior:(NSPressureBehavior)pressureBehavior; | 58 - (instancetype)initWithPressureBehavior:(NSPressureBehavior)pressureBehavior; |
44 @end | 59 @end |
45 | 60 |
46 enum { | 61 enum { |
47 NSSpringLoadingHighlightNone = 0, | 62 NSSpringLoadingHighlightNone = 0, |
48 NSSpringLoadingHighlightStandard, | 63 NSSpringLoadingHighlightStandard, |
49 NSSpringLoadingHighlightEmphasized | 64 NSSpringLoadingHighlightEmphasized |
50 }; | 65 }; |
51 typedef NSUInteger NSSpringLoadingHighlight; | 66 typedef NSUInteger NSSpringLoadingHighlight; |
52 | 67 |
53 #endif // MAC_OS_X_VERSION_10_11 | 68 #endif // MAC_OS_X_VERSION_10_11 |
54 | 69 |
55 // ---------------------------------------------------------------------------- | 70 // ---------------------------------------------------------------------------- |
56 // Define NSStrings only available in newer versions of the OSX SDK to force | 71 // Define NSStrings only available in newer versions of the OSX SDK to force |
57 // them to be statically linked. | 72 // them to be statically linked. |
58 // ---------------------------------------------------------------------------- | 73 // ---------------------------------------------------------------------------- |
59 | 74 |
60 extern "C" { | 75 extern "C" { |
61 #if !defined(MAC_OS_X_VERSION_10_9) || \ | 76 #if !defined(MAC_OS_X_VERSION_10_9) || \ |
62 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 | 77 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 |
63 BASE_EXPORT extern NSString* const NSWindowDidChangeOcclusionStateNotification; | 78 BASE_EXPORT extern NSString* const NSWindowDidChangeOcclusionStateNotification; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 242 |
228 // ---------------------------------------------------------------------------- | 243 // ---------------------------------------------------------------------------- |
229 // The symbol for kCWSSIDDidChangeNotification is available in the | 244 // The symbol for kCWSSIDDidChangeNotification is available in the |
230 // CoreWLAN.framework for OSX versions 10.6 through 10.10. The symbol is not | 245 // CoreWLAN.framework for OSX versions 10.6 through 10.10. The symbol is not |
231 // declared in the OSX 10.9+ SDK, so when compiling against an OSX 10.9+ SDK, | 246 // declared in the OSX 10.9+ SDK, so when compiling against an OSX 10.9+ SDK, |
232 // declare the symbol. | 247 // declare the symbol. |
233 // ---------------------------------------------------------------------------- | 248 // ---------------------------------------------------------------------------- |
234 BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification; | 249 BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification; |
235 | 250 |
236 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 251 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
OLD | NEW |