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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 base::TimeDelta time_stamp, | 466 base::TimeDelta time_stamp, |
467 int flags, | 467 int flags, |
468 int changed_button_flags); | 468 int changed_button_flags); |
469 | 469 |
470 // The amount to scroll. This is in multiples of kWheelDelta. | 470 // The amount to scroll. This is in multiples of kWheelDelta. |
471 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up. | 471 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up. |
472 int x_offset() const { return offset_.x(); } | 472 int x_offset() const { return offset_.x(); } |
473 int y_offset() const { return offset_.y(); } | 473 int y_offset() const { return offset_.y(); } |
474 const gfx::Vector2d& offset() const { return offset_; } | 474 const gfx::Vector2d& offset() const { return offset_; } |
475 | 475 |
476 // Overridden from LocatedEvent. | |
477 void UpdateForRootTransform( | |
478 const gfx::Transform& inverted_root_transform) override; | |
479 | |
480 private: | 476 private: |
481 gfx::Vector2d offset_; | 477 gfx::Vector2d offset_; |
482 }; | 478 }; |
483 | 479 |
484 class EVENTS_EXPORT TouchEvent : public LocatedEvent { | 480 class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
485 public: | 481 public: |
486 explicit TouchEvent(const base::NativeEvent& native_event); | 482 explicit TouchEvent(const base::NativeEvent& native_event); |
487 | 483 |
488 // Create a new TouchEvent which is identical to the provided model. | 484 // Create a new TouchEvent which is identical to the provided model. |
489 // If source / target windows are provided, the model location will be | 485 // If source / target windows are provided, the model location will be |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 | 879 |
884 const GestureEventDetails& details() const { return details_; } | 880 const GestureEventDetails& details() const { return details_; } |
885 | 881 |
886 private: | 882 private: |
887 GestureEventDetails details_; | 883 GestureEventDetails details_; |
888 }; | 884 }; |
889 | 885 |
890 } // namespace ui | 886 } // namespace ui |
891 | 887 |
892 #endif // UI_EVENTS_EVENT_H_ | 888 #endif // UI_EVENTS_EVENT_H_ |
OLD | NEW |