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