| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 float deltaX() const { return m_deltaX; } | 97 float deltaX() const { return m_deltaX; } |
| 98 float deltaY() const { return m_deltaY; } | 98 float deltaY() const { return m_deltaY; } |
| 99 | 99 |
| 100 float wheelTicksX() const { return m_wheelTicksX; } | 100 float wheelTicksX() const { return m_wheelTicksX; } |
| 101 float wheelTicksY() const { return m_wheelTicksY; } | 101 float wheelTicksY() const { return m_wheelTicksY; } |
| 102 | 102 |
| 103 PlatformWheelEventGranularity granularity() const { return m_granularity; } | 103 PlatformWheelEventGranularity granularity() const { return m_granularity; } |
| 104 | 104 |
| 105 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} | 105 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas;
} |
| 106 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} | 106 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b;
} |
| 107 |
| 108 unsigned short buttons() const |
| 109 { |
| 110 unsigned short value = 0; |
| 111 |
| 112 if (m_modifiers & LeftButtonDown) |
| 113 value |= 1; |
| 114 if (m_modifiers & RightButtonDown) |
| 115 value |= 2; |
| 116 if (m_modifiers & MiddleButtonDown) |
| 117 value |= 4; |
| 118 |
| 119 return value; |
| 120 } |
| 107 #if OS(MACOSX) | 121 #if OS(MACOSX) |
| 108 PlatformWheelEventPhase phase() const { return m_phase; } | 122 PlatformWheelEventPhase phase() const { return m_phase; } |
| 109 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } | 123 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } |
| 110 bool useLatchedEventNode() const { return m_momentumPhase == PlatformWheelEv
entPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; } | 124 bool useLatchedEventNode() const { return m_momentumPhase == PlatformWheelEv
entPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; } |
| 111 bool canRubberbandLeft() const { return m_canRubberbandLeft; } | 125 bool canRubberbandLeft() const { return m_canRubberbandLeft; } |
| 112 bool canRubberbandRight() const { return m_canRubberbandRight; } | 126 bool canRubberbandRight() const { return m_canRubberbandRight; } |
| 113 #else | 127 #else |
| 114 bool useLatchedEventNode() const { return false; } | 128 bool useLatchedEventNode() const { return false; } |
| 115 #endif | 129 #endif |
| 116 | 130 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 127 PlatformWheelEventPhase m_phase; | 141 PlatformWheelEventPhase m_phase; |
| 128 PlatformWheelEventPhase m_momentumPhase; | 142 PlatformWheelEventPhase m_momentumPhase; |
| 129 bool m_canRubberbandLeft; | 143 bool m_canRubberbandLeft; |
| 130 bool m_canRubberbandRight; | 144 bool m_canRubberbandRight; |
| 131 #endif | 145 #endif |
| 132 }; | 146 }; |
| 133 | 147 |
| 134 } // namespace blink | 148 } // namespace blink |
| 135 | 149 |
| 136 #endif // PlatformWheelEvent_h | 150 #endif // PlatformWheelEvent_h |
| OLD | NEW |