| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_EVENTS_EVENT_H_ | 5 #ifndef VIEWS_EVENTS_EVENT_H_ |
| 6 #define VIEWS_EVENTS_EVENT_H_ | 6 #define VIEWS_EVENTS_EVENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 : native_event_(model.native_event()), | 102 : native_event_(model.native_event()), |
| 103 #if defined(TOOLKIT_USES_GTK) | 103 #if defined(TOOLKIT_USES_GTK) |
| 104 gdk_event_(model.gdk_event_), | 104 gdk_event_(model.gdk_event_), |
| 105 #endif | 105 #endif |
| 106 type_(model.type()), | 106 type_(model.type()), |
| 107 time_stamp_(model.time_stamp()), | 107 time_stamp_(model.time_stamp()), |
| 108 flags_(model.flags()) { | 108 flags_(model.flags()) { |
| 109 } | 109 } |
| 110 | 110 |
| 111 void set_type(ui::EventType type) { type_ = type; } | 111 void set_type(ui::EventType type) { type_ = type; } |
| 112 void set_time_stamp(base::Time time_stamp) { time_stamp_ = time_stamp; } |
| 112 | 113 |
| 113 private: | 114 private: |
| 114 void operator=(const Event&); | 115 void operator=(const Event&); |
| 115 | 116 |
| 116 NativeEvent native_event_; | 117 NativeEvent native_event_; |
| 117 #if defined(TOOLKIT_USES_GTK) | 118 #if defined(TOOLKIT_USES_GTK) |
| 118 GdkEvent* gdk_event_; | 119 GdkEvent* gdk_event_; |
| 119 #endif | 120 #endif |
| 120 ui::EventType type_; | 121 ui::EventType type_; |
| 121 base::Time time_stamp_; | 122 base::Time time_stamp_; |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 private: | 428 private: |
| 428 // Data associated with the drag/drop session. | 429 // Data associated with the drag/drop session. |
| 429 const ui::OSExchangeData& data_; | 430 const ui::OSExchangeData& data_; |
| 430 | 431 |
| 431 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. | 432 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
| 432 int source_operations_; | 433 int source_operations_; |
| 433 | 434 |
| 434 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 435 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
| 435 }; | 436 }; |
| 436 | 437 |
| 438 //////////////////////////////////////////////////////////////////////////////// |
| 439 // GestureEvent class |
| 440 // |
| 441 //////////////////////////////////////////////////////////////////////////////// |
| 442 class VIEWS_EXPORT GestureEvent : public LocatedEvent { |
| 443 public: |
| 444 GestureEvent(ui::EventType type, int x, int y, int flags, |
| 445 base::Time time_stamp, float delta_x, float delta_y); |
| 446 |
| 447 float delta_x() const { return delta_x_; } |
| 448 float delta_y() const { return delta_y_; } |
| 449 |
| 450 private: |
| 451 float delta_x_; |
| 452 float delta_y_; |
| 453 |
| 454 DISALLOW_COPY_AND_ASSIGN(GestureEvent); |
| 455 }; |
| 456 |
| 437 } // namespace views | 457 } // namespace views |
| 438 | 458 |
| 439 #endif // VIEWS_EVENTS_EVENT_H_ | 459 #endif // VIEWS_EVENTS_EVENT_H_ |
| OLD | NEW |