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/gfx/point.h" | 9 #include "base/gfx/point.h" |
10 | 10 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // A key event is used for any input event related to the keyboard. | 237 // A key event is used for any input event related to the keyboard. |
238 // Note: this event is about key pressed, not typed characters. | 238 // Note: this event is about key pressed, not typed characters. |
239 // | 239 // |
240 //////////////////////////////////////////////////////////////////////////////// | 240 //////////////////////////////////////////////////////////////////////////////// |
241 class KeyEvent : public Event { | 241 class KeyEvent : public Event { |
242 public: | 242 public: |
243 #if defined(OS_WIN) | 243 #if defined(OS_WIN) |
244 // Create a new key event | 244 // Create a new key event |
245 KeyEvent(EventType type, int ch, int repeat_count, int message_flags); | 245 KeyEvent(EventType type, int ch, int repeat_count, int message_flags); |
246 #elif defined(OS_LINUX) | 246 #elif defined(OS_LINUX) |
247 KeyEvent(GdkEventKey* event, bool make_lower_case); | 247 explicit KeyEvent(GdkEventKey* event); |
248 #endif | 248 #endif |
249 | 249 |
| 250 // This returns a VKEY_ value as defined in base/keyboard_codes.h which is |
| 251 // the Windows value. |
| 252 // On GTK, you can use the methods in keyboard_code_conversion_gtk.cc to |
| 253 // convert this value back to a GDK value if needed. |
250 int GetCharacter() const { | 254 int GetCharacter() const { |
251 return character_; | 255 return character_; |
252 } | 256 } |
253 | 257 |
254 #if defined(OS_WIN) | 258 #if defined(OS_WIN) |
255 bool IsExtendedKey() const; | 259 bool IsExtendedKey() const; |
256 #endif | 260 #endif |
257 | 261 |
258 int GetRepeatCount() const { | 262 int GetRepeatCount() const { |
259 return repeat_count_; | 263 return repeat_count_; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 private: | 328 private: |
325 const OSExchangeData& data_; | 329 const OSExchangeData& data_; |
326 int source_operations_; | 330 int source_operations_; |
327 | 331 |
328 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 332 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
329 }; | 333 }; |
330 | 334 |
331 } // namespace views | 335 } // namespace views |
332 | 336 |
333 #endif // VIEWS_EVENT_H_ | 337 #endif // VIEWS_EVENT_H_ |
OLD | NEW |