OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EVENTS_EVENT_UTILS_H_ | 5 #ifndef UI_EVENTS_EVENT_UTILS_H_ |
6 #define UI_EVENTS_EVENT_UTILS_H_ | 6 #define UI_EVENTS_EVENT_UTILS_H_ |
7 | 7 |
8 #include "base/event_types.h" | 8 #include "base/event_types.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/keycodes/keyboard_codes.h" | 10 #include "ui/events/keycodes/keyboard_codes.h" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 class TimeDelta; | 25 class TimeDelta; |
26 } | 26 } |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
29 | 29 |
30 class Event; | 30 class Event; |
31 | 31 |
32 // Updates the list of devices for cached properties. | 32 // Updates the list of devices for cached properties. |
33 EVENTS_EXPORT void UpdateDeviceList(); | 33 EVENTS_EXPORT void UpdateDeviceList(); |
34 | 34 |
35 // Returns a ui::Event wrapping a native event. Ownership of the returned value | |
36 // is transferred to the caller. | |
37 EVENTS_EXPORT Event* EventFromNative(const base::NativeEvent& native_event); | |
sadrul
2014/05/14 03:23:10
Return a scoped_ptr<>
flackr
2014/05/15 21:12:57
Done.
| |
38 | |
35 // Get the EventType from a native event. | 39 // Get the EventType from a native event. |
36 EVENTS_EXPORT EventType EventTypeFromNative( | 40 EVENTS_EXPORT EventType EventTypeFromNative( |
37 const base::NativeEvent& native_event); | 41 const base::NativeEvent& native_event); |
38 | 42 |
39 // Get the EventFlags from a native event. | 43 // Get the EventFlags from a native event. |
40 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); | 44 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); |
41 | 45 |
42 // Get the timestamp from a native event. | 46 // Get the timestamp from a native event. |
43 EVENTS_EXPORT base::TimeDelta EventTimeFromNative( | 47 EVENTS_EXPORT base::TimeDelta EventTimeFromNative( |
44 const base::NativeEvent& native_event); | 48 const base::NativeEvent& native_event); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); | 160 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); |
157 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); | 161 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); |
158 #endif | 162 #endif |
159 | 163 |
160 // Registers a custom event type. | 164 // Registers a custom event type. |
161 EVENTS_EXPORT int RegisterCustomEventType(); | 165 EVENTS_EXPORT int RegisterCustomEventType(); |
162 | 166 |
163 } // namespace ui | 167 } // namespace ui |
164 | 168 |
165 #endif // UI_EVENTS_EVENT_UTILS_H_ | 169 #endif // UI_EVENTS_EVENT_UTILS_H_ |
OLD | NEW |