| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 wheelDeltaX() const { return m_wheelDelta.x(); } |
| 82 int wheelDeltaY() const { return m_wheelDelta.y(); } | 82 int wheelDeltaY() 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 // Needed for Objective-C legacy support | |
| 89 bool isHorizontal() const { return m_wheelDelta.x(); } | |
| 90 | 88 |
| 91 virtual const AtomicString& interfaceName() const; | 89 virtual const AtomicString& interfaceName() const; |
| 92 virtual bool isMouseEvent() const; | 90 virtual bool isMouseEvent() const; |
| 93 | 91 |
| 94 private: | 92 private: |
| 95 WheelEvent(); | 93 WheelEvent(); |
| 96 WheelEvent(const AtomicString&, const WheelEventInit&); | 94 WheelEvent(const AtomicString&, const WheelEventInit&); |
| 97 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, | 95 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, |
| 98 unsigned, PassRefPtr<AbstractView>, const IntPoint& screenLocation, cons
t IntPoint& pageLocation, | 96 unsigned, PassRefPtr<AbstractView>, const IntPoint& screenLocation, cons
t IntPoint& pageLocation, |
| 99 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn
vertedFromDevice); | 97 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn
vertedFromDevice); |
| 100 | 98 |
| 101 IntPoint m_wheelDelta; | 99 IntPoint m_wheelDelta; |
| 102 IntPoint m_rawDelta; | 100 IntPoint m_rawDelta; |
| 103 unsigned m_deltaMode; | 101 unsigned m_deltaMode; |
| 104 bool m_directionInvertedFromDevice; | 102 bool m_directionInvertedFromDevice; |
| 105 }; | 103 }; |
| 106 | 104 |
| 107 class WheelEventDispatchMediator : public EventDispatchMediator { | 105 class WheelEventDispatchMediator : public EventDispatchMediator { |
| 108 public: | 106 public: |
| 109 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); | 107 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); |
| 110 private: | 108 private: |
| 111 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); | 109 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); |
| 112 WheelEvent* event() const; | 110 WheelEvent* event() const; |
| 113 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 111 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| 114 }; | 112 }; |
| 115 | 113 |
| 116 } // namespace WebCore | 114 } // namespace WebCore |
| 117 | 115 |
| 118 #endif // WheelEvent_h | 116 #endif // WheelEvent_h |
| OLD | NEW |