OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebMouseEvent_h |
| 6 #define WebMouseEvent_h |
| 7 |
| 8 #include "WebInputEvent.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // See WebInputEvent.h for details why this pack is here. |
| 13 #pragma pack(push, 4) |
| 14 |
| 15 // WebMouseEvent -------------------------------------------------------------- |
| 16 |
| 17 class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| 18 public: |
| 19 // Renderer coordinates. Similar to viewport coordinates but without |
| 20 // DevTools emulation transform or overscroll applied. i.e. the coordinates |
| 21 // in Chromium's RenderView bounds. |
| 22 int x; |
| 23 int y; |
| 24 |
| 25 // DEPRECATED (crbug.com/507787) |
| 26 int windowX; |
| 27 int windowY; |
| 28 |
| 29 // Screen coordinate |
| 30 int globalX; |
| 31 int globalY; |
| 32 |
| 33 int movementX; |
| 34 int movementY; |
| 35 int clickCount; |
| 36 |
| 37 WebMouseEvent(Type type, int modifiers, double timeStampSeconds) |
| 38 : WebInputEvent(sizeof(WebMouseEvent), type, modifiers, timeStampSeconds), |
| 39 WebPointerProperties() {} |
| 40 |
| 41 WebMouseEvent() |
| 42 : WebInputEvent(sizeof(WebMouseEvent)), WebPointerProperties() {} |
| 43 |
| 44 #if INSIDE_BLINK |
| 45 BLINK_PLATFORM_EXPORT WebFloatPoint movementInRootFrame() const; |
| 46 BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const; |
| 47 #endif |
| 48 |
| 49 protected: |
| 50 explicit WebMouseEvent(unsigned sizeParam) |
| 51 : WebInputEvent(sizeParam), WebPointerProperties() {} |
| 52 |
| 53 WebMouseEvent(unsigned sizeParam, |
| 54 Type type, |
| 55 int modifiers, |
| 56 double timeStampSeconds) |
| 57 : WebInputEvent(sizeParam, type, modifiers, timeStampSeconds), |
| 58 WebPointerProperties() {} |
| 59 |
| 60 void flattenTransformSelf(); |
| 61 }; |
| 62 |
| 63 #pragma pack(pop) |
| 64 |
| 65 } // namespace blink |
| 66 |
| 67 #endif // WebMouseEvent_h |
OLD | NEW |