OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef PlatformWheelEvent_h | 26 #ifndef PlatformWheelEvent_h |
27 #define PlatformWheelEvent_h | 27 #define PlatformWheelEvent_h |
28 | 28 |
29 #include "platform/PlatformEvent.h" | 29 #include "platform/PlatformEvent.h" |
30 #include "platform/PlatformMouseEvent.h" | 30 #include "platform/PlatformMouseEvent.h" |
31 #include "platform/geometry/IntPoint.h" | 31 #include "platform/geometry/IntPoint.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 // Wheel events come in two flavors: | |
36 // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precis
e number of pixels to scroll. It is sent directly by MacBook touchpads on OS X, | |
37 // and synthesized in other cases where platforms generate line-by-line scrollin
g events. | |
38 // The ScrollByPageWheelEvent indicates that the wheel event should scroll an en
tire page. In this case WebCore's built in paging behavior is used to page | |
39 // up and down (you get the same behavior as if the user was clicking in a scrol
lbar track to page up or page down). | |
40 enum PlatformWheelEventGranularity { | 35 enum PlatformWheelEventGranularity { |
| 36 // Indicates that the wheel event should scroll an entire page. In this case |
| 37 // WebCore's built in paging behavior is used to page up and down (you get the |
| 38 // same behavior as if the user was clicking in a scrollbar track to page up |
| 39 // or page down). |
41 ScrollByPageWheelEvent, | 40 ScrollByPageWheelEvent, |
| 41 // A fine-grained event that specifies the precise number of pixels to scroll. |
| 42 // It is sent directly by MacBook touchpads on OS X, and synthesized in other |
| 43 // cases where platforms generate line-by-line scrolling events. |
42 ScrollByPixelWheelEvent, | 44 ScrollByPixelWheelEvent, |
43 }; | 45 }; |
44 | 46 |
45 #if OS(MACOSX) | 47 #if OS(MACOSX) |
46 enum PlatformWheelEventPhase { | 48 enum PlatformWheelEventPhase { |
47 PlatformWheelEventPhaseNone = 0, | 49 PlatformWheelEventPhaseNone = 0, |
48 PlatformWheelEventPhaseBegan = 1 << 0, | 50 PlatformWheelEventPhaseBegan = 1 << 0, |
49 PlatformWheelEventPhaseStationary = 1 << 1, | 51 PlatformWheelEventPhaseStationary = 1 << 1, |
50 PlatformWheelEventPhaseChanged = 1 << 2, | 52 PlatformWheelEventPhaseChanged = 1 << 2, |
51 PlatformWheelEventPhaseEnded = 1 << 3, | 53 PlatformWheelEventPhaseEnded = 1 << 3, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 DispatchType m_dispatchType; | 108 DispatchType m_dispatchType; |
107 #if OS(MACOSX) | 109 #if OS(MACOSX) |
108 PlatformWheelEventPhase m_phase; | 110 PlatformWheelEventPhase m_phase; |
109 PlatformWheelEventPhase m_momentumPhase; | 111 PlatformWheelEventPhase m_momentumPhase; |
110 #endif | 112 #endif |
111 }; | 113 }; |
112 | 114 |
113 } // namespace blink | 115 } // namespace blink |
114 | 116 |
115 #endif // PlatformWheelEvent_h | 117 #endif // PlatformWheelEvent_h |
OLD | NEW |