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.6). | 6 // default one with which Chromium is built (currently 10.6). |
| 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 |
| 9 // on older OS X versions that chrome still supports). |
7 | 10 |
8 #ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 11 #ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
9 #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 12 #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
10 | 13 |
| 14 #import <AppKit/AppKit.h> |
| 15 |
11 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 16 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
12 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 17 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
13 enum { | 18 enum { |
14 NSEventPhaseNone = 0, // event not associated with a phase. | 19 NSEventPhaseNone = 0, // event not associated with a phase. |
15 NSEventPhaseBegan = 0x1 << 0, | 20 NSEventPhaseBegan = 0x1 << 0, |
16 NSEventPhaseStationary = 0x1 << 1, | 21 NSEventPhaseStationary = 0x1 << 1, |
17 NSEventPhaseChanged = 0x1 << 2, | 22 NSEventPhaseChanged = 0x1 << 2, |
18 NSEventPhaseEnded = 0x1 << 3, | 23 NSEventPhaseEnded = 0x1 << 3, |
19 NSEventPhaseCancelled = 0x1 << 4, | 24 NSEventPhaseCancelled = 0x1 << 4, |
20 }; | 25 }; |
(...skipping 21 matching lines...) Expand all Loading... |
42 | 47 |
43 - (BOOL)isDirectionInvertedFromDevice; | 48 - (BOOL)isDirectionInvertedFromDevice; |
44 | 49 |
45 @end | 50 @end |
46 | 51 |
47 @interface CALayer (LionAPI) | 52 @interface CALayer (LionAPI) |
48 - (CGFloat)contentsScale; | 53 - (CGFloat)contentsScale; |
49 - (void)setContentsScale:(CGFloat)contentsScale; | 54 - (void)setContentsScale:(CGFloat)contentsScale; |
50 @end | 55 @end |
51 | 56 |
| 57 @interface NSScreen (LionSDK) |
| 58 - (CGFloat)backingScaleFactor; |
| 59 - (NSRect)convertRectToBacking:(NSRect)aRect; |
| 60 @end |
| 61 |
| 62 @interface NSWindow (LionSDK) |
| 63 - (CGFloat)backingScaleFactor; |
| 64 @end |
52 #endif // MAC_OS_X_VERSION_10_7 | 65 #endif // MAC_OS_X_VERSION_10_7 |
53 | 66 |
54 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 67 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
OLD | NEW |