| 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 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 static PassRefPtrWillBeRawPtr<WheelEvent> create(const FloatPoint& wheelTick
s, | 67 static PassRefPtrWillBeRawPtr<WheelEvent> create(const FloatPoint& wheelTick
s, |
| 68 const FloatPoint& rawDelta, unsigned deltaMode, PassRefPtrWillBeRawPtr<A
bstractView> view, | 68 const FloatPoint& rawDelta, unsigned deltaMode, PassRefPtrWillBeRawPtr<A
bstractView> view, |
| 69 const IntPoint& screenLocation, const IntPoint& pageLocation, | 69 const IntPoint& screenLocation, const IntPoint& pageLocation, |
| 70 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 70 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 71 { | 71 { |
| 72 return adoptRefWillBeNoop(new WheelEvent(wheelTicks, rawDelta, deltaMode
, view, | 72 return adoptRefWillBeNoop(new WheelEvent(wheelTicks, rawDelta, deltaMode
, view, |
| 73 screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey)); | 73 screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawPtr<Abs
tractView>, |
| 77 int screenX, int screenY, int pageX, int pageY, |
| 78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
| 79 |
| 80 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawP
tr<AbstractView>, |
| 81 int screenX, int screenY, int pageX, int pageY, |
| 82 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
| 83 |
| 76 double deltaX() const { return m_deltaX; } // Positive when scrolling right. | 84 double deltaX() const { return m_deltaX; } // Positive when scrolling right. |
| 77 double deltaY() const { return m_deltaY; } // Positive when scrolling down. | 85 double deltaY() const { return m_deltaY; } // Positive when scrolling down. |
| 78 double deltaZ() const { return m_deltaZ; } | 86 double deltaZ() const { return m_deltaZ; } |
| 79 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX(
); } // Deprecated. | 87 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX(
); } // Deprecated. |
| 80 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative
when scrolling right. | 88 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative
when scrolling right. |
| 81 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative
when scrolling down. | 89 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative
when scrolling down. |
| 82 unsigned deltaMode() const { return m_deltaMode; } | 90 unsigned deltaMode() const { return m_deltaMode; } |
| 83 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul
tiplier; } | 91 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul
tiplier; } |
| 84 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul
tiplier; } | 92 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul
tiplier; } |
| 85 | 93 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 112 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf
ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>); | 120 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf
ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>); |
| 113 private: | 121 private: |
| 114 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr
<AbstractView>); | 122 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr
<AbstractView>); |
| 115 WheelEvent* event() const; | 123 WheelEvent* event() const; |
| 116 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 124 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| 117 }; | 125 }; |
| 118 | 126 |
| 119 } // namespace blink | 127 } // namespace blink |
| 120 | 128 |
| 121 #endif // WheelEvent_h | 129 #endif // WheelEvent_h |
| OLD | NEW |