OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This file contains forward declarations for items in later SDKs than the |
| 6 // default one with which Chromium is built (currently 10.6). |
| 7 |
| 8 #ifndef BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
| 9 #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
| 10 |
| 11 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
| 12 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
| 13 enum { |
| 14 NSEventPhaseNone = 0, // event not associated with a phase. |
| 15 NSEventPhaseBegan = 0x1 << 0, |
| 16 NSEventPhaseStationary = 0x1 << 1, |
| 17 NSEventPhaseChanged = 0x1 << 2, |
| 18 NSEventPhaseEnded = 0x1 << 3, |
| 19 NSEventPhaseCancelled = 0x1 << 4, |
| 20 }; |
| 21 typedef NSUInteger NSEventPhase; |
| 22 |
| 23 enum { |
| 24 NSEventSwipeTrackingLockDirection = 0x1 << 0, |
| 25 NSEventSwipeTrackingClampGestureAmount = 0x1 << 1, |
| 26 }; |
| 27 typedef NSUInteger NSEventSwipeTrackingOptions; |
| 28 |
| 29 @interface NSEvent (LionSDK) |
| 30 + (BOOL)isSwipeTrackingFromScrollEventsEnabled; |
| 31 |
| 32 - (NSEventPhase)phase; |
| 33 - (CGFloat)scrollingDeltaX; |
| 34 - (CGFloat)scrollingDeltaY; |
| 35 - (void)trackSwipeEventWithOptions:(NSEventSwipeTrackingOptions)options |
| 36 dampenAmountThresholdMin:(CGFloat)minDampenThreshold |
| 37 max:(CGFloat)maxDampenThreshold |
| 38 usingHandler:(void (^)(CGFloat gestureAmount, |
| 39 NSEventPhase phase, |
| 40 BOOL isComplete, |
| 41 BOOL *stop))trackingHandler; |
| 42 |
| 43 - (BOOL)isDirectionInvertedFromDevice; |
| 44 |
| 45 @end |
| 46 #endif // MAC_OS_X_VERSION_10_7 |
| 47 |
| 48 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
OLD | NEW |