| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 PlatformMouseEvent() | 51 PlatformMouseEvent() |
| 52 : PlatformEvent(PlatformEvent::MouseMoved) | 52 : PlatformEvent(PlatformEvent::MouseMoved) |
| 53 , m_button(NoButton) | 53 , m_button(NoButton) |
| 54 , m_clickCount(0) | 54 , m_clickCount(0) |
| 55 , m_synthesized(RealOrIndistinguishable) | 55 , m_synthesized(RealOrIndistinguishable) |
| 56 { | 56 { |
| 57 } | 57 } |
| 58 | 58 |
| 59 PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition,
MouseButton button, PlatformEvent::Type type, int clickCount, Modifiers modifie
rs, double timestamp) | 59 PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition,
MouseButton button, EventType type, int clickCount, Modifiers modifiers, double
timestamp) |
| 60 : PlatformEvent(type, modifiers, timestamp) | 60 : PlatformEvent(type, modifiers, timestamp) |
| 61 , m_position(position) | 61 , m_position(position) |
| 62 , m_globalPosition(globalPosition) | 62 , m_globalPosition(globalPosition) |
| 63 , m_button(button) | 63 , m_button(button) |
| 64 , m_clickCount(clickCount) | 64 , m_clickCount(clickCount) |
| 65 , m_synthesized(RealOrIndistinguishable) | 65 , m_synthesized(RealOrIndistinguishable) |
| 66 { | 66 { |
| 67 } | 67 } |
| 68 | 68 |
| 69 PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition,
MouseButton button, PlatformEvent::Type type, int clickCount, Modifiers modifie
rs, SyntheticEventType synthesized, double timestamp, WebPointerProperties::Poin
terType pointerType = WebPointerProperties::PointerType::Unknown) | 69 PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition,
MouseButton button, EventType type, int clickCount, Modifiers modifiers, Synthe
ticEventType synthesized, double timestamp, WebPointerProperties::PointerType po
interType = WebPointerProperties::PointerType::Unknown) |
| 70 : PlatformEvent(type, modifiers, timestamp) | 70 : PlatformEvent(type, modifiers, timestamp) |
| 71 , m_position(position) | 71 , m_position(position) |
| 72 , m_globalPosition(globalPosition) | 72 , m_globalPosition(globalPosition) |
| 73 , m_button(button) | 73 , m_button(button) |
| 74 , m_clickCount(clickCount) | 74 , m_clickCount(clickCount) |
| 75 , m_synthesized(synthesized) | 75 , m_synthesized(synthesized) |
| 76 { | 76 { |
| 77 m_pointerProperties.pointerType = pointerType; | 77 m_pointerProperties.pointerType = pointerType; |
| 78 } | 78 } |
| 79 | 79 |
| 80 const WebPointerProperties& pointerProperties() const { return m_pointerProp
erties; } | 80 const WebPointerProperties& pointerProperties() const { return m_pointerProp
erties; } |
| 81 const IntPoint& position() const { return m_position; } | 81 const IntPoint& position() const { return m_position; } |
| 82 const IntPoint& globalPosition() const { return m_globalPosition; } | 82 const IntPoint& globalPosition() const { return m_globalPosition; } |
| 83 const IntPoint& movementDelta() const { return m_movementDelta; } | 83 const IntPoint& movementDelta() const { return m_movementDelta; } |
| 84 | 84 |
| 85 MouseButton button() const { return m_button; } | 85 MouseButton button() const { return m_button; } |
| 86 int clickCount() const { return m_clickCount; } | 86 int clickCount() const { return m_clickCount; } |
| 87 bool fromTouch() const { return m_synthesized == FromTouch; } | 87 bool fromTouch() const { return m_synthesized == FromTouch; } |
| 88 SyntheticEventType syntheticEventType() const { return m_synthesized; } | 88 SyntheticEventType getSyntheticEventType() const { return m_synthesized; } |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 WebPointerProperties m_pointerProperties; | 91 WebPointerProperties m_pointerProperties; |
| 92 | 92 |
| 93 // In local root frame coordinates. (Except possibly if the Widget under | 93 // In local root frame coordinates. (Except possibly if the Widget under |
| 94 // the mouse is a popup, see FIXME in PlatformMouseEventBuilder). | 94 // the mouse is a popup, see FIXME in PlatformMouseEventBuilder). |
| 95 IntPoint m_position; | 95 IntPoint m_position; |
| 96 | 96 |
| 97 // In screen coordinates. | 97 // In screen coordinates. |
| 98 IntPoint m_globalPosition; | 98 IntPoint m_globalPosition; |
| 99 | 99 |
| 100 IntPoint m_movementDelta; | 100 IntPoint m_movementDelta; |
| 101 MouseButton m_button; | 101 MouseButton m_button; |
| 102 int m_clickCount; | 102 int m_clickCount; |
| 103 SyntheticEventType m_synthesized; | 103 SyntheticEventType m_synthesized; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| 107 | 107 |
| 108 #endif // PlatformMouseEvent_h | 108 #endif // PlatformMouseEvent_h |
| OLD | NEW |