| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_EVENT_H_ | 5 #ifndef VIEWS_EVENT_H_ |
| 6 #define VIEWS_EVENT_H_ | 6 #define VIEWS_EVENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/keyboard_codes.h" | 9 #include "base/keyboard_codes.h" |
| 10 #include "gfx/point.h" | 10 #include "gfx/point.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ET_MOUSE_DRAGGED, | 39 ET_MOUSE_DRAGGED, |
| 40 ET_MOUSE_RELEASED, | 40 ET_MOUSE_RELEASED, |
| 41 ET_MOUSE_MOVED, | 41 ET_MOUSE_MOVED, |
| 42 ET_MOUSE_ENTERED, | 42 ET_MOUSE_ENTERED, |
| 43 ET_MOUSE_EXITED, | 43 ET_MOUSE_EXITED, |
| 44 ET_KEY_PRESSED, | 44 ET_KEY_PRESSED, |
| 45 ET_KEY_RELEASED, | 45 ET_KEY_RELEASED, |
| 46 ET_MOUSEWHEEL, | 46 ET_MOUSEWHEEL, |
| 47 ET_DROP_TARGET_EVENT }; | 47 ET_DROP_TARGET_EVENT }; |
| 48 | 48 |
| 49 // Event flags currently supported | 49 // Event flags currently supported. Although this is a "views" |
| 50 // file, this header is used on non-views platforms (e.g. OSX). For |
| 51 // example, these EventFlags are used by the automation provider for |
| 52 // all platforms. |
| 50 enum EventFlags { EF_SHIFT_DOWN = 1 << 0, | 53 enum EventFlags { EF_SHIFT_DOWN = 1 << 0, |
| 51 EF_CONTROL_DOWN = 1 << 1, | 54 EF_CONTROL_DOWN = 1 << 1, |
| 52 EF_ALT_DOWN = 1 << 2, | 55 EF_ALT_DOWN = 1 << 2, |
| 53 EF_LEFT_BUTTON_DOWN = 1 << 3, | 56 EF_LEFT_BUTTON_DOWN = 1 << 3, |
| 54 EF_MIDDLE_BUTTON_DOWN = 1 << 4, | 57 EF_MIDDLE_BUTTON_DOWN = 1 << 4, |
| 55 EF_RIGHT_BUTTON_DOWN = 1 << 5 }; | 58 EF_RIGHT_BUTTON_DOWN = 1 << 5, |
| 59 EF_COMMAND_DOWN = 1 << 6, // Only useful on OSX |
| 60 }; |
| 56 | 61 |
| 57 // Return the event type | 62 // Return the event type |
| 58 EventType GetType() const { | 63 EventType GetType() const { |
| 59 return type_; | 64 return type_; |
| 60 } | 65 } |
| 61 | 66 |
| 62 // Return the event time stamp in ticks | 67 // Return the event time stamp in ticks |
| 63 int GetTimeStamp() const { | 68 int GetTimeStamp() const { |
| 64 return time_stamp_; | 69 return time_stamp_; |
| 65 } | 70 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 private: | 339 private: |
| 335 const OSExchangeData& data_; | 340 const OSExchangeData& data_; |
| 336 int source_operations_; | 341 int source_operations_; |
| 337 | 342 |
| 338 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 343 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
| 339 }; | 344 }; |
| 340 | 345 |
| 341 } // namespace views | 346 } // namespace views |
| 342 | 347 |
| 343 #endif // VIEWS_EVENT_H_ | 348 #endif // VIEWS_EVENT_H_ |
| OLD | NEW |