| 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 AURA_EVENT_H_ | 5 #ifndef AURA_EVENT_H_ |
| 6 #define AURA_EVENT_H_ | 6 #define AURA_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" |
| 11 #include "ui/base/events.h" | 11 #include "ui/base/events.h" |
| 12 #include "ui/base/keycodes/keyboard_codes.h" | 12 #include "ui/base/keycodes/keyboard_codes.h" |
| 13 #include "ui/gfx/point.h" | 13 #include "ui/gfx/point.h" |
| 14 | 14 |
| 15 #if defined(USE_X11) |
| 16 typedef union _XEvent XEvent; |
| 17 #endif |
| 18 |
| 15 namespace aura { | 19 namespace aura { |
| 16 | 20 |
| 17 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
| 18 typedef MSG NativeEvent; | 22 typedef MSG NativeEvent; |
| 19 #elif defined(USE_X11) | 23 #elif defined(USE_X11) |
| 20 typedef union _XEvent XEvent; | |
| 21 typedef XEvent* NativeEvent; | 24 typedef XEvent* NativeEvent; |
| 22 #endif | 25 #endif |
| 23 | 26 |
| 24 class Window; | 27 class Window; |
| 25 | 28 |
| 26 class Event { | 29 class Event { |
| 27 public: | 30 public: |
| 28 const NativeEvent& native_event() const { return native_event_; } | 31 const NativeEvent& native_event() const { return native_event_; } |
| 29 ui::EventType type() const { return type_; } | 32 ui::EventType type() const { return type_; } |
| 30 const base::Time& time_stamp() const { return time_stamp_; } | 33 const base::Time& time_stamp() const { return time_stamp_; } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 101 |
| 99 ui::KeyboardCode key_code() const { return key_code_; } | 102 ui::KeyboardCode key_code() const { return key_code_; } |
| 100 | 103 |
| 101 private: | 104 private: |
| 102 ui::KeyboardCode key_code_; | 105 ui::KeyboardCode key_code_; |
| 103 }; | 106 }; |
| 104 | 107 |
| 105 } // namespace aura | 108 } // namespace aura |
| 106 | 109 |
| 107 #endif // AURA_EVENT_H_ | 110 #endif // AURA_EVENT_H_ |
| OLD | NEW |