| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/dom/MouseEvent.h" | 28 #include "core/dom/MouseEvent.h" |
| 29 #include "core/platform/graphics/FloatPoint.h" | 29 #include "core/platform/graphics/FloatPoint.h" |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 class PlatformWheelEvent; | 33 class PlatformWheelEvent; |
| 34 | 34 |
| 35 struct WheelEventInit : public MouseEventInit { | 35 struct WheelEventInit : public MouseEventInit { |
| 36 WheelEventInit(); | 36 WheelEventInit(); |
| 37 | 37 |
| 38 int wheelDeltaX; | 38 int deltaX; |
| 39 int wheelDeltaY; | 39 int deltaY; |
| 40 unsigned deltaMode; | 40 unsigned deltaMode; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class WheelEvent : public MouseEvent { | 43 class WheelEvent : public MouseEvent { |
| 44 public: | 44 public: |
| 45 enum { TickMultiplier = 120 }; | 45 enum { TickMultiplier = 120 }; |
| 46 | 46 |
| 47 enum DeltaMode { | 47 enum DeltaMode { |
| 48 DOM_DELTA_PIXEL = 0, | 48 DOM_DELTA_PIXEL = 0, |
| 49 DOM_DELTA_LINE, | 49 DOM_DELTA_LINE, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 71 | 71 |
| 72 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>, | 72 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>, |
| 73 int screenX, int screenY, int pageX, int pageY, | 73 int screenX, int screenY, int pageX, int pageY, |
| 74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); | 74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
| 75 | 75 |
| 76 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractV
iew>, | 76 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractV
iew>, |
| 77 int screenX, int screenY, int pageX, int pageY, | 77 int screenX, int screenY, int pageX, int pageY, |
| 78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); | 78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
| 79 | 79 |
| 80 int wheelDelta() const { return m_wheelDelta.y() ? m_wheelDelta.y() : m_whee
lDelta.x(); } | 80 int wheelDelta() const { return m_wheelDelta.y() ? m_wheelDelta.y() : m_whee
lDelta.x(); } |
| 81 int wheelDeltaX() const { return m_wheelDelta.x(); } | 81 int deltaX() const { return m_wheelDelta.x(); } |
| 82 int wheelDeltaY() const { return m_wheelDelta.y(); } | 82 int deltaY() const { return m_wheelDelta.y(); } |
| 83 int rawDeltaX() const { return m_rawDelta.x(); } | 83 int rawDeltaX() const { return m_rawDelta.x(); } |
| 84 int rawDeltaY() const { return m_rawDelta.y(); } | 84 int rawDeltaY() const { return m_rawDelta.y(); } |
| 85 unsigned deltaMode() const { return m_deltaMode; } | 85 unsigned deltaMode() const { return m_deltaMode; } |
| 86 | 86 |
| 87 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF
romDevice; } | 87 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF
romDevice; } |
| 88 | 88 |
| 89 virtual const AtomicString& interfaceName() const; | 89 virtual const AtomicString& interfaceName() const; |
| 90 virtual bool isMouseEvent() const; | 90 virtual bool isMouseEvent() const; |
| 91 | 91 |
| 92 private: | 92 private: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 107 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); | 107 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); |
| 108 private: | 108 private: |
| 109 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); | 109 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); |
| 110 WheelEvent* event() const; | 110 WheelEvent* event() const; |
| 111 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 111 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace WebCore | 114 } // namespace WebCore |
| 115 | 115 |
| 116 #endif // WheelEvent_h | 116 #endif // WheelEvent_h |
| OLD | NEW |