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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } | 74 } |
75 | 75 |
76 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>, | 76 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>, |
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 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractV
iew>, | 80 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractV
iew>, |
81 int screenX, int screenY, int pageX, int pageY, | 81 int screenX, int screenY, int pageX, int pageY, |
82 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); | 82 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
83 | 83 |
84 double deltaX() const { return m_deltaX; } | 84 double deltaX() const { return m_deltaX; } // Positive when scrolling right. |
85 double deltaY() const { return m_deltaY; } | 85 double deltaY() const { return m_deltaY; } // Positive when scrolling down. |
86 double deltaZ() const { return m_deltaZ; } | 86 double deltaZ() const { return m_deltaZ; } |
87 int wheelDelta() const { return m_deltaY ? m_deltaY : m_deltaX; } // Depreca
ted. | 87 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX(
); } // Deprecated. |
88 int wheelDeltaX() const { return m_deltaX; } // Deprecated. | 88 int wheelDeltaX() const { return -m_deltaX; } // Deprecated, negative when s
crolling right. |
89 int wheelDeltaY() const { return m_deltaY; } // Deprecated. | 89 int wheelDeltaY() const { return -m_deltaY; } // Deprecated, negative when s
crolling down. |
90 int rawDeltaX() const { return m_rawDelta.x(); } | 90 int rawDeltaX() const { return m_rawDelta.x(); } |
91 int rawDeltaY() const { return m_rawDelta.y(); } | 91 int rawDeltaY() const { return m_rawDelta.y(); } |
92 unsigned deltaMode() const { return m_deltaMode; } | 92 unsigned deltaMode() const { return m_deltaMode; } |
93 | 93 |
94 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF
romDevice; } | 94 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF
romDevice; } |
95 | 95 |
96 virtual const AtomicString& interfaceName() const; | 96 virtual const AtomicString& interfaceName() const; |
97 virtual bool isMouseEvent() const; | 97 virtual bool isMouseEvent() const; |
98 | 98 |
99 private: | 99 private: |
(...skipping 16 matching lines...) Expand all Loading... |
116 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); | 116 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven
t&, PassRefPtr<AbstractView>); |
117 private: | 117 private: |
118 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); | 118 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie
w>); |
119 WheelEvent* event() const; | 119 WheelEvent* event() const; |
120 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 120 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
121 }; | 121 }; |
122 | 122 |
123 } // namespace WebCore | 123 } // namespace WebCore |
124 | 124 |
125 #endif // WheelEvent_h | 125 #endif // WheelEvent_h |
OLD | NEW |