Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: base/mac/sdk_forward_declarations.h

Issue 15979009: [Mac] Move the large block of NSEvent forward declarations to a shared header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698