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_BASE_EVENTS_H_ | 5 #ifndef UI_BASE_EVENTS_H_ |
6 #define UI_BASE_EVENTS_H_ | 6 #define UI_BASE_EVENTS_H_ |
7 | 7 |
8 #include "base/event_types.h" | 8 #include "base/event_types.h" |
9 #include "ui/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); | 149 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); |
150 #endif | 150 #endif |
151 | 151 |
152 // Returns the KeyboardCode from a native event. | 152 // Returns the KeyboardCode from a native event. |
153 UI_EXPORT KeyboardCode KeyboardCodeFromNative( | 153 UI_EXPORT KeyboardCode KeyboardCodeFromNative( |
154 const base::NativeEvent& native_event); | 154 const base::NativeEvent& native_event); |
155 | 155 |
156 // Returns true if the message is a mouse event. | 156 // Returns true if the message is a mouse event. |
157 UI_EXPORT bool IsMouseEvent(const base::NativeEvent& native_event); | 157 UI_EXPORT bool IsMouseEvent(const base::NativeEvent& native_event); |
158 | 158 |
| 159 // Returns the flags of the button that changed during a press/release. |
| 160 UI_EXPORT int GetChangedMouseButtonFlagsFromNative( |
| 161 const base::NativeEvent& native_event); |
| 162 |
159 // Gets the mouse wheel offset from a native event. | 163 // Gets the mouse wheel offset from a native event. |
160 UI_EXPORT int GetMouseWheelOffset(const base::NativeEvent& native_event); | 164 UI_EXPORT int GetMouseWheelOffset(const base::NativeEvent& native_event); |
161 | 165 |
162 // Gets the touch id from a native event. | 166 // Gets the touch id from a native event. |
163 UI_EXPORT int GetTouchId(const base::NativeEvent& native_event); | 167 UI_EXPORT int GetTouchId(const base::NativeEvent& native_event); |
164 | 168 |
165 // Gets the radius along the X/Y axis from a native event. Default is 1.0. | 169 // Gets the radius along the X/Y axis from a native event. Default is 1.0. |
166 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event); | 170 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event); |
167 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event); | 171 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event); |
168 | 172 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 UI_EXPORT int GetModifiersFromACCEL(const ACCEL& accel); | 214 UI_EXPORT int GetModifiersFromACCEL(const ACCEL& accel); |
211 | 215 |
212 // Returns true if |message| identifies a mouse event that was generated as the | 216 // Returns true if |message| identifies a mouse event that was generated as the |
213 // result of a touch event. | 217 // result of a touch event. |
214 UI_EXPORT bool IsMouseEventFromTouch(UINT message); | 218 UI_EXPORT bool IsMouseEventFromTouch(UINT message); |
215 #endif | 219 #endif |
216 | 220 |
217 } // namespace ui | 221 } // namespace ui |
218 | 222 |
219 #endif // UI_BASE_EVENTS_H_ | 223 #endif // UI_BASE_EVENTS_H_ |
OLD | NEW |