diff options
author | Ben Murdoch <benm@google.com> | 2011-05-13 16:23:25 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-16 11:35:02 +0100 |
commit | 65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch) | |
tree | f478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/platform/PlatformWheelEvent.h | |
parent | 47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff) | |
download | external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2 |
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/platform/PlatformWheelEvent.h')
-rw-r--r-- | Source/WebCore/platform/PlatformWheelEvent.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/Source/WebCore/platform/PlatformWheelEvent.h b/Source/WebCore/platform/PlatformWheelEvent.h index 6747392..1e5cd53 100644 --- a/Source/WebCore/platform/PlatformWheelEvent.h +++ b/Source/WebCore/platform/PlatformWheelEvent.h @@ -68,8 +68,22 @@ namespace WebCore { // and synthesized in other cases where platforms generate line-by-line scrolling events. // The ScrollByPageWheelEvent indicates that the wheel event should scroll an entire page. In this case WebCore's built in paging behavior is used to page // up and down (you get the same behavior as if the user was clicking in a scrollbar track to page up or page down). Page scrolling only works in the vertical direction. - enum PlatformWheelEventGranularity { ScrollByPageWheelEvent, ScrollByPixelWheelEvent }; - + enum PlatformWheelEventGranularity { + ScrollByPageWheelEvent, + ScrollByPixelWheelEvent + }; + +#if PLATFORM(MAC) + enum PlatformWheelEventPhase { + PlatformWheelEventPhaseNone = 0, + PlatformWheelEventPhaseBegan = 1 << 1, + PlatformWheelEventPhaseStationary = 1 << 2, + PlatformWheelEventPhaseChanged = 1 << 3, + PlatformWheelEventPhaseEnded = 1 << 4, + PlatformWheelEventPhaseCancelled = 1 << 5, + }; +#endif + class PlatformWheelEvent { public: PlatformWheelEvent() @@ -83,6 +97,9 @@ namespace WebCore { , m_ctrlKey(false) , m_altKey(false) , m_metaKey(false) +#if PLATFORM(MAC) + , m_phase(PlatformWheelEventPhaseNone) +#endif { } @@ -128,10 +145,14 @@ namespace WebCore { PlatformWheelEvent(const Evas_Event_Mouse_Wheel*); #endif -#if PLATFORM(MAC) && defined(__OBJC__) +#if PLATFORM(MAC) +#if defined(__OBJC__) PlatformWheelEvent(NSEvent *, NSView *windowView); #endif + PlatformWheelEventPhase phase() const { return m_phase; } +#endif + #if PLATFORM(QT) PlatformWheelEvent(QWheelEvent*); PlatformWheelEvent(QGraphicsSceneWheelEvent*); @@ -164,6 +185,9 @@ namespace WebCore { bool m_ctrlKey; bool m_altKey; bool m_metaKey; +#if PLATFORM(MAC) + PlatformWheelEventPhase m_phase; +#endif }; } // namespace WebCore |