| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EVENT_H_ | 5 #ifndef UI_EVENTS_EVENT_H_ |
| 6 #define UI_EVENTS_EVENT_H_ | 6 #define UI_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 float angle, | 511 float angle, |
| 512 float force); | 512 float force); |
| 513 | 513 |
| 514 TouchEvent(const TouchEvent& copy); | 514 TouchEvent(const TouchEvent& copy); |
| 515 | 515 |
| 516 ~TouchEvent() override; | 516 ~TouchEvent() override; |
| 517 | 517 |
| 518 // The id of the pointer this event modifies. | 518 // The id of the pointer this event modifies. |
| 519 int touch_id() const { return touch_id_; } | 519 int touch_id() const { return touch_id_; } |
| 520 // A unique identifier for this event. | 520 // A unique identifier for this event. |
| 521 uint64 unique_event_id() const { return unique_event_id_; } | 521 uint32 unique_event_id() const { return unique_event_id_; } |
| 522 // If we aren't provided with a radius on one axis, use the | 522 // If we aren't provided with a radius on one axis, use the |
| 523 // information from the other axis. | 523 // information from the other axis. |
| 524 float radius_x() const { return radius_x_ > 0 ? radius_x_ : radius_y_; } | 524 float radius_x() const { return radius_x_ > 0 ? radius_x_ : radius_y_; } |
| 525 float radius_y() const { return radius_y_ > 0 ? radius_y_ : radius_x_; } | 525 float radius_y() const { return radius_y_ > 0 ? radius_y_ : radius_x_; } |
| 526 float rotation_angle() const { return rotation_angle_; } | 526 float rotation_angle() const { return rotation_angle_; } |
| 527 float force() const { return force_; } | 527 float force() const { return force_; } |
| 528 | 528 |
| 529 void set_may_cause_scrolling(bool causes) { may_cause_scrolling_ = causes; } | 529 void set_may_cause_scrolling(bool causes) { may_cause_scrolling_ = causes; } |
| 530 bool may_cause_scrolling() const { return may_cause_scrolling_; } | 530 bool may_cause_scrolling() const { return may_cause_scrolling_; } |
| 531 | 531 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 551 | 551 |
| 552 private: | 552 private: |
| 553 // Adjusts rotation_angle_ to within the acceptable range. | 553 // Adjusts rotation_angle_ to within the acceptable range. |
| 554 void FixRotationAngle(); | 554 void FixRotationAngle(); |
| 555 | 555 |
| 556 // The identity (typically finger) of the touch starting at 0 and incrementing | 556 // The identity (typically finger) of the touch starting at 0 and incrementing |
| 557 // for each separable additional touch that the hardware can detect. | 557 // for each separable additional touch that the hardware can detect. |
| 558 const int touch_id_; | 558 const int touch_id_; |
| 559 | 559 |
| 560 // A unique identifier for the touch event. | 560 // A unique identifier for the touch event. |
| 561 const uint64 unique_event_id_; | 561 const uint32 unique_event_id_; |
| 562 | 562 |
| 563 // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. | 563 // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. |
| 564 float radius_x_; | 564 float radius_x_; |
| 565 | 565 |
| 566 // Radius of the Y (minor) axis of the touch ellipse. 0.0 if unknown. | 566 // Radius of the Y (minor) axis of the touch ellipse. 0.0 if unknown. |
| 567 float radius_y_; | 567 float radius_y_; |
| 568 | 568 |
| 569 // Clockwise angle (in degrees) of the major axis from the X axis. Must be | 569 // Clockwise angle (in degrees) of the major axis from the X axis. Must be |
| 570 // less than 180 and non-negative. | 570 // less than 180 and non-negative. |
| 571 float rotation_angle_; | 571 float rotation_angle_; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 879 |
| 880 const GestureEventDetails& details() const { return details_; } | 880 const GestureEventDetails& details() const { return details_; } |
| 881 | 881 |
| 882 private: | 882 private: |
| 883 GestureEventDetails details_; | 883 GestureEventDetails details_; |
| 884 }; | 884 }; |
| 885 | 885 |
| 886 } // namespace ui | 886 } // namespace ui |
| 887 | 887 |
| 888 #endif // UI_EVENTS_EVENT_H_ | 888 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |