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 | |
46 }; | 44 }; |
47 | 45 |
48 PlatformMouseEvent() | 46 PlatformMouseEvent() |
49 : PlatformEvent(PlatformEvent::MouseMoved) | 47 : PlatformEvent(PlatformEvent::MouseMoved) |
50 , m_button(NoButton) | 48 , m_button(NoButton) |
51 , m_clickCount(0) | 49 , m_clickCount(0) |
52 , m_synthesized(RealOrIndistinguishable) | 50 , m_synthesized(RealOrIndistinguishable) |
53 { | 51 { |
54 } | 52 } |
55 | 53 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 IntPoint m_globalPosition; | 95 IntPoint m_globalPosition; |
98 IntPoint m_movementDelta; | 96 IntPoint m_movementDelta; |
99 MouseButton m_button; | 97 MouseButton m_button; |
100 int m_clickCount; | 98 int m_clickCount; |
101 SyntheticEventType m_synthesized; | 99 SyntheticEventType m_synthesized; |
102 }; | 100 }; |
103 | 101 |
104 } // namespace blink | 102 } // namespace blink |
105 | 103 |
106 #endif // PlatformMouseEvent_h | 104 #endif // PlatformMouseEvent_h |
OLD | NEW |