| 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 #include "ui/events/event_utils.h" | 5 #include "ui/events/event_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <X11/extensions/XInput.h> | 9 #include <X11/extensions/XInput.h> |
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) { | 87 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) { |
| 88 base::TimeTicks timestamp = EventTimeFromXEvent(*native_event); | 88 base::TimeTicks timestamp = EventTimeFromXEvent(*native_event); |
| 89 ValidateEventTimeClock(×tamp); | 89 ValidateEventTimeClock(×tamp); |
| 90 return timestamp; | 90 return timestamp; |
| 91 } | 91 } |
| 92 | 92 |
| 93 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) { | 93 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) { |
| 94 return EventLocationFromXEvent(*native_event); | 94 return EventLocationFromXEvent(*native_event); |
| 95 } | 95 } |
| 96 | 96 |
| 97 gfx::PointF EventLocationFromNativeF(const base::NativeEvent& native_event) { |
| 98 return gfx::PointF(EventLocationFromNative(native_event)); |
| 99 } |
| 100 |
| 97 gfx::Point EventSystemLocationFromNative( | 101 gfx::Point EventSystemLocationFromNative( |
| 98 const base::NativeEvent& native_event) { | 102 const base::NativeEvent& native_event) { |
| 99 return EventSystemLocationFromXEvent(*native_event); | 103 return EventSystemLocationFromXEvent(*native_event); |
| 100 } | 104 } |
| 101 | 105 |
| 102 int EventButtonFromNative(const base::NativeEvent& native_event) { | 106 int EventButtonFromNative(const base::NativeEvent& native_event) { |
| 103 return EventButtonFromXEvent(*native_event); | 107 return EventButtonFromXEvent(*native_event); |
| 104 } | 108 } |
| 105 | 109 |
| 106 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) { | 110 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 xievent->detail = | 232 xievent->detail = |
| 229 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); | 233 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); |
| 230 break; | 234 break; |
| 231 } | 235 } |
| 232 default: | 236 default: |
| 233 break; | 237 break; |
| 234 } | 238 } |
| 235 } | 239 } |
| 236 | 240 |
| 237 } // namespace ui | 241 } // namespace ui |
| OLD | NEW |