| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 public: | 57 public: |
| 58 PlatformWheelEvent() | 58 PlatformWheelEvent() |
| 59 : PlatformEvent(PlatformEvent::Wheel) | 59 : PlatformEvent(PlatformEvent::Wheel) |
| 60 , m_deltaX(0) | 60 , m_deltaX(0) |
| 61 , m_deltaY(0) | 61 , m_deltaY(0) |
| 62 , m_wheelTicksX(0) | 62 , m_wheelTicksX(0) |
| 63 , m_wheelTicksY(0) | 63 , m_wheelTicksY(0) |
| 64 , m_granularity(ScrollByPixelWheelEvent) | 64 , m_granularity(ScrollByPixelWheelEvent) |
| 65 , m_hasPreciseScrollingDeltas(false) | 65 , m_hasPreciseScrollingDeltas(false) |
| 66 , m_canScroll(true) | 66 , m_canScroll(true) |
| 67 , m_resendingPluginId(-1) |
| 67 , m_railsMode(RailsModeFree) | 68 , m_railsMode(RailsModeFree) |
| 68 #if OS(MACOSX) | 69 #if OS(MACOSX) |
| 69 , m_phase(PlatformWheelEventPhaseNone) | 70 , m_phase(PlatformWheelEventPhaseNone) |
| 70 , m_momentumPhase(PlatformWheelEventPhaseNone) | 71 , m_momentumPhase(PlatformWheelEventPhaseNone) |
| 71 , m_canRubberbandLeft(true) | 72 , m_canRubberbandLeft(true) |
| 72 , m_canRubberbandRight(true) | 73 , m_canRubberbandRight(true) |
| 73 #endif | 74 #endif |
| 74 { | 75 { |
| 75 } | 76 } |
| 76 | 77 |
| 77 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX,
float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranulari
ty granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey) | 78 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX,
float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranulari
ty granularity, int resendingPluginId, bool shiftKey, bool ctrlKey, bool altKey,
bool metaKey) |
| 78 : PlatformEvent(PlatformEvent::Wheel, shiftKey, ctrlKey, altKey, metaKey
, 0) | 79 : PlatformEvent(PlatformEvent::Wheel, shiftKey, ctrlKey, altKey, metaKey
, 0) |
| 79 , m_position(position) | 80 , m_position(position) |
| 80 , m_globalPosition(globalPosition) | 81 , m_globalPosition(globalPosition) |
| 81 , m_deltaX(deltaX) | 82 , m_deltaX(deltaX) |
| 82 , m_deltaY(deltaY) | 83 , m_deltaY(deltaY) |
| 83 , m_wheelTicksX(wheelTicksX) | 84 , m_wheelTicksX(wheelTicksX) |
| 84 , m_wheelTicksY(wheelTicksY) | 85 , m_wheelTicksY(wheelTicksY) |
| 85 , m_granularity(granularity) | 86 , m_granularity(granularity) |
| 86 , m_hasPreciseScrollingDeltas(false) | 87 , m_hasPreciseScrollingDeltas(false) |
| 87 , m_canScroll(true) | 88 , m_canScroll(true) |
| 89 , m_resendingPluginId(resendingPluginId) |
| 88 , m_railsMode(RailsModeFree) | 90 , m_railsMode(RailsModeFree) |
| 89 #if OS(MACOSX) | 91 #if OS(MACOSX) |
| 90 , m_phase(PlatformWheelEventPhaseNone) | 92 , m_phase(PlatformWheelEventPhaseNone) |
| 91 , m_momentumPhase(PlatformWheelEventPhaseNone) | 93 , m_momentumPhase(PlatformWheelEventPhaseNone) |
| 92 , m_canRubberbandLeft(true) | 94 , m_canRubberbandLeft(true) |
| 93 , m_canRubberbandRight(true) | 95 , m_canRubberbandRight(true) |
| 94 #endif | 96 #endif |
| 95 { | 97 { |
| 96 } | 98 } |
| 97 | 99 |
| 98 const IntPoint& position() const { return m_position; } // PlatformWindow co
ordinates. | 100 const IntPoint& position() const { return m_position; } // PlatformWindow co
ordinates. |
| 99 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree
n coordinates. | 101 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree
n coordinates. |
| 100 | 102 |
| 101 float deltaX() const { return m_deltaX; } | 103 float deltaX() const { return m_deltaX; } |
| 102 float deltaY() const { return m_deltaY; } | 104 float deltaY() const { return m_deltaY; } |
| 103 | 105 |
| 104 float wheelTicksX() const { return m_wheelTicksX; } | 106 float wheelTicksX() const { return m_wheelTicksX; } |
| 105 float wheelTicksY() const { return m_wheelTicksY; } | 107 float wheelTicksY() const { return m_wheelTicksY; } |
| 106 | 108 |
| 107 PlatformWheelEventGranularity granularity() const { return m_granularity; } | 109 PlatformWheelEventGranularity granularity() const { return m_granularity; } |
| 108 | 110 |
| 109 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} | 111 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} |
| 110 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} | 112 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} |
| 111 bool canScroll() const { return m_canScroll; } | 113 bool canScroll() const { return m_canScroll; } |
| 112 void setCanScroll(bool b) { m_canScroll = b; } | 114 void setCanScroll(bool b) { m_canScroll = b; } |
| 115 int resendingPluginId() const { return m_resendingPluginId; } |
| 113 RailsMode railsMode() const { return m_railsMode; } | 116 RailsMode railsMode() const { return m_railsMode; } |
| 114 | 117 |
| 115 #if OS(MACOSX) | 118 #if OS(MACOSX) |
| 116 PlatformWheelEventPhase phase() const { return m_phase; } | 119 PlatformWheelEventPhase phase() const { return m_phase; } |
| 117 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } | 120 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } |
| 118 bool canRubberbandLeft() const { return m_canRubberbandLeft; } | 121 bool canRubberbandLeft() const { return m_canRubberbandLeft; } |
| 119 bool canRubberbandRight() const { return m_canRubberbandRight; } | 122 bool canRubberbandRight() const { return m_canRubberbandRight; } |
| 120 #endif | 123 #endif |
| 121 | 124 |
| 122 protected: | 125 protected: |
| 123 IntPoint m_position; | 126 IntPoint m_position; |
| 124 IntPoint m_globalPosition; | 127 IntPoint m_globalPosition; |
| 125 float m_deltaX; | 128 float m_deltaX; |
| 126 float m_deltaY; | 129 float m_deltaY; |
| 127 float m_wheelTicksX; | 130 float m_wheelTicksX; |
| 128 float m_wheelTicksY; | 131 float m_wheelTicksY; |
| 129 PlatformWheelEventGranularity m_granularity; | 132 PlatformWheelEventGranularity m_granularity; |
| 130 bool m_hasPreciseScrollingDeltas; | 133 bool m_hasPreciseScrollingDeltas; |
| 131 bool m_canScroll; | 134 bool m_canScroll; |
| 135 int m_resendingPluginId; |
| 132 RailsMode m_railsMode; | 136 RailsMode m_railsMode; |
| 133 #if OS(MACOSX) | 137 #if OS(MACOSX) |
| 134 PlatformWheelEventPhase m_phase; | 138 PlatformWheelEventPhase m_phase; |
| 135 PlatformWheelEventPhase m_momentumPhase; | 139 PlatformWheelEventPhase m_momentumPhase; |
| 136 bool m_canRubberbandLeft; | 140 bool m_canRubberbandLeft; |
| 137 bool m_canRubberbandRight; | 141 bool m_canRubberbandRight; |
| 138 #endif | 142 #endif |
| 139 }; | 143 }; |
| 140 | 144 |
| 141 } // namespace blink | 145 } // namespace blink |
| 142 | 146 |
| 143 #endif // PlatformWheelEvent_h | 147 #endif // PlatformWheelEvent_h |
| OLD | NEW |