OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 WebPointerEvent_h | |
6 #define WebPointerEvent_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 // WebPointerEvent | |
use mustaq_at_chromium.org
2017/05/08 17:07:30
Please add a detailed note here to clarify that th
Navid Zolghadr
2017/06/08 16:38:26
Done.
| |
16 // -------------------------------------------------------------- | |
17 | |
18 class WebPointerEvent : public WebInputEvent, public WebPointerProperties { | |
19 public: | |
20 WebPointerEvent(PointerAction action, | |
21 WebFloatPoint screen_position, | |
22 WebFloatPoint position, | |
23 float width, | |
24 float height) | |
25 : WebInputEvent(sizeof(WebPointerEvent)), | |
26 action(action), | |
27 screen_position(screen_position), | |
28 position(position), | |
29 width(width), | |
30 height(height) {} | |
31 | |
32 PointerAction action; | |
33 | |
34 WebFloatPoint screen_position; | |
use mustaq_at_chromium.org
2017/05/08 17:07:30
Let's use the coordinate names as in WebMouseEvent
Navid Zolghadr
2017/06/08 16:38:26
Removed completely as your CL makes this unnecessa
| |
35 WebFloatPoint position; | |
36 | |
37 float width; | |
38 float height; | |
39 | |
40 // ------------ Touch Point Specific ------------ | |
41 | |
42 float rotation_angle; | |
43 | |
44 // ------------ Touch Event Specific ------------ | |
45 | |
46 // Whether the event is blocking, non-blocking, all event | |
47 // listeners were passive or was forced to be non-blocking. | |
48 DispatchType dispatch_type; | |
49 | |
50 // For a single touch, this is true after the touch-point has moved beyond | |
51 // the platform slop region. For a multitouch, this is true after any | |
52 // touch-point has moved (by whatever amount). | |
53 bool moved_beyond_slop_region; | |
54 | |
55 // Whether this touch event is a touchstart or a first touchmove event per | |
56 // scroll. | |
57 bool touch_start_or_first_touch_move; | |
58 | |
59 #if INSIDE_BLINK | |
60 bool IsCancelable() const { return dispatch_type == kBlocking; } | |
61 #endif | |
62 }; | |
63 | |
64 #pragma pack(pop) | |
65 | |
66 } // namespace blink | |
67 | |
68 #endif // WebMouseEvent_h | |
OLD | NEW |