| 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 23 matching lines...) Expand all Loading... |
| 34 // These button numbers match the ones used in the DOM API, 0 through 2, except
for NoButton which isn't specified. | 34 // These button numbers match the ones used in the DOM API, 0 through 2, except
for NoButton which isn't specified. |
| 35 enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton }; | 35 enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton }; |
| 36 | 36 |
| 37 class PlatformMouseEvent : public PlatformEvent { | 37 class PlatformMouseEvent : public PlatformEvent { |
| 38 public: | 38 public: |
| 39 enum SyntheticEventType { | 39 enum SyntheticEventType { |
| 40 // Real mouse input events or synthetic events that behave just like rea
l events | 40 // Real mouse input events or synthetic events that behave just like rea
l events |
| 41 RealOrIndistinguishable, | 41 RealOrIndistinguishable, |
| 42 // Mouse events derived from touch input | 42 // Mouse events derived from touch input |
| 43 FromTouch, | 43 FromTouch, |
| 44 // Mouse events created from script or dispatched from script |
| 45 FromScript |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 PlatformMouseEvent() | 48 PlatformMouseEvent() |
| 47 : PlatformEvent(PlatformEvent::MouseMoved) | 49 : PlatformEvent(PlatformEvent::MouseMoved) |
| 48 , m_button(NoButton) | 50 , m_button(NoButton) |
| 49 , m_clickCount(0) | 51 , m_clickCount(0) |
| 50 , m_synthesized(RealOrIndistinguishable) | 52 , m_synthesized(RealOrIndistinguishable) |
| 51 { | 53 { |
| 52 } | 54 } |
| 53 | 55 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 IntPoint m_globalPosition; | 97 IntPoint m_globalPosition; |
| 96 IntPoint m_movementDelta; | 98 IntPoint m_movementDelta; |
| 97 MouseButton m_button; | 99 MouseButton m_button; |
| 98 int m_clickCount; | 100 int m_clickCount; |
| 99 SyntheticEventType m_synthesized; | 101 SyntheticEventType m_synthesized; |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 } // namespace blink | 104 } // namespace blink |
| 103 | 105 |
| 104 #endif // PlatformMouseEvent_h | 106 #endif // PlatformMouseEvent_h |
| OLD | NEW |