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 UI_AURA_EVENT_H_ | 5 #ifndef UI_AURA_EVENT_H_ |
6 #define UI_AURA_EVENT_H_ | 6 #define UI_AURA_EVENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 const float rotation_angle_; | 136 const float rotation_angle_; |
137 | 137 |
138 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0. | 138 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0. |
139 const float force_; | 139 const float force_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(TouchEvent); | 141 DISALLOW_COPY_AND_ASSIGN(TouchEvent); |
142 }; | 142 }; |
143 | 143 |
144 class AURA_EXPORT KeyEvent : public Event { | 144 class AURA_EXPORT KeyEvent : public Event { |
145 public: | 145 public: |
| 146 // TODO(yusukes): Remove |is_char| when IME support for Aura is submitted. |
146 KeyEvent(const base::NativeEvent& native_event, bool is_char); | 147 KeyEvent(const base::NativeEvent& native_event, bool is_char); |
147 | 148 |
148 // Used for synthetic events in testing. | 149 // Used for synthetic events in testing. |
149 KeyEvent(ui::EventType type, | 150 KeyEvent(ui::EventType type, |
150 ui::KeyboardCode key_code, | 151 ui::KeyboardCode key_code, |
151 int flags); | 152 int flags); |
152 | 153 |
153 // These setters allow an I18N virtual keyboard to fabricate a keyboard event | 154 // These setters allow an I18N virtual keyboard to fabricate a keyboard event |
154 // which does not have a corresponding ui::KeyboardCode (example: U+00E1 Latin | 155 // which does not have a corresponding ui::KeyboardCode (example: U+00E1 Latin |
155 // small letter A with acute, U+0410 Cyrillic capital letter A.) | 156 // small letter A with acute, U+0410 Cyrillic capital letter A.) |
(...skipping 20 matching lines...) Expand all Loading... |
176 // share the same type: ui::ET_KEY_PRESSED. | 177 // share the same type: ui::ET_KEY_PRESSED. |
177 bool is_char_; | 178 bool is_char_; |
178 | 179 |
179 uint16 character_; | 180 uint16 character_; |
180 uint16 unmodified_character_; | 181 uint16 unmodified_character_; |
181 }; | 182 }; |
182 | 183 |
183 } // namespace aura | 184 } // namespace aura |
184 | 185 |
185 #endif // UI_AURA_EVENT_H_ | 186 #endif // UI_AURA_EVENT_H_ |
OLD | NEW |