| 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_BASE_EVENTS_EVENT_H_ | 5 #ifndef UI_BASE_EVENTS_EVENT_H_ |
| 6 #define UI_BASE_EVENTS_EVENT_H_ | 6 #define UI_BASE_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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 private: | 198 private: |
| 199 TestApi(); | 199 TestApi(); |
| 200 LocatedEvent* located_event_; | 200 LocatedEvent* located_event_; |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 virtual ~LocatedEvent(); | 203 virtual ~LocatedEvent(); |
| 204 | 204 |
| 205 int x() const { return location_.x(); } | 205 int x() const { return location_.x(); } |
| 206 int y() const { return location_.y(); } | 206 int y() const { return location_.y(); } |
| 207 void set_location(const gfx::Point& location) { location_ = location; } |
| 207 gfx::Point location() const { return location_; } | 208 gfx::Point location() const { return location_; } |
| 209 void set_root_location(const gfx::Point& root_location) { |
| 210 root_location_ = root_location; |
| 211 } |
| 208 gfx::Point root_location() const { return root_location_; } | 212 gfx::Point root_location() const { return root_location_; } |
| 209 | 213 |
| 210 bool valid_system_location() const { return valid_system_location_; } | 214 bool valid_system_location() const { return valid_system_location_; } |
| 211 void set_system_location(const gfx::Point& loc) { | 215 void set_system_location(const gfx::Point& loc) { |
| 212 valid_system_location_ = true; | 216 valid_system_location_ = true; |
| 213 system_location_ = loc; | 217 system_location_ = loc; |
| 214 } | 218 } |
| 215 const gfx::Point& system_location() const { return system_location_; } | 219 const gfx::Point& system_location() const { return system_location_; } |
| 216 | 220 |
| 217 // Applies |root_transform| to the event. | 221 // Applies |root_transform| to the event. |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // This value is stored as a bitfield because the number of touch ids varies, | 633 // This value is stored as a bitfield because the number of touch ids varies, |
| 630 // but we currently don't need more than 32 touches at a time. | 634 // but we currently don't need more than 32 touches at a time. |
| 631 const unsigned int touch_ids_bitfield_; | 635 const unsigned int touch_ids_bitfield_; |
| 632 | 636 |
| 633 DISALLOW_COPY_AND_ASSIGN(GestureEvent); | 637 DISALLOW_COPY_AND_ASSIGN(GestureEvent); |
| 634 }; | 638 }; |
| 635 | 639 |
| 636 } // namespace ui | 640 } // namespace ui |
| 637 | 641 |
| 638 #endif // UI_BASE_EVENTS_EVENT_H_ | 642 #endif // UI_BASE_EVENTS_EVENT_H_ |
| OLD | NEW |