OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "views/event.h" | 5 #include "views/event.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 namespace views { | 9 namespace views { |
10 | 10 |
11 KeyEvent::KeyEvent(EventType type, app::KeyboardCode key_code, | 11 KeyEvent::KeyEvent(EventType type, ui::KeyboardCode key_code, |
12 int event_flags, int repeat_count, int message_flags, | 12 int event_flags, int repeat_count, int message_flags, |
13 UINT message) | 13 UINT message) |
14 : Event(type, event_flags), | 14 : Event(type, event_flags), |
15 key_code_(key_code), | 15 key_code_(key_code), |
16 repeat_count_(repeat_count), | 16 repeat_count_(repeat_count), |
17 message_flags_(message_flags), | 17 message_flags_(message_flags), |
18 message_(message) { | 18 message_(message) { |
19 } | 19 } |
20 | 20 |
21 int Event::GetWindowsFlags() const { | 21 int Event::GetWindowsFlags() const { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 if (GetKeyState(VK_CONTROL) & 0x80) | 60 if (GetKeyState(VK_CONTROL) & 0x80) |
61 flags |= Event::EF_CONTROL_DOWN; | 61 flags |= Event::EF_CONTROL_DOWN; |
62 return flags; | 62 return flags; |
63 } | 63 } |
64 | 64 |
65 bool KeyEvent::IsExtendedKey() const { | 65 bool KeyEvent::IsExtendedKey() const { |
66 return (message_flags_ & KF_EXTENDED) == KF_EXTENDED; | 66 return (message_flags_ & KF_EXTENDED) == KF_EXTENDED; |
67 } | 67 } |
68 | 68 |
69 } // namespace views | 69 } // namespace views |
OLD | NEW |