| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_resendingPluginId(-1) | 66 , m_resendingPluginId(-1) |
| 67 , m_railsMode(RailsModeFree) | 67 , m_railsMode(RailsModeFree) |
| 68 , m_dispatchType(Blocking) | 68 , m_dispatchType(Blocking) |
| 69 #if OS(MACOSX) | 69 #if OS(MACOSX) |
| 70 , m_phase(PlatformWheelEventPhaseNone) | 70 , m_phase(PlatformWheelEventPhaseNone) |
| 71 , m_momentumPhase(PlatformWheelEventPhaseNone) | 71 , m_momentumPhase(PlatformWheelEventPhaseNone) |
| 72 , m_canRubberbandLeft(true) | |
| 73 , m_canRubberbandRight(true) | |
| 74 #endif | 72 #endif |
| 75 { | 73 { |
| 76 } | 74 } |
| 77 | 75 |
| 78 const IntPoint& position() const { return m_position; } // PlatformWindow co
ordinates. | 76 const IntPoint& position() const { return m_position; } // PlatformWindow co
ordinates. |
| 79 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree
n coordinates. | 77 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree
n coordinates. |
| 80 | 78 |
| 81 float deltaX() const { return m_deltaX; } | 79 float deltaX() const { return m_deltaX; } |
| 82 float deltaY() const { return m_deltaY; } | 80 float deltaY() const { return m_deltaY; } |
| 83 | 81 |
| 84 float wheelTicksX() const { return m_wheelTicksX; } | 82 float wheelTicksX() const { return m_wheelTicksX; } |
| 85 float wheelTicksY() const { return m_wheelTicksY; } | 83 float wheelTicksY() const { return m_wheelTicksY; } |
| 86 | 84 |
| 87 PlatformWheelEventGranularity granularity() const { return m_granularity; } | 85 PlatformWheelEventGranularity granularity() const { return m_granularity; } |
| 88 | 86 |
| 89 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} | 87 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} |
| 90 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} | 88 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} |
| 91 int resendingPluginId() const { return m_resendingPluginId; } | 89 int resendingPluginId() const { return m_resendingPluginId; } |
| 92 RailsMode getRailsMode() const { return m_railsMode; } | 90 RailsMode getRailsMode() const { return m_railsMode; } |
| 93 DispatchType dispatchType() const { return m_dispatchType; } | 91 DispatchType dispatchType() const { return m_dispatchType; } |
| 94 bool cancelable() const { return m_dispatchType == PlatformEvent::Blocking;
} | 92 bool cancelable() const { return m_dispatchType == PlatformEvent::Blocking;
} |
| 95 #if OS(MACOSX) | 93 #if OS(MACOSX) |
| 96 PlatformWheelEventPhase phase() const { return m_phase; } | 94 PlatformWheelEventPhase phase() const { return m_phase; } |
| 97 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } | 95 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } |
| 98 bool canRubberbandLeft() const { return m_canRubberbandLeft; } | |
| 99 bool canRubberbandRight() const { return m_canRubberbandRight; } | |
| 100 #endif | 96 #endif |
| 101 | 97 |
| 102 protected: | 98 protected: |
| 103 IntPoint m_position; | 99 IntPoint m_position; |
| 104 IntPoint m_globalPosition; | 100 IntPoint m_globalPosition; |
| 105 float m_deltaX; | 101 float m_deltaX; |
| 106 float m_deltaY; | 102 float m_deltaY; |
| 107 float m_wheelTicksX; | 103 float m_wheelTicksX; |
| 108 float m_wheelTicksY; | 104 float m_wheelTicksY; |
| 109 PlatformWheelEventGranularity m_granularity; | 105 PlatformWheelEventGranularity m_granularity; |
| 110 bool m_hasPreciseScrollingDeltas; | 106 bool m_hasPreciseScrollingDeltas; |
| 111 int m_resendingPluginId; | 107 int m_resendingPluginId; |
| 112 RailsMode m_railsMode; | 108 RailsMode m_railsMode; |
| 113 DispatchType m_dispatchType; | 109 DispatchType m_dispatchType; |
| 114 #if OS(MACOSX) | 110 #if OS(MACOSX) |
| 115 PlatformWheelEventPhase m_phase; | 111 PlatformWheelEventPhase m_phase; |
| 116 PlatformWheelEventPhase m_momentumPhase; | 112 PlatformWheelEventPhase m_momentumPhase; |
| 117 bool m_canRubberbandLeft; | |
| 118 bool m_canRubberbandRight; | |
| 119 #endif | 113 #endif |
| 120 }; | 114 }; |
| 121 | 115 |
| 122 } // namespace blink | 116 } // namespace blink |
| 123 | 117 |
| 124 #endif // PlatformWheelEvent_h | 118 #endif // PlatformWheelEvent_h |
| OLD | NEW |