Chromium Code Reviews| 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_BASE_EVENTS_H_ | 5 #ifndef UI_BASE_EVENTS_H_ |
| 6 #define UI_BASE_EVENTS_H_ | 6 #define UI_BASE_EVENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 // Gets the radius along the X/Y axis from a native event. Default is 1.0. | 96 // Gets the radius along the X/Y axis from a native event. Default is 1.0. |
| 97 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event); | 97 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event); |
| 98 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event); | 98 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event); |
| 99 | 99 |
| 100 // Gets the angle of the major axis away from the X axis. Default is 0.0. | 100 // Gets the angle of the major axis away from the X axis. Default is 0.0. |
| 101 UI_EXPORT float GetTouchAngle(const base::NativeEvent& native_event); | 101 UI_EXPORT float GetTouchAngle(const base::NativeEvent& native_event); |
| 102 | 102 |
| 103 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0. | 103 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0. |
| 104 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); | 104 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); |
| 105 | 105 |
| 106 #if defined(USE_X11) | |
|
rjkroege
2011/11/10 16:34:40
can you move this code to your test? They do not s
Gajen
2011/11/11 13:39:07
Done.
| |
| 107 // All Below methods are intended for testing touch to mouse event conversion in | |
| 108 // views_unittests. | |
| 109 // Get test XEvent with all bits set to 'x0'. | |
| 110 UI_EXPORT base::NativeEvent GetNativeEventForTesting(); | |
| 111 | |
| 112 // Set location of native event. | |
| 113 UI_EXPORT void SetNativeEventLocationForTesting( | |
| 114 const base::NativeEvent& native_event, | |
| 115 int x, int y); | |
| 116 #endif | |
| 117 | |
| 106 } // namespace ui | 118 } // namespace ui |
| 107 | 119 |
| 108 #endif // UI_BASE_EVENTS_H_ | 120 #endif // UI_BASE_EVENTS_H_ |
| OLD | NEW |