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