OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // is compatible and sufficient for that expected by gestures of |type|. | 38 // is compatible and sufficient for that expected by gestures of |type|. |
39 GestureEventDetails(EventType type, const GestureEventDetails& other); | 39 GestureEventDetails(EventType type, const GestureEventDetails& other); |
40 | 40 |
41 EventType type() const { return type_; } | 41 EventType type() const { return type_; } |
42 | 42 |
43 GestureDeviceType device_type() const { return device_type_; } | 43 GestureDeviceType device_type() const { return device_type_; } |
44 void set_device_type(GestureDeviceType device_type) { | 44 void set_device_type(GestureDeviceType device_type) { |
45 device_type_ = device_type; | 45 device_type_ = device_type; |
46 } | 46 } |
47 | 47 |
48 bool is_source_touch_event_set_non_blocking() const { | |
49 return is_source_touch_event_set_non_blocking_; | |
50 } | |
51 void set_is_source_touch_event_set_non_blocking( | |
52 bool is_source_touch_event_set_non_blocking) { | |
53 is_source_touch_event_set_non_blocking_ = | |
54 is_source_touch_event_set_non_blocking; | |
55 } | |
56 | |
57 int touch_points() const { return touch_points_; } | 48 int touch_points() const { return touch_points_; } |
58 void set_touch_points(int touch_points) { | 49 void set_touch_points(int touch_points) { |
59 DCHECK_GT(touch_points, 0); | 50 DCHECK_GT(touch_points, 0); |
60 touch_points_ = touch_points; | 51 touch_points_ = touch_points; |
61 } | 52 } |
62 | 53 |
63 const gfx::Rect bounding_box() const { | 54 const gfx::Rect bounding_box() const { |
64 return ToEnclosingRect(bounding_box_); | 55 return ToEnclosingRect(bounding_box_); |
65 } | 56 } |
66 | 57 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 bool down; | 218 bool down; |
228 } swipe; | 219 } swipe; |
229 | 220 |
230 // Tap information must be set for ET_GESTURE_TAP, | 221 // Tap information must be set for ET_GESTURE_TAP, |
231 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. | 222 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. |
232 int tap_count; // TAP repeat count. | 223 int tap_count; // TAP repeat count. |
233 } data_; | 224 } data_; |
234 | 225 |
235 GestureDeviceType device_type_; | 226 GestureDeviceType device_type_; |
236 | 227 |
237 bool is_source_touch_event_set_non_blocking_ = false; | |
238 | |
239 int touch_points_; // Number of active touch points in the gesture. | 228 int touch_points_; // Number of active touch points in the gesture. |
240 | 229 |
241 // Bounding box is an axis-aligned rectangle that contains all the | 230 // Bounding box is an axis-aligned rectangle that contains all the |
242 // enclosing rectangles of the touch-points in the gesture. | 231 // enclosing rectangles of the touch-points in the gesture. |
243 gfx::RectF bounding_box_; | 232 gfx::RectF bounding_box_; |
244 }; | 233 }; |
245 | 234 |
246 } // namespace ui | 235 } // namespace ui |
247 | 236 |
248 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 237 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
OLD | NEW |